Added two new "trusted" url handlers to the Inventory server, to allow the user server to get a list of items in a folder and add a new item.
Not really bug fixes but as trunk is so unstable at the moment am adding them to 0.6.0-stable branch as well0.6.0-stable
parent
4295c125aa
commit
66737b9c0c
|
@ -209,6 +209,23 @@ namespace OpenSim.Grid.InventoryServer
|
|||
return invCollection;
|
||||
}
|
||||
|
||||
public List<InventoryItemBase> GetFolderItems(Guid folderID)
|
||||
{
|
||||
List<InventoryItemBase> allItems = new List<InventoryItemBase>();
|
||||
|
||||
|
||||
List<InventoryItemBase> items = RequestFolderItems(new UUID(folderID));
|
||||
|
||||
if (items != null)
|
||||
{
|
||||
allItems.InsertRange(0, items);
|
||||
}
|
||||
m_log.InfoFormat(
|
||||
"[GRID AGENT INVENTORY]: Sending back inventory response containing {0} items", allItems.Count.ToString());
|
||||
return allItems;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Guid to UUID wrapper for same name IInventoryServices method
|
||||
/// </summary>
|
||||
|
|
|
@ -105,10 +105,18 @@ namespace OpenSim.Grid.InventoryServer
|
|||
new RestDeserialiseSecureHandler<InventoryFolderBase, bool>(
|
||||
"POST", "/PurgeFolder/", m_inventoryService.PurgeFolder, m_inventoryService.CheckAuthSession));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>(
|
||||
"POST", "/GetItems/", m_inventoryService.GetFolderItems, m_inventoryService.CheckTrustSource));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||
"POST", "/NewItem/", m_inventoryService.AddItem, m_inventoryService.CheckAuthSession));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialiseTrustedHandler<InventoryItemBase, bool>(
|
||||
"POST", "/AddNewItem/", m_inventoryService.AddItem, m_inventoryService.CheckTrustSource));
|
||||
|
||||
m_httpServer.AddStreamHandler(
|
||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||
"POST", "/DeleteItem/", m_inventoryService.DeleteItem, m_inventoryService.CheckAuthSession));
|
||||
|
|
Loading…
Reference in New Issue