aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2009-06-22 13:14:48 +0000
committerMelanie Thielker2009-06-22 13:14:48 +0000
commit77ebb7c9f30acaad1cc44a2bce799d05282a5f48 (patch)
treebe420f70ce4601ad6529c5537de3e1dfc3075811 /OpenSim
parentCommitting the meat of the user server interface and the bones of the service... (diff)
downloadopensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.zip
opensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.gz
opensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.bz2
opensim-SC_OLD-77ebb7c9f30acaad1cc44a2bce799d05282a5f48.tar.xz
Committing RemoteUserServiceConnector out connector, local user service
connector and the glue code.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/User/LocalUserServiceConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/User/RemoteUserServiceConnector.cs25
-rw-r--r--OpenSim/Services/Interfaces/IUserService.cs5
-rw-r--r--OpenSim/Services/UserService/UserService.cs2
4 files changed, 29 insertions, 9 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
28using Nini.Config; 28using Nini.Config;
29using log4net;
30using System.Reflection;
29using OpenSim.Region.Framework.Interfaces; 31using OpenSim.Region.Framework.Interfaces;
30using OpenSim.Region.Framework.Scenes; 32using OpenSim.Region.Framework.Scenes;
31using OpenSim.Services.Interfaces; 33using OpenSim.Services.Interfaces;
34using OpenSim.Services.Connectors;
32 35
33namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User 36namespace 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)
diff --git a/OpenSim/Services/Interfaces/IUserService.cs b/OpenSim/Services/Interfaces/IUserService.cs
index 823a86d..eb77bd4 100644
--- a/OpenSim/Services/Interfaces/IUserService.cs
+++ b/OpenSim/Services/Interfaces/IUserService.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Services.Interfaces
35 public string FirstName; 35 public string FirstName;
36 public string LastName; 36 public string LastName;
37 public UUID UserID; 37 public UUID UserID;
38 public UUID scopeID; 38 public UUID ScopeID;
39 39
40 // For informational purposes only! 40 // For informational purposes only!
41 // 41 //
@@ -59,7 +59,7 @@ namespace OpenSim.Services.Interfaces
59 public string AccountType; 59 public string AccountType;
60 }; 60 };
61 61
62 public interface IUserService 62 public interface IUserDataService
63 { 63 {
64 UserData GetUserData(UUID scopeID, UUID userID); 64 UserData GetUserData(UUID scopeID, UUID userID);
65 UserData GetUserData(UUID scopeID, string FirstName, string LastName); 65 UserData GetUserData(UUID scopeID, string FirstName, string LastName);
@@ -71,7 +71,6 @@ namespace OpenSim.Services.Interfaces
71 71
72 // Returns the list of avatars that matches both the search 72 // Returns the list of avatars that matches both the search
73 // criterion and the scope ID passed 73 // criterion and the scope ID passed
74 // ONLY THE NAME, SCOPE ID and UUID will be filled in!
75 // 74 //
76 List<UserData> GetAvatarPickerData(UUID scopeID, string query); 75 List<UserData> GetAvatarPickerData(UUID scopeID, string query);
77 } 76 }
diff --git a/OpenSim/Services/UserService/UserService.cs b/OpenSim/Services/UserService/UserService.cs
index 3443643..5a6e5fb 100644
--- a/OpenSim/Services/UserService/UserService.cs
+++ b/OpenSim/Services/UserService/UserService.cs
@@ -35,7 +35,7 @@ using OpenMetaverse;
35 35
36namespace OpenSim.Services.UserService 36namespace OpenSim.Services.UserService
37{ 37{
38 public class UserService : UserServiceBase, IUserService 38 public class UserService : UserServiceBase, IUserDataService
39 { 39 {
40 public UserService(IConfigSource config) : base(config) 40 public UserService(IConfigSource config) : base(config)
41 { 41 {