diff options
author | Melanie | 2012-03-28 02:45:50 +0100 |
---|---|---|
committer | Melanie | 2012-03-28 02:45:50 +0100 |
commit | 0463a00d34af4752936817e826d735e3f36d33f1 (patch) | |
tree | f59be685c5745ce751243bc28f0f524bc1548b0a | |
parent | Add a corresponding method for items. HG v2 (diff) | |
download | opensim-SC-0463a00d34af4752936817e826d735e3f36d33f1.zip opensim-SC-0463a00d34af4752936817e826d735e3f36d33f1.tar.gz opensim-SC-0463a00d34af4752936817e826d735e3f36d33f1.tar.bz2 opensim-SC-0463a00d34af4752936817e826d735e3f36d33f1.tar.xz |
Start on Bulk inventory update via CAPS. Not functional yet. HG v2
-rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Client/IClientInventory.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 48 |
3 files changed, 51 insertions, 1 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 31aeda3..089d2f5 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | The following people have contributed to OpenSim (Thank you | 1 | <<<>>>>The following people have contributed to OpenSim (Thank you |
2 | for your effort!) | 2 | for your effort!) |
3 | 3 | ||
4 | = Current OpenSim Developers (in very rough order of appearance) = | 4 | = Current OpenSim Developers (in very rough order of appearance) = |
diff --git a/OpenSim/Framework/Client/IClientInventory.cs b/OpenSim/Framework/Client/IClientInventory.cs index d59f8b7..a6e0510 100644 --- a/OpenSim/Framework/Client/IClientInventory.cs +++ b/OpenSim/Framework/Client/IClientInventory.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenSim.Framework; | ||
30 | 31 | ||
31 | namespace OpenSim.Framework.Client | 32 | namespace OpenSim.Framework.Client |
32 | { | 33 | { |
@@ -34,5 +35,6 @@ namespace OpenSim.Framework.Client | |||
34 | { | 35 | { |
35 | void SendRemoveInventoryFolders(UUID[] folders); | 36 | void SendRemoveInventoryFolders(UUID[] folders); |
36 | void SendRemoveInventoryItems(UUID[] folders); | 37 | void SendRemoveInventoryItems(UUID[] folders); |
38 | void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items); | ||
37 | } | 39 | } |
38 | } | 40 | } |
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 | |||
12339 | eq.Enqueue(BuildEvent("RemoveInventoryFolder", | 12339 | eq.Enqueue(BuildEvent("RemoveInventoryFolder", |
12340 | llsd), AgentId); | 12340 | llsd), AgentId); |
12341 | } | 12341 | } |
12342 | |||
12343 | public void SendBulkUpdateInventory(InventoryFolderBase[] folders, InventoryItemBase[] items) | ||
12344 | { | ||
12345 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | ||
12346 | |||
12347 | if (eq == null) | ||
12348 | { | ||
12349 | m_log.DebugFormat("[LLCLIENT]: Null event queue"); | ||
12350 | return; | ||
12351 | } | ||
12352 | |||
12353 | OSDMap llsd = new OSDMap(3); | ||
12354 | |||
12355 | OSDMap AgentDataMap = new OSDMap(1); | ||
12356 | AgentDataMap.Add("AgentID", OSD.FromUUID(AgentId)); | ||
12357 | AgentDataMap.Add("SessionID", OSD.FromUUID(SessionId)); | ||
12358 | |||
12359 | OSDArray AgentData = new OSDArray(1); | ||
12360 | AgentData.Add(AgentDataMap); | ||
12361 | |||
12362 | llsd.Add("AgentData", AgentData); | ||
12363 | |||
12364 | OSDArray FolderData = new OSDArray(); | ||
12365 | |||
12366 | foreach (UUID InventoryFolderBase in folders) | ||
12367 | { | ||
12368 | OSDMap FolderDataMap = new OSDMap(5); | ||
12369 | FolderDataMap.Add("FolderID", OSD.FromUUID(folder.ID)); | ||
12370 | FolderDataMap.Add("AgentID", OSD.FromUUID(AgentId)); | ||
12371 | FolderDataMap.Add("ParentID", OSD.FromUUID(folder.ParentID)); | ||
12372 | FolderDataMap.Add("Type", OSD.FromInteger(folder.Type)); | ||
12373 | FolderDataMap.Add("Name", OSD.FromString(folder.Name)); | ||
12374 | |||
12375 | FolderData.Add(FolderDataMap); | ||
12376 | } | ||
12377 | |||
12378 | llsd.Add("FolderData", FolderData); | ||
12379 | |||
12380 | OSDArray ItemData = new OSDArray(); | ||
12381 | |||
12382 | foreach (UUID InventoryItemBase in items) | ||
12383 | { | ||
12384 | OSDMap ItemDataMap = new OSDMap(); | ||
12385 | ItemData.Add(DataMap); | ||
12386 | } | ||
12387 | |||
12388 | llsd.Add("ItemData", ItemData); | ||
12389 | } | ||
12342 | } | 12390 | } |
12343 | } | 12391 | } |