aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-08-15 01:08:30 +0200
committerMelanie2012-08-15 01:08:30 +0200
commit7d1bec00d5cda6d7024a3d64b5913b5c08c15a3f (patch)
treeb069ddb4607d598ff93b60103ba5756cca3520ae /OpenSim
parentRemove NPC debug spam (diff)
downloadopensim-SC_OLD-7d1bec00d5cda6d7024a3d64b5913b5c08c15a3f.zip
opensim-SC_OLD-7d1bec00d5cda6d7024a3d64b5913b5c08c15a3f.tar.gz
opensim-SC_OLD-7d1bec00d5cda6d7024a3d64b5913b5c08c15a3f.tar.bz2
opensim-SC_OLD-7d1bec00d5cda6d7024a3d64b5913b5c08c15a3f.tar.xz
Add a skeleton for a name value storage associated with regions
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLSimulationData.cs13
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs13
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations7
-rw-r--r--OpenSim/Data/Null/NullSimulationData.cs13
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs13
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationDataService.cs15
-rw-r--r--OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs26
10 files changed, 116 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
index 47fb6d7..5bb6ec9 100644
--- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
@@ -2207,5 +2207,18 @@ VALUES
2207 { 2207 {
2208 return new UUID[0]; 2208 return new UUID[0];
2209 } 2209 }
2210
2211 public void SaveExtra(UUID regionID, string name, string value)
2212 {
2213 }
2214
2215 public void RemoveExtra(UUID regionID, string name)
2216 {
2217 }
2218
2219 public Dictionary<string, string> GetExtra(UUID regionID)
2220 {
2221 return null;
2222 }
2210 } 2223 }
2211} 2224}
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 29bd6b6..03cfd02 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -2094,5 +2094,18 @@ namespace OpenSim.Data.MySQL
2094 } 2094 }
2095 } 2095 }
2096 } 2096 }
2097
2098 public void SaveExtra(UUID regionID, string name, string val)
2099 {
2100 }
2101
2102 public void RemoveExtra(UUID regionID, string name)
2103 {
2104 }
2105
2106 public Dictionary<string, string> GetExtra(UUID regionID)
2107 {
2108 return null;
2109 }
2097 } 2110 }
2098} 2111}
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index db0d0ec..c4b0832 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -895,3 +895,10 @@ CREATE TABLE `regionenvironment` (
895 895
896COMMIT; 896COMMIT;
897 897
898:VERSION 45
899
900BEGIN;
901
902CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`));
903
904COMMIT;
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index a39ef0b..e7e5c41 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -156,5 +156,18 @@ namespace OpenSim.Data.Null
156 { 156 {
157 return new UUID[0]; 157 return new UUID[0];
158 } 158 }
159
160 public void SaveExtra(UUID regionID, string name, string value)
161 {
162 }
163
164 public void RemoveExtra(UUID regionID, string name)
165 {
166 }
167
168 public Dictionary<string, string> GetExtra(UUID regionID)
169 {
170 return null;
171 }
159 } 172 }
160} 173}
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 9175a8f..431709f 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -2894,5 +2894,18 @@ namespace OpenSim.Data.SQLite
2894 { 2894 {
2895 return new UUID[0]; 2895 return new UUID[0];
2896 } 2896 }
2897
2898 public void SaveExtra(UUID regionID, string name, string value)
2899 {
2900 }
2901
2902 public void RemoveExtra(UUID regionID, string name)
2903 {
2904 }
2905
2906 public Dictionary<string, string> GetExtra(UUID regionID)
2907 {
2908 return null;
2909 }
2897 } 2910 }
2898} 2911}
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
index ccb583d..3e97a7a 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
@@ -117,5 +117,11 @@ namespace OpenSim.Region.Framework.Interfaces
117 void RemoveRegionEnvironmentSettings(UUID regionUUID); 117 void RemoveRegionEnvironmentSettings(UUID regionUUID);
118 118
119 UUID[] GetObjectIDs(UUID regionID); 119 UUID[] GetObjectIDs(UUID regionID);
120
121 void SaveExtra(UUID regionID, string name, string value);
122
123 void RemoveExtra(UUID regionID, string name);
124
125 Dictionary<string, string> GetExtra(UUID regionID);
120 } 126 }
121} 127}
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index d7c80f7..17bd48b 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -128,6 +128,12 @@ namespace OpenSim.Region.Framework.Interfaces
128 /// <param name="regionUUID">the region UUID</param> 128 /// <param name="regionUUID">the region UUID</param>
129 void RemoveRegionEnvironmentSettings(UUID regionUUID); 129 void RemoveRegionEnvironmentSettings(UUID regionUUID);
130 130
131 void SaveExtra(UUID regionID, string name, string val);
132
133 void RemoveExtra(UUID regionID, string name);
134
135 Dictionary<string, string> GetExtra(UUID regionID);
136
131 void Shutdown(); 137 void Shutdown();
132 } 138 }
133} 139}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1fc4c52..79ebc6e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -177,6 +177,8 @@ namespace OpenSim.Region.Framework.Scenes
177 protected ICapabilitiesModule m_capsModule; 177 protected ICapabilitiesModule m_capsModule;
178 protected IGroupsModule m_groupsModule; 178 protected IGroupsModule m_groupsModule;
179 179
180 private Dictionary<string, string> m_extraSettings;
181
180 /// <summary> 182 /// <summary>
181 /// Current scene frame number 183 /// Current scene frame number
182 /// </summary> 184 /// </summary>
@@ -658,6 +660,8 @@ namespace OpenSim.Region.Framework.Scenes
658 // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new 660 // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new
659 // region is set up and avoid these gyrations. 661 // region is set up and avoid these gyrations.
660 RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID); 662 RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID);
663 m_extraSettings = simDataService.GetExtra(RegionInfo.RegionID);
664
661 bool updatedTerrainTextures = false; 665 bool updatedTerrainTextures = false;
662 if (rs.TerrainTexture1 == UUID.Zero) 666 if (rs.TerrainTexture1 == UUID.Zero)
663 { 667 {
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
index 6db830b..96c02d9 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
@@ -168,5 +168,20 @@ namespace OpenSim.Services.Connectors
168 { 168 {
169 return m_database.GetObjectIDs(regionID); 169 return m_database.GetObjectIDs(regionID);
170 } 170 }
171
172 public void SaveExtra(UUID regionID, string name, string val)
173 {
174 m_database.SaveExtra(regionID, name, val);
175 }
176
177 public void RemoveExtra(UUID regionID, string name)
178 {
179 m_database.RemoveExtra(regionID, name);
180 }
181
182 public Dictionary<string, string> GetExtra(UUID regionID)
183 {
184 return m_database.GetExtra(regionID);
185 }
171 } 186 }
172} 187}
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
index 3f99a39..5c1ec0b 100644
--- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
@@ -132,6 +132,19 @@ namespace OpenSim.Data.Null
132 { 132 {
133 return new UUID[0]; 133 return new UUID[0];
134 } 134 }
135
136 public void SaveExtra(UUID regionID, string name, string value)
137 {
138 }
139
140 public void RemoveExtra(UUID regionID, string name)
141 {
142 }
143
144 public Dictionary<string, string> GetExtra(UUID regionID)
145 {
146 return null;
147 }
135 } 148 }
136 149
137 /// <summary> 150 /// <summary>
@@ -328,5 +341,18 @@ namespace OpenSim.Data.Null
328 { 341 {
329 return new UUID[0]; 342 return new UUID[0];
330 } 343 }
344
345 public void SaveExtra(UUID regionID, string name, string value)
346 {
347 }
348
349 public void RemoveExtra(UUID regionID, string name)
350 {
351 }
352
353 public Dictionary<string, string> GetExtra(UUID regionID)
354 {
355 return null;
356 }
331 } 357 }
332} 358}