aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs')
-rw-r--r--OpenSim/Grid/UserServer.Modules/UserDataBaseService.cs43
1 files changed, 43 insertions, 0 deletions
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;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
37using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
38using OpenSim.Grid.Framework;
38 39
39namespace OpenSim.Grid.UserServer.Modules 40namespace OpenSim.Grid.UserServer.Modules
40{ 41{
41 public class UserDataBaseService : UserManagerBase 42 public class UserDataBaseService : UserManagerBase
42 { 43 {
44 protected IUGAIMCore m_core;
45
43 public UserDataBaseService() 46 public UserDataBaseService()
44 : base(null) 47 : base(null)
45 { 48 {
@@ -50,6 +53,46 @@ namespace OpenSim.Grid.UserServer.Modules
50 { 53 {
51 } 54 }
52 55
56 public void Initialise(IUGAIMCore core)
57 {
58 m_core = core;
59
60 //we only need core components so we can request them from here
61 IInterServiceInventoryServices inventoryService;
62 if (m_core.TryGet<IInterServiceInventoryServices>(out inventoryService))
63 {
64 m_interServiceInventoryService = inventoryService;
65 }
66
67 UserConfig cfg;
68 if (m_core.TryGet<UserConfig>(out cfg))
69 {
70 AddPlugin(cfg.DatabaseProvider, cfg.DatabaseConnect);
71 }
72
73 m_core.RegisterInterface<UserDataBaseService>(this);
74 }
75
76 public void PostInitialise()
77 {
78 }
79
80 public void RegisterHandlers(BaseHttpServer httpServer)
81 {
82 }
83
84 public UserAgentData GetUserAgentData(UUID AgentID)
85 {
86 UserProfileData userProfile = GetUserProfile(AgentID);
87
88 if (userProfile != null)
89 {
90 return userProfile.CurrentAgent;
91 }
92
93 return null;
94 }
95
53 public override UserProfileData SetupMasterUser(string firstName, string lastName) 96 public override UserProfileData SetupMasterUser(string firstName, string lastName)
54 { 97 {
55 throw new Exception("The method or operation is not implemented."); 98 throw new Exception("The method or operation is not implemented.");