diff options
author | Melanie | 2012-08-15 02:06:22 +0100 |
---|---|---|
committer | Melanie | 2012-08-15 02:06:22 +0100 |
commit | dc82ad0f7abe5f09675dfc3768da2a0134503916 (patch) | |
tree | e0745126d25725ca5650a088de9d54fd4e6bf349 /OpenSim | |
parent | Actually add the module (diff) | |
download | opensim-SC_OLD-dc82ad0f7abe5f09675dfc3768da2a0134503916.zip opensim-SC_OLD-dc82ad0f7abe5f09675dfc3768da2a0134503916.tar.gz opensim-SC_OLD-dc82ad0f7abe5f09675dfc3768da2a0134503916.tar.bz2 opensim-SC_OLD-dc82ad0f7abe5f09675dfc3768da2a0134503916.tar.xz |
Add a skeleton for a name value storage associated with regions
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 13 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 13 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/RegionStore.migrations | 7 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullSimulationData.cs | 13 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteSimulationData.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 4 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationDataService.cs | 14 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 26 |
10 files changed, 113 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index 3f29f5b..17f42e1 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs | |||
@@ -2202,5 +2202,18 @@ VALUES | |||
2202 | } | 2202 | } |
2203 | } | 2203 | } |
2204 | } | 2204 | } |
2205 | |||
2206 | public void SaveExtra(UUID regionID, string name, string value) | ||
2207 | { | ||
2208 | } | ||
2209 | |||
2210 | public void RemoveExtra(UUID regionID, string name) | ||
2211 | { | ||
2212 | } | ||
2213 | |||
2214 | public Dictionary<string, string> GetExtra(UUID regionID) | ||
2215 | { | ||
2216 | return null; | ||
2217 | } | ||
2205 | } | 2218 | } |
2206 | } | 2219 | } |
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 1a2e113..be985ab 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -1966,5 +1966,18 @@ namespace OpenSim.Data.MySQL | |||
1966 | } | 1966 | } |
1967 | } | 1967 | } |
1968 | } | 1968 | } |
1969 | |||
1970 | public void SaveExtra(UUID regionID, string name, string val) | ||
1971 | { | ||
1972 | } | ||
1973 | |||
1974 | public void RemoveExtra(UUID regionID, string name) | ||
1975 | { | ||
1976 | } | ||
1977 | |||
1978 | public Dictionary<string, string> GetExtra(UUID regionID) | ||
1979 | { | ||
1980 | return null; | ||
1981 | } | ||
1969 | } | 1982 | } |
1970 | } | 1983 | } |
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 4a925fb..5b59779 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -895,3 +895,10 @@ CREATE TABLE `regionenvironment` ( | |||
895 | 895 | ||
896 | COMMIT; | 896 | COMMIT; |
897 | 897 | ||
898 | :VERSION 45 | ||
899 | |||
900 | BEGIN; | ||
901 | |||
902 | CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`)); | ||
903 | |||
904 | COMMIT; | ||
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs index 8f2314f..4979cf6 100644 --- a/OpenSim/Data/Null/NullSimulationData.cs +++ b/OpenSim/Data/Null/NullSimulationData.cs | |||
@@ -151,5 +151,18 @@ namespace OpenSim.Data.Null | |||
151 | public void Shutdown() | 151 | public void Shutdown() |
152 | { | 152 | { |
153 | } | 153 | } |
154 | |||
155 | public void SaveExtra(UUID regionID, string name, string value) | ||
156 | { | ||
157 | } | ||
158 | |||
159 | public void RemoveExtra(UUID regionID, string name) | ||
160 | { | ||
161 | } | ||
162 | |||
163 | public Dictionary<string, string> GetExtra(UUID regionID) | ||
164 | { | ||
165 | return null; | ||
166 | } | ||
154 | } | 167 | } |
155 | } | 168 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index f40e866..56df3cb 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -2890,5 +2890,17 @@ namespace OpenSim.Data.SQLite | |||
2890 | } | 2890 | } |
2891 | } | 2891 | } |
2892 | 2892 | ||
2893 | public void SaveExtra(UUID regionID, string name, string value) | ||
2894 | { | ||
2895 | } | ||
2896 | |||
2897 | public void RemoveExtra(UUID regionID, string name) | ||
2898 | { | ||
2899 | } | ||
2900 | |||
2901 | public Dictionary<string, string> GetExtra(UUID regionID) | ||
2902 | { | ||
2903 | return null; | ||
2904 | } | ||
2893 | } | 2905 | } |
2894 | } | 2906 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs index 0fcafcc..085b5ca 100644 --- a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs +++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs | |||
@@ -116,5 +116,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
116 | /// <param name="regionUUID">the region UUID</param> | 116 | /// <param name="regionUUID">the region UUID</param> |
117 | void RemoveRegionEnvironmentSettings(UUID regionUUID); | 117 | void RemoveRegionEnvironmentSettings(UUID regionUUID); |
118 | 118 | ||
119 | void SaveExtra(UUID regionID, string name, string value); | ||
120 | |||
121 | void RemoveExtra(UUID regionID, string name); | ||
122 | |||
123 | Dictionary<string, string> GetExtra(UUID regionID); | ||
119 | } | 124 | } |
120 | } | 125 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs index e424976..3787ca0 100644 --- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs | |||
@@ -127,6 +127,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
127 | /// <param name="regionUUID">the region UUID</param> | 127 | /// <param name="regionUUID">the region UUID</param> |
128 | void RemoveRegionEnvironmentSettings(UUID regionUUID); | 128 | void RemoveRegionEnvironmentSettings(UUID regionUUID); |
129 | 129 | ||
130 | void SaveExtra(UUID regionID, string name, string val); | ||
131 | |||
132 | void RemoveExtra(UUID regionID, string name); | ||
133 | |||
134 | Dictionary<string, string> GetExtra(UUID regionID); | ||
135 | |||
130 | void Shutdown(); | 136 | void Shutdown(); |
131 | } | 137 | } |
132 | } | 138 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0967c34..59f49ea 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -174,6 +174,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
174 | protected ICapabilitiesModule m_capsModule; | 174 | protected ICapabilitiesModule m_capsModule; |
175 | protected IGroupsModule m_groupsModule; | 175 | protected IGroupsModule m_groupsModule; |
176 | 176 | ||
177 | private Dictionary<string, string> m_extraSettings; | ||
178 | |||
177 | /// <summary> | 179 | /// <summary> |
178 | /// Current scene frame number | 180 | /// Current scene frame number |
179 | /// </summary> | 181 | /// </summary> |
@@ -635,6 +637,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
635 | // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new | 637 | // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new |
636 | // region is set up and avoid these gyrations. | 638 | // region is set up and avoid these gyrations. |
637 | RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID); | 639 | RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID); |
640 | m_extraSettings = simDataService.GetExtra(RegionInfo.RegionID); | ||
641 | |||
638 | bool updatedTerrainTextures = false; | 642 | bool updatedTerrainTextures = false; |
639 | if (rs.TerrainTexture1 == UUID.Zero) | 643 | if (rs.TerrainTexture1 == UUID.Zero) |
640 | { | 644 | { |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs index c9cbbfa..504fcaf 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs | |||
@@ -164,5 +164,19 @@ namespace OpenSim.Services.Connectors | |||
164 | m_database.RemoveRegionEnvironmentSettings(regionUUID); | 164 | m_database.RemoveRegionEnvironmentSettings(regionUUID); |
165 | } | 165 | } |
166 | 166 | ||
167 | public void SaveExtra(UUID regionID, string name, string val) | ||
168 | { | ||
169 | m_database.SaveExtra(regionID, name, val); | ||
170 | } | ||
171 | |||
172 | public void RemoveExtra(UUID regionID, string name) | ||
173 | { | ||
174 | m_database.RemoveExtra(regionID, name); | ||
175 | } | ||
176 | |||
177 | public Dictionary<string, string> GetExtra(UUID regionID) | ||
178 | { | ||
179 | return m_database.GetExtra(regionID); | ||
180 | } | ||
167 | } | 181 | } |
168 | } | 182 | } |
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index 1845eb9..ed29c39 100644 --- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | |||
@@ -127,6 +127,19 @@ namespace OpenSim.Data.Null | |||
127 | { | 127 | { |
128 | m_store.RemoveRegionEnvironmentSettings(regionUUID); | 128 | m_store.RemoveRegionEnvironmentSettings(regionUUID); |
129 | } | 129 | } |
130 | |||
131 | public void SaveExtra(UUID regionID, string name, string value) | ||
132 | { | ||
133 | } | ||
134 | |||
135 | public void RemoveExtra(UUID regionID, string name) | ||
136 | { | ||
137 | } | ||
138 | |||
139 | public Dictionary<string, string> GetExtra(UUID regionID) | ||
140 | { | ||
141 | return null; | ||
142 | } | ||
130 | } | 143 | } |
131 | 144 | ||
132 | /// <summary> | 145 | /// <summary> |
@@ -318,5 +331,18 @@ namespace OpenSim.Data.Null | |||
318 | public void Shutdown() | 331 | public void Shutdown() |
319 | { | 332 | { |
320 | } | 333 | } |
334 | |||
335 | public void SaveExtra(UUID regionID, string name, string value) | ||
336 | { | ||
337 | } | ||
338 | |||
339 | public void RemoveExtra(UUID regionID, string name) | ||
340 | { | ||
341 | } | ||
342 | |||
343 | public Dictionary<string, string> GetExtra(UUID regionID) | ||
344 | { | ||
345 | return null; | ||
346 | } | ||
321 | } | 347 | } |
322 | } | 348 | } |