diff options
author | Melanie | 2010-03-03 02:07:03 +0000 |
---|---|---|
committer | Melanie | 2010-03-03 02:07:03 +0000 |
commit | 028a87fe37002e7a0611f66babf1deee46c83804 (patch) | |
tree | 387aec499fd60c2012bed8148e6a2ddc847c3d95 /OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs | |
parent | Revert "test" (diff) | |
parent | Fixes Region.Framework tests. Although these tests don't fail, they need to b... (diff) | |
download | opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.zip opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.gz opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.bz2 opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.xz |
Merge branch 'master' into careminster-presence-refactor
This brings careminster on the level of master. To be tested
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs (renamed from OpenSim/Services/Connectors/User/UserServiceConnector.cs) | 84 |
1 files changed, 26 insertions, 58 deletions
diff --git a/OpenSim/Services/Connectors/User/UserServiceConnector.cs b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs index 683990f..f2d9321 100644 --- a/OpenSim/Services/Connectors/User/UserServiceConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -25,90 +25,58 @@ | |||
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; | 29 | using System.Collections.Generic; |
31 | using System.IO; | ||
32 | using System.Reflection; | 30 | using System.Reflection; |
33 | using Nini.Config; | 31 | using Nini.Config; |
34 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications; | 33 | using OpenSim.Server.Base; |
36 | using OpenSim.Framework.Servers.HttpServer; | ||
37 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
38 | using OpenMetaverse; | 35 | using OpenSim.Framework.Servers.HttpServer; |
36 | using OpenSim.Server.Handlers.Base; | ||
39 | 37 | ||
40 | namespace OpenSim.Services.Connectors | 38 | using log4net; |
39 | |||
40 | namespace OpenSim.Server.Handlers.Hypergrid | ||
41 | { | 41 | { |
42 | public class UserServicesConnector : IUserAccountService | 42 | public class GatekeeperServiceInConnector : ServiceConnector |
43 | { | 43 | { |
44 | private static readonly ILog m_log = | 44 | private static readonly ILog m_log = |
45 | LogManager.GetLogger( | 45 | LogManager.GetLogger( |
46 | MethodBase.GetCurrentMethod().DeclaringType); | 46 | MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | // private string m_ServerURI = String.Empty; | 48 | private IGatekeeperService m_GatekeeperService; |
49 | 49 | public IGatekeeperService GateKeeper | |
50 | public UserServicesConnector() | ||
51 | { | 50 | { |
51 | get { return m_GatekeeperService; } | ||
52 | } | 52 | } |
53 | 53 | ||
54 | public UserServicesConnector(string serverURI) | 54 | public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, ISimulationService simService) : |
55 | base(config, server, String.Empty) | ||
55 | { | 56 | { |
56 | // m_ServerURI = serverURI.TrimEnd('/'); | 57 | IConfig gridConfig = config.Configs["GatekeeperService"]; |
57 | } | 58 | if (gridConfig != null) |
58 | |||
59 | public UserServicesConnector(IConfigSource source) | ||
60 | { | ||
61 | Initialise(source); | ||
62 | } | ||
63 | |||
64 | public virtual void Initialise(IConfigSource source) | ||
65 | { | ||
66 | IConfig assetConfig = source.Configs["UserService"]; | ||
67 | if (assetConfig == null) | ||
68 | { | 59 | { |
69 | m_log.Error("[USER CONNECTOR]: UserService missing from OpanSim.ini"); | 60 | string serviceDll = gridConfig.GetString("LocalServiceModule", string.Empty); |
70 | throw new Exception("User connector init error"); | 61 | Object[] args = new Object[] { config, simService }; |
71 | } | 62 | m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(serviceDll, args); |
72 | 63 | ||
73 | string serviceURI = assetConfig.GetString("UserServerURI", | ||
74 | String.Empty); | ||
75 | |||
76 | if (serviceURI == String.Empty) | ||
77 | { | ||
78 | m_log.Error("[USER CONNECTOR]: No Server URI named in section UserService"); | ||
79 | throw new Exception("User connector init error"); | ||
80 | } | 64 | } |
81 | //m_ServerURI = serviceURI; | 65 | if (m_GatekeeperService == null) |
82 | } | 66 | throw new Exception("Gatekeeper server connector cannot proceed because of missing service"); |
83 | 67 | ||
84 | public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) | 68 | HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService); |
85 | { | 69 | server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false); |
86 | return null; | 70 | server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false); |
87 | } | ||
88 | 71 | ||
89 | public UserAccount GetUserAccount(UUID scopeID, UUID userID) | 72 | server.AddHTTPHandler("/foreignagent/", new GatekeeperAgentHandler(m_GatekeeperService).Handler); |
90 | { | ||
91 | return null; | ||
92 | } | ||
93 | 73 | ||
94 | public bool SetHomePosition(UserAccount data, UUID regionID, UUID regionSecret) | ||
95 | { | ||
96 | return false; | ||
97 | } | ||
98 | |||
99 | public bool SetUserAccount(UserAccount data, UUID principalID, string token) | ||
100 | { | ||
101 | return false; | ||
102 | } | 74 | } |
103 | 75 | ||
104 | public bool CreateUserAccount(UserAccount data, UUID principalID, string token) | 76 | public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server) |
77 | : this(config, server, null) | ||
105 | { | 78 | { |
106 | return false; | ||
107 | } | 79 | } |
108 | 80 | ||
109 | public List<UserAccount> GetUserAccount(UUID scopeID, string query) | ||
110 | { | ||
111 | return null; | ||
112 | } | ||
113 | } | 81 | } |
114 | } | 82 | } |