aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorSean Dague2009-02-12 18:59:45 +0000
committerSean Dague2009-02-12 18:59:45 +0000
commit5959e426834b49c9048b862506e9db50870ef867 (patch)
tree6d6ad1c1d64e9f9d6474fd89c59d99b22b2b4bbc /OpenSim/Data
parent* Lock remaining m_rpcHandlers use since these accesses are not guaranteed to... (diff)
downloadopensim-SC_OLD-5959e426834b49c9048b862506e9db50870ef867.zip
opensim-SC_OLD-5959e426834b49c9048b862506e9db50870ef867.tar.gz
opensim-SC_OLD-5959e426834b49c9048b862506e9db50870ef867.tar.bz2
opensim-SC_OLD-5959e426834b49c9048b862506e9db50870ef867.tar.xz
large scale fix for svn props after "the great refactor"
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/IRegionProfileService.cs88
-rw-r--r--OpenSim/Data/RegionProfileServiceProxy.cs188
2 files changed, 138 insertions, 138 deletions
diff --git a/OpenSim/Data/IRegionProfileService.cs b/OpenSim/Data/IRegionProfileService.cs
index 7c41f1a..525f909 100644
--- a/OpenSim/Data/IRegionProfileService.cs
+++ b/OpenSim/Data/IRegionProfileService.cs
@@ -1,44 +1,44 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenMetaverse; 4using OpenMetaverse;
5 5
6namespace OpenSim.Data 6namespace OpenSim.Data
7{ 7{
8 public interface IRegionProfileService 8 public interface IRegionProfileService
9 { 9 {
10 /// <summary> 10 /// <summary>
11 /// Request sim profile information from a grid server, by Region UUID 11 /// Request sim profile information from a grid server, by Region UUID
12 /// </summary> 12 /// </summary>
13 /// <param name="regionId">The region UUID to look for</param> 13 /// <param name="regionId">The region UUID to look for</param>
14 /// <param name="gridserverUrl"></param> 14 /// <param name="gridserverUrl"></param>
15 /// <param name="gridserverSendkey"></param> 15 /// <param name="gridserverSendkey"></param>
16 /// <param name="gridserverRecvkey"></param> 16 /// <param name="gridserverRecvkey"></param>
17 /// <returns>The sim profile. Null if there was a request failure</returns> 17 /// <returns>The sim profile. Null if there was a request failure</returns>
18 /// <remarks>This method should be statics</remarks> 18 /// <remarks>This method should be statics</remarks>
19 RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl, 19 RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
20 string gridserverSendkey, string gridserverRecvkey); 20 string gridserverSendkey, string gridserverRecvkey);
21 21
22 /// <summary> 22 /// <summary>
23 /// Request sim profile information from a grid server, by Region Handle 23 /// Request sim profile information from a grid server, by Region Handle
24 /// </summary> 24 /// </summary>
25 /// <param name="regionHandle">the region handle to look for</param> 25 /// <param name="regionHandle">the region handle to look for</param>
26 /// <param name="gridserverUrl"></param> 26 /// <param name="gridserverUrl"></param>
27 /// <param name="gridserverSendkey"></param> 27 /// <param name="gridserverSendkey"></param>
28 /// <param name="gridserverRecvkey"></param> 28 /// <param name="gridserverRecvkey"></param>
29 /// <returns>The sim profile. Null if there was a request failure</returns> 29 /// <returns>The sim profile. Null if there was a request failure</returns>
30 RegionProfileData RequestSimProfileData(ulong regionHandle, Uri gridserverUrl, 30 RegionProfileData RequestSimProfileData(ulong regionHandle, Uri gridserverUrl,
31 string gridserverSendkey, string gridserverRecvkey); 31 string gridserverSendkey, string gridserverRecvkey);
32 32
33 /// <summary> 33 /// <summary>
34 /// Request sim profile information from a grid server, by Region Name 34 /// Request sim profile information from a grid server, by Region Name
35 /// </summary> 35 /// </summary>
36 /// <param name="regionName">the region name to look for</param> 36 /// <param name="regionName">the region name to look for</param>
37 /// <param name="gridserverUrl"></param> 37 /// <param name="gridserverUrl"></param>
38 /// <param name="gridserverSendkey"></param> 38 /// <param name="gridserverSendkey"></param>
39 /// <param name="gridserverRecvkey"></param> 39 /// <param name="gridserverRecvkey"></param>
40 /// <returns>The sim profile. Null if there was a request failure</returns> 40 /// <returns>The sim profile. Null if there was a request failure</returns>
41 RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl, 41 RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
42 string gridserverSendkey, string gridserverRecvkey); 42 string gridserverSendkey, string gridserverRecvkey);
43 } 43 }
44} 44}
diff --git a/OpenSim/Data/RegionProfileServiceProxy.cs b/OpenSim/Data/RegionProfileServiceProxy.cs
index 998b4ef..be4d9c5 100644
--- a/OpenSim/Data/RegionProfileServiceProxy.cs
+++ b/OpenSim/Data/RegionProfileServiceProxy.cs
@@ -1,94 +1,94 @@
1using System; 1using System;
2using System.Collections; 2using System.Collections;
3using System.Collections.Generic; 3using System.Collections.Generic;
4using System.Text; 4using System.Text;
5using Nwc.XmlRpc; 5using Nwc.XmlRpc;
6using OpenMetaverse; 6using OpenMetaverse;
7using OpenSim.Framework; 7using OpenSim.Framework;
8 8
9namespace OpenSim.Data 9namespace OpenSim.Data
10{ 10{
11 public class RegionProfileServiceProxy : IRegionProfileService 11 public class RegionProfileServiceProxy : IRegionProfileService
12 { 12 {
13 /// <summary> 13 /// <summary>
14 /// Request sim data based on arbitrary key/value 14 /// Request sim data based on arbitrary key/value
15 /// </summary> 15 /// </summary>
16 private RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue) 16 private RegionProfileData RequestSimData(Uri gridserverUrl, string gridserverSendkey, string keyField, string keyValue)
17 { 17 {
18 Hashtable requestData = new Hashtable(); 18 Hashtable requestData = new Hashtable();
19 requestData[keyField] = keyValue; 19 requestData[keyField] = keyValue;
20 requestData["authkey"] = gridserverSendkey; 20 requestData["authkey"] = gridserverSendkey;
21 ArrayList SendParams = new ArrayList(); 21 ArrayList SendParams = new ArrayList();
22 SendParams.Add(requestData); 22 SendParams.Add(requestData);
23 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 23 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
24 XmlRpcResponse GridResp = GridReq.Send(gridserverUrl.ToString(), 3000); 24 XmlRpcResponse GridResp = GridReq.Send(gridserverUrl.ToString(), 3000);
25 25
26 Hashtable responseData = (Hashtable) GridResp.Value; 26 Hashtable responseData = (Hashtable) GridResp.Value;
27 27
28 RegionProfileData simData = null; 28 RegionProfileData simData = null;
29 29
30 if (!responseData.ContainsKey("error")) 30 if (!responseData.ContainsKey("error"))
31 { 31 {
32 simData = new RegionProfileData(); 32 simData = new RegionProfileData();
33 simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]); 33 simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]);
34 simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]); 34 simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]);
35 simData.regionHandle = 35 simData.regionHandle =
36 Utils.UIntsToLong((simData.regionLocX * Constants.RegionSize), 36 Utils.UIntsToLong((simData.regionLocX * Constants.RegionSize),
37 (simData.regionLocY*Constants.RegionSize)); 37 (simData.regionLocY*Constants.RegionSize));
38 simData.serverIP = (string) responseData["sim_ip"]; 38 simData.serverIP = (string) responseData["sim_ip"];
39 simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]); 39 simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]);
40 simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]); 40 simData.httpPort = Convert.ToUInt32((string) responseData["http_port"]);
41 simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]); 41 simData.remotingPort = Convert.ToUInt32((string) responseData["remoting_port"]);
42 simData.serverURI = (string) responseData["server_uri"]; 42 simData.serverURI = (string) responseData["server_uri"];
43 simData.httpServerURI = "http://" + (string)responseData["sim_ip"] + ":" + simData.httpPort.ToString() + "/"; 43 simData.httpServerURI = "http://" + (string)responseData["sim_ip"] + ":" + simData.httpPort.ToString() + "/";
44 simData.UUID = new UUID((string) responseData["region_UUID"]); 44 simData.UUID = new UUID((string) responseData["region_UUID"]);
45 simData.regionName = (string) responseData["region_name"]; 45 simData.regionName = (string) responseData["region_name"];
46 } 46 }
47 47
48 return simData; 48 return simData;
49 } 49 }
50 50
51 /// <summary> 51 /// <summary>
52 /// Request sim profile information from a grid server, by Region UUID 52 /// Request sim profile information from a grid server, by Region UUID
53 /// </summary> 53 /// </summary>
54 /// <param name="regionId">The region UUID to look for</param> 54 /// <param name="regionId">The region UUID to look for</param>
55 /// <param name="gridserverUrl"></param> 55 /// <param name="gridserverUrl"></param>
56 /// <param name="gridserverSendkey"></param> 56 /// <param name="gridserverSendkey"></param>
57 /// <param name="gridserverRecvkey"></param> 57 /// <param name="gridserverRecvkey"></param>
58 /// <returns>The sim profile. Null if there was a request failure</returns> 58 /// <returns>The sim profile. Null if there was a request failure</returns>
59 /// <remarks>This method should be statics</remarks> 59 /// <remarks>This method should be statics</remarks>
60 public RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl, 60 public RegionProfileData RequestSimProfileData(UUID regionId, Uri gridserverUrl,
61 string gridserverSendkey, string gridserverRecvkey) 61 string gridserverSendkey, string gridserverRecvkey)
62 { 62 {
63 return RequestSimData(gridserverUrl, gridserverSendkey, "region_UUID", regionId.Guid.ToString()); 63 return RequestSimData(gridserverUrl, gridserverSendkey, "region_UUID", regionId.Guid.ToString());
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Request sim profile information from a grid server, by Region Handle 67 /// Request sim profile information from a grid server, by Region Handle
68 /// </summary> 68 /// </summary>
69 /// <param name="regionHandle">the region handle to look for</param> 69 /// <param name="regionHandle">the region handle to look for</param>
70 /// <param name="gridserverUrl"></param> 70 /// <param name="gridserverUrl"></param>
71 /// <param name="gridserverSendkey"></param> 71 /// <param name="gridserverSendkey"></param>
72 /// <param name="gridserverRecvkey"></param> 72 /// <param name="gridserverRecvkey"></param>
73 /// <returns>The sim profile. Null if there was a request failure</returns> 73 /// <returns>The sim profile. Null if there was a request failure</returns>
74 public RegionProfileData RequestSimProfileData(ulong regionHandle, Uri gridserverUrl, 74 public RegionProfileData RequestSimProfileData(ulong regionHandle, Uri gridserverUrl,
75 string gridserverSendkey, string gridserverRecvkey) 75 string gridserverSendkey, string gridserverRecvkey)
76 { 76 {
77 return RequestSimData(gridserverUrl, gridserverSendkey, "region_handle", regionHandle.ToString()); 77 return RequestSimData(gridserverUrl, gridserverSendkey, "region_handle", regionHandle.ToString());
78 } 78 }
79 79
80 /// <summary> 80 /// <summary>
81 /// Request sim profile information from a grid server, by Region Name 81 /// Request sim profile information from a grid server, by Region Name
82 /// </summary> 82 /// </summary>
83 /// <param name="regionName">the region name to look for</param> 83 /// <param name="regionName">the region name to look for</param>
84 /// <param name="gridserverUrl"></param> 84 /// <param name="gridserverUrl"></param>
85 /// <param name="gridserverSendkey"></param> 85 /// <param name="gridserverSendkey"></param>
86 /// <param name="gridserverRecvkey"></param> 86 /// <param name="gridserverRecvkey"></param>
87 /// <returns>The sim profile. Null if there was a request failure</returns> 87 /// <returns>The sim profile. Null if there was a request failure</returns>
88 public RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl, 88 public RegionProfileData RequestSimProfileData(string regionName, Uri gridserverUrl,
89 string gridserverSendkey, string gridserverRecvkey) 89 string gridserverSendkey, string gridserverRecvkey)
90 { 90 {
91 return RequestSimData(gridserverUrl, gridserverSendkey, "region_name_search", regionName ); 91 return RequestSimData(gridserverUrl, gridserverSendkey, "region_name_search", regionName );
92 } 92 }
93 } 93 }
94} 94}