Start on Bulk inventory update via CAPS. Not functional yet. HG v2

0.7.3-extended
Melanie 2012-03-28 02:45:50 +01:00 committed by Justin Clark-Casey (justincc)
parent ccd7d35b3f
commit 37685ec1b4
3 changed files with 51 additions and 1 deletions

View File

@ -1,4 +1,4 @@
The following people have contributed to OpenSim (Thank you
<<<>>>>The following people have contributed to OpenSim (Thank you
for your effort!)
= Current OpenSim Developers (in very rough order of appearance) =

View File

@ -27,6 +27,7 @@
using System;
using OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Framework.Client
{
@ -34,5 +35,6 @@ namespace OpenSim.Framework.Client
{
void SendRemoveInventoryFolders(UUID[] folders);
void SendRemoveInventoryItems(UUID[] folders);
void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items);
}
}

View File

@ -12368,5 +12368,53 @@ namespace OpenSim.Region.ClientStack.LindenUDP
eq.Enqueue(BuildEvent("RemoveInventoryFolder",
llsd), AgentId);
}
public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items)
{
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
if (eq == null)
{
m_log.DebugFormat("[LLCLIENT]: Null event queue");
return;
}
OSDMap llsd = new OSDMap(3);
OSDMap AgentDataMap = new OSDMap(1);
AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
OSDArray AgentData = new OSDArray(1);
AgentData.Add(AgentDataMap);
llsd.Add("AgentData", AgentData);
OSDArray FolderData = new OSDArray();
foreach (UUID InventoryFolderBase in folders)
{
OSDMap FolderDataMap = new OSDMap(5);
FolderDataMap.Add("FolderID", OSD.FromUUID(folder.ID));
FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId));
FolderDataMap.Add("ParentID", OSD.FromUUID(folder.ParentID));
FolderDataMap.Add("Type", OSD.FromInteger(folder.Type));
FolderDataMap.Add("Name", OSD.FromString(folder.Name));
FolderData.Add(FolderDataMap);
}
llsd.Add("FolderData", FolderData);
OSDArray ItemData = new OSDArray();
foreach (UUID InventoryItemBase in items)
{
OSDMap ItemDataMap = new OSDMap();
ItemData.Add(DataMap);
}
llsd.Add("ItemData", ItemData);
}
}
}