WARNING: massive refactor to follow libomv's latest changes regarding inventory folders. The newest version of libomv itself is committed here. Basically, everything that was using the AssetType enum has been combed through; many of those uses were changed to the new FolderType enum.

This means that from now on, [new] root folders have code 8 (FolderType.Root), as the viewers expect, as opposed to 9, which was what we had been doing. Normal folders are as they were, -1. Also now sending folder code 100 for Suitcase folders to viewers, with no filter.
All tests pass, but fingers crossed!
This commit is contained in:
Diva Canto
2015-08-08 12:12:50 -07:00
parent 2153a01cc7
commit 959872315f
41 changed files with 238 additions and 225 deletions

View File

@@ -695,18 +695,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (remoteClient == null ||
so.OwnerID != remoteClient.AgentId)
{
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
folder = m_Scene.InventoryService.GetFolderForType(userID, FolderType.LostAndFound);
}
else
{
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
folder = m_Scene.InventoryService.GetFolderForType(userID, FolderType.Trash);
}
}
else if (action == DeRezAction.Return)
{
// Dump to lost + found unconditionally
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
folder = m_Scene.InventoryService.GetFolderForType(userID, FolderType.LostAndFound);
}
if (folderID == UUID.Zero && folder == null)
@@ -715,7 +715,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{
// Deletes go to trash by default
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.TrashFolder);
folder = m_Scene.InventoryService.GetFolderForType(userID, FolderType.Trash);
}
else
{
@@ -723,14 +723,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{
// Taking copy of another person's item. Take to
// Objects folder.
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object);
folder = m_Scene.InventoryService.GetFolderForType(userID, FolderType.Object);
so.FromFolderID = UUID.Zero;
}
else
{
// Catch all. Use lost & found
//
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.LostAndFoundFolder);
folder = m_Scene.InventoryService.GetFolderForType(userID, FolderType.LostAndFound);
}
}
}
@@ -748,7 +748,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if(folder.Type == 14 || folder.Type == 16)
{
// folder.Type = 6;
folder = m_Scene.InventoryService.GetFolderForType(userID, AssetType.Object);
folder = m_Scene.InventoryService.GetFolderForType(userID, FolderType.Object);
}
}
}

View File

@@ -175,7 +175,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
/// <param name="userID"></param>
/// <param name="type"></param>
/// <returns></returns>
public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) { return null; }
public InventoryFolderBase GetFolderForType(UUID userID, FolderType type) { return null; }
/// <summary>