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.
parent
bf4ccf3858
commit
b62b9af6b0
|
@ -209,6 +209,22 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
return invCollection;
|
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>
|
/// <summary>
|
||||||
/// Guid to UUID wrapper for same name IInventoryServices method
|
/// Guid to UUID wrapper for same name IInventoryServices method
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -109,6 +109,14 @@ namespace OpenSim.Grid.InventoryServer
|
||||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||||
"POST", "/NewItem/", m_inventoryService.AddItem, m_inventoryService.CheckAuthSession));
|
"POST", "/NewItem/", m_inventoryService.AddItem, m_inventoryService.CheckAuthSession));
|
||||||
|
|
||||||
|
m_httpServer.AddStreamHandler(
|
||||||
|
new RestDeserialiseTrustedHandler<Guid, List<InventoryItemBase>>(
|
||||||
|
"POST", "/GetItems/", m_inventoryService.GetFolderItems, m_inventoryService.CheckTrustSource));
|
||||||
|
|
||||||
|
m_httpServer.AddStreamHandler(
|
||||||
|
new RestDeserialiseTrustedHandler<InventoryItemBase, bool>(
|
||||||
|
"POST", "/AddNewItem/", m_inventoryService.AddItem, m_inventoryService.CheckTrustSource));
|
||||||
|
|
||||||
m_httpServer.AddStreamHandler(
|
m_httpServer.AddStreamHandler(
|
||||||
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
|
||||||
"POST", "/DeleteItem/", m_inventoryService.DeleteItem, m_inventoryService.CheckAuthSession));
|
"POST", "/DeleteItem/", m_inventoryService.DeleteItem, m_inventoryService.CheckAuthSession));
|
||||||
|
|
Loading…
Reference in New Issue