diff options
* 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 | ||
28 | using log4net; | ||
29 | using System; | 28 | using System; |
30 | using System.Collections.Generic; | ||
31 | using System.IO; | ||
32 | using System.Reflection; | ||
33 | using Nini.Config; | 29 | using Nini.Config; |
34 | using OpenSim.Framework; | 30 | using log4net; |
35 | using OpenSim.Framework.Communications; | 31 | using System.Reflection; |
36 | using OpenSim.Framework.Servers.HttpServer; | 32 | using OpenSim.Region.Framework.Interfaces; |
33 | using OpenSim.Region.Framework.Scenes; | ||
37 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
38 | using OpenMetaverse; | 35 | using OpenSim.Services.Connectors; |
39 | 36 | ||
40 | namespace OpenSim.Services.Connectors | 37 | namespace 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 | } |