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