aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Interfaces
diff options
context:
space:
mode:
authorMic Bowman2013-02-13 07:14:04 -0800
committerMic Bowman2013-02-13 07:14:04 -0800
commitbcb172301dfc1d8dcdb837be89c3ce3248500cc0 (patch)
treec6e86bda51d3922395d629f8c62f5d359b8ccbe4 /OpenSim/Region/Framework/Interfaces
parentMake path parsing more robust in the JsonStore. (diff)
downloadopensim-SC_OLD-bcb172301dfc1d8dcdb837be89c3ce3248500cc0.zip
opensim-SC_OLD-bcb172301dfc1d8dcdb837be89c3ce3248500cc0.tar.gz
opensim-SC_OLD-bcb172301dfc1d8dcdb837be89c3ce3248500cc0.tar.bz2
opensim-SC_OLD-bcb172301dfc1d8dcdb837be89c3ce3248500cc0.tar.xz
Adds a couple requested functions to the JsonStore script
interface. JsonPathType returns the type of node pointed to by the path and deprecates the functionality of both JsonTestPath functions. JsonArrayLength returns the length of an array node.
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
index cc7885a..d7907e3 100644
--- a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs
@@ -31,6 +31,16 @@ using OpenMetaverse;
31 31
32namespace OpenSim.Region.Framework.Interfaces 32namespace OpenSim.Region.Framework.Interfaces
33{ 33{
34 // these could be expanded at some point to provide more type information
35 // for now value accounts for all base types
36 public enum JsonStoreNodeType
37 {
38 Undefined = 0,
39 Object = 1,
40 Array = 2,
41 Value = 3
42 }
43
34 public delegate void TakeValueCallback(string s); 44 public delegate void TakeValueCallback(string s);
35 45
36 public interface IJsonStoreModule 46 public interface IJsonStoreModule
@@ -38,13 +48,18 @@ namespace OpenSim.Region.Framework.Interfaces
38 bool AttachObjectStore(UUID objectID); 48 bool AttachObjectStore(UUID objectID);
39 bool CreateStore(string value, ref UUID result); 49 bool CreateStore(string value, ref UUID result);
40 bool DestroyStore(UUID storeID); 50 bool DestroyStore(UUID storeID);
51
52 JsonStoreNodeType PathType(UUID storeID, string path);
41 bool TestStore(UUID storeID); 53 bool TestStore(UUID storeID);
42 bool TestPath(UUID storeID, string path, bool useJson); 54 bool TestPath(UUID storeID, string path, bool useJson);
55
43 bool SetValue(UUID storeID, string path, string value, bool useJson); 56 bool SetValue(UUID storeID, string path, string value, bool useJson);
44 bool RemoveValue(UUID storeID, string path); 57 bool RemoveValue(UUID storeID, string path);
45 bool GetValue(UUID storeID, string path, bool useJson, out string value); 58 bool GetValue(UUID storeID, string path, bool useJson, out string value);
46 59
47 void TakeValue(UUID storeID, string path, bool useJson, TakeValueCallback cback); 60 void TakeValue(UUID storeID, string path, bool useJson, TakeValueCallback cback);
48 void ReadValue(UUID storeID, string path, bool useJson, TakeValueCallback cback); 61 void ReadValue(UUID storeID, string path, bool useJson, TakeValueCallback cback);
62
63 int ArrayLength(UUID storeID, string path);
49 } 64 }
50} 65}