29 using System.Collections.Generic;
30 using System.Reflection;
33 using OpenSim.Framework;
36 namespace OpenSim.Tests.Common
50 private Dictionary<UUID, InventoryFolderBase> m_folders =
new Dictionary<UUID, InventoryFolderBase>();
55 private Dictionary<UUID, InventoryItemBase> m_items =
new Dictionary<UUID, InventoryItemBase>();
60 private Dictionary<UUID, InventoryFolderBase> m_rootFolders =
new Dictionary<UUID, InventoryFolderBase>();
62 public string Version {
get {
return "0"; } }
63 public string Name {
get {
return "TestInventoryDataPlugin"; } }
71 List<InventoryFolderBase> folders =
new List<InventoryFolderBase>();
77 folders.AddRange(getFolderHierarchy(folder.
ID));
91 List<InventoryItemBase> items =
new List<InventoryItemBase>();
95 if (item.
Folder == folderID)
112 m_rootFolders.TryGetValue(user, out folder);
123 List<InventoryFolderBase> folders =
new List<InventoryFolderBase>();
143 m_folders.TryGetValue(folderId, out folder);
150 return getInventoryFolder(folderID);
159 m_folders[folder.ID] = folder;
165 m_rootFolders[folder.Owner] = folder;
171 m_folders[folder.ID] = folder;
177 updateInventoryFolder(folder);
182 if (m_folders.ContainsKey(folderId))
183 m_folders.Remove(folderId);
193 m_items[item.ID] = item;
200 if (m_items.ContainsKey(itemId))
201 m_items.Remove(itemId);
206 if (m_items.ContainsKey(itemId))
207 return m_items[itemId];
List< InventoryFolderBase > getInventoryFolders(UUID parentID)
Returns a list of inventory folders contained in the folder 'parentID'
void deleteInventoryItem(UUID itemId)
List< InventoryItemBase > fetchActiveGestures(UUID avatarID)
Returns all activated gesture-items in the inventory of the specified avatar.
void deleteInventoryFolder(UUID folderId)
Deletes a folder. Thie will delete both the folder itself and its contents (items and descendent fold...
List< InventoryFolderBase > getUserRootFolders(UUID user)
Returns a list of the root folders within a users inventory
void updateInventoryFolder(InventoryFolderBase folder)
Updates a folder based on its ID with folder
void moveInventoryFolder(InventoryFolderBase folder)
Updates a folder based on its ID with folder
void addInventoryItem(InventoryItemBase item)
Creates a new inventory item based on item
InventoryFolderBase queryInventoryFolder(UUID folderID)
InventoryFolderBase getUserRootFolder(UUID user)
Returns the users inventory root folder.
void Initialise(string connect)
Initialises the interface
In memory inventory data plugin for test purposes. Could be another dll when properly filled out and ...
List< InventoryFolderBase > getFolderHierarchy(UUID parentID)
Returns all descendent folders of this folder. Does not return the parent folder itself.
Inventory Item - contains all the properties associated with an individual inventory piece...
UUID ID
A UUID containing the ID for the inventory node itself
InventoryFolderBase getInventoryFolder(UUID folderId)
Returns a specified inventory folder by its UUID
void addInventoryFolder(InventoryFolderBase folder)
Adds a new folder specified by folder
void Initialise()
Default-initialises the plugin
InventoryItemBase queryInventoryItem(UUID item)
void updateInventoryItem(InventoryItemBase item)
Updates an inventory item with item (updates based on ID)
List< InventoryItemBase > getInventoryInFolder(UUID folderID)
Returns a list of inventory items contained within the specified folder
InventoryItemBase getInventoryItem(UUID itemId)
Returns an inventory item by its UUID
An interface for accessing inventory data from a storage server