* Turned RegionProfileService non-static
parent
792b7cba2f
commit
c3a4810e91
|
@ -13,7 +13,7 @@ namespace OpenSim.Data
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request sim data based on arbitrary key/value
|
/// Request sim data based on arbitrary key/value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue)
|
private RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue)
|
||||||
{
|
{
|
||||||
Hashtable requestData = new Hashtable();
|
Hashtable requestData = new Hashtable();
|
||||||
requestData[keyField] = keyValue;
|
requestData[keyField] = keyValue;
|
||||||
|
@ -57,7 +57,7 @@ namespace OpenSim.Data
|
||||||
/// <param name="gridserverRecvkey"></param>
|
/// <param name="gridserverRecvkey"></param>
|
||||||
/// <returns>The sim profile. Null if there was a request failure</returns>
|
/// <returns>The sim profile. Null if there was a request failure</returns>
|
||||||
/// <remarks>This method should be statics</remarks>
|
/// <remarks>This method should be statics</remarks>
|
||||||
public static RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
|
public RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
|
||||||
string gridserverSendkey, string gridserverRecvkey)
|
string gridserverSendkey, string gridserverRecvkey)
|
||||||
{
|
{
|
||||||
return RequestSimData(gridserverUrl, gridserverSendkey, "region_UUID", regionId.Guid.ToString());
|
return RequestSimData(gridserverUrl, gridserverSendkey, "region_UUID", regionId.Guid.ToString());
|
||||||
|
@ -71,7 +71,7 @@ namespace OpenSim.Data
|
||||||
/// <param name="gridserver_sendkey"></param>
|
/// <param name="gridserver_sendkey"></param>
|
||||||
/// <param name="gridserver_recvkey"></param>
|
/// <param name="gridserver_recvkey"></param>
|
||||||
/// <returns>The sim profile. Null if there was a request failure</returns>
|
/// <returns>The sim profile. Null if there was a request failure</returns>
|
||||||
public static RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url,
|
public RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url,
|
||||||
string gridserver_sendkey, string gridserver_recvkey)
|
string gridserver_sendkey, string gridserver_recvkey)
|
||||||
{
|
{
|
||||||
return RequestSimData(gridserver_url, gridserver_sendkey, "region_handle", region_handle.ToString());
|
return RequestSimData(gridserver_url, gridserver_sendkey, "region_handle", region_handle.ToString());
|
||||||
|
@ -85,7 +85,7 @@ namespace OpenSim.Data
|
||||||
/// <param name="gridserverSendkey"></param>
|
/// <param name="gridserverSendkey"></param>
|
||||||
/// <param name="gridserverRecvkey"></param>
|
/// <param name="gridserverRecvkey"></param>
|
||||||
/// <returns>The sim profile. Null if there was a request failure</returns>
|
/// <returns>The sim profile. Null if there was a request failure</returns>
|
||||||
public static RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
|
public RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
|
||||||
string gridserverSendkey, string gridserverRecvkey)
|
string gridserverSendkey, string gridserverRecvkey)
|
||||||
{
|
{
|
||||||
return RequestSimData(gridserverUrl, gridserverSendkey, "region_name_search", regionName );
|
return RequestSimData(gridserverUrl, gridserverSendkey, "region_name_search", regionName );
|
||||||
|
|
|
@ -32,6 +32,7 @@ using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
using log4net.Config;
|
using log4net.Config;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Data;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
@ -167,7 +168,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
protected virtual void StartupLoginService(IInterServiceInventoryServices inventoryService)
|
protected virtual void StartupLoginService(IInterServiceInventoryServices inventoryService)
|
||||||
{
|
{
|
||||||
m_loginService = new UserLoginService(
|
m_loginService = new UserLoginService(
|
||||||
m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg);
|
m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg, new RegionProfileService());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void AddHttpHandlers()
|
protected virtual void AddHttpHandlers()
|
||||||
|
|
|
@ -59,15 +59,17 @@ namespace OpenSim.Grid.UserServer
|
||||||
private UserLoggedInAtLocation handlerUserLoggedInAtLocation;
|
private UserLoggedInAtLocation handlerUserLoggedInAtLocation;
|
||||||
|
|
||||||
public UserConfig m_config;
|
public UserConfig m_config;
|
||||||
|
private readonly RegionProfileService m_regionProfileService;
|
||||||
|
|
||||||
public UserLoginService(
|
public UserLoginService(
|
||||||
UserManagerBase userManager, IInterServiceInventoryServices inventoryService,
|
UserManagerBase userManager, IInterServiceInventoryServices inventoryService,
|
||||||
LibraryRootFolder libraryRootFolder,
|
LibraryRootFolder libraryRootFolder,
|
||||||
UserConfig config, string welcomeMess)
|
UserConfig config, string welcomeMess, RegionProfileService regionProfileService)
|
||||||
: base(userManager, libraryRootFolder, welcomeMess)
|
: base(userManager, libraryRootFolder, welcomeMess)
|
||||||
{
|
{
|
||||||
m_config = config;
|
m_config = config;
|
||||||
m_inventoryService = inventoryService;
|
m_inventoryService = inventoryService;
|
||||||
|
m_regionProfileService = regionProfileService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setloginlevel(int level)
|
public void setloginlevel(int level)
|
||||||
|
@ -86,7 +88,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
RegionProfileData SimInfo;
|
RegionProfileData SimInfo;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SimInfo = RegionProfileService.RequestSimProfileData(
|
SimInfo = m_regionProfileService.RequestSimProfileData(
|
||||||
theUser.CurrentAgent.Handle, m_config.GridServerURL,
|
theUser.CurrentAgent.Handle, m_config.GridServerURL,
|
||||||
m_config.GridSendKey, m_config.GridRecvKey);
|
m_config.GridSendKey, m_config.GridRecvKey);
|
||||||
|
|
||||||
|
@ -302,20 +304,20 @@ namespace OpenSim.Grid.UserServer
|
||||||
|
|
||||||
protected RegionProfileData RequestClosestRegion(string region)
|
protected RegionProfileData RequestClosestRegion(string region)
|
||||||
{
|
{
|
||||||
return RegionProfileService.RequestSimProfileData(region,
|
return m_regionProfileService.RequestSimProfileData(region,
|
||||||
m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
|
m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected RegionProfileData GetRegionInfo(ulong homeRegionHandle)
|
protected RegionProfileData GetRegionInfo(ulong homeRegionHandle)
|
||||||
{
|
{
|
||||||
return RegionProfileService.RequestSimProfileData(homeRegionHandle,
|
return m_regionProfileService.RequestSimProfileData(homeRegionHandle,
|
||||||
m_config.GridServerURL, m_config.GridSendKey,
|
m_config.GridServerURL, m_config.GridSendKey,
|
||||||
m_config.GridRecvKey);
|
m_config.GridRecvKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected RegionProfileData GetRegionInfo(UUID homeRegionId)
|
protected RegionProfileData GetRegionInfo(UUID homeRegionId)
|
||||||
{
|
{
|
||||||
return RegionProfileService.RequestSimProfileData(homeRegionId,
|
return m_regionProfileService.RequestSimProfileData(homeRegionId,
|
||||||
m_config.GridServerURL, m_config.GridSendKey,
|
m_config.GridServerURL, m_config.GridSendKey,
|
||||||
m_config.GridRecvKey);
|
m_config.GridRecvKey);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue