aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
diff options
context:
space:
mode:
authorMelanie2010-03-03 02:07:03 +0000
committerMelanie2010-03-03 02:07:03 +0000
commit028a87fe37002e7a0611f66babf1deee46c83804 (patch)
tree387aec499fd60c2012bed8148e6a2ddc847c3d95 /OpenSim/Server/Handlers/Hypergrid/GatekeeperServerConnector.cs
parentRevert "test" (diff)
parentFixes Region.Framework tests. Although these tests don't fail, they need to b... (diff)
downloadopensim-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
28using log4net;
29using System; 28using System;
30using System.Collections.Generic; 29using System.Collections.Generic;
31using System.IO;
32using System.Reflection; 30using System.Reflection;
33using Nini.Config; 31using Nini.Config;
34using OpenSim.Framework; 32using OpenSim.Framework;
35using OpenSim.Framework.Communications; 33using OpenSim.Server.Base;
36using OpenSim.Framework.Servers.HttpServer;
37using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
38using OpenMetaverse; 35using OpenSim.Framework.Servers.HttpServer;
36using OpenSim.Server.Handlers.Base;
39 37
40namespace OpenSim.Services.Connectors 38using log4net;
39
40namespace 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}