28 using System.Collections;
29 using System.Collections.Generic;
31 using System.Reflection;
33 using OpenSim.Services.Interfaces;
40 namespace OpenSim.Server.Handlers.Hypergrid
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 m_GatekeeperService = gatekeeper;
51 m_log.DebugFormat(
"[HYPERGRID HANDLERS]: Active");
61 Hashtable requestData = (Hashtable)request.Params[0];
64 string name = (
string)requestData[
"region_name"];
68 UUID regionID = UUID.Zero;
69 string externalName = string.Empty;
70 string imageURL = string.Empty;
71 ulong regionHandle = 0;
72 string reason = string.Empty;
74 bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason);
76 Hashtable hash =
new Hashtable();
77 hash[
"result"] = success.ToString();
78 hash[
"uuid"] = regionID.ToString();
79 hash[
"handle"] = regionHandle.ToString();
80 hash[
"region_image"] = imageURL;
81 hash[
"external_name"] = externalName;
83 XmlRpcResponse response =
new XmlRpcResponse();
84 response.Value = hash;
88 public XmlRpcResponse
GetRegion(XmlRpcRequest request, IPEndPoint remoteClient)
90 Hashtable requestData = (Hashtable)request.Params[0];
93 string regionID_str = (
string)requestData[
"region_uuid"];
94 UUID regionID = UUID.Zero;
95 UUID.TryParse(regionID_str, out regionID);
97 UUID agentID = UUID.Zero;
98 string agentHomeURI = null;
99 if (requestData.ContainsKey(
"agent_id"))
100 agentID = UUID.Parse((
string)requestData[
"agent_id"]);
101 if (requestData.ContainsKey(
"agent_home_uri"))
102 agentHomeURI = (
string)requestData[
"agent_home_uri"];
105 GridRegion regInfo = m_GatekeeperService.GetHyperlinkRegion(regionID, agentID, agentHomeURI, out message);
107 Hashtable hash =
new Hashtable();
110 hash[
"result"] =
"false";
114 hash[
"result"] =
"true";
115 hash[
"uuid"] = regInfo.RegionID.ToString();
116 hash[
"x"] = regInfo.RegionLocX.ToString();
117 hash[
"y"] = regInfo.RegionLocY.ToString();
118 hash[
"size_x"] = regInfo.RegionSizeX.ToString();
119 hash[
"size_y"] = regInfo.RegionSizeY.ToString();
120 hash[
"region_name"] = regInfo.RegionName;
121 hash[
"hostname"] = regInfo.ExternalHostName;
122 hash[
"http_port"] = regInfo.HttpPort.ToString();
123 hash[
"internal_port"] = regInfo.InternalEndPoint.Port.ToString();
127 hash[
"message"] = message;
129 XmlRpcResponse response =
new XmlRpcResponse();
130 response.Value = hash;
OpenSim.Services.Interfaces.GridRegion GridRegion
XmlRpcResponse GetRegion(XmlRpcRequest request, IPEndPoint remoteClient)
HypergridHandlers(IGatekeeperService gatekeeper)
XmlRpcResponse LinkRegionRequest(XmlRpcRequest request, IPEndPoint remoteClient)
Someone wants to link to us