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') 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 From b24605d5262cb4ff18436d8cff21063be83a39ef Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 28 Mar 2012 02:55:29 +0100 Subject: Fix typos --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4107209..82a76a2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12363,7 +12363,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OSDArray FolderData = new OSDArray(); - foreach (UUID InventoryFolderBase in folders) + foreach (InventoryFolderBase folder in folders) { OSDMap FolderDataMap = new OSDMap(5); FolderDataMap.Add("FolderID", OSD.FromUUID(folder.ID)); @@ -12379,7 +12379,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OSDArray ItemData = new OSDArray(); - foreach (UUID InventoryItemBase in items) + foreach (InventoryItemBase item in items) { OSDMap ItemDataMap = new OSDMap(); ItemData.Add(DataMap); -- cgit v1.1 From 614c40492369778a9b13a31f1e052b2836f8e449 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 28 Mar 2012 02:33:15 +0200 Subject: Typo fix --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 82a76a2..cd81df5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12382,7 +12382,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP foreach (InventoryItemBase item in items) { OSDMap ItemDataMap = new OSDMap(); - ItemData.Add(DataMap); + ItemData.Add(ItemDataMap); } llsd.Add("ItemData", ItemData); -- cgit v1.1