aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/RegionProfileData.cs
diff options
context:
space:
mode:
authorlbsa712009-03-10 09:05:06 +0000
committerlbsa712009-03-10 09:05:06 +0000
commit1b34b94331ca810ed53669699abcff3a6a99de83 (patch)
tree9a4f1c55c287f733b373a46c5a9aa44c0932f5bf /OpenSim/Data/RegionProfileData.cs
parentFrom: Alan Webb <alan_webb@us.ibm.com> (diff)
downloadopensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.zip
opensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.tar.gz
opensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.tar.bz2
opensim-SC_OLD-1b34b94331ca810ed53669699abcff3a6a99de83.tar.xz
* Refactored out Create() methods to ensure proper transformation between RegionProfileData and RegionInfo
* Created ToRegionInfo method, still not using it pending peer review. * This is a preparatory commit for a subsequent login service refactoring.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/RegionProfileData.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs
index 0b757f3..5476233 100644
--- a/OpenSim/Data/RegionProfileData.cs
+++ b/OpenSim/Data/RegionProfileData.cs
@@ -279,6 +279,30 @@ namespace OpenSim.Data
279 get { return originUUID; } 279 get { return originUUID; }
280 set { originUUID = value; } 280 set { originUUID = value; }
281 } 281 }
282 282
283 public RegionInfo ToRegionInfo( )
284 {
285 return RegionInfo.Create(UUID, regionName, regionLocX, regionLocY, serverIP, httpPort, serverPort, remotingPort);
286 }
287
288 public static RegionProfileData Create(UUID regionID, string regionName, uint locX, uint locY, string externalHostName, uint regionPort, uint httpPort, uint remotingPort, string serverUri)
289 {
290 RegionProfileData regionProfile;
291 regionProfile = new RegionProfileData();
292 regionProfile.regionLocX = locX;
293 regionProfile.regionLocY = locY;
294 regionProfile.regionHandle =
295 Utils.UIntsToLong((regionProfile.regionLocX * Constants.RegionSize),
296 (regionProfile.regionLocY*Constants.RegionSize));
297 regionProfile.serverIP = externalHostName;
298 regionProfile.serverPort = regionPort;
299 regionProfile.httpPort = httpPort;
300 regionProfile.remotingPort = remotingPort;
301 regionProfile.serverURI = serverUri;
302 regionProfile.httpServerURI = "http://" + externalHostName + ":" + httpPort + "/";
303 regionProfile.UUID = regionID;
304 regionProfile.regionName = regionName;
305 return regionProfile;
306 }
283 } 307 }
284} 308}