aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorlbsa712009-02-12 10:16:11 +0000
committerlbsa712009-02-12 10:16:11 +0000
commitc3a4810e91a0357af9e8a9f0e43d450f3bb1b16f (patch)
tree79c6588848b4631ae3bf43217d9679272528d689
parent* Applied some CCC (Code Convention Conformance) (diff)
downloadopensim-SC-c3a4810e91a0357af9e8a9f0e43d450f3bb1b16f.zip
opensim-SC-c3a4810e91a0357af9e8a9f0e43d450f3bb1b16f.tar.gz
opensim-SC-c3a4810e91a0357af9e8a9f0e43d450f3bb1b16f.tar.bz2
opensim-SC-c3a4810e91a0357af9e8a9f0e43d450f3bb1b16f.tar.xz
* Turned RegionProfileService non-static
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/RegionProfileService.cs8
-rw-r--r--OpenSim/Grid/UserServer/Main.cs3
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs12
3 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Data/RegionProfileService.cs b/OpenSim/Data/RegionProfileService.cs
index f30bd1e..0cd4021 100644
--- a/OpenSim/Data/RegionProfileService.cs
+++ b/OpenSim/Data/RegionProfileService.cs
@@ -13,7 +13,7 @@ namespace OpenSim.Data
13 /// <summary> 13 /// <summary>
14 /// Request sim data based on arbitrary key/value 14 /// Request sim data based on arbitrary key/value
15 /// </summary> 15 /// </summary>
16 private static RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue) 16 private RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue)
17 { 17 {
18 Hashtable requestData = new Hashtable(); 18 Hashtable requestData = new Hashtable();
19 requestData[keyField] = keyValue; 19 requestData[keyField] = keyValue;
@@ -57,7 +57,7 @@ namespace OpenSim.Data
57 /// <param name="gridserverRecvkey"></param> 57 /// <param name="gridserverRecvkey"></param>
58 /// <returns>The sim profile. Null if there was a request failure</returns> 58 /// <returns>The sim profile. Null if there was a request failure</returns>
59 /// <remarks>This method should be statics</remarks> 59 /// <remarks>This method should be statics</remarks>
60 public static RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl, 60 public RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
61 string gridserverSendkey, string gridserverRecvkey) 61 string gridserverSendkey, string gridserverRecvkey)
62 { 62 {
63 return RequestSimData(gridserverUrl, gridserverSendkey, "region_UUID", regionId.Guid.ToString()); 63 return RequestSimData(gridserverUrl, gridserverSendkey, "region_UUID", regionId.Guid.ToString());
@@ -71,7 +71,7 @@ namespace OpenSim.Data
71 /// <param name="gridserver_sendkey"></param> 71 /// <param name="gridserver_sendkey"></param>
72 /// <param name="gridserver_recvkey"></param> 72 /// <param name="gridserver_recvkey"></param>
73 /// <returns>The sim profile. Null if there was a request failure</returns> 73 /// <returns>The sim profile. Null if there was a request failure</returns>
74 public static RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url, 74 public RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url,
75 string gridserver_sendkey, string gridserver_recvkey) 75 string gridserver_sendkey, string gridserver_recvkey)
76 { 76 {
77 return RequestSimData(gridserver_url, gridserver_sendkey, "region_handle", region_handle.ToString()); 77 return RequestSimData(gridserver_url, gridserver_sendkey, "region_handle", region_handle.ToString());
@@ -85,7 +85,7 @@ namespace OpenSim.Data
85 /// <param name="gridserverSendkey"></param> 85 /// <param name="gridserverSendkey"></param>
86 /// <param name="gridserverRecvkey"></param> 86 /// <param name="gridserverRecvkey"></param>
87 /// <returns>The sim profile. Null if there was a request failure</returns> 87 /// <returns>The sim profile. Null if there was a request failure</returns>
88 public static RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl, 88 public RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
89 string gridserverSendkey, string gridserverRecvkey) 89 string gridserverSendkey, string gridserverRecvkey)
90 { 90 {
91 return RequestSimData(gridserverUrl, gridserverSendkey, "region_name_search", regionName ); 91 return RequestSimData(gridserverUrl, gridserverSendkey, "region_name_search", regionName );
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 3f75838..70aaea3 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -32,6 +32,7 @@ using System.Reflection;
32using log4net; 32using log4net;
33using log4net.Config; 33using log4net.Config;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Data;
35using OpenSim.Framework; 36using OpenSim.Framework;
36using OpenSim.Framework.Communications; 37using OpenSim.Framework.Communications;
37using OpenSim.Framework.Communications.Cache; 38using OpenSim.Framework.Communications.Cache;
@@ -167,7 +168,7 @@ namespace OpenSim.Grid.UserServer
167 protected virtual void StartupLoginService(IInterServiceInventoryServices inventoryService) 168 protected virtual void StartupLoginService(IInterServiceInventoryServices inventoryService)
168 { 169 {
169 m_loginService = new UserLoginService( 170 m_loginService = new UserLoginService(
170 m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg); 171 m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg, new RegionProfileService());
171 } 172 }
172 173
173 protected virtual void AddHttpHandlers() 174 protected virtual void AddHttpHandlers()
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 7dce157..b11714a 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -59,15 +59,17 @@ namespace OpenSim.Grid.UserServer
59 private UserLoggedInAtLocation handlerUserLoggedInAtLocation; 59 private UserLoggedInAtLocation handlerUserLoggedInAtLocation;
60 60
61 public UserConfig m_config; 61 public UserConfig m_config;
62 private readonly RegionProfileService m_regionProfileService;
62 63
63 public UserLoginService( 64 public UserLoginService(
64 UserManagerBase userManager, IInterServiceInventoryServices inventoryService, 65 UserManagerBase userManager, IInterServiceInventoryServices inventoryService,
65 LibraryRootFolder libraryRootFolder, 66 LibraryRootFolder libraryRootFolder,
66 UserConfig config, string welcomeMess) 67 UserConfig config, string welcomeMess, RegionProfileService regionProfileService)
67 : base(userManager, libraryRootFolder, welcomeMess) 68 : base(userManager, libraryRootFolder, welcomeMess)
68 { 69 {
69 m_config = config; 70 m_config = config;
70 m_inventoryService = inventoryService; 71 m_inventoryService = inventoryService;
72 m_regionProfileService = regionProfileService;
71 } 73 }
72 74
73 public void setloginlevel(int level) 75 public void setloginlevel(int level)
@@ -86,7 +88,7 @@ namespace OpenSim.Grid.UserServer
86 RegionProfileData SimInfo; 88 RegionProfileData SimInfo;
87 try 89 try
88 { 90 {
89 SimInfo = RegionProfileService.RequestSimProfileData( 91 SimInfo = m_regionProfileService.RequestSimProfileData(
90 theUser.CurrentAgent.Handle, m_config.GridServerURL, 92 theUser.CurrentAgent.Handle, m_config.GridServerURL,
91 m_config.GridSendKey, m_config.GridRecvKey); 93 m_config.GridSendKey, m_config.GridRecvKey);
92 94
@@ -302,20 +304,20 @@ namespace OpenSim.Grid.UserServer
302 304
303 protected RegionProfileData RequestClosestRegion(string region) 305 protected RegionProfileData RequestClosestRegion(string region)
304 { 306 {
305 return RegionProfileService.RequestSimProfileData(region, 307 return m_regionProfileService.RequestSimProfileData(region,
306 m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); 308 m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
307 } 309 }
308 310
309 protected RegionProfileData GetRegionInfo(ulong homeRegionHandle) 311 protected RegionProfileData GetRegionInfo(ulong homeRegionHandle)
310 { 312 {
311 return RegionProfileService.RequestSimProfileData(homeRegionHandle, 313 return m_regionProfileService.RequestSimProfileData(homeRegionHandle,
312 m_config.GridServerURL, m_config.GridSendKey, 314 m_config.GridServerURL, m_config.GridSendKey,
313 m_config.GridRecvKey); 315 m_config.GridRecvKey);
314 } 316 }
315 317
316 protected RegionProfileData GetRegionInfo(UUID homeRegionId) 318 protected RegionProfileData GetRegionInfo(UUID homeRegionId)
317 { 319 {
318 return RegionProfileService.RequestSimProfileData(homeRegionId, 320 return m_regionProfileService.RequestSimProfileData(homeRegionId,
319 m_config.GridServerURL, m_config.GridSendKey, 321 m_config.GridServerURL, m_config.GridSendKey,
320 m_config.GridRecvKey); 322 m_config.GridRecvKey);
321 } 323 }