diff options
author | Mic Bowman | 2013-01-30 14:45:03 -0800 |
---|---|---|
committer | Mic Bowman | 2013-01-30 14:45:03 -0800 |
commit | a0ef3df1941147cfc894493950e4d204f6b34216 (patch) | |
tree | b30fa940a50310ae96b206c832069e86c3db2475 /OpenSim/Region/OptionalModules/Scripting/JsonStore | |
parent | * This adds a bit more to the previous flying roll effect by adding additiona... (diff) | |
download | opensim-SC_OLD-a0ef3df1941147cfc894493950e4d204f6b34216.zip opensim-SC_OLD-a0ef3df1941147cfc894493950e4d204f6b34216.tar.gz opensim-SC_OLD-a0ef3df1941147cfc894493950e4d204f6b34216.tar.bz2 opensim-SC_OLD-a0ef3df1941147cfc894493950e4d204f6b34216.tar.xz |
Add JsonTestStore to determine if a JsonStore is associated with
a particular UUID.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs index e68764a..b9b3ebc 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs | |||
@@ -221,6 +221,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
221 | /// | 221 | /// |
222 | /// </summary> | 222 | /// </summary> |
223 | // ----------------------------------------------------------------- | 223 | // ----------------------------------------------------------------- |
224 | public bool TestStore(UUID storeID) | ||
225 | { | ||
226 | if (! m_enabled) return false; | ||
227 | |||
228 | lock (m_JsonValueStore) | ||
229 | return m_JsonValueStore.ContainsKey(storeID); | ||
230 | } | ||
231 | |||
232 | // ----------------------------------------------------------------- | ||
233 | /// <summary> | ||
234 | /// | ||
235 | /// </summary> | ||
236 | // ----------------------------------------------------------------- | ||
224 | public bool TestPath(UUID storeID, string path, bool useJson) | 237 | public bool TestPath(UUID storeID, string path, bool useJson) |
225 | { | 238 | { |
226 | if (! m_enabled) return false; | 239 | if (! m_enabled) return false; |
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index b9dcfea..29955af 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | |||
@@ -167,6 +167,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
167 | { | 167 | { |
168 | m_comms.RegisterScriptInvocation(this, "JsonCreateStore"); | 168 | m_comms.RegisterScriptInvocation(this, "JsonCreateStore"); |
169 | m_comms.RegisterScriptInvocation(this, "JsonDestroyStore"); | 169 | m_comms.RegisterScriptInvocation(this, "JsonDestroyStore"); |
170 | m_comms.RegisterScriptInvocation(this, "JsonTestStore"); | ||
170 | 171 | ||
171 | m_comms.RegisterScriptInvocation(this, "JsonReadNotecard"); | 172 | m_comms.RegisterScriptInvocation(this, "JsonReadNotecard"); |
172 | m_comms.RegisterScriptInvocation(this, "JsonWriteNotecard"); | 173 | m_comms.RegisterScriptInvocation(this, "JsonWriteNotecard"); |
@@ -248,6 +249,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
248 | /// | 249 | /// |
249 | /// </summary> | 250 | /// </summary> |
250 | // ----------------------------------------------------------------- | 251 | // ----------------------------------------------------------------- |
252 | protected int JsonTestStore(UUID hostID, UUID scriptID, UUID storeID) | ||
253 | { | ||
254 | return m_store.TestStore(storeID) ? 1 : 0; | ||
255 | } | ||
256 | |||
257 | // ----------------------------------------------------------------- | ||
258 | /// <summary> | ||
259 | /// | ||
260 | /// </summary> | ||
261 | // ----------------------------------------------------------------- | ||
251 | protected UUID JsonReadNotecard(UUID hostID, UUID scriptID, UUID storeID, string path, UUID assetID) | 262 | protected UUID JsonReadNotecard(UUID hostID, UUID scriptID, UUID storeID, string path, UUID assetID) |
252 | { | 263 | { |
253 | UUID reqID = UUID.Random(); | 264 | UUID reqID = UUID.Random(); |