aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/RegionProfileData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/RegionProfileData.cs')
-rw-r--r--OpenSim/Data/RegionProfileData.cs81
1 files changed, 0 insertions, 81 deletions
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs
index d01aaa0..0b757f3 100644
--- a/OpenSim/Data/RegionProfileData.cs
+++ b/OpenSim/Data/RegionProfileData.cs
@@ -131,87 +131,6 @@ namespace OpenSim.Data
131 /// </summary> 131 /// </summary>
132 public UUID originUUID; 132 public UUID originUUID;
133 133
134 /// <summary>
135 /// Request sim data based on arbitrary key/value
136 /// </summary>
137 private static RegionProfileData RequestSimData(Uri gridserver_url, string gridserver_sendkey, string keyField, string keyValue)
138 {
139 Hashtable requestData = new Hashtable();
140 requestData[keyField] = keyValue;
141 requestData["authkey"] = gridserver_sendkey;
142 ArrayList SendParams = new ArrayList();
143 SendParams.Add(requestData);
144 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
145 XmlRpcResponse GridResp = GridReq.Send(gridserver_url.ToString(), 3000);
146
147 Hashtable responseData = (Hashtable) GridResp.Value;
148
149 RegionProfileData simData = null;
150
151 if (!responseData.ContainsKey("error"))
152 {
153 simData = new RegionProfileData();
154 simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]);
155 simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]);
156 simData.regionHandle =
157 Utils.UIntsToLong((simData.regionLocX * Constants.RegionSize),
158 (simData.regionLocY*Constants.RegionSize));
159 simData.serverIP = (string) responseData["sim_ip"];
160 simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]);
161 simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]);
162 simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
163 simData.serverURI = (string) responseData["server_uri"];
164 simData.httpServerURI = "http://" + (string)responseData["sim_ip"] + ":" + simData.httpPort.ToString() + "/";
165 simData.UUID = new UUID((string) responseData["region_UUID"]);
166 simData.regionName = (string) responseData["region_name"];
167 }
168
169 return simData;
170 }
171
172 /// <summary>
173 /// Request sim profile information from a grid server, by Region UUID
174 /// </summary>
175 /// <param name="region_UUID">The region UUID to look for</param>
176 /// <param name="gridserver_url"></param>
177 /// <param name="gridserver_sendkey"></param>
178 /// <param name="gridserver_recvkey"></param>
179 /// <returns>The sim profile. Null if there was a request failure</returns>
180 /// <remarks>This method should be statics</remarks>
181 public static RegionProfileData RequestSimProfileData(UUID region_uuid, Uri gridserver_url,
182 string gridserver_sendkey, string gridserver_recvkey)
183 {
184 return RequestSimData(gridserver_url, gridserver_sendkey, "region_UUID", region_uuid.Guid.ToString());
185 }
186
187 /// <summary>
188 /// Request sim profile information from a grid server, by Region Handle
189 /// </summary>
190 /// <param name="region_handle">the region handle to look for</param>
191 /// <param name="gridserver_url"></param>
192 /// <param name="gridserver_sendkey"></param>
193 /// <param name="gridserver_recvkey"></param>
194 /// <returns>The sim profile. Null if there was a request failure</returns>
195 public static RegionProfileData RequestSimProfileData(ulong region_handle, Uri gridserver_url,
196 string gridserver_sendkey, string gridserver_recvkey)
197 {
198 return RequestSimData(gridserver_url, gridserver_sendkey, "region_handle", region_handle.ToString());
199 }
200
201 /// <summary>
202 /// Request sim profile information from a grid server, by Region Name
203 /// </summary>
204 /// <param name="region_handle">the region name to look for</param>
205 /// <param name="gridserver_url"></param>
206 /// <param name="gridserver_sendkey"></param>
207 /// <param name="gridserver_recvkey"></param>
208 /// <returns>The sim profile. Null if there was a request failure</returns>
209 public static RegionProfileData RequestSimProfileData(string regionName, Uri gridserver_url,
210 string gridserver_sendkey, string gridserver_recvkey)
211 {
212 return RequestSimData(gridserver_url, gridserver_sendkey, "region_name_search", regionName );
213 }
214
215 134
216 //Data Wrappers 135 //Data Wrappers
217 public string RegionName 136 public string RegionName