From 710c14fb57ce2a8cd9a1d5c68ed7c3539a4148cc Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 28 Mar 2012 01:15:56 +0200 Subject: Add SendRemoveInventoryFolders which allows to remove one or more folders from the viewer's inventory view. For HG v2.0. More to come --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 41 +++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 68aae14..7ba9eaf 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -59,7 +59,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Handles new client connections /// Constructor takes a single Packet and authenticates everything /// - public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector + public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientInventory, IClientIPEndpoint, IStatsCollector { /// /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. @@ -448,6 +448,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // DebugPacketLevel = 1; RegisterInterface(this); + RegisterInterface(this); RegisterInterface(this); RegisterInterface(this); @@ -12262,5 +12263,43 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (reply != null) OutPacket(reply, ThrottleOutPacketType.Task); } + + public void SendRemoveInventoryFolders(UUID[] folders) + { + 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 folder in folders) + { + OSDMap FolderDataMap = new OSDMap(2); + FolderDataMap.Add("FolderID", OSD.FromUUID(folder)); + FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId)); + + FolderData.Add(FolderDataMap); + } + + llsd.Add("FolderData", FolderData); + + eq.Enqueue(BuildEvent("RemoveInventoryFolder", + llsd), AgentId); + } } } -- cgit v1.1 From 8c0f1e905814e93003dd8d78ee54ae947cb3af17 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 28 Mar 2012 02:10:07 +0100 Subject: Add a corresponding method for items. HG v2 --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7ba9eaf..0c1d7f2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12264,6 +12264,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(reply, ThrottleOutPacketType.Task); } + public void SendRemoveInventoryItems(UUID[] 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 ItemData = new OSDArray(); + + foreach (UUID item in items) + { + OSDMap ItemDataMap = new OSDMap(2); + ItemDataMap.Add("ItemID", OSD.FromUUID(item)); + ItemDataMap.Add("AgentID", OSD.FromUUID(AgentId)); + + ItemData.Add(ItemDataMap); + } + + llsd.Add("ItemData", ItemData); + + eq.Enqueue(BuildEvent("RemoveInventoryItem", + llsd), AgentId); + } + public void SendRemoveInventoryFolders(UUID[] folders) { IEventQueue eq = Scene.RequestModuleInterface(); -- cgit v1.1