diff options
author | mingchen | 2007-07-05 15:15:28 +0000 |
---|---|---|
committer | mingchen | 2007-07-05 15:15:28 +0000 |
commit | 583f2a9de8e503773a427facd5f81a82b40bd585 (patch) | |
tree | 35d434db32056e7d0b231f56f2732c031c130a1d /OpenSim/Framework/General/SimProfile.cs | |
parent | * Tweaks to Java engine (uses less threads). Added support for OnFrame and On... (diff) | |
download | opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.zip opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.gz opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.bz2 opensim-SC_OLD-583f2a9de8e503773a427facd5f81a82b40bd585.tar.xz |
*Removed SimProfile.cs as it is no longer needed (in favor of SimProfileData)
*Added simulator_data_request XMLRPC method to request data from the grid server about a sim instead of faking its login
*Login is progressing, now just getting an XML error (http://pastebin.com/942515) -- if you can fix this, throw MingChen in IRC a Private Message
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/General/SimProfile.cs | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/OpenSim/Framework/General/SimProfile.cs b/OpenSim/Framework/General/SimProfile.cs deleted file mode 100644 index 47f1af3..0000000 --- a/OpenSim/Framework/General/SimProfile.cs +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using libsecondlife; | ||
31 | using Nwc.XmlRpc; | ||
32 | |||
33 | namespace OpenSim.Framework.Sims | ||
34 | { | ||
35 | public class SimProfile | ||
36 | { | ||
37 | public LLUUID UUID; | ||
38 | public ulong regionhandle; | ||
39 | public string regionname; | ||
40 | public string sim_ip; | ||
41 | public uint sim_port; | ||
42 | public string caps_url; | ||
43 | public uint RegionLocX; | ||
44 | public uint RegionLocY; | ||
45 | public string sendkey; | ||
46 | public string recvkey; | ||
47 | public bool online; | ||
48 | |||
49 | public SimProfile LoadFromGrid(ulong region_handle, string GridURL, string SendKey, string RecvKey) | ||
50 | { | ||
51 | try | ||
52 | { | ||
53 | Hashtable GridReqParams = new Hashtable(); | ||
54 | GridReqParams["region_handle"] = region_handle.ToString(); | ||
55 | GridReqParams["authkey"] = SendKey; | ||
56 | ArrayList SendParams = new ArrayList(); | ||
57 | SendParams.Add(GridReqParams); | ||
58 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); | ||
59 | |||
60 | XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000); | ||
61 | |||
62 | Hashtable RespData = (Hashtable)GridResp.Value; | ||
63 | this.UUID = new LLUUID((string)RespData["UUID"]); | ||
64 | this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256)); | ||
65 | this.regionname = (string)RespData["regionname"]; | ||
66 | this.sim_ip = (string)RespData["sim_ip"]; | ||
67 | this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]); | ||
68 | this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/"; | ||
69 | this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]); | ||
70 | this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]); | ||
71 | this.sendkey = SendKey; | ||
72 | this.recvkey = RecvKey; | ||
73 | } | ||
74 | catch (Exception e) | ||
75 | { | ||
76 | System.Console.WriteLine(e.ToString()); | ||
77 | } | ||
78 | return this; | ||
79 | } | ||
80 | |||
81 | public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey) | ||
82 | { | ||
83 | try | ||
84 | { | ||
85 | Hashtable GridReqParams = new Hashtable(); | ||
86 | GridReqParams["UUID"] = UUID.ToString(); | ||
87 | GridReqParams["authkey"] = SendKey; | ||
88 | ArrayList SendParams = new ArrayList(); | ||
89 | SendParams.Add(GridReqParams); | ||
90 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); | ||
91 | |||
92 | XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000); | ||
93 | |||
94 | Hashtable RespData = (Hashtable)GridResp.Value; | ||
95 | this.UUID = new LLUUID((string)RespData["UUID"]); | ||
96 | this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256)); | ||
97 | this.regionname = (string)RespData["regionname"]; | ||
98 | this.sim_ip = (string)RespData["sim_ip"]; | ||
99 | this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]); | ||
100 | this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/"; | ||
101 | this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]); | ||
102 | this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]); | ||
103 | this.sendkey = SendKey; | ||
104 | this.recvkey = RecvKey; | ||
105 | } | ||
106 | catch (Exception e) | ||
107 | { | ||
108 | System.Console.WriteLine(e.ToString()); | ||
109 | } | ||
110 | return this; | ||
111 | } | ||
112 | |||
113 | |||
114 | public SimProfile() | ||
115 | { | ||
116 | } | ||
117 | } | ||
118 | |||
119 | } | ||