From a0607dadaf0f5be4262b48829f3a64daef965c8c Mon Sep 17 00:00:00 2001 From: morphw Date: Sun, 20 May 2007 02:35:23 +0000 Subject: Add RequestMapBlocks to local and remote interfaces --- OpenSim.GridInterfaces/Local/LocalGridServer.cs | 7 +++++++ OpenSim.GridInterfaces/Remote/RemoteGridServer.cs | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/OpenSim.GridInterfaces/Local/LocalGridServer.cs b/OpenSim.GridInterfaces/Local/LocalGridServer.cs index 622eb53..fdd6ba4 100644 --- a/OpenSim.GridInterfaces/Local/LocalGridServer.cs +++ b/OpenSim.GridInterfaces/Local/LocalGridServer.cs @@ -34,6 +34,7 @@ using OpenSim.Framework.Console; using libsecondlife; using Db4objects.Db4o; using Db4objects.Db4o.Query; +using System.Collections; namespace OpenSim.GridInterfaces.Local { @@ -114,6 +115,12 @@ namespace OpenSim.GridInterfaces.Local { } + + public override IList RequestMapBlocks(int minX, int minY, int maxX, int maxY) + { + return new ArrayList(); + } + public override void Close() { diff --git a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs index 6a4484f..7f911d8 100644 --- a/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs +++ b/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs @@ -161,6 +161,21 @@ namespace OpenSim.GridInterfaces.Remote return null; } + public override IList RequestMapBlocks(int minX, int minY, int maxX, int maxY) + { + Hashtable param = new Hashtable(); + param["xmin"] = minX; + param["ymin"] = minY; + param["xmax"] = maxX; + param["ymax"] = maxY; + IList parameters = new ArrayList(); + parameters.Add(param); + XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); + XmlRpcResponse resp = req.Send(GridServerUrl, 3000); + Hashtable respData = (Hashtable)resp.Value; + return (IList)respData["sim-profiles"]; + } + public override void SetServerInfo(string ServerUrl, string SendKey, string RecvKey) { this.GridServerUrl = ServerUrl; -- cgit v1.1