aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs127
1 files changed, 126 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index c40c0ec..d0920d2 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.
@@ -460,6 +460,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
460// DebugPacketLevel = 1; 460// DebugPacketLevel = 1;
461 461
462 RegisterInterface<IClientIM>(this); 462 RegisterInterface<IClientIM>(this);
463 RegisterInterface<IClientInventory>(this);
463 RegisterInterface<IClientChat>(this); 464 RegisterInterface<IClientChat>(this);
464 RegisterInterface<IClientIPEndpoint>(this); 465 RegisterInterface<IClientIPEndpoint>(this);
465 466
@@ -12421,5 +12422,129 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12421 if (reply != null) 12422 if (reply != null)
12422 OutPacket(reply, ThrottleOutPacketType.Task); 12423 OutPacket(reply, ThrottleOutPacketType.Task);
12423 } 12424 }
12425
12426 public void SendRemoveInventoryItems(UUID[] items)
12427 {
12428 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
12429
12430 if (eq == null)
12431 {
12432 m_log.DebugFormat("[LLCLIENT]: Null event queue");
12433 return;
12434 }
12435
12436 OSDMap llsd = new OSDMap(3);
12437
12438 OSDMap AgentDataMap = new OSDMap(1);
12439 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12440 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
12441
12442 OSDArray AgentData = new OSDArray(1);
12443 AgentData.Add(AgentDataMap);
12444
12445 llsd.Add("AgentData", AgentData);
12446
12447 OSDArray ItemData = new OSDArray();
12448
12449 foreach (UUID item in items)
12450 {
12451 OSDMap ItemDataMap = new OSDMap(2);
12452 ItemDataMap.Add("ItemID", OSD.FromUUID(item));
12453 ItemDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12454
12455 ItemData.Add(ItemDataMap);
12456 }
12457
12458 llsd.Add("ItemData", ItemData);
12459
12460 eq.Enqueue(BuildEvent("RemoveInventoryItem",
12461 llsd), AgentId);
12462 }
12463
12464 public void SendRemoveInventoryFolders(UUID[] folders)
12465 {
12466 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
12467
12468 if (eq == null)
12469 {
12470 m_log.DebugFormat("[LLCLIENT]: Null event queue");
12471 return;
12472 }
12473
12474 OSDMap llsd = new OSDMap(3);
12475
12476 OSDMap AgentDataMap = new OSDMap(1);
12477 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12478 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
12479
12480 OSDArray AgentData = new OSDArray(1);
12481 AgentData.Add(AgentDataMap);
12482
12483 llsd.Add("AgentData", AgentData);
12484
12485 OSDArray FolderData = new OSDArray();
12486
12487 foreach (UUID folder in folders)
12488 {
12489 OSDMap FolderDataMap = new OSDMap(2);
12490 FolderDataMap.Add("FolderID", OSD.FromUUID(folder));
12491 FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12492
12493 FolderData.Add(FolderDataMap);
12494 }
12495
12496 llsd.Add("FolderData", FolderData);
12497
12498 eq.Enqueue(BuildEvent("RemoveInventoryFolder",
12499 llsd), AgentId);
12500 }
12501
12502 public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items)
12503 {
12504 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
12505
12506 if (eq == null)
12507 {
12508 m_log.DebugFormat("[LLCLIENT]: Null event queue");
12509 return;
12510 }
12511
12512 OSDMap llsd = new OSDMap(3);
12513
12514 OSDMap AgentDataMap = new OSDMap(1);
12515 AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12516 AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId));
12517
12518 OSDArray AgentData = new OSDArray(1);
12519 AgentData.Add(AgentDataMap);
12520
12521 llsd.Add("AgentData", AgentData);
12522
12523 OSDArray FolderData = new OSDArray();
12524
12525 foreach (InventoryFolderBase folder in folders)
12526 {
12527 OSDMap FolderDataMap = new OSDMap(5);
12528 FolderDataMap.Add("FolderID", OSD.FromUUID(folder.ID));
12529 FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId));
12530 FolderDataMap.Add("ParentID", OSD.FromUUID(folder.ParentID));
12531 FolderDataMap.Add("Type", OSD.FromInteger(folder.Type));
12532 FolderDataMap.Add("Name", OSD.FromString(folder.Name));
12533
12534 FolderData.Add(FolderDataMap);
12535 }
12536
12537 llsd.Add("FolderData", FolderData);
12538
12539 OSDArray ItemData = new OSDArray();
12540
12541 foreach (InventoryItemBase item in items)
12542 {
12543 OSDMap ItemDataMap = new OSDMap();
12544 ItemData.Add(ItemDataMap);
12545 }
12546
12547 llsd.Add("ItemData", ItemData);
12548 }
12424 } 12549 }
12425} 12550}