* Renamed RegionProfileService to RegionProfileServiceProxy to better reflect actual use.

* Added IRegionProfileService
0.6.3-post-fixes
lbsa71 2009-02-12 10:21:21 +00:00
parent c3a4810e91
commit 6187888456
4 changed files with 48 additions and 4 deletions

View File

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
namespace OpenSim.Data
{
public interface IRegionProfileService
{
/// <summary>
/// Request sim profile information from a grid server, by Region UUID
/// </summary>
/// <param name="regionId">The region UUID to look for</param>
/// <param name="gridserverUrl"></param>
/// <param name="gridserverSendkey"></param>
/// <param name="gridserverRecvkey"></param>
/// <returns>The sim profile. Null if there was a request failure</returns>
/// <remarks>This method should be statics</remarks>
RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
string gridserverSendkey, string gridserverRecvkey);
/// <summary>
/// Request sim profile information from a grid server, by Region Handle
/// </summary>
/// <param name="region_handle">the region handle to look for</param>
/// <param name="gridserver_url"></param>
/// <param name="gridserver_sendkey"></param>
/// <param name="gridserver_recvkey"></param>
/// <returns>The sim profile. Null if there was a request failure</returns>
RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url,
string gridserver_sendkey, string gridserver_recvkey);
/// <summary>
/// Request sim profile information from a grid server, by Region Name
/// </summary>
/// <param name="regionName">the region name to look for</param>
/// <param name="gridserverUrl"></param>
/// <param name="gridserverSendkey"></param>
/// <param name="gridserverRecvkey"></param>
/// <returns>The sim profile. Null if there was a request failure</returns>
RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
string gridserverSendkey, string gridserverRecvkey);
}
}

View File

@ -8,7 +8,7 @@ using OpenSim.Framework;
namespace OpenSim.Data namespace OpenSim.Data
{ {
public class RegionProfileService public class RegionProfileServiceProxy : IRegionProfileService
{ {
/// <summary> /// <summary>
/// Request sim data based on arbitrary key/value /// Request sim data based on arbitrary key/value

View File

@ -168,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, new RegionProfileService()); m_userManager, inventoryService, new LibraryRootFolder(Cfg.LibraryXmlfile), Cfg, Cfg.DefaultStartupMsg, new RegionProfileServiceProxy());
} }
protected virtual void AddHttpHandlers() protected virtual void AddHttpHandlers()

View File

@ -59,12 +59,12 @@ namespace OpenSim.Grid.UserServer
private UserLoggedInAtLocation handlerUserLoggedInAtLocation; private UserLoggedInAtLocation handlerUserLoggedInAtLocation;
public UserConfig m_config; public UserConfig m_config;
private readonly RegionProfileService m_regionProfileService; private readonly IRegionProfileService m_regionProfileService;
public UserLoginService( public UserLoginService(
UserManagerBase userManager, IInterServiceInventoryServices inventoryService, UserManagerBase userManager, IInterServiceInventoryServices inventoryService,
LibraryRootFolder libraryRootFolder, LibraryRootFolder libraryRootFolder,
UserConfig config, string welcomeMess, RegionProfileService regionProfileService) UserConfig config, string welcomeMess, IRegionProfileService regionProfileService)
: base(userManager, libraryRootFolder, welcomeMess) : base(userManager, libraryRootFolder, welcomeMess)
{ {
m_config = config; m_config = config;