diff options
author | gareth | 2007-05-20 16:17:19 +0000 |
---|---|---|
committer | gareth | 2007-05-20 16:17:19 +0000 |
commit | 3b1eba2ffc5964b307ca25c5485a55f6a733e333 (patch) | |
tree | 68e23bc05357a5dd34d7b210859a95ab67f07f35 | |
parent | * Added UnixTimeSinceEpoch() function to Util class (god knows how many times... (diff) | |
download | opensim-SC_OLD-3b1eba2ffc5964b307ca25c5485a55f6a733e333.zip opensim-SC_OLD-3b1eba2ffc5964b307ca25c5485a55f6a733e333.tar.gz opensim-SC_OLD-3b1eba2ffc5964b307ca25c5485a55f6a733e333.tar.bz2 opensim-SC_OLD-3b1eba2ffc5964b307ca25c5485a55f6a733e333.tar.xz |
Need to add the grid portion next to test this thing
-rw-r--r-- | OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs | 5 | ||||
-rw-r--r-- | OpenGridServices.Manager/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 | |||
49 | System.Net.WebClient mapdownloader = new WebClient(); | 49 | System.Net.WebClient mapdownloader = new WebClient(); |
50 | Stream regionliststream = mapdownloader.OpenRead(ServerURL + "/regionlist"); | 50 | Stream regionliststream = mapdownloader.OpenRead(ServerURL + "/regionlist"); |
51 | 51 | ||
52 | RegionBlock TempRegionData; | ||
52 | 53 | ||
53 | XmlDocument doc = new XmlDocument(); | 54 | XmlDocument doc = new XmlDocument(); |
54 | doc.Load(regionliststream); | 55 | doc.Load(regionliststream); |
56 | regionliststream.Close(); | ||
55 | XmlNode rootnode = doc.FirstChild; | 57 | XmlNode rootnode = doc.FirstChild; |
56 | if (rootnode.Name != "regions") | 58 | if (rootnode.Name != "regions") |
57 | { | 59 | { |
@@ -63,6 +65,9 @@ namespace OpenGridServices.Manager | |||
63 | if(rootnode.ChildNodes.Item(i).Name != "region") { | 65 | if(rootnode.ChildNodes.Item(i).Name != "region") { |
64 | // TODO - ERROR! | 66 | // TODO - ERROR! |
65 | } else { | 67 | } else { |
68 | TempRegionData = new RegionBlock(); | ||
69 | |||
70 | |||
66 | } | 71 | } |
67 | } | 72 | } |
68 | } | 73 | } |
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 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Xml; | ||
2 | using libsecondlife; | 3 | using libsecondlife; |
3 | using OpenSim.Framework.Utilities; | 4 | using OpenSim.Framework.Utilities; |
4 | 5 | ||
@@ -8,11 +9,12 @@ namespace OpenGridServices.Manager | |||
8 | 9 | ||
9 | public class RegionBlock | 10 | public class RegionBlock |
10 | { | 11 | { |
11 | 12 | public uint regloc_x; | |
12 | private uint regloc_x; | 13 | public uint regloc_y; |
13 | private uint regloc_y; | ||
14 | 14 | ||
15 | public string httpd_url; | ||
15 | 16 | ||
17 | public string region_name; | ||
16 | 18 | ||
17 | public ulong regionhandle { | 19 | public ulong regionhandle { |
18 | get { return Util.UIntsToLong(regloc_x*256,regloc_y*256); } | 20 | get { return Util.UIntsToLong(regloc_x*256,regloc_y*256); } |
@@ -23,5 +25,13 @@ namespace OpenGridServices.Manager | |||
23 | public RegionBlock() | 25 | public RegionBlock() |
24 | { | 26 | { |
25 | } | 27 | } |
28 | |||
29 | public void LoadFromXmlNode(XmlNode sourcenode) | ||
30 | { | ||
31 | this.regloc_x=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_x").Value); | ||
32 | this.regloc_y=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_y").Value); | ||
33 | this.region_name=sourcenode.Attributes.GetNamedItem("region_name").Value; | ||
34 | this.httpd_url=sourcenode.Attributes.GetNamedItem("httpd_url").Value; | ||
35 | } | ||
26 | } | 36 | } |
27 | } | 37 | } |