aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.GridServer/GridManager.cs
diff options
context:
space:
mode:
authormorphw2007-05-20 02:31:20 +0000
committermorphw2007-05-20 02:31:20 +0000
commit723008d8c9835bca365a8e4ea86c9c2c0cfda569 (patch)
tree6fff99591c8fc788badd6e95273b034b755b9f88 /OpenGridServices.GridServer/GridManager.cs
parentDone more work on the world map downloading functionality (diff)
downloadopensim-SC_OLD-723008d8c9835bca365a8e4ea86c9c2c0cfda569.zip
opensim-SC_OLD-723008d8c9835bca365a8e4ea86c9c2c0cfda569.tar.gz
opensim-SC_OLD-723008d8c9835bca365a8e4ea86c9c2c0cfda569.tar.bz2
opensim-SC_OLD-723008d8c9835bca365a8e4ea86c9c2c0cfda569.tar.xz
Add XmlRpcMapBlockMethod handlers to service map-block XmlRpc requests from region servers (on behalf of users)
Diffstat (limited to '')
-rw-r--r--OpenGridServices.GridServer/GridManager.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/OpenGridServices.GridServer/GridManager.cs b/OpenGridServices.GridServer/GridManager.cs
index 539fbb1..54e4bb7 100644
--- a/OpenGridServices.GridServer/GridManager.cs
+++ b/OpenGridServices.GridServer/GridManager.cs
@@ -241,6 +241,63 @@ namespace OpenGridServices.GridServer
241 return response; 241 return response;
242 } 242 }
243 243
244 public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request)
245 {
246 int xmin=980, ymin=980, xmax=1020, ymax=1020;
247
248 Hashtable requestData = (Hashtable)request.Params[0];
249 if (requestData.ContainsKey("xmin"))
250 {
251 xmin = (Int32)requestData["xmin"];
252 }
253 if (requestData.ContainsKey("ymin"))
254 {
255 ymin = (Int32)requestData["ymin"];
256 }
257 if (requestData.ContainsKey("xmax"))
258 {
259 xmax = (Int32)requestData["xmax"];
260 }
261 if (requestData.ContainsKey("ymax"))
262 {
263 ymax = (Int32)requestData["ymax"];
264 }
265
266 XmlRpcResponse response = new XmlRpcResponse();
267 Hashtable responseData = new Hashtable();
268 response.Value = responseData;
269 IList simProfileList = new ArrayList();
270
271 SimProfileData simProfile;
272 for (int x = xmin; x < xmax; x++)
273 {
274 for (int y = ymin; y < ymax; y++)
275 {
276 simProfile = getRegion(Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256)));
277 if (simProfile != null)
278 {
279 Hashtable simProfileBlock = new Hashtable();
280 simProfileBlock["x"] = x;
281 simProfileBlock["y"] = y;
282 simProfileBlock["name"] = simProfile.regionName;
283 simProfileBlock["access"] = 0;
284 simProfileBlock["region-flags"] = 0;
285 simProfileBlock["water-height"] = 20;
286 simProfileBlock["agents"] = 1;
287 simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
288
289 simProfileList.Add(simProfileBlock);
290 }
291 }
292 }
293
294 responseData["sim-profiles"] = simProfileList;
295
296 return response;
297 }
298
299
300
244 /// <summary> 301 /// <summary>
245 /// Performs a REST Get Operation 302 /// Performs a REST Get Operation
246 /// </summary> 303 /// </summary>