diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/Data/RegionProfileData.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2 opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz |
* Optimized usings
* Shortened type references
* Removed redundant 'this' qualifier
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data/RegionProfileData.cs | 63 |
1 files changed, 36 insertions, 27 deletions
diff --git a/OpenSim/Framework/Data/RegionProfileData.cs b/OpenSim/Framework/Data/RegionProfileData.cs index 5e5dac6..ab8771a 100644 --- a/OpenSim/Framework/Data/RegionProfileData.cs +++ b/OpenSim/Framework/Data/RegionProfileData.cs | |||
@@ -25,11 +25,11 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | ||
29 | using Nwc.XmlRpc; | ||
30 | 28 | ||
31 | using System; | 29 | using System; |
32 | using System.Collections; | 30 | using System.Collections; |
31 | using libsecondlife; | ||
32 | using Nwc.XmlRpc; | ||
33 | 33 | ||
34 | namespace OpenSim.Framework.Data | 34 | namespace OpenSim.Framework.Data |
35 | { | 35 | { |
@@ -57,6 +57,7 @@ namespace OpenSim.Framework.Data | |||
57 | /// Coordinates of the region | 57 | /// Coordinates of the region |
58 | /// </summary> | 58 | /// </summary> |
59 | public uint regionLocX; | 59 | public uint regionLocX; |
60 | |||
60 | public uint regionLocY; | 61 | public uint regionLocY; |
61 | public uint regionLocZ; // Reserved (round-robin, layers, etc) | 62 | public uint regionLocZ; // Reserved (round-robin, layers, etc) |
62 | 63 | ||
@@ -65,6 +66,7 @@ namespace OpenSim.Framework.Data | |||
65 | /// </summary> | 66 | /// </summary> |
66 | /// <remarks>Not very secure, needs improvement.</remarks> | 67 | /// <remarks>Not very secure, needs improvement.</remarks> |
67 | public string regionSendKey = ""; | 68 | public string regionSendKey = ""; |
69 | |||
68 | public string regionRecvKey = ""; | 70 | public string regionRecvKey = ""; |
69 | public string regionSecret = ""; | 71 | public string regionSecret = ""; |
70 | 72 | ||
@@ -77,6 +79,7 @@ namespace OpenSim.Framework.Data | |||
77 | /// Information about the server that the region is currently hosted on | 79 | /// Information about the server that the region is currently hosted on |
78 | /// </summary> | 80 | /// </summary> |
79 | public string serverIP = ""; | 81 | public string serverIP = ""; |
82 | |||
80 | public uint serverPort; | 83 | public uint serverPort; |
81 | public string serverURI = ""; | 84 | public string serverURI = ""; |
82 | 85 | ||
@@ -88,6 +91,7 @@ namespace OpenSim.Framework.Data | |||
88 | /// Set of optional overrides. Can be used to create non-eulicidean spaces. | 91 | /// Set of optional overrides. Can be used to create non-eulicidean spaces. |
89 | /// </summary> | 92 | /// </summary> |
90 | public ulong regionNorthOverrideHandle; | 93 | public ulong regionNorthOverrideHandle; |
94 | |||
91 | public ulong regionSouthOverrideHandle; | 95 | public ulong regionSouthOverrideHandle; |
92 | public ulong regionEastOverrideHandle; | 96 | public ulong regionEastOverrideHandle; |
93 | public ulong regionWestOverrideHandle; | 97 | public ulong regionWestOverrideHandle; |
@@ -102,6 +106,7 @@ namespace OpenSim.Framework.Data | |||
102 | /// Region Asset Details | 106 | /// Region Asset Details |
103 | /// </summary> | 107 | /// </summary> |
104 | public string regionAssetURI = ""; | 108 | public string regionAssetURI = ""; |
109 | |||
105 | public string regionAssetSendKey = ""; | 110 | public string regionAssetSendKey = ""; |
106 | public string regionAssetRecvKey = ""; | 111 | public string regionAssetRecvKey = ""; |
107 | 112 | ||
@@ -109,6 +114,7 @@ namespace OpenSim.Framework.Data | |||
109 | /// Region Userserver Details | 114 | /// Region Userserver Details |
110 | /// </summary> | 115 | /// </summary> |
111 | public string regionUserURI = ""; | 116 | public string regionUserURI = ""; |
117 | |||
112 | public string regionUserSendKey = ""; | 118 | public string regionUserSendKey = ""; |
113 | public string regionUserRecvKey = ""; | 119 | public string regionUserRecvKey = ""; |
114 | 120 | ||
@@ -124,7 +130,8 @@ namespace OpenSim.Framework.Data | |||
124 | /// <param name="gridserver_url"></param> | 130 | /// <param name="gridserver_url"></param> |
125 | /// <param name="?"></param> | 131 | /// <param name="?"></param> |
126 | /// <returns></returns> | 132 | /// <returns></returns> |
127 | public RegionProfileData RequestSimProfileData(LLUUID region_uuid, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey) | 133 | public RegionProfileData RequestSimProfileData(LLUUID region_uuid, string gridserver_url, |
134 | string gridserver_sendkey, string gridserver_recvkey) | ||
128 | { | 135 | { |
129 | Hashtable requestData = new Hashtable(); | 136 | Hashtable requestData = new Hashtable(); |
130 | requestData["region_uuid"] = region_uuid.UUID.ToString(); | 137 | requestData["region_uuid"] = region_uuid.UUID.ToString(); |
@@ -134,7 +141,7 @@ namespace OpenSim.Framework.Data | |||
134 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); | 141 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); |
135 | XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); | 142 | XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); |
136 | 143 | ||
137 | Hashtable responseData = (Hashtable)GridResp.Value; | 144 | Hashtable responseData = (Hashtable) GridResp.Value; |
138 | 145 | ||
139 | if (responseData.ContainsKey("error")) | 146 | if (responseData.ContainsKey("error")) |
140 | { | 147 | { |
@@ -142,21 +149,23 @@ namespace OpenSim.Framework.Data | |||
142 | } | 149 | } |
143 | 150 | ||
144 | RegionProfileData simData = new RegionProfileData(); | 151 | RegionProfileData simData = new RegionProfileData(); |
145 | simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]); | 152 | simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]); |
146 | simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]); | 153 | simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]); |
147 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); | 154 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX*256), (simData.regionLocY*256)); |
148 | simData.serverIP = (string)responseData["sim_ip"]; | 155 | simData.serverIP = (string) responseData["sim_ip"]; |
149 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); | 156 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); |
150 | simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]); | 157 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
151 | simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); | 158 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
152 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; | 159 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; |
153 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 160 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
154 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); | 161 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
155 | simData.regionName = (string)responseData["region_name"]; | 162 | simData.regionName = (string) responseData["region_name"]; |
156 | 163 | ||
157 | return simData; | 164 | return simData; |
158 | } | 165 | } |
159 | public RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey) | 166 | |
167 | public RegionProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, | ||
168 | string gridserver_sendkey, string gridserver_recvkey) | ||
160 | { | 169 | { |
161 | Hashtable requestData = new Hashtable(); | 170 | Hashtable requestData = new Hashtable(); |
162 | requestData["region_handle"] = region_handle.ToString(); | 171 | requestData["region_handle"] = region_handle.ToString(); |
@@ -166,7 +175,7 @@ namespace OpenSim.Framework.Data | |||
166 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); | 175 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); |
167 | XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); | 176 | XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); |
168 | 177 | ||
169 | Hashtable responseData = (Hashtable)GridResp.Value; | 178 | Hashtable responseData = (Hashtable) GridResp.Value; |
170 | 179 | ||
171 | if (responseData.ContainsKey("error")) | 180 | if (responseData.ContainsKey("error")) |
172 | { | 181 | { |
@@ -174,19 +183,19 @@ namespace OpenSim.Framework.Data | |||
174 | } | 183 | } |
175 | 184 | ||
176 | RegionProfileData simData = new RegionProfileData(); | 185 | RegionProfileData simData = new RegionProfileData(); |
177 | simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]); | 186 | simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]); |
178 | simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]); | 187 | simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]); |
179 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); | 188 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX*256), (simData.regionLocY*256)); |
180 | simData.serverIP = (string)responseData["sim_ip"]; | 189 | simData.serverIP = (string) responseData["sim_ip"]; |
181 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); | 190 | simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); |
182 | simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]); | 191 | simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); |
183 | simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); | 192 | simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); |
184 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | 193 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; |
185 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; | 194 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; |
186 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); | 195 | simData.UUID = new LLUUID((string) responseData["region_UUID"]); |
187 | simData.regionName = (string)responseData["region_name"]; | 196 | simData.regionName = (string) responseData["region_name"]; |
188 | 197 | ||
189 | return simData; | 198 | return simData; |
190 | } | 199 | } |
191 | } | 200 | } |
192 | } | 201 | } \ No newline at end of file |