diff options
Diffstat (limited to 'OpenSim/Framework/Data')
-rw-r--r-- | OpenSim/Framework/Data/GridData.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Data/ILogData.cs | 7 | ||||
-rw-r--r-- | OpenSim/Framework/Data/IniConfig.cs | 22 | ||||
-rw-r--r-- | OpenSim/Framework/Data/Properties/AssemblyInfo.cs | 31 | ||||
-rw-r--r-- | OpenSim/Framework/Data/RegionProfileData.cs | 63 | ||||
-rw-r--r-- | OpenSim/Framework/Data/ReservationData.cs | 4 |
6 files changed, 73 insertions, 57 deletions
diff --git a/OpenSim/Framework/Data/GridData.cs b/OpenSim/Framework/Data/GridData.cs index 2a5b8f6..b3b6ed7 100644 --- a/OpenSim/Framework/Data/GridData.cs +++ b/OpenSim/Framework/Data/GridData.cs | |||
@@ -106,6 +106,5 @@ namespace OpenSim.Framework.Data | |||
106 | DataResponse AddProfile(RegionProfileData profile); | 106 | DataResponse AddProfile(RegionProfileData profile); |
107 | 107 | ||
108 | ReservationData GetReservationAtPoint(uint x, uint y); | 108 | ReservationData GetReservationAtPoint(uint x, uint y); |
109 | |||
110 | } | 109 | } |
111 | } | 110 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/ILogData.cs b/OpenSim/Framework/Data/ILogData.cs index b222a28..373d8e1 100644 --- a/OpenSim/Framework/Data/ILogData.cs +++ b/OpenSim/Framework/Data/ILogData.cs | |||
@@ -63,7 +63,9 @@ namespace OpenSim.Framework.Data | |||
63 | /// </summary> | 63 | /// </summary> |
64 | public interface ILogData | 64 | public interface ILogData |
65 | { | 65 | { |
66 | void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage); | 66 | void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, |
67 | string logMessage); | ||
68 | |||
67 | /// <summary> | 69 | /// <summary> |
68 | /// Initialises the interface | 70 | /// Initialises the interface |
69 | /// </summary> | 71 | /// </summary> |
@@ -86,5 +88,4 @@ namespace OpenSim.Framework.Data | |||
86 | /// <returns>A string containing the plugin version</returns> | 88 | /// <returns>A string containing the plugin version</returns> |
87 | string getVersion(); | 89 | string getVersion(); |
88 | } | 90 | } |
89 | 91 | } \ No newline at end of file | |
90 | } | ||
diff --git a/OpenSim/Framework/Data/IniConfig.cs b/OpenSim/Framework/Data/IniConfig.cs index f0f63b4..048b491 100644 --- a/OpenSim/Framework/Data/IniConfig.cs +++ b/OpenSim/Framework/Data/IniConfig.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | using System.IO; | 28 | using System.IO; |
29 | using System.Text.RegularExpressions; | 29 | using System.Text.RegularExpressions; |
30 | |||
30 | /* | 31 | /* |
31 | Taken from public code listing at by Alex Pinsker | 32 | Taken from public code listing at by Alex Pinsker |
32 | http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html | 33 | http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html |
@@ -52,7 +53,8 @@ namespace OpenSim.Framework.Data | |||
52 | RegexOptions.Compiled | | 53 | RegexOptions.Compiled | |
53 | RegexOptions.CultureInvariant); | 54 | RegexOptions.CultureInvariant); |
54 | } | 55 | } |
55 | static private Regex _iniKeyValuePatternRegex; | 56 | |
57 | private static Regex _iniKeyValuePatternRegex; | ||
56 | 58 | ||
57 | public IniFile(string iniFileName) | 59 | public IniFile(string iniFileName) |
58 | { | 60 | { |
@@ -62,7 +64,7 @@ namespace OpenSim.Framework.Data | |||
62 | public string ParseFileReadValue(string key) | 64 | public string ParseFileReadValue(string key) |
63 | { | 65 | { |
64 | using (StreamReader reader = | 66 | using (StreamReader reader = |
65 | new StreamReader(_iniFileName)) | 67 | new StreamReader(_iniFileName)) |
66 | { | 68 | { |
67 | do | 69 | do |
68 | { | 70 | { |
@@ -72,18 +74,16 @@ namespace OpenSim.Framework.Data | |||
72 | if (match.Success) | 74 | if (match.Success) |
73 | { | 75 | { |
74 | string currentKey = | 76 | string currentKey = |
75 | match.Groups["Key"].Value as string; | 77 | match.Groups["Key"].Value as string; |
76 | if (currentKey != null && | 78 | if (currentKey != null && |
77 | currentKey.Trim().CompareTo(key) == 0) | 79 | currentKey.Trim().CompareTo(key) == 0) |
78 | { | 80 | { |
79 | string value = | 81 | string value = |
80 | match.Groups["Value"].Value as string; | 82 | match.Groups["Value"].Value as string; |
81 | return value; | 83 | return value; |
82 | } | 84 | } |
83 | } | 85 | } |
84 | 86 | } while (reader.Peek() != -1); | |
85 | } | ||
86 | while (reader.Peek() != -1); | ||
87 | } | 87 | } |
88 | return null; | 88 | return null; |
89 | } | 89 | } |
@@ -91,6 +91,8 @@ namespace OpenSim.Framework.Data | |||
91 | public string IniFileName | 91 | public string IniFileName |
92 | { | 92 | { |
93 | get { return _iniFileName; } | 93 | get { return _iniFileName; } |
94 | } private string _iniFileName; | 94 | } |
95 | |||
96 | private string _iniFileName; | ||
95 | } | 97 | } |
96 | } | 98 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs index 556d589..51050d1 100644 --- a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs | |||
@@ -1,24 +1,28 @@ | |||
1 | using System.Reflection; | 1 | using System.Reflection; |
2 | using System.Runtime.InteropServices; | 2 | using System.Runtime.InteropServices; |
3 | |||
3 | // General Information about an assembly is controlled through the following | 4 | // General Information about an assembly is controlled through the following |
4 | // set of attributes. Change these attribute values to modify the information | 5 | // set of attributes. Change these attribute values to modify the information |
5 | // associated with an assembly. | 6 | // associated with an assembly. |
6 | [assembly: AssemblyTitle("OpenSim.Framework.Data")] | 7 | |
7 | [assembly: AssemblyDescription("")] | 8 | [assembly : AssemblyTitle("OpenSim.Framework.Data")] |
8 | [assembly: AssemblyConfiguration("")] | 9 | [assembly : AssemblyDescription("")] |
9 | [assembly: AssemblyCompany("")] | 10 | [assembly : AssemblyConfiguration("")] |
10 | [assembly: AssemblyProduct("OpenSim.Framework.Data")] | 11 | [assembly : AssemblyCompany("")] |
11 | [assembly: AssemblyCopyright("Copyright © 2007")] | 12 | [assembly : AssemblyProduct("OpenSim.Framework.Data")] |
12 | [assembly: AssemblyTrademark("")] | 13 | [assembly : AssemblyCopyright("Copyright © 2007")] |
13 | [assembly: AssemblyCulture("")] | 14 | [assembly : AssemblyTrademark("")] |
15 | [assembly : AssemblyCulture("")] | ||
14 | 16 | ||
15 | // Setting ComVisible to false makes the types in this assembly not visible | 17 | // Setting ComVisible to false makes the types in this assembly not visible |
16 | // to COM components. If you need to access a type in this assembly from | 18 | // to COM components. If you need to access a type in this assembly from |
17 | // COM, set the ComVisible attribute to true on that type. | 19 | // COM, set the ComVisible attribute to true on that type. |
18 | [assembly: ComVisible(false)] | 20 | |
21 | [assembly : ComVisible(false)] | ||
19 | 22 | ||
20 | // The following GUID is for the ID of the typelib if this project is exposed to COM | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM |
21 | [assembly: Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")] | 24 | |
25 | [assembly : Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")] | ||
22 | 26 | ||
23 | // Version information for an assembly consists of the following four values: | 27 | // Version information for an assembly consists of the following four values: |
24 | // | 28 | // |
@@ -29,5 +33,6 @@ using System.Runtime.InteropServices; | |||
29 | // | 33 | // |
30 | // You can specify all the values or you can default the Revision and Build Numbers | 34 | // You can specify all the values or you can default the Revision and Build Numbers |
31 | // by using the '*' as shown below: | 35 | // by using the '*' as shown below: |
32 | [assembly: AssemblyVersion("1.0.0.0")] | 36 | |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 37 | [assembly : AssemblyVersion("1.0.0.0")] |
38 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | ||
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 |
diff --git a/OpenSim/Framework/Data/ReservationData.cs b/OpenSim/Framework/Data/ReservationData.cs index 1e606ee..06adf04 100644 --- a/OpenSim/Framework/Data/ReservationData.cs +++ b/OpenSim/Framework/Data/ReservationData.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Data | |||
36 | public int reservationMinY = 0; | 36 | public int reservationMinY = 0; |
37 | public int reservationMaxX = 65536; | 37 | public int reservationMaxX = 65536; |
38 | public int reservationMaxY = 65536; | 38 | public int reservationMaxY = 65536; |
39 | 39 | ||
40 | public string reservationName = ""; | 40 | public string reservationName = ""; |
41 | public string reservationCompany = ""; | 41 | public string reservationCompany = ""; |
42 | public bool status = true; | 42 | public bool status = true; |
@@ -44,4 +44,4 @@ namespace OpenSim.Framework.Data | |||
44 | public string gridSendKey = ""; | 44 | public string gridSendKey = ""; |
45 | public string gridRecvKey = ""; | 45 | public string gridRecvKey = ""; |
46 | } | 46 | } |
47 | } | 47 | } \ No newline at end of file |