More work on modulising the User Server.

This commit is contained in:
MW
2009-02-24 19:00:36 +00:00
parent 8645fa9215
commit bc0bedf75d
3 changed files with 99 additions and 35 deletions

View File

@@ -35,11 +35,14 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Servers;
using OpenSim.Grid.Framework;
namespace OpenSim.Grid.UserServer.Modules
{
public class UserDataBaseService : UserManagerBase
{
protected IUGAIMCore m_core;
public UserDataBaseService()
: base(null)
{
@@ -50,6 +53,46 @@ namespace OpenSim.Grid.UserServer.Modules
{
}
public void Initialise(IUGAIMCore core)
{
m_core = core;
//we only need core components so we can request them from here
IInterServiceInventoryServices inventoryService;
if (m_core.TryGet<IInterServiceInventoryServices>(out inventoryService))
{
m_interServiceInventoryService = inventoryService;
}
UserConfig cfg;
if (m_core.TryGet<UserConfig>(out cfg))
{
AddPlugin(cfg.DatabaseProvider, cfg.DatabaseConnect);
}
m_core.RegisterInterface<UserDataBaseService>(this);
}
public void PostInitialise()
{
}
public void RegisterHandlers(BaseHttpServer httpServer)
{
}
public UserAgentData GetUserAgentData(UUID AgentID)
{
UserProfileData userProfile = GetUserProfile(AgentID);
if (userProfile != null)
{
return userProfile.CurrentAgent;
}
return null;
}
public override UserProfileData SetupMasterUser(string firstName, string lastName)
{
throw new Exception("The method or operation is not implemented.");