diff options
author | Melanie | 2012-03-28 01:15:56 +0200 |
---|---|---|
committer | Melanie | 2012-03-28 01:49:06 +0100 |
commit | 710c14fb57ce2a8cd9a1d5c68ed7c3539a4148cc (patch) | |
tree | 7f74cb0868f7ecbc798c0859c2841fea001e0cb7 | |
parent | minor: Add some documentation to OnNewClient and OnClientClosed events (diff) | |
download | opensim-SC_OLD-710c14fb57ce2a8cd9a1d5c68ed7c3539a4148cc.zip opensim-SC_OLD-710c14fb57ce2a8cd9a1d5c68ed7c3539a4148cc.tar.gz opensim-SC_OLD-710c14fb57ce2a8cd9a1d5c68ed7c3539a4148cc.tar.bz2 opensim-SC_OLD-710c14fb57ce2a8cd9a1d5c68ed7c3539a4148cc.tar.xz |
Add SendRemoveInventoryFolders which allows to remove one or more
folders from the viewer's inventory view. For HG v2.0. More to come
-rw-r--r-- | OpenSim/Framework/Client/IClientInventory.cs | 37 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 41 |
2 files changed, 77 insertions, 1 deletions
diff --git a/OpenSim/Framework/Client/IClientInventory.cs b/OpenSim/Framework/Client/IClientInventory.cs new file mode 100644 index 0000000..00651e0 --- /dev/null +++ b/OpenSim/Framework/Client/IClientInventory.cs | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using OpenMetaverse; | ||
30 | |||
31 | namespace OpenSim.Framework.Client | ||
32 | { | ||
33 | public interface IClientInventory | ||
34 | { | ||
35 | void SendRemoveInventoryFolders(UUID[] folders); | ||
36 | } | ||
37 | } | ||
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 | |||
59 | /// Handles new client connections | 59 | /// Handles new client connections |
60 | /// Constructor takes a single Packet and authenticates everything | 60 | /// Constructor takes a single Packet and authenticates everything |
61 | /// </summary> | 61 | /// </summary> |
62 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector | 62 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientInventory, IClientIPEndpoint, IStatsCollector |
63 | { | 63 | { |
64 | /// <value> | 64 | /// <value> |
65 | /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. | 65 | /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. |
@@ -448,6 +448,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
448 | // DebugPacketLevel = 1; | 448 | // DebugPacketLevel = 1; |
449 | 449 | ||
450 | RegisterInterface<IClientIM>(this); | 450 | RegisterInterface<IClientIM>(this); |
451 | RegisterInterface<IClientInventory>(this); | ||
451 | RegisterInterface<IClientChat>(this); | 452 | RegisterInterface<IClientChat>(this); |
452 | RegisterInterface<IClientIPEndpoint>(this); | 453 | RegisterInterface<IClientIPEndpoint>(this); |
453 | 454 | ||
@@ -12262,5 +12263,43 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12262 | if (reply != null) | 12263 | if (reply != null) |
12263 | OutPacket(reply, ThrottleOutPacketType.Task); | 12264 | OutPacket(reply, ThrottleOutPacketType.Task); |
12264 | } | 12265 | } |
12266 | |||
12267 | public void SendRemoveInventoryFolders(UUID[] folders) | ||
12268 | { | ||
12269 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | ||
12270 | |||
12271 | if (eq == null) | ||
12272 | { | ||
12273 | m_log.DebugFormat("[LLCLIENT]: Null event queue"); | ||
12274 | return; | ||
12275 | } | ||
12276 | |||
12277 | OSDMap llsd = new OSDMap(3); | ||
12278 | |||
12279 | OSDMap AgentDataMap = new OSDMap(1); | ||
12280 | AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); | ||
12281 | AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); | ||
12282 | |||
12283 | OSDArray AgentData = new OSDArray(1); | ||
12284 | AgentData.Add(AgentDataMap); | ||
12285 | |||
12286 | llsd.Add("AgentData", AgentData); | ||
12287 | |||
12288 | OSDArray FolderData = new OSDArray(); | ||
12289 | |||
12290 | foreach (UUID folder in folders) | ||
12291 | { | ||
12292 | OSDMap FolderDataMap = new OSDMap(2); | ||
12293 | FolderDataMap.Add("FolderID", OSD.FromUUID(folder)); | ||
12294 | FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId)); | ||
12295 | |||
12296 | FolderData.Add(FolderDataMap); | ||
12297 | } | ||
12298 | |||
12299 | llsd.Add("FolderData", FolderData); | ||
12300 | |||
12301 | eq.Enqueue(BuildEvent("RemoveInventoryFolder", | ||
12302 | llsd), AgentId); | ||
12303 | } | ||
12265 | } | 12304 | } |
12266 | } | 12305 | } |