diff options
author | Melanie Thielker | 2009-06-22 13:14:48 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-06-22 13:14:48 +0000 |
commit | 77ebb7c9f30acaad1cc44a2bce799d05282a5f48 (patch) | |
tree | be420f70ce4601ad6529c5537de3e1dfc3075811 /OpenSim/Region/CoreModules/ServiceConnectorsOut | |
parent | Committing the meat of the user server interface and the bones of the service... (diff) | |
download | opensim-SC-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.zip opensim-SC-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.gz opensim-SC-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.bz2 opensim-SC-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.xz |
Committing RemoteUserServiceConnector out connector, local user service
connector and the glue code.
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/User/LocalUserServiceConnector.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs | 25 |
2 files changed, 26 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/LocalUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/LocalUserServiceConnector.cs index f364999..1efb8f6 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/LocalUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/LocalUserServiceConnector.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
42 | LogManager.GetLogger( | 42 | LogManager.GetLogger( |
43 | MethodBase.GetCurrentMethod().DeclaringType); | 43 | MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | private IUserService m_UserService; | 45 | private IUserDataService m_UserService; |
46 | 46 | ||
47 | private bool m_Enabled = false; | 47 | private bool m_Enabled = false; |
48 | 48 | ||
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
77 | 77 | ||
78 | Object[] args = new Object[] { source }; | 78 | Object[] args = new Object[] { source }; |
79 | m_UserService = | 79 | m_UserService = |
80 | ServerUtils.LoadPlugin<IUserService>(serviceDll, | 80 | ServerUtils.LoadPlugin<IUserDataService>(serviceDll, |
81 | args); | 81 | args); |
82 | 82 | ||
83 | if (m_UserService == null) | 83 | if (m_UserService == null) |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
108 | if (!m_Enabled) | 108 | if (!m_Enabled) |
109 | return; | 109 | return; |
110 | 110 | ||
111 | scene.RegisterModuleInterface<IUserService>(m_UserService); | 111 | scene.RegisterModuleInterface<IUserDataService>(m_UserService); |
112 | } | 112 | } |
113 | 113 | ||
114 | public void RemoveRegion(Scene scene) | 114 | public void RemoveRegion(Scene scene) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs index 00a2478..2e9739b 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs | |||
@@ -26,14 +26,22 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using Nini.Config; | 28 | using Nini.Config; |
29 | using log4net; | ||
30 | using System.Reflection; | ||
29 | using OpenSim.Region.Framework.Interfaces; | 31 | using OpenSim.Region.Framework.Interfaces; |
30 | using OpenSim.Region.Framework.Scenes; | 32 | using OpenSim.Region.Framework.Scenes; |
31 | using OpenSim.Services.Interfaces; | 33 | using OpenSim.Services.Interfaces; |
34 | using OpenSim.Services.Connectors; | ||
32 | 35 | ||
33 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | 36 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User |
34 | { | 37 | { |
35 | public class RemoteUserServicesConnector : ISharedRegionModule | 38 | public class RemoteUserServicesConnector : UserServicesConnector, |
39 | ISharedRegionModule, IUserDataService | ||
36 | { | 40 | { |
41 | private static readonly ILog m_log = | ||
42 | LogManager.GetLogger( | ||
43 | MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
37 | private bool m_Enabled = false; | 45 | private bool m_Enabled = false; |
38 | 46 | ||
39 | public string Name | 47 | public string Name |
@@ -41,7 +49,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
41 | get { return "RemoteUserServicesConnector"; } | 49 | get { return "RemoteUserServicesConnector"; } |
42 | } | 50 | } |
43 | 51 | ||
44 | public void Initialise(IConfigSource source) | 52 | public override void Initialise(IConfigSource source) |
45 | { | 53 | { |
46 | IConfig moduleConfig = source.Configs["Modules"]; | 54 | IConfig moduleConfig = source.Configs["Modules"]; |
47 | if (moduleConfig != null) | 55 | if (moduleConfig != null) |
@@ -49,7 +57,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
49 | string name = moduleConfig.GetString("UserServices", ""); | 57 | string name = moduleConfig.GetString("UserServices", ""); |
50 | if (name == Name) | 58 | if (name == Name) |
51 | { | 59 | { |
60 | IConfig userConfig = source.Configs["UserService"]; | ||
61 | if (userConfig == null) | ||
62 | { | ||
63 | m_log.Error("[USER CONNECTOR]: UserService missing from OpanSim.ini"); | ||
64 | return; | ||
65 | } | ||
66 | |||
52 | m_Enabled = true; | 67 | m_Enabled = true; |
68 | |||
69 | base.Initialise(source); | ||
70 | |||
71 | m_log.Info("[USER CONNECTOR]: Remote users enabled"); | ||
53 | } | 72 | } |
54 | } | 73 | } |
55 | } | 74 | } |
@@ -70,6 +89,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User | |||
70 | { | 89 | { |
71 | if (!m_Enabled) | 90 | if (!m_Enabled) |
72 | return; | 91 | return; |
92 | |||
93 | scene.RegisterModuleInterface<IUserDataService>(this); | ||
73 | } | 94 | } |
74 | 95 | ||
75 | public void RemoveRegion(Scene scene) | 96 | public void RemoveRegion(Scene scene) |