Renamed SimProfileData to RegionProfileData

This commit is contained in:
Tleiades Hax
2007-10-17 09:36:11 +00:00
parent 7415eb7355
commit 44a7db0e44
12 changed files with 73 additions and 71 deletions

View File

@@ -56,7 +56,7 @@ namespace OpenSim.Framework.Data.DB4o
/// <param name="c">maximum X coordinate</param>
/// <param name="d">maximum Y coordinate</param>
/// <returns>An array of region profiles</returns>
public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
public RegionProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
{
return null;
}
@@ -66,7 +66,8 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary>
/// <param name="handle">The handle to search for</param>
/// <returns>A region profile</returns>
public SimProfileData GetProfileByHandle(ulong handle) {
public RegionProfileData GetProfileByHandle(ulong handle)
{
lock (manager.simProfiles)
{
foreach (LLUUID UUID in manager.simProfiles.Keys)
@@ -85,7 +86,7 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary>
/// <param name="uuid">The region ID code</param>
/// <returns>A region profile</returns>
public SimProfileData GetProfileByLLUUID(LLUUID uuid)
public RegionProfileData GetProfileByLLUUID(LLUUID uuid)
{
lock (manager.simProfiles)
{
@@ -100,7 +101,7 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary>
/// <param name="profile">The profile to add</param>
/// <returns>A dataresponse enum indicating success</returns>
public DataResponse AddProfile(SimProfileData profile)
public DataResponse AddProfile(RegionProfileData profile)
{
lock (manager.simProfiles)
{

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Data.DB4o
/// <summary>
/// A list of the current regions connected (in-memory cache)
/// </summary>
public Dictionary<LLUUID, SimProfileData> simProfiles = new Dictionary<LLUUID, SimProfileData>();
public Dictionary<LLUUID, RegionProfileData> simProfiles = new Dictionary<LLUUID, RegionProfileData>();
/// <summary>
/// Database File Name
/// </summary>
@@ -56,9 +56,10 @@ namespace OpenSim.Framework.Data.DB4o
dbfl = db4odb;
IObjectContainer database;
database = Db4oFactory.OpenFile(dbfl);
IObjectSet result = database.Get(typeof(SimProfileData));
IObjectSet result = database.Get(typeof(RegionProfileData));
// Loads the file into the in-memory cache
foreach(SimProfileData row in result) {
foreach (RegionProfileData row in result)
{
simProfiles.Add(row.UUID, row);
}
database.Close();
@@ -69,7 +70,7 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary>
/// <param name="row">The profile to add</param>
/// <returns>Successful?</returns>
public bool AddRow(SimProfileData row)
public bool AddRow(RegionProfileData row)
{
if (simProfiles.ContainsKey(row.UUID))
{