aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
authorDiva Canto2009-09-23 17:20:07 -0700
committerDiva Canto2009-09-23 17:20:07 -0700
commit67276589c883fe1a74d8d52057db1431d637dade (patch)
treedea80b87d7e11fb9a15c4b6e22c2c051e08eaf25 /OpenSim/Services/Connectors
parentMerge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-67276589c883fe1a74d8d52057db1431d637dade.zip
opensim-SC_OLD-67276589c883fe1a74d8d52057db1431d637dade.tar.gz
opensim-SC_OLD-67276589c883fe1a74d8d52057db1431d637dade.tar.bz2
opensim-SC_OLD-67276589c883fe1a74d8d52057db1431d637dade.tar.xz
Changed IGridService to use the new GridRegion data structure instead of old SimpleRegionInfo.
Added grid configs to standalones.
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs39
-rw-r--r--OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs5
2 files changed, 23 insertions, 21 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index 1962bcf..0a867db 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -35,6 +35,7 @@ using OpenSim.Framework;
35using OpenSim.Framework.Communications; 35using OpenSim.Framework.Communications;
36using OpenSim.Framework.Servers.HttpServer; 36using OpenSim.Framework.Servers.HttpServer;
37using OpenSim.Services.Interfaces; 37using OpenSim.Services.Interfaces;
38using GridRegion = OpenSim.Services.Interfaces.GridRegion;
38using OpenSim.Server.Base; 39using OpenSim.Server.Base;
39using OpenMetaverse; 40using OpenMetaverse;
40 41
@@ -85,7 +86,7 @@ namespace OpenSim.Services.Connectors
85 86
86 #region IGridService 87 #region IGridService
87 88
88 public virtual bool RegisterRegion(UUID scopeID, SimpleRegionInfo regionInfo) 89 public virtual bool RegisterRegion(UUID scopeID, GridRegion regionInfo)
89 { 90 {
90 Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs(); 91 Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs();
91 Dictionary<string, string> sendData = new Dictionary<string,string>(); 92 Dictionary<string, string> sendData = new Dictionary<string,string>();
@@ -128,7 +129,7 @@ namespace OpenSim.Services.Connectors
128 return false; 129 return false;
129 } 130 }
130 131
131 public virtual List<SimpleRegionInfo> GetNeighbours(UUID scopeID, UUID regionID) 132 public virtual List<GridRegion> GetNeighbours(UUID scopeID, UUID regionID)
132 { 133 {
133 Dictionary<string, string> sendData = new Dictionary<string, string>(); 134 Dictionary<string, string> sendData = new Dictionary<string, string>();
134 135
@@ -143,7 +144,7 @@ namespace OpenSim.Services.Connectors
143 144
144 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 145 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
145 146
146 List<SimpleRegionInfo> rinfos = new List<SimpleRegionInfo>(); 147 List<GridRegion> rinfos = new List<GridRegion>();
147 if (replyData != null) 148 if (replyData != null)
148 { 149 {
149 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values; 150 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values;
@@ -151,7 +152,7 @@ namespace OpenSim.Services.Connectors
151 { 152 {
152 if (r is Dictionary<string, object>) 153 if (r is Dictionary<string, object>)
153 { 154 {
154 SimpleRegionInfo rinfo = new SimpleRegionInfo((Dictionary<string, object>)r); 155 GridRegion rinfo = new GridRegion((Dictionary<string, object>)r);
155 rinfos.Add(rinfo); 156 rinfos.Add(rinfo);
156 } 157 }
157 else 158 else
@@ -166,7 +167,7 @@ namespace OpenSim.Services.Connectors
166 return rinfos; 167 return rinfos;
167 } 168 }
168 169
169 public virtual SimpleRegionInfo GetRegionByUUID(UUID scopeID, UUID regionID) 170 public virtual GridRegion GetRegionByUUID(UUID scopeID, UUID regionID)
170 { 171 {
171 Dictionary<string, string> sendData = new Dictionary<string, string>(); 172 Dictionary<string, string> sendData = new Dictionary<string, string>();
172 173
@@ -181,11 +182,11 @@ namespace OpenSim.Services.Connectors
181 182
182 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 183 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
183 184
184 SimpleRegionInfo rinfo = null; 185 GridRegion rinfo = null;
185 if ((replyData != null) && (replyData["result"] != null)) 186 if ((replyData != null) && (replyData["result"] != null))
186 { 187 {
187 if (replyData["result"] is Dictionary<string, object>) 188 if (replyData["result"] is Dictionary<string, object>)
188 rinfo = new SimpleRegionInfo((Dictionary<string, object>)replyData["result"]); 189 rinfo = new GridRegion((Dictionary<string, object>)replyData["result"]);
189 else 190 else
190 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByUUID {0}, {1} received invalid response", 191 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByUUID {0}, {1} received invalid response",
191 scopeID, regionID); 192 scopeID, regionID);
@@ -197,7 +198,7 @@ namespace OpenSim.Services.Connectors
197 return rinfo; 198 return rinfo;
198 } 199 }
199 200
200 public virtual SimpleRegionInfo GetRegionByPosition(UUID scopeID, int x, int y) 201 public virtual GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
201 { 202 {
202 Dictionary<string, string> sendData = new Dictionary<string, string>(); 203 Dictionary<string, string> sendData = new Dictionary<string, string>();
203 204
@@ -213,11 +214,11 @@ namespace OpenSim.Services.Connectors
213 214
214 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 215 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
215 216
216 SimpleRegionInfo rinfo = null; 217 GridRegion rinfo = null;
217 if ((replyData != null) && (replyData["result"] != null)) 218 if ((replyData != null) && (replyData["result"] != null))
218 { 219 {
219 if (replyData["result"] is Dictionary<string, object>) 220 if (replyData["result"] is Dictionary<string, object>)
220 rinfo = new SimpleRegionInfo((Dictionary<string, object>)replyData["result"]); 221 rinfo = new GridRegion((Dictionary<string, object>)replyData["result"]);
221 else 222 else
222 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received invalid response", 223 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1}-{2} received invalid response",
223 scopeID, x, y); 224 scopeID, x, y);
@@ -229,7 +230,7 @@ namespace OpenSim.Services.Connectors
229 return rinfo; 230 return rinfo;
230 } 231 }
231 232
232 public virtual SimpleRegionInfo GetRegionByName(UUID scopeID, string regionName) 233 public virtual GridRegion GetRegionByName(UUID scopeID, string regionName)
233 { 234 {
234 Dictionary<string, string> sendData = new Dictionary<string, string>(); 235 Dictionary<string, string> sendData = new Dictionary<string, string>();
235 236
@@ -244,11 +245,11 @@ namespace OpenSim.Services.Connectors
244 245
245 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 246 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
246 247
247 SimpleRegionInfo rinfo = null; 248 GridRegion rinfo = null;
248 if ((replyData != null) && (replyData["result"] != null)) 249 if ((replyData != null) && (replyData["result"] != null))
249 { 250 {
250 if (replyData["result"] is Dictionary<string, object>) 251 if (replyData["result"] is Dictionary<string, object>)
251 rinfo = new SimpleRegionInfo((Dictionary<string, object>)replyData["result"]); 252 rinfo = new GridRegion((Dictionary<string, object>)replyData["result"]);
252 else 253 else
253 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1} received invalid response", 254 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionByPosition {0}, {1} received invalid response",
254 scopeID, regionName); 255 scopeID, regionName);
@@ -260,7 +261,7 @@ namespace OpenSim.Services.Connectors
260 return rinfo; 261 return rinfo;
261 } 262 }
262 263
263 public virtual List<SimpleRegionInfo> GetRegionsByName(UUID scopeID, string name, int maxNumber) 264 public virtual List<GridRegion> GetRegionsByName(UUID scopeID, string name, int maxNumber)
264 { 265 {
265 Dictionary<string, string> sendData = new Dictionary<string, string>(); 266 Dictionary<string, string> sendData = new Dictionary<string, string>();
266 267
@@ -276,7 +277,7 @@ namespace OpenSim.Services.Connectors
276 277
277 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 278 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
278 279
279 List<SimpleRegionInfo> rinfos = new List<SimpleRegionInfo>(); 280 List<GridRegion> rinfos = new List<GridRegion>();
280 if (replyData != null) 281 if (replyData != null)
281 { 282 {
282 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values; 283 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values;
@@ -284,7 +285,7 @@ namespace OpenSim.Services.Connectors
284 { 285 {
285 if (r is Dictionary<string, object>) 286 if (r is Dictionary<string, object>)
286 { 287 {
287 SimpleRegionInfo rinfo = new SimpleRegionInfo((Dictionary<string, object>)r); 288 GridRegion rinfo = new GridRegion((Dictionary<string, object>)r);
288 rinfos.Add(rinfo); 289 rinfos.Add(rinfo);
289 } 290 }
290 else 291 else
@@ -299,7 +300,7 @@ namespace OpenSim.Services.Connectors
299 return rinfos; 300 return rinfos;
300 } 301 }
301 302
302 public virtual List<SimpleRegionInfo> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax) 303 public virtual List<GridRegion> GetRegionRange(UUID scopeID, int xmin, int xmax, int ymin, int ymax)
303 { 304 {
304 Dictionary<string, string> sendData = new Dictionary<string, string>(); 305 Dictionary<string, string> sendData = new Dictionary<string, string>();
305 306
@@ -317,7 +318,7 @@ namespace OpenSim.Services.Connectors
317 318
318 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 319 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
319 320
320 List<SimpleRegionInfo> rinfos = new List<SimpleRegionInfo>(); 321 List<GridRegion> rinfos = new List<GridRegion>();
321 if (replyData != null) 322 if (replyData != null)
322 { 323 {
323 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values; 324 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values;
@@ -325,7 +326,7 @@ namespace OpenSim.Services.Connectors
325 { 326 {
326 if (r is Dictionary<string, object>) 327 if (r is Dictionary<string, object>)
327 { 328 {
328 SimpleRegionInfo rinfo = new SimpleRegionInfo((Dictionary<string, object>)r); 329 GridRegion rinfo = new GridRegion((Dictionary<string, object>)r);
329 rinfos.Add(rinfo); 330 rinfos.Add(rinfo);
330 } 331 }
331 else 332 else
diff --git a/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs
index 6b0518c..616c2c1 100644
--- a/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/HypergridServiceConnector.cs
@@ -33,6 +33,7 @@ using System.Drawing;
33using System.Net; 33using System.Net;
34using System.Reflection; 34using System.Reflection;
35using OpenSim.Services.Interfaces; 35using OpenSim.Services.Interfaces;
36using GridRegion = OpenSim.Services.Interfaces.GridRegion;
36 37
37using OpenSim.Framework; 38using OpenSim.Framework;
38 39
@@ -54,7 +55,7 @@ namespace OpenSim.Services.Connectors.Grid
54 m_AssetService = assService; 55 m_AssetService = assService;
55 } 56 }
56 57
57 public UUID LinkRegion(SimpleRegionInfo info, out ulong realHandle) 58 public UUID LinkRegion(GridRegion info, out ulong realHandle)
58 { 59 {
59 UUID uuid = UUID.Zero; 60 UUID uuid = UUID.Zero;
60 realHandle = 0; 61 realHandle = 0;
@@ -114,7 +115,7 @@ namespace OpenSim.Services.Connectors.Grid
114 return uuid; 115 return uuid;
115 } 116 }
116 117
117 public void GetMapImage(SimpleRegionInfo info) 118 public void GetMapImage(GridRegion info)
118 { 119 {
119 try 120 try
120 { 121 {