From 38ca31b37a6ac8fe74b77e4488112eb77d612827 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 4 Dec 2008 19:57:36 +0000
Subject: * Put in the code necessary to allow inventory transfer of whole
folders (and their contents) between agents, not just single items * However,
this is not currently activated since it's not absolutely fully tested and
there's a bug lurking in there to do with the sending of the
BulkInventoryUpdate packets
---
OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 5 ++++-
OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | 4 ++++
OpenSim/Framework/IClientAPI.cs | 7 +++++++
3 files changed, 15 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 4212fbc..b4e7bfa 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -556,8 +556,10 @@ namespace OpenSim.Framework.Communications.Cache
}
///
- /// Add an item to the user's inventory
+ /// Add an item to the user's inventory.
///
+ /// If the item has no folder set (i.e. it is UUID.Zero), then it is placed in the most appropriate folder
+ /// for that type.
///
public void AddItem(InventoryItemBase item)
{
@@ -572,6 +574,7 @@ namespace OpenSim.Framework.Communications.Cache
item.Folder = RootFolder.ID;
}
ItemReceive(item, null);
+
if (m_commsManager.SecureInventoryService != null)
{
m_commsManager.SecureInventoryService.AddItem(item, m_session_id);
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index 8e624f9..0704232 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -358,6 +358,10 @@ namespace OpenSim.Framework.Communications.Cache
return folderList;
}
+ ///
+ /// The total number of items in this folder and in the immediate child folders (though not from other
+ /// descendants).
+ ///
public int TotalCount
{
get
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 15a89d3..8a3c4b6 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -829,6 +829,13 @@ namespace OpenSim.Framework
void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
///
+ /// Used by the server to inform the client of new inventory items. Will transfer the contents of the folder
+ /// (including all descendent folders) as well as the folder itself.
+ ///
+ ///
+ void SendBulkUpdateInventory(InventoryFolderBase folder);
+
+ ///
/// Used by the server to inform the client of a new inventory item. Used when transferring items
/// between avatars, possibly among other things.
///
--
cgit v1.1