aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/SimProfile.cs
diff options
context:
space:
mode:
authorMW2007-05-24 12:16:50 +0000
committerMW2007-05-24 12:16:50 +0000
commit3376b82501000692d6dac24b051af738cdaf2737 (patch)
tree90ed0a5d4955236f011fa63fce9d555186b0d179 /OpenSim.Framework/SimProfile.cs
parentAdded "terrain save grdmap <filename> <gradientmap>" function to console. Gra... (diff)
downloadopensim-SC-3376b82501000692d6dac24b051af738cdaf2737.zip
opensim-SC-3376b82501000692d6dac24b051af738cdaf2737.tar.gz
opensim-SC-3376b82501000692d6dac24b051af738cdaf2737.tar.bz2
opensim-SC-3376b82501000692d6dac24b051af738cdaf2737.tar.xz
Some more code refactoring, plus a restructuring of the directories so that the Grid servers can be a separate solution to the region server.
Diffstat (limited to 'OpenSim.Framework/SimProfile.cs')
-rw-r--r--OpenSim.Framework/SimProfile.cs83
1 files changed, 0 insertions, 83 deletions
diff --git a/OpenSim.Framework/SimProfile.cs b/OpenSim.Framework/SimProfile.cs
deleted file mode 100644
index 8acb20b..0000000
--- a/OpenSim.Framework/SimProfile.cs
+++ /dev/null
@@ -1,83 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Collections;
4using System.Xml;
5using System.Text;
6using libsecondlife;
7using Nwc.XmlRpc;
8
9namespace OpenSim.Framework.Sims
10{
11 public class SimProfile : SimProfileBase
12 {
13 public SimProfile LoadFromGrid(ulong region_handle, string GridURL, string SendKey, string RecvKey)
14 {
15 try
16 {
17 Hashtable GridReqParams = new Hashtable();
18 GridReqParams["region_handle"] = region_handle.ToString();
19 GridReqParams["authkey"] = SendKey;
20 ArrayList SendParams = new ArrayList();
21 SendParams.Add(GridReqParams);
22 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
23
24 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
25
26 Hashtable RespData = (Hashtable)GridResp.Value;
27 this.UUID = new LLUUID((string)RespData["UUID"]);
28 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
29 this.regionname = (string)RespData["regionname"];
30 this.sim_ip = (string)RespData["sim_ip"];
31 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
32 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
33 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
34 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
35 this.sendkey = SendKey;
36 this.recvkey = RecvKey;
37 }
38 catch (Exception e)
39 {
40 Console.WriteLine(e.ToString());
41 }
42 return this;
43 }
44
45 public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
46 {
47 try
48 {
49 Hashtable GridReqParams = new Hashtable();
50 GridReqParams["UUID"] = UUID.ToString();
51 GridReqParams["authkey"] = SendKey;
52 ArrayList SendParams = new ArrayList();
53 SendParams.Add(GridReqParams);
54 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
55
56 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
57
58 Hashtable RespData = (Hashtable)GridResp.Value;
59 this.UUID = new LLUUID((string)RespData["UUID"]);
60 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
61 this.regionname = (string)RespData["regionname"];
62 this.sim_ip = (string)RespData["sim_ip"];
63 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
64 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
65 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
66 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
67 this.sendkey = SendKey;
68 this.recvkey = RecvKey;
69 }
70 catch (Exception e)
71 {
72 Console.WriteLine(e.ToString());
73 }
74 return this;
75 }
76
77
78 public SimProfile()
79 {
80 }
81 }
82
83}