diff options
author | Melanie Thielker | 2009-06-22 12:18:04 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-06-22 12:18:04 +0000 |
commit | 044446821b7d1d4550e43b0351c2611026874755 (patch) | |
tree | 2043005ce27cd5519b104c0d49e53ba78632b2bb /OpenSim/Services | |
parent | Formatting cleanup, ignore some generated files. (diff) | |
download | opensim-SC-044446821b7d1d4550e43b0351c2611026874755.zip opensim-SC-044446821b7d1d4550e43b0351c2611026874755.tar.gz opensim-SC-044446821b7d1d4550e43b0351c2611026874755.tar.bz2 opensim-SC-044446821b7d1d4550e43b0351c2611026874755.tar.xz |
Committing the meat of the user server interface and the bones of the service implementation
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/AssetService/AssetServiceBase.cs | 22 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IUserService.cs | 45 | ||||
-rw-r--r-- | OpenSim/Services/UserService/UserService.cs | 24 |
3 files changed, 81 insertions, 10 deletions
diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs index c42d469..c60dd1f 100644 --- a/OpenSim/Services/AssetService/AssetServiceBase.cs +++ b/OpenSim/Services/AssetService/AssetServiceBase.cs | |||
@@ -46,23 +46,25 @@ namespace OpenSim.Services.AssetService | |||
46 | string connString = String.Empty; | 46 | string connString = String.Empty; |
47 | 47 | ||
48 | // | 48 | // |
49 | // Try reading the [DatabaseService] section first, if it exists | 49 | // Try reading the [AssetService] section first, if it exists |
50 | // | 50 | // |
51 | IConfig dbConfig = config.Configs["DatabaseService"]; | 51 | IConfig assetConfig = config.Configs["AssetService"]; |
52 | if (dbConfig != null) | 52 | if (assetConfig != null) |
53 | { | 53 | { |
54 | dllName = dbConfig.GetString("StorageProvider", String.Empty); | 54 | dllName = assetConfig.GetString("StorageProvider", dllName); |
55 | connString = dbConfig.GetString("ConnectionString", String.Empty); | 55 | connString = assetConfig.GetString("ConnectionString", connString); |
56 | } | 56 | } |
57 | 57 | ||
58 | // | 58 | // |
59 | // Try reading the more specific [AssetService] section, if it exists | 59 | // Try reading the [DatabaseService] section, if it exists |
60 | // | 60 | // |
61 | IConfig assetConfig = config.Configs["AssetService"]; | 61 | IConfig dbConfig = config.Configs["DatabaseService"]; |
62 | if (assetConfig != null) | 62 | if (dbConfig != null) |
63 | { | 63 | { |
64 | dllName = assetConfig.GetString("StorageProvider", dllName); | 64 | if (dllName != String.Empty) |
65 | connString = assetConfig.GetString("ConnectionString", connString); | 65 | dllName = dbConfig.GetString("StorageProvider", String.Empty); |
66 | if (connString != String.Empty) | ||
67 | connString = dbConfig.GetString("ConnectionString", String.Empty); | ||
66 | } | 68 | } |
67 | 69 | ||
68 | // | 70 | // |
diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs index 051ee9a..823a86d 100644 --- a/OpenSim/Services/Interfaces/IUserService.cs +++ b/OpenSim/Services/Interfaces/IUserService.cs | |||
@@ -25,9 +25,54 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System.Collections.Generic; | ||
29 | using OpenMetaverse; | ||
30 | |||
28 | namespace OpenSim.Services.Interfaces | 31 | namespace OpenSim.Services.Interfaces |
29 | { | 32 | { |
33 | public class UserData | ||
34 | { | ||
35 | public string FirstName; | ||
36 | public string LastName; | ||
37 | public UUID UserID; | ||
38 | public UUID scopeID; | ||
39 | |||
40 | // For informational purposes only! | ||
41 | // | ||
42 | public string HomeRegionName; | ||
43 | |||
44 | public UUID HomeRegionID; | ||
45 | public float HomePositionX; | ||
46 | public float HomePositionY; | ||
47 | public float HomePositionZ; | ||
48 | public float HomeLookAtX; | ||
49 | public float HomeLookAtY; | ||
50 | public float HomeLookAtZ; | ||
51 | |||
52 | // There are here because they | ||
53 | // concern the account rather than | ||
54 | // the profile. They just happen to | ||
55 | // be used in the Linden profile as well | ||
56 | // | ||
57 | public int GodLevel; | ||
58 | public int UserFlags; | ||
59 | public string AccountType; | ||
60 | }; | ||
61 | |||
30 | public interface IUserService | 62 | public interface IUserService |
31 | { | 63 | { |
64 | UserData GetUserData(UUID scopeID, UUID userID); | ||
65 | UserData GetUserData(UUID scopeID, string FirstName, string LastName); | ||
66 | |||
67 | // This will set only the home region portion of the data! | ||
68 | // Can't be used to set god level, flags, type or change the name! | ||
69 | // | ||
70 | bool SetUserData(UserData data); | ||
71 | |||
72 | // Returns the list of avatars that matches both the search | ||
73 | // criterion and the scope ID passed | ||
74 | // ONLY THE NAME, SCOPE ID and UUID will be filled in! | ||
75 | // | ||
76 | List<UserData> GetAvatarPickerData(UUID scopeID, string query); | ||
32 | } | 77 | } |
33 | } | 78 | } |
diff --git a/OpenSim/Services/UserService/UserService.cs b/OpenSim/Services/UserService/UserService.cs index a725683..3443643 100644 --- a/OpenSim/Services/UserService/UserService.cs +++ b/OpenSim/Services/UserService/UserService.cs | |||
@@ -30,6 +30,8 @@ using System.Reflection; | |||
30 | using Nini.Config; | 30 | using Nini.Config; |
31 | using OpenSim.Data; | 31 | using OpenSim.Data; |
32 | using OpenSim.Services.Interfaces; | 32 | using OpenSim.Services.Interfaces; |
33 | using System.Collections.Generic; | ||
34 | using OpenMetaverse; | ||
33 | 35 | ||
34 | namespace OpenSim.Services.UserService | 36 | namespace OpenSim.Services.UserService |
35 | { | 37 | { |
@@ -38,5 +40,27 @@ namespace OpenSim.Services.UserService | |||
38 | public UserService(IConfigSource config) : base(config) | 40 | public UserService(IConfigSource config) : base(config) |
39 | { | 41 | { |
40 | } | 42 | } |
43 | |||
44 | public UserData GetUserData(UUID scopeID, string firstName, | ||
45 | string lastName) | ||
46 | { | ||
47 | return null; | ||
48 | } | ||
49 | |||
50 | public UserData GetUserData(UUID scopeID, UUID userID) | ||
51 | { | ||
52 | return null; | ||
53 | } | ||
54 | |||
55 | public bool SetUserData(UserData data) | ||
56 | { | ||
57 | return false; | ||
58 | } | ||
59 | |||
60 | public List<UserData> GetAvatarPickerData(UUID scopeID, | ||
61 | string query) | ||
62 | { | ||
63 | return null; | ||
64 | } | ||
41 | } | 65 | } |
42 | } | 66 | } |