From bc0bedf75d219e1ceda337cade1d47a5c7b18712 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 24 Feb 2009 19:00:36 +0000 Subject: More work on modulising the User Server. --- .../Grid/UserServer.Modules/UserDataBaseService.cs | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs') diff --git a/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs b/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs index 1fcc623..ef59cac 100644 --- a/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs +++ b/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs @@ -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(out inventoryService)) + { + m_interServiceInventoryService = inventoryService; + } + + UserConfig cfg; + if (m_core.TryGet(out cfg)) + { + AddPlugin(cfg.DatabaseProvider, cfg.DatabaseConnect); + } + + m_core.RegisterInterface(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."); -- cgit v1.1