Add a skeleton for a name value storage associated with regions

avinationmerge
Melanie 2012-08-15 01:08:30 +02:00
parent 4a969b45bd
commit 7d1bec00d5
10 changed files with 116 additions and 0 deletions

View File

@ -2207,5 +2207,18 @@ VALUES
{
return new UUID[0];
}
public void SaveExtra(UUID regionID, string name, string value)
{
}
public void RemoveExtra(UUID regionID, string name)
{
}
public Dictionary<string, string> GetExtra(UUID regionID)
{
return null;
}
}
}

View File

@ -2094,5 +2094,18 @@ namespace OpenSim.Data.MySQL
}
}
}
public void SaveExtra(UUID regionID, string name, string val)
{
}
public void RemoveExtra(UUID regionID, string name)
{
}
public Dictionary<string, string> GetExtra(UUID regionID)
{
return null;
}
}
}

View File

@ -895,3 +895,10 @@ CREATE TABLE `regionenvironment` (
COMMIT;
:VERSION 45
BEGIN;
CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`));
COMMIT;

View File

@ -156,5 +156,18 @@ namespace OpenSim.Data.Null
{
return new UUID[0];
}
public void SaveExtra(UUID regionID, string name, string value)
{
}
public void RemoveExtra(UUID regionID, string name)
{
}
public Dictionary<string, string> GetExtra(UUID regionID)
{
return null;
}
}
}

View File

@ -2894,5 +2894,18 @@ namespace OpenSim.Data.SQLite
{
return new UUID[0];
}
public void SaveExtra(UUID regionID, string name, string value)
{
}
public void RemoveExtra(UUID regionID, string name)
{
}
public Dictionary<string, string> GetExtra(UUID regionID)
{
return null;
}
}
}

View File

@ -117,5 +117,11 @@ namespace OpenSim.Region.Framework.Interfaces
void RemoveRegionEnvironmentSettings(UUID regionUUID);
UUID[] GetObjectIDs(UUID regionID);
void SaveExtra(UUID regionID, string name, string value);
void RemoveExtra(UUID regionID, string name);
Dictionary<string, string> GetExtra(UUID regionID);
}
}

View File

@ -128,6 +128,12 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="regionUUID">the region UUID</param>
void RemoveRegionEnvironmentSettings(UUID regionUUID);
void SaveExtra(UUID regionID, string name, string val);
void RemoveExtra(UUID regionID, string name);
Dictionary<string, string> GetExtra(UUID regionID);
void Shutdown();
}
}

View File

@ -177,6 +177,8 @@ namespace OpenSim.Region.Framework.Scenes
protected ICapabilitiesModule m_capsModule;
protected IGroupsModule m_groupsModule;
private Dictionary<string, string> m_extraSettings;
/// <summary>
/// Current scene frame number
/// </summary>
@ -658,6 +660,8 @@ namespace OpenSim.Region.Framework.Scenes
// FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new
// region is set up and avoid these gyrations.
RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID);
m_extraSettings = simDataService.GetExtra(RegionInfo.RegionID);
bool updatedTerrainTextures = false;
if (rs.TerrainTexture1 == UUID.Zero)
{

View File

@ -168,5 +168,20 @@ namespace OpenSim.Services.Connectors
{
return m_database.GetObjectIDs(regionID);
}
public void SaveExtra(UUID regionID, string name, string val)
{
m_database.SaveExtra(regionID, name, val);
}
public void RemoveExtra(UUID regionID, string name)
{
m_database.RemoveExtra(regionID, name);
}
public Dictionary<string, string> GetExtra(UUID regionID)
{
return m_database.GetExtra(regionID);
}
}
}

View File

@ -132,6 +132,19 @@ namespace OpenSim.Data.Null
{
return new UUID[0];
}
public void SaveExtra(UUID regionID, string name, string value)
{
}
public void RemoveExtra(UUID regionID, string name)
{
}
public Dictionary<string, string> GetExtra(UUID regionID)
{
return null;
}
}
/// <summary>
@ -328,5 +341,18 @@ namespace OpenSim.Data.Null
{
return new UUID[0];
}
public void SaveExtra(UUID regionID, string name, string value)
{
}
public void RemoveExtra(UUID regionID, string name)
{
}
public Dictionary<string, string> GetExtra(UUID regionID)
{
return null;
}
}
}