* Change SendBulkUpdateInventory from two methods to one which accepts an InventoryNode
							parent
							
								
									e12981ef1b
								
							
						
					
					
						commit
						8645c7482d
					
				| 
						 | 
				
			
			@ -887,18 +887,14 @@ namespace OpenSim.Framework
 | 
			
		|||
        void SendTaskInventory(UUID taskID, short serial, byte[] fileName);
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Used by the server to inform the client of new inventory items.  Will transfer the contents of the folder
 | 
			
		||||
        /// Used by the server to inform the client of new inventory items and folders.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// 
 | 
			
		||||
        /// If the node is a folder then the contents will be transferred
 | 
			
		||||
        /// (including all descendent folders) as well as the folder itself.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="folder"></param>
 | 
			
		||||
        void SendBulkUpdateInventory(InventoryFolderBase folder);
 | 
			
		||||
        
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Used by the server to inform the client of a new inventory item.  Used when transferring items
 | 
			
		||||
        /// between avatars, possibly among other things.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="item"></param>
 | 
			
		||||
        void SendBulkUpdateInventory(InventoryItemBase item);
 | 
			
		||||
        /// 
 | 
			
		||||
        /// <param name="node"></param>
 | 
			
		||||
        void SendBulkUpdateInventory(InventoryNodeBase node);
 | 
			
		||||
 | 
			
		||||
        void SendXferPacket(ulong xferID, uint packet, byte[] data);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1850,9 +1850,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
            inventoryReply.Header.Zerocoded = true;
 | 
			
		||||
            OutPacket(inventoryReply, ThrottleOutPacketType.Asset);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <see>IClientAPI.SendBulkUpdateInventory(InventoryFolderBase)</see>
 | 
			
		||||
        public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
 | 
			
		||||
        
 | 
			
		||||
        protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase)
 | 
			
		||||
        {
 | 
			
		||||
            // XXX: Nasty temporary move that will be resolved shortly
 | 
			
		||||
            InventoryFolderImpl folder = (InventoryFolderImpl)folderBase;
 | 
			
		||||
| 
						 | 
				
			
			@ -1863,7 +1862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
            List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks
 | 
			
		||||
                = new List<BulkUpdateInventoryPacket.FolderDataBlock>();
 | 
			
		||||
 | 
			
		||||
            SendBulkUpdateInventoryRecursive(folder, ref folderDataBlocks, transactionId);
 | 
			
		||||
            SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId);
 | 
			
		||||
 | 
			
		||||
            if (folderDataBlocks.Count > 0)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -1888,7 +1887,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
        /// <param name="folder"></param>
 | 
			
		||||
        /// <param name="folderDataBlocks"></param>
 | 
			
		||||
        /// <param name="transactionId"></param>
 | 
			
		||||
        private void SendBulkUpdateInventoryRecursive(
 | 
			
		||||
        private void SendBulkUpdateInventoryFolderRecursive(
 | 
			
		||||
            InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks,
 | 
			
		||||
            UUID transactionId)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			@ -1934,7 +1933,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
            List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls();
 | 
			
		||||
            foreach (InventoryFolderImpl subFolder in subFolders)
 | 
			
		||||
            {
 | 
			
		||||
                SendBulkUpdateInventoryRecursive(subFolder, ref folderDataBlocks, transactionId);
 | 
			
		||||
                SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1997,9 +1996,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
 | 
			
		||||
            return itemBlock;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see>
 | 
			
		||||
        public void SendBulkUpdateInventory(InventoryItemBase item)
 | 
			
		||||
        
 | 
			
		||||
        public void SendBulkUpdateInventory(InventoryNodeBase node)        
 | 
			
		||||
        {
 | 
			
		||||
            if (node is InventoryItemBase)
 | 
			
		||||
                SendBulkUpdateInventoryItem((InventoryItemBase)node);
 | 
			
		||||
            else if (node is InventoryFolderBase)
 | 
			
		||||
                SendBulkUpdateInventoryFolder((InventoryFolderBase)node);
 | 
			
		||||
            else
 | 
			
		||||
                m_log.ErrorFormat("[CLIENT]: Client for {0} sent unknown inventory node named {1}", Name, node.Name);
 | 
			
		||||
        }
 | 
			
		||||
                
 | 
			
		||||
        protected void SendBulkUpdateInventoryItem(InventoryItemBase item)
 | 
			
		||||
        {
 | 
			
		||||
            const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -548,13 +548,9 @@ namespace OpenSim.Region.Examples.SimpleModule
 | 
			
		|||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see>
 | 
			
		||||
        public virtual void SendBulkUpdateInventory(InventoryItemBase item)
 | 
			
		||||
        public virtual void SendBulkUpdateInventory(InventoryNodeBase node)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
 | 
			
		||||
        {}
 | 
			
		||||
 | 
			
		||||
        public UUID GetDefaultAnimation(string name)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -636,13 +636,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
 | 
			
		|||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see>
 | 
			
		||||
        public virtual void SendBulkUpdateInventory(InventoryItemBase item)
 | 
			
		||||
        public virtual void SendBulkUpdateInventory(InventoryNodeBase node)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        public virtual void SendBulkUpdateInventory(InventoryFolderBase folderBase)
 | 
			
		||||
        {}
 | 
			
		||||
 | 
			
		||||
        public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
 | 
			
		||||
        {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -627,14 +627,10 @@ namespace OpenSim.Tests.Common.Mock
 | 
			
		|||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see>
 | 
			
		||||
        public virtual void SendBulkUpdateInventory(InventoryItemBase item)
 | 
			
		||||
        public virtual void SendBulkUpdateInventory(InventoryNodeBase node)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
 | 
			
		||||
        {}
 | 
			
		||||
 | 
			
		||||
        public UUID GetDefaultAnimation(string name)
 | 
			
		||||
        {
 | 
			
		||||
            return UUID.Zero;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue