aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-08-05 20:04:27 +0100
committerJustin Clark-Casey (justincc)2009-08-05 20:04:27 +0100
commit1f7466e5c3136d0580a21b5f2f4d8f18fa9fc72f (patch)
tree60b61c9ecca8e36369728cff76d280531c16e036
parenthopefully the finally fix for the hooks (diff)
downloadopensim-SC_OLD-1f7466e5c3136d0580a21b5f2f4d8f18fa9fc72f.zip
opensim-SC_OLD-1f7466e5c3136d0580a21b5f2f4d8f18fa9fc72f.tar.gz
opensim-SC_OLD-1f7466e5c3136d0580a21b5f2f4d8f18fa9fc72f.tar.bz2
opensim-SC_OLD-1f7466e5c3136d0580a21b5f2f4d8f18fa9fc72f.tar.xz
test item data storage impementation (unused as of yet)
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs45
1 files changed, 31 insertions, 14 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
index 442ff06..1b14abb 100644
--- a/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestInventoryDataPlugin.cs
@@ -39,12 +39,17 @@ namespace OpenSim.Tests.Common.Mock
39 /// tests are single threaded. 39 /// tests are single threaded.
40 /// </summary> 40 /// </summary>
41 public class TestInventoryDataPlugin : IInventoryDataPlugin 41 public class TestInventoryDataPlugin : IInventoryDataPlugin
42 { 42 {
43 /// <value> 43 /// <value>
44 /// Known inventory folders 44 /// Inventory folders
45 /// </value> 45 /// </value>
46 private Dictionary<UUID, InventoryFolderBase> m_folders = new Dictionary<UUID, InventoryFolderBase>(); 46 private Dictionary<UUID, InventoryFolderBase> m_folders = new Dictionary<UUID, InventoryFolderBase>();
47 47
48 //// <value>
49 /// Inventory items
50 /// </value>
51 private Dictionary<UUID, InventoryItemBase> m_items = new Dictionary<UUID, InventoryItemBase>();
52
48 /// <value> 53 /// <value>
49 /// User root folders 54 /// User root folders
50 /// </value> 55 /// </value>
@@ -99,9 +104,7 @@ namespace OpenSim.Tests.Common.Mock
99 } 104 }
100 105
101 return folders; 106 return folders;
102 } 107 }
103
104 public InventoryItemBase getInventoryItem(UUID item) { return null; }
105 108
106 public InventoryFolderBase getInventoryFolder(UUID folderId) 109 public InventoryFolderBase getInventoryFolder(UUID folderId)
107 { 110 {
@@ -111,15 +114,6 @@ namespace OpenSim.Tests.Common.Mock
111 return folder; 114 return folder;
112 } 115 }
113 116
114 public void addInventoryItem(InventoryItemBase item) {}
115 public void updateInventoryItem(InventoryItemBase item) {}
116 public void deleteInventoryItem(UUID item) {}
117
118 public InventoryItemBase queryInventoryItem(UUID item)
119 {
120 return null;
121 }
122
123 public InventoryFolderBase queryInventoryFolder(UUID folderID) 117 public InventoryFolderBase queryInventoryFolder(UUID folderID)
124 { 118 {
125 return getInventoryFolder(folderID); 119 return getInventoryFolder(folderID);
@@ -150,6 +144,29 @@ namespace OpenSim.Tests.Common.Mock
150 m_folders.Remove(folderId); 144 m_folders.Remove(folderId);
151 } 145 }
152 146
147 public void addInventoryItem(InventoryItemBase item) { m_items[item.ID] = item; }
148
149 public void updateInventoryItem(InventoryItemBase item) { addInventoryItem(item); }
150
151 public void deleteInventoryItem(UUID itemId)
152 {
153 if (m_items.ContainsKey(itemId))
154 m_items.Remove(itemId);
155 }
156
157 public InventoryItemBase getInventoryItem(UUID itemId)
158 {
159 if (m_items.ContainsKey(itemId))
160 return m_items[itemId];
161 else
162 return null;
163 }
164
165 public InventoryItemBase queryInventoryItem(UUID item)
166 {
167 return null;
168 }
169
153 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; } 170 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) { return null; }
154 } 171 }
155} 172}