aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccount/RemoteUserAccountServiceConnector.cs
diff options
context:
space:
mode:
authorDiva Canto2009-12-29 15:58:40 -0800
committerDiva Canto2009-12-29 15:58:40 -0800
commitb4483df2701483aabd43fc7d03ebd74770d70170 (patch)
treed36e88b1409e438be222e0a994b6ca563fe26850 /OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccount/RemoteUserAccountServiceConnector.cs
parentTighten up the IUserService interface again. No need for auth tokens at this ... (diff)
downloadopensim-SC_OLD-b4483df2701483aabd43fc7d03ebd74770d70170.zip
opensim-SC_OLD-b4483df2701483aabd43fc7d03ebd74770d70170.tar.gz
opensim-SC_OLD-b4483df2701483aabd43fc7d03ebd74770d70170.tar.bz2
opensim-SC_OLD-b4483df2701483aabd43fc7d03ebd74770d70170.tar.xz
* All modules and connectors for user account service are in place. Untested.
* Cleaned up a few things on presence connectors
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccount/RemoteUserAccountServiceConnector.cs (renamed from OpenSim/Services/Connectors/User/UserServiceConnector.cs)94
1 files changed, 47 insertions, 47 deletions
diff --git a/OpenSim/Services/Connectors/User/UserServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccount/RemoteUserAccountServiceConnector.cs
index 0de8c1d..0b72080 100644
--- a/OpenSim/Services/Connectors/User/UserServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccount/RemoteUserAccountServiceConnector.cs
@@ -25,90 +25,90 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using log4net;
29using System; 28using System;
30using System.Collections.Generic;
31using System.IO;
32using System.Reflection;
33using Nini.Config; 29using Nini.Config;
34using OpenSim.Framework; 30using log4net;
35using OpenSim.Framework.Communications; 31using System.Reflection;
36using OpenSim.Framework.Servers.HttpServer; 32using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes;
37using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
38using OpenMetaverse; 35using OpenSim.Services.Connectors;
39 36
40namespace OpenSim.Services.Connectors 37namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.User
41{ 38{
42 public class UserServicesConnector : IUserAccountService 39 public class RemoteUserAccountServicesConnector : UserAccountServicesConnector,
40 ISharedRegionModule, IUserAccountService
43 { 41 {
44 private static readonly ILog m_log = 42 private static readonly ILog m_log =
45 LogManager.GetLogger( 43 LogManager.GetLogger(
46 MethodBase.GetCurrentMethod().DeclaringType); 44 MethodBase.GetCurrentMethod().DeclaringType);
47 45
48// private string m_ServerURI = String.Empty; 46 private bool m_Enabled = false;
49
50 public UserServicesConnector()
51 {
52 }
53 47
54 public UserServicesConnector(string serverURI) 48 public Type ReplaceableInterface
55 { 49 {
56// m_ServerURI = serverURI.TrimEnd('/'); 50 get { return null; }
57 } 51 }
58 52
59 public UserServicesConnector(IConfigSource source) 53 public string Name
60 { 54 {
61 Initialise(source); 55 get { return "RemoteUserAccountServicesConnector"; }
62 } 56 }
63 57
64 public virtual void Initialise(IConfigSource source) 58 public override void Initialise(IConfigSource source)
65 { 59 {
66 IConfig assetConfig = source.Configs["UserService"]; 60 IConfig moduleConfig = source.Configs["Modules"];
67 if (assetConfig == null) 61 if (moduleConfig != null)
68 { 62 {
69 m_log.Error("[USER CONNECTOR]: UserService missing from OpanSim.ini"); 63 string name = moduleConfig.GetString("UserServices", "");
70 throw new Exception("User connector init error"); 64 if (name == Name)
71 } 65 {
66 IConfig userConfig = source.Configs["UserService"];
67 if (userConfig == null)
68 {
69 m_log.Error("[USER CONNECTOR]: UserService missing from OpanSim.ini");
70 return;
71 }
72 72
73 string serviceURI = assetConfig.GetString("UserServerURI", 73 m_Enabled = true;
74 String.Empty);
75 74
76 if (serviceURI == String.Empty) 75 base.Initialise(source);
77 { 76
78 m_log.Error("[USER CONNECTOR]: No Server URI named in section UserService"); 77 m_log.Info("[USER CONNECTOR]: Remote users enabled");
79 throw new Exception("User connector init error"); 78 }
80 } 79 }
81 //m_ServerURI = serviceURI;
82 } 80 }
83 81
84 public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) 82 public void PostInitialise()
85 { 83 {
86 return null; 84 if (!m_Enabled)
85 return;
87 } 86 }
88 87
89 public UserAccount GetUserAccount(UUID scopeID, string email) 88 public void Close()
90 { 89 {
91 return null; 90 if (!m_Enabled)
92 } 91 return;
93
94 public UserAccount GetUserAccount(UUID scopeID, UUID userID)
95 {
96 return null;
97 } 92 }
98 93
99 public bool SetUserAccount(UserAccount data) 94 public void AddRegion(Scene scene)
100 { 95 {
101 return false; 96 if (!m_Enabled)
97 return;
98
99 scene.RegisterModuleInterface<IUserAccountService>(this);
102 } 100 }
103 101
104 public bool CreateUserAccount(UserAccount data) 102 public void RemoveRegion(Scene scene)
105 { 103 {
106 return false; 104 if (!m_Enabled)
105 return;
107 } 106 }
108 107
109 public List<UserAccount> GetUserAccounts(UUID scopeID, string query) 108 public void RegionLoaded(Scene scene)
110 { 109 {
111 return null; 110 if (!m_Enabled)
111 return;
112 } 112 }
113 } 113 }
114} 114}