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.

This commit is contained in:
Diva Canto
2009-08-11 10:30:03 -07:00
parent cdcbc48534
commit 31419a70ce
8 changed files with 238 additions and 48 deletions

View File

@@ -126,7 +126,7 @@ namespace OpenSim.Services.Connectors.Inventory
/// <param name="userID"></param>
/// <param name="type"></param>
/// <returns></returns>
public List<InventoryFolderBase> GetSystemFolders(string id, UUID sessionID)
public Dictionary<AssetType, InventoryFolderBase> 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<InventoryFolderBase>();
return new Dictionary<AssetType, InventoryFolderBase>();
}
/// <summary>

View File

@@ -57,7 +57,7 @@ namespace OpenSim.Services.Connectors
/// <param name="userID"></param>
/// <param name="type"></param>
/// <returns></returns>
List<InventoryFolderBase> GetSystemFolders(string userID, UUID session_id);
Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID session_id);
/// <summary>
/// Gets everything (folders and items) inside a folder

View File

@@ -161,11 +161,11 @@ namespace OpenSim.Services.Connectors
/// <param name="userID"></param>
/// <param name="type"></param>
/// <returns></returns>
public List<InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID)
public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID)
{
try
{
return SynchronousRestSessionObjectPoster<string, List<InventoryFolderBase>>.BeginPostObject(
return SynchronousRestSessionObjectPoster<string, Dictionary<AssetType, InventoryFolderBase>>.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<InventoryFolderBase>();
return new Dictionary<AssetType, InventoryFolderBase>();
}
/// <summary>

View File

@@ -273,6 +273,26 @@ namespace OpenSim.Services.InventoryService
return root;
}
public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
{
InventoryFolderBase root = GetRootFolder(userID);
if (root != null)
{
InventoryCollection content = GetFolderContent(userID, root.ID);
if (content != null)
{
Dictionary<AssetType, InventoryFolderBase> folders = new Dictionary<AssetType, InventoryFolderBase>();
foreach (InventoryFolderBase folder in content.Folders)
{
if (folder.Type != (short)AssetType.Folder)
folders[(AssetType)folder.Type] = folder;
}
return folders;
}
}
return new Dictionary<AssetType, InventoryFolderBase>();
}
public List<InventoryItemBase> GetActiveGestures(UUID userId)
{
List<InventoryItemBase> activeGestures = new List<InventoryItemBase>();