diff options
author | Justin Clarke Casey | 2009-02-11 19:57:45 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-11 19:57:45 +0000 |
commit | 8645c7482d39ccc9d72cb4cfc7c68b651b3824d3 (patch) | |
tree | 56f5c0a371328eda49ed4c0fc97774762b8aaf42 | |
parent | * Establish a common InventoryNodeBase class from InventoryItemBase and Inven... (diff) | |
download | opensim-SC-8645c7482d39ccc9d72cb4cfc7c68b651b3824d3.zip opensim-SC-8645c7482d39ccc9d72cb4cfc7c68b651b3824d3.tar.gz opensim-SC-8645c7482d39ccc9d72cb4cfc7c68b651b3824d3.tar.bz2 opensim-SC-8645c7482d39ccc9d72cb4cfc7c68b651b3824d3.tar.xz |
* Change SendBulkUpdateInventory from two methods to one which accepts an InventoryNode
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 6 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 6 |
5 files changed, 27 insertions, 35 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 63c09fe..759059f 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -887,18 +887,14 @@ namespace OpenSim.Framework | |||
887 | void SendTaskInventory(UUID taskID, short serial, byte[] fileName); | 887 | void SendTaskInventory(UUID taskID, short serial, byte[] fileName); |
888 | 888 | ||
889 | /// <summary> | 889 | /// <summary> |
890 | /// Used by the server to inform the client of new inventory items. Will transfer the contents of the folder | 890 | /// Used by the server to inform the client of new inventory items and folders. |
891 | /// (including all descendent folders) as well as the folder itself. | ||
892 | /// </summary> | 891 | /// </summary> |
893 | /// <param name="folder"></param> | 892 | /// |
894 | void SendBulkUpdateInventory(InventoryFolderBase folder); | 893 | /// If the node is a folder then the contents will be transferred |
895 | 894 | /// (including all descendent folders) as well as the folder itself. | |
896 | /// <summary> | 895 | /// |
897 | /// Used by the server to inform the client of a new inventory item. Used when transferring items | 896 | /// <param name="node"></param> |
898 | /// between avatars, possibly among other things. | 897 | void SendBulkUpdateInventory(InventoryNodeBase node); |
899 | /// </summary> | ||
900 | /// <param name="item"></param> | ||
901 | void SendBulkUpdateInventory(InventoryItemBase item); | ||
902 | 898 | ||
903 | void SendXferPacket(ulong xferID, uint packet, byte[] data); | 899 | void SendXferPacket(ulong xferID, uint packet, byte[] data); |
904 | 900 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a1263a1..45915db 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1850,9 +1850,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1850 | inventoryReply.Header.Zerocoded = true; | 1850 | inventoryReply.Header.Zerocoded = true; |
1851 | OutPacket(inventoryReply, ThrottleOutPacketType.Asset); | 1851 | OutPacket(inventoryReply, ThrottleOutPacketType.Asset); |
1852 | } | 1852 | } |
1853 | 1853 | ||
1854 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryFolderBase)</see> | 1854 | protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) |
1855 | public void SendBulkUpdateInventory(InventoryFolderBase folderBase) | ||
1856 | { | 1855 | { |
1857 | // XXX: Nasty temporary move that will be resolved shortly | 1856 | // XXX: Nasty temporary move that will be resolved shortly |
1858 | InventoryFolderImpl folder = (InventoryFolderImpl)folderBase; | 1857 | InventoryFolderImpl folder = (InventoryFolderImpl)folderBase; |
@@ -1863,7 +1862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1863 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks | 1862 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks |
1864 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); | 1863 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); |
1865 | 1864 | ||
1866 | SendBulkUpdateInventoryRecursive(folder, ref folderDataBlocks, transactionId); | 1865 | SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId); |
1867 | 1866 | ||
1868 | if (folderDataBlocks.Count > 0) | 1867 | if (folderDataBlocks.Count > 0) |
1869 | { | 1868 | { |
@@ -1888,7 +1887,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1888 | /// <param name="folder"></param> | 1887 | /// <param name="folder"></param> |
1889 | /// <param name="folderDataBlocks"></param> | 1888 | /// <param name="folderDataBlocks"></param> |
1890 | /// <param name="transactionId"></param> | 1889 | /// <param name="transactionId"></param> |
1891 | private void SendBulkUpdateInventoryRecursive( | 1890 | private void SendBulkUpdateInventoryFolderRecursive( |
1892 | InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, | 1891 | InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, |
1893 | UUID transactionId) | 1892 | UUID transactionId) |
1894 | { | 1893 | { |
@@ -1934,7 +1933,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1934 | List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); | 1933 | List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); |
1935 | foreach (InventoryFolderImpl subFolder in subFolders) | 1934 | foreach (InventoryFolderImpl subFolder in subFolders) |
1936 | { | 1935 | { |
1937 | SendBulkUpdateInventoryRecursive(subFolder, ref folderDataBlocks, transactionId); | 1936 | SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); |
1938 | } | 1937 | } |
1939 | } | 1938 | } |
1940 | 1939 | ||
@@ -1997,9 +1996,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1997 | 1996 | ||
1998 | return itemBlock; | 1997 | return itemBlock; |
1999 | } | 1998 | } |
2000 | 1999 | ||
2001 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> | 2000 | public void SendBulkUpdateInventory(InventoryNodeBase node) |
2002 | public void SendBulkUpdateInventory(InventoryItemBase item) | 2001 | { |
2002 | if (node is InventoryItemBase) | ||
2003 | SendBulkUpdateInventoryItem((InventoryItemBase)node); | ||
2004 | else if (node is InventoryFolderBase) | ||
2005 | SendBulkUpdateInventoryFolder((InventoryFolderBase)node); | ||
2006 | else | ||
2007 | m_log.ErrorFormat("[CLIENT]: Client for {0} sent unknown inventory node named {1}", Name, node.Name); | ||
2008 | } | ||
2009 | |||
2010 | protected void SendBulkUpdateInventoryItem(InventoryItemBase item) | ||
2003 | { | 2011 | { |
2004 | const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; | 2012 | const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; |
2005 | 2013 | ||
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index aac5990..1ee4424 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -548,13 +548,9 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
548 | { | 548 | { |
549 | } | 549 | } |
550 | 550 | ||
551 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> | 551 | public virtual void SendBulkUpdateInventory(InventoryNodeBase node) |
552 | public virtual void SendBulkUpdateInventory(InventoryItemBase item) | ||
553 | { | 552 | { |
554 | } | 553 | } |
555 | |||
556 | public void SendBulkUpdateInventory(InventoryFolderBase folderBase) | ||
557 | {} | ||
558 | 554 | ||
559 | public UUID GetDefaultAnimation(string name) | 555 | public UUID GetDefaultAnimation(string name) |
560 | { | 556 | { |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 3ba8a97..91518e2 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -636,13 +636,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
636 | { | 636 | { |
637 | } | 637 | } |
638 | 638 | ||
639 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> | 639 | public virtual void SendBulkUpdateInventory(InventoryNodeBase node) |
640 | public virtual void SendBulkUpdateInventory(InventoryItemBase item) | ||
641 | { | 640 | { |
642 | } | 641 | } |
643 | |||
644 | public virtual void SendBulkUpdateInventory(InventoryFolderBase folderBase) | ||
645 | {} | ||
646 | 642 | ||
647 | public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) | 643 | public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) |
648 | { | 644 | { |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 5f02524..2463b3b 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -627,14 +627,10 @@ namespace OpenSim.Tests.Common.Mock | |||
627 | { | 627 | { |
628 | } | 628 | } |
629 | 629 | ||
630 | /// <see>IClientAPI.SendBulkUpdateInventory(InventoryItemBase)</see> | 630 | public virtual void SendBulkUpdateInventory(InventoryNodeBase node) |
631 | public virtual void SendBulkUpdateInventory(InventoryItemBase item) | ||
632 | { | 631 | { |
633 | } | 632 | } |
634 | 633 | ||
635 | public void SendBulkUpdateInventory(InventoryFolderBase folderBase) | ||
636 | {} | ||
637 | |||
638 | public UUID GetDefaultAnimation(string name) | 634 | public UUID GetDefaultAnimation(string name) |
639 | { | 635 | { |
640 | return UUID.Zero; | 636 | return UUID.Zero; |