aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IGridService.cs
diff options
context:
space:
mode:
authorRobert Adams2013-12-28 06:58:15 -0800
committerRobert Adams2013-12-28 06:58:15 -0800
commit6869633d76b2a6664743a608e4284b8dd7df85a6 (patch)
treee976908cac58662ac37b0dfee8c748f314a259c7 /OpenSim/Services/Interfaces/IGridService.cs
parentMerge branch 'justincc-master' (diff)
downloadopensim-SC_OLD-6869633d76b2a6664743a608e4284b8dd7df85a6.zip
opensim-SC_OLD-6869633d76b2a6664743a608e4284b8dd7df85a6.tar.gz
opensim-SC_OLD-6869633d76b2a6664743a608e4284b8dd7df85a6.tar.bz2
opensim-SC_OLD-6869633d76b2a6664743a608e4284b8dd7df85a6.tar.xz
Add serialization/deserialization of region size to RegionInfo, GridRegion, and RegionData.
This does not modify interfaces or handling of variable sized regions. This only enables the loading and storing of the region size and the reporting of the region size in grid service responses. The database tables already have the code to load and store the region size.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 88ac5b3..651bd97 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -177,6 +177,7 @@ namespace OpenSim.Services.Interfaces
177 177
178 /// <summary> 178 /// <summary>
179 /// The location of this region in meters. 179 /// The location of this region in meters.
180 /// DANGER DANGER! Note that this name means something different in RegionInfo.
180 /// </summary> 181 /// </summary>
181 public int RegionLocX 182 public int RegionLocX
182 { 183 {
@@ -185,8 +186,12 @@ namespace OpenSim.Services.Interfaces
185 } 186 }
186 protected int m_regionLocX; 187 protected int m_regionLocX;
187 188
189 public int RegionSizeX { get; set; }
190 public int RegionSizeY { get; set; }
191
188 /// <summary> 192 /// <summary>
189 /// The location of this region in meters. 193 /// The location of this region in meters.
194 /// DANGER DANGER! Note that this name means something different in RegionInfo.
190 /// </summary> 195 /// </summary>
191 public int RegionLocY 196 public int RegionLocY
192 { 197 {
@@ -218,10 +223,13 @@ namespace OpenSim.Services.Interfaces
218 m_serverURI = string.Empty; 223 m_serverURI = string.Empty;
219 } 224 }
220 225
226 /*
221 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri) 227 public GridRegion(int regionLocX, int regionLocY, IPEndPoint internalEndPoint, string externalUri)
222 { 228 {
223 m_regionLocX = regionLocX; 229 m_regionLocX = regionLocX;
224 m_regionLocY = regionLocY; 230 m_regionLocY = regionLocY;
231 RegionSizeX = (int)Constants.RegionSize;
232 RegionSizeY = (int)Constants.RegionSize;
225 233
226 m_internalEndPoint = internalEndPoint; 234 m_internalEndPoint = internalEndPoint;
227 m_externalHostName = externalUri; 235 m_externalHostName = externalUri;
@@ -231,16 +239,21 @@ namespace OpenSim.Services.Interfaces
231 { 239 {
232 m_regionLocX = regionLocX; 240 m_regionLocX = regionLocX;
233 m_regionLocY = regionLocY; 241 m_regionLocY = regionLocY;
242 RegionSizeX = (int)Constants.RegionSize;
243 RegionSizeY = (int)Constants.RegionSize;
234 244
235 m_externalHostName = externalUri; 245 m_externalHostName = externalUri;
236 246
237 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)port); 247 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int)port);
238 } 248 }
249 */
239 250
240 public GridRegion(uint xcell, uint ycell) 251 public GridRegion(uint xcell, uint ycell)
241 { 252 {
242 m_regionLocX = (int)(xcell * Constants.RegionSize); 253 m_regionLocX = (int)(xcell * Constants.RegionSize);
243 m_regionLocY = (int)(ycell * Constants.RegionSize); 254 m_regionLocY = (int)(ycell * Constants.RegionSize);
255 RegionSizeX = (int)Constants.RegionSize;
256 RegionSizeY = (int)Constants.RegionSize;
244 } 257 }
245 258
246 public GridRegion(RegionInfo ConvertFrom) 259 public GridRegion(RegionInfo ConvertFrom)
@@ -248,6 +261,8 @@ namespace OpenSim.Services.Interfaces
248 m_regionName = ConvertFrom.RegionName; 261 m_regionName = ConvertFrom.RegionName;
249 m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize); 262 m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize);
250 m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize); 263 m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize);
264 RegionSizeX = (int)ConvertFrom.RegionSizeX;
265 RegionSizeY = (int)ConvertFrom.RegionSizeY;
251 m_internalEndPoint = ConvertFrom.InternalEndPoint; 266 m_internalEndPoint = ConvertFrom.InternalEndPoint;
252 m_externalHostName = ConvertFrom.ExternalHostName; 267 m_externalHostName = ConvertFrom.ExternalHostName;
253 m_httpPort = ConvertFrom.HttpPort; 268 m_httpPort = ConvertFrom.HttpPort;
@@ -266,6 +281,8 @@ namespace OpenSim.Services.Interfaces
266 m_regionName = ConvertFrom.RegionName; 281 m_regionName = ConvertFrom.RegionName;
267 m_regionLocX = ConvertFrom.RegionLocX; 282 m_regionLocX = ConvertFrom.RegionLocX;
268 m_regionLocY = ConvertFrom.RegionLocY; 283 m_regionLocY = ConvertFrom.RegionLocY;
284 RegionSizeX = ConvertFrom.RegionSizeX;
285 RegionSizeY = ConvertFrom.RegionSizeY;
269 m_internalEndPoint = ConvertFrom.InternalEndPoint; 286 m_internalEndPoint = ConvertFrom.InternalEndPoint;
270 m_externalHostName = ConvertFrom.ExternalHostName; 287 m_externalHostName = ConvertFrom.ExternalHostName;
271 m_httpPort = ConvertFrom.HttpPort; 288 m_httpPort = ConvertFrom.HttpPort;
@@ -373,6 +390,8 @@ namespace OpenSim.Services.Interfaces
373 kvp["uuid"] = RegionID.ToString(); 390 kvp["uuid"] = RegionID.ToString();
374 kvp["locX"] = RegionLocX.ToString(); 391 kvp["locX"] = RegionLocX.ToString();
375 kvp["locY"] = RegionLocY.ToString(); 392 kvp["locY"] = RegionLocY.ToString();
393 kvp["sizeX"] = RegionSizeX.ToString();
394 kvp["sizeY"] = RegionSizeY.ToString();
376 kvp["regionName"] = RegionName; 395 kvp["regionName"] = RegionName;
377 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString(); 396 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
378 kvp["serverHttpPort"] = HttpPort.ToString(); 397 kvp["serverHttpPort"] = HttpPort.ToString();
@@ -399,6 +418,12 @@ namespace OpenSim.Services.Interfaces
399 if (kvp.ContainsKey("locY")) 418 if (kvp.ContainsKey("locY"))
400 RegionLocY = Convert.ToInt32((string)kvp["locY"]); 419 RegionLocY = Convert.ToInt32((string)kvp["locY"]);
401 420
421 if (kvp.ContainsKey("sizeX"))
422 RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]);
423
424 if (kvp.ContainsKey("sizeY"))
425 RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]);
426
402 if (kvp.ContainsKey("regionName")) 427 if (kvp.ContainsKey("regionName"))
403 RegionName = (string)kvp["regionName"]; 428 RegionName = (string)kvp["regionName"];
404 429