Need to add the grid portion next to test this thing
parent
7073286008
commit
3b1eba2ffc
|
@ -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();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
public uint regloc_x;
|
||||
public uint regloc_y;
|
||||
|
||||
private uint regloc_x;
|
||||
private 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue