From 0463a00d34af4752936817e826d735e3f36d33f1 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 28 Mar 2012 02:45:50 +0100 Subject: Start on Bulk inventory update via CAPS. Not functional yet. HG v2 --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 0c1d7f2..4107209 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12339,5 +12339,53 @@ namespace OpenSim.Region.ClientStack.LindenUDP eq.Enqueue(BuildEvent("RemoveInventoryFolder", llsd), AgentId); } + + public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) + { + IEventQueue eq = Scene.RequestModuleInterface(); + + 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); + } } } -- cgit v1.1