diff options
author | Justin Clarke Casey | 2009-04-22 18:15:43 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-22 18:15:43 +0000 |
commit | 2c81e41c8a884ece643f3079349b033d03b6b774 (patch) | |
tree | bea7956ef00378f47fa420e82ffb665a137a9630 /OpenSim/Region/Communications/Hypergrid | |
parent | From: Alan Webb <alan_webb@us.ibm.com> (diff) | |
download | opensim-SC-2c81e41c8a884ece643f3079349b033d03b6b774.zip opensim-SC-2c81e41c8a884ece643f3079349b033d03b6b774.tar.gz opensim-SC-2c81e41c8a884ece643f3079349b033d03b6b774.tar.bz2 opensim-SC-2c81e41c8a884ece643f3079349b033d03b6b774.tar.xz |
* Fission OGS1UserServices into user service and OGS1 user data plugin components
* Make OGS1UserServices inherit from UserManagerBase
* This allows grid mode regions to use the same user data plugin infrastructure as grid servers and standalone OpenSims
Diffstat (limited to 'OpenSim/Region/Communications/Hypergrid')
-rw-r--r-- | OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Hypergrid/HGUserServices.cs | 33 |
2 files changed, 9 insertions, 35 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index 2ef0fd3..1268237 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs | |||
@@ -31,6 +31,7 @@ using OpenSim.Framework; | |||
31 | using OpenSim.Framework.Communications; | 31 | using OpenSim.Framework.Communications; |
32 | using OpenSim.Framework.Communications.Cache; | 32 | using OpenSim.Framework.Communications.Cache; |
33 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
34 | using OpenSim.Region.Communications.OGS1; | ||
34 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
35 | 36 | ||
36 | namespace OpenSim.Region.Communications.Hypergrid | 37 | namespace OpenSim.Region.Communications.Hypergrid |
@@ -51,7 +52,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
51 | IAssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder) | 52 | IAssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder) |
52 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) | 53 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) |
53 | { | 54 | { |
54 | |||
55 | // From constructor at CommunicationsOGS1 | 55 | // From constructor at CommunicationsOGS1 |
56 | HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, httpServer, assetCache, sman, m_userProfileCacheService); | 56 | HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, httpServer, assetCache, sman, m_userProfileCacheService); |
57 | m_gridService = gridInterComms; | 57 | m_gridService = gridInterComms; |
@@ -63,12 +63,15 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
63 | AddSecureInventoryService(invService); | 63 | AddSecureInventoryService(invService); |
64 | m_defaultInventoryHost = invService.Host; | 64 | m_defaultInventoryHost = invService.Host; |
65 | if (SecureInventoryService != null) | 65 | if (SecureInventoryService != null) |
66 | m_log.Info("[HG] SecureInventoryService."); | 66 | m_log.Info("[HG]: SecureInventoryService."); |
67 | else | 67 | else |
68 | m_log.Info("[HG] Non-secureInventoryService."); | 68 | m_log.Info("[HG]: Non-secureInventoryService."); |
69 | |||
70 | 69 | ||
71 | HGUserServices userServices = new HGUserServices(this); | 70 | HGUserServices userServices = new HGUserServices(this); |
71 | // This plugin arrangement could eventually be configurable rather than hardcoded here. | ||
72 | OGS1UserDataPlugin userDataPlugin = new OGS1UserDataPlugin(this); | ||
73 | userServices.AddPlugin(userDataPlugin); | ||
74 | |||
72 | m_userService = userServices; | 75 | m_userService = userServices; |
73 | m_messageService = userServices; | 76 | m_messageService = userServices; |
74 | m_avatarService = (IAvatarService)m_userService; | 77 | m_avatarService = (IAvatarService)m_userService; |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs index 370ef12..357d8a6 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
59 | 59 | ||
60 | // Constructor called when running in standalone | 60 | // Constructor called when running in standalone |
61 | public HGUserServices(LocalUserServices local) | 61 | public HGUserServices(LocalUserServices local) |
62 | : base(null) | ||
62 | { | 63 | { |
63 | m_localUserServices = local; | 64 | m_localUserServices = local; |
64 | } | 65 | } |
@@ -101,30 +102,12 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
101 | base.LogOffUser(userid, regionid, regionhandle, position, lookat); | 102 | base.LogOffUser(userid, regionid, regionhandle, position, lookat); |
102 | } | 103 | } |
103 | 104 | ||
104 | /// <summary> | ||
105 | /// Logs off a user on the user server (deprecated as of 2008-08-27) | ||
106 | /// </summary> | ||
107 | /// <param name="UserID">UUID of the user</param> | ||
108 | /// <param name="regionID">UUID of the Region</param> | ||
109 | /// <param name="regionhandle">regionhandle</param> | ||
110 | /// <param name="posx">final position x</param> | ||
111 | /// <param name="posy">final position y</param> | ||
112 | /// <param name="posz">final position z</param> | ||
113 | public override void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz) | ||
114 | { | ||
115 | string url = string.Empty; | ||
116 | if ((m_localUserServices != null) && !IsForeignUser(userid, out url)) | ||
117 | m_localUserServices.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); | ||
118 | else | ||
119 | base.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); | ||
120 | } | ||
121 | |||
122 | public override UserProfileData GetUserProfile(string firstName, string lastName) | 105 | public override UserProfileData GetUserProfile(string firstName, string lastName) |
123 | { | 106 | { |
124 | if (m_localUserServices != null) | 107 | if (m_localUserServices != null) |
125 | return m_localUserServices.GetUserProfile(firstName, lastName); | 108 | return m_localUserServices.GetUserProfile(firstName, lastName); |
126 | 109 | ||
127 | return GetUserProfile(firstName + " " + lastName); | 110 | return base.GetUserProfile(firstName, lastName); |
128 | } | 111 | } |
129 | 112 | ||
130 | public override List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) | 113 | public override List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) |
@@ -140,18 +123,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
140 | /// </summary> | 123 | /// </summary> |
141 | /// <param name="avatarID"></param> | 124 | /// <param name="avatarID"></param> |
142 | /// <returns>null if the request fails</returns> | 125 | /// <returns>null if the request fails</returns> |
143 | public override UserProfileData GetUserProfile(string name) | ||
144 | { | ||
145 | // This doesn't exist in LocalUserServices | ||
146 | |||
147 | return base.GetUserProfile(name); | ||
148 | } | ||
149 | |||
150 | /// <summary> | ||
151 | /// Get a user profile from the user server | ||
152 | /// </summary> | ||
153 | /// <param name="avatarID"></param> | ||
154 | /// <returns>null if the request fails</returns> | ||
155 | public override UserProfileData GetUserProfile(UUID avatarID) | 126 | public override UserProfileData GetUserProfile(UUID avatarID) |
156 | { | 127 | { |
157 | //string url = string.Empty; | 128 | //string url = string.Empty; |