diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/InventoryFolder.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCache.cs | 23 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 |
3 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs index 3495e55..6161c5a 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs | |||
@@ -36,6 +36,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
36 | public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); | 36 | public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); |
37 | public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); | 37 | public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); |
38 | 38 | ||
39 | // Accessors | ||
40 | public int SubFoldersCount | ||
41 | { | ||
42 | get { return SubFolders.Count; } | ||
43 | } | ||
44 | |||
45 | // Constructors | ||
39 | public InventoryFolderImpl(InventoryFolderBase folderbase) | 46 | public InventoryFolderImpl(InventoryFolderBase folderbase) |
40 | { | 47 | { |
41 | agentID = folderbase.agentID; | 48 | agentID = folderbase.agentID; |
@@ -132,4 +139,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
132 | return itemList; | 139 | return itemList; |
133 | } | 140 | } |
134 | } | 141 | } |
135 | } \ No newline at end of file | 142 | } |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs index 117ed36..379ac9d 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs | |||
@@ -111,6 +111,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | /// <summary> | ||
115 | /// Tell the client about the various child items and folders contained in the requested folder. | ||
116 | /// </summary> | ||
117 | /// <param name="remoteClient"></param> | ||
118 | /// <param name="folderID"></param> | ||
119 | /// <param name="ownerID"></param> | ||
120 | /// <param name="fetchFolders"></param> | ||
121 | /// <param name="fetchItems"></param> | ||
122 | /// <param name="sortOrder"></param> | ||
114 | public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, | 123 | public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, |
115 | bool fetchFolders, bool fetchItems, int sortOrder) | 124 | bool fetchFolders, bool fetchItems, int sortOrder) |
116 | { | 125 | { |
@@ -118,14 +127,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
118 | if (folderID == libraryRoot.folderID) | 127 | if (folderID == libraryRoot.folderID) |
119 | { | 128 | { |
120 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, libraryRoot.folderID, | 129 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, libraryRoot.folderID, |
121 | libraryRoot.RequestListOfItems()); | 130 | libraryRoot.RequestListOfItems(), libraryRoot.SubFoldersCount); |
122 | 131 | ||
123 | return; | 132 | return; |
124 | } | 133 | } |
125 | 134 | ||
126 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) | 135 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) |
127 | { | 136 | { |
128 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems()); | 137 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems(), fold.SubFoldersCount); |
129 | 138 | ||
130 | return; | 139 | return; |
131 | } | 140 | } |
@@ -140,16 +149,16 @@ namespace OpenSim.Framework.Communications.Cache | |||
140 | if (fetchItems) | 149 | if (fetchItems) |
141 | { | 150 | { |
142 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, | 151 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, |
143 | userProfile.RootFolder.RequestListOfItems()); | 152 | userProfile.RootFolder.RequestListOfItems(), userProfile.RootFolder.SubFoldersCount); |
144 | } | 153 | } |
145 | } | 154 | } |
146 | else | 155 | else |
147 | { | 156 | { |
148 | InventoryFolderImpl folder = userProfile.RootFolder.HasSubFolder(folderID); | 157 | InventoryFolderImpl folder = userProfile.RootFolder.HasSubFolder(folderID); |
149 | if ((folder != null) && fetchItems) | 158 | |
159 | if (fetchItems && folder != null) | ||
150 | { | 160 | { |
151 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, | 161 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, folder.RequestListOfItems(), folder.SubFoldersCount); |
152 | folder.RequestListOfItems()); | ||
153 | } | 162 | } |
154 | } | 163 | } |
155 | } | 164 | } |
@@ -184,4 +193,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
184 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); | 193 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); |
185 | } | 194 | } |
186 | } | 195 | } |
187 | } \ No newline at end of file | 196 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 0068761..1427516 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -449,7 +449,7 @@ namespace OpenSim.Framework | |||
449 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 449 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, |
450 | LLQuaternion rotation,LLVector3 velocity, LLVector3 rotationalvelocity); | 450 | LLQuaternion rotation,LLVector3 velocity, LLVector3 rotationalvelocity); |
451 | 451 | ||
452 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items); | 452 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, int subFoldersCount); |
453 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); | 453 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); |
454 | void SendInventoryItemUpdate(InventoryItemBase Item); | 454 | void SendInventoryItemUpdate(InventoryItemBase Item); |
455 | void SendRemoveInventoryItem(LLUUID itemID); | 455 | void SendRemoveInventoryItem(LLUUID itemID); |