From 31419a70ce05e7db0c54f4c4ec827a0d1fe23402 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 11 Aug 2009 10:30:03 -0700 Subject: System folders inventory cache added to OUT inventory modules. This tracks agents in and out of *sims* in order to fetch/drop their system folders from the cache. Also added region-side support for fetching the system folders from the inventory service. Nothing of this is called yet. --- .../Inventory/HGInventoryServiceConnector.cs | 4 ++-- .../Inventory/ISessionAuthInventoryService.cs | 2 +- .../Inventory/InventoryServiceConnector.cs | 6 +++--- .../Services/InventoryService/InventoryService.cs | 20 ++++++++++++++++++++ 4 files changed, 26 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs index b168871..f6d1500 100644 --- a/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/HGInventoryServiceConnector.cs @@ -126,7 +126,7 @@ namespace OpenSim.Services.Connectors.Inventory /// /// /// - public List GetSystemFolders(string id, UUID sessionID) + public Dictionary GetSystemFolders(string id, UUID sessionID) { m_log.Debug("[HGInventory]: GetSystemFolders " + id); string url = string.Empty; @@ -138,7 +138,7 @@ namespace OpenSim.Services.Connectors.Inventory return connector.GetSystemFolders(userID, sessionID); } - return new List(); + return new Dictionary(); } /// diff --git a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs index 98fd680..973cb0a 100644 --- a/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs +++ b/OpenSim/Services/Connectors/Inventory/ISessionAuthInventoryService.cs @@ -57,7 +57,7 @@ namespace OpenSim.Services.Connectors /// /// /// - List GetSystemFolders(string userID, UUID session_id); + Dictionary GetSystemFolders(string userID, UUID session_id); /// /// Gets everything (folders and items) inside a folder diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index 1a6826e..3b15831 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs @@ -161,11 +161,11 @@ namespace OpenSim.Services.Connectors /// /// /// - public List GetSystemFolders(string userID, UUID sessionID) + public Dictionary GetSystemFolders(string userID, UUID sessionID) { try { - return SynchronousRestSessionObjectPoster>.BeginPostObject( + return SynchronousRestSessionObjectPoster>.BeginPostObject( "GET", m_ServerURI + "/SystemFolders/", userID, sessionID.ToString(), userID.ToString()); } catch (Exception e) @@ -174,7 +174,7 @@ namespace OpenSim.Services.Connectors e.Source, e.Message); } - return new List(); + return new Dictionary(); } /// diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index dd435c9..fc54c12 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs @@ -273,6 +273,26 @@ namespace OpenSim.Services.InventoryService return root; } + public Dictionary GetSystemFolders(UUID userID) + { + InventoryFolderBase root = GetRootFolder(userID); + if (root != null) + { + InventoryCollection content = GetFolderContent(userID, root.ID); + if (content != null) + { + Dictionary folders = new Dictionary(); + foreach (InventoryFolderBase folder in content.Folders) + { + if (folder.Type != (short)AssetType.Folder) + folders[(AssetType)folder.Type] = folder; + } + return folders; + } + } + return new Dictionary(); + } + public List GetActiveGestures(UUID userId) { List activeGestures = new List(); -- cgit v1.1