From 3b1eba2ffc5964b307ca25c5485a55f6a733e333 Mon Sep 17 00:00:00 2001 From: gareth Date: Sun, 20 May 2007 16:17:19 +0000 Subject: Need to add the grid portion next to test this thing --- .../GridServerConnectionManager.cs | 5 +++++ .../OpenGridServices.Manager/RegionBlock.cs | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs index 1694805..6b632d6 100644 --- a/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs +++ b/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs @@ -49,9 +49,11 @@ namespace OpenGridServices.Manager System.Net.WebClient mapdownloader = new WebClient(); Stream regionliststream = mapdownloader.OpenRead(ServerURL + "/regionlist"); + RegionBlock TempRegionData; XmlDocument doc = new XmlDocument(); doc.Load(regionliststream); + regionliststream.Close(); XmlNode rootnode = doc.FirstChild; if (rootnode.Name != "regions") { @@ -63,6 +65,9 @@ namespace OpenGridServices.Manager if(rootnode.ChildNodes.Item(i).Name != "region") { // TODO - ERROR! } else { + TempRegionData = new RegionBlock(); + + } } } diff --git a/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs b/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs index b4e5cca..00f7c65 100644 --- a/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs +++ b/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs @@ -1,4 +1,5 @@ using System; +using System.Xml; using libsecondlife; using OpenSim.Framework.Utilities; @@ -8,11 +9,12 @@ namespace OpenGridServices.Manager public class RegionBlock { - - private uint regloc_x; - private uint regloc_y; + public uint regloc_x; + public uint regloc_y; + public string httpd_url; + public string region_name; public ulong regionhandle { get { return Util.UIntsToLong(regloc_x*256,regloc_y*256); } @@ -23,5 +25,13 @@ namespace OpenGridServices.Manager public RegionBlock() { } + + public void LoadFromXmlNode(XmlNode sourcenode) + { + this.regloc_x=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_x").Value); + this.regloc_y=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_y").Value); + this.region_name=sourcenode.Attributes.GetNamedItem("region_name").Value; + this.httpd_url=sourcenode.Attributes.GetNamedItem("httpd_url").Value; + } } } -- cgit v1.1