* Towards enabling hyperlinks at grid-level.

* Updated grid configs
This commit is contained in:
Diva Canto
2010-01-18 20:35:59 -08:00
parent 5feeea00ae
commit 9fbcceb1db
5 changed files with 158 additions and 15 deletions

View File

@@ -44,10 +44,12 @@ namespace OpenSim.Server.Handlers.Hypergrid
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IGatekeeperService m_GatekeeperService;
private IHypergridService m_HypergridService;
public HypergridHandlers(IGatekeeperService gatekeeper)
public HypergridHandlers(IGatekeeperService gatekeeper, IHypergridService hyper)
{
m_GatekeeperService = gatekeeper;
m_HypergridService = hyper;
}
/// <summary>
@@ -80,6 +82,36 @@ namespace OpenSim.Server.Handlers.Hypergrid
return response;
}
/// <summary>
/// A local region wants to establish a grid-wide hyperlink to another region
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public XmlRpcResponse LinkRegionByDescRequest(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
//string host = (string)requestData["host"];
//string portstr = (string)requestData["port"];
string descriptor = (string)requestData["region_desc"];
UUID regionID = UUID.Zero;
string imageURL = string.Empty;
ulong regionHandle = 0;
string reason = string.Empty;
bool success = m_HypergridService.LinkRegion(descriptor, out regionID, out regionHandle, out imageURL, out reason);
Hashtable hash = new Hashtable();
hash["result"] = success.ToString();
hash["uuid"] = regionID.ToString();
hash["handle"] = regionHandle.ToString();
hash["region_image"] = imageURL;
XmlRpcResponse response = new XmlRpcResponse();
response.Value = hash;
return response;
}
public XmlRpcResponse GetRegion(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];