diff options
author | Brian McBee | 2007-12-08 20:41:37 +0000 |
---|---|---|
committer | Brian McBee | 2007-12-08 20:41:37 +0000 |
commit | 383eccc543e402710bb48802c6951b94d185a6a8 (patch) | |
tree | 17b1730a5e6bc3783d54e3cf0166da2196f8a9a5 /OpenSim/Framework | |
parent | Allow moving, deleting, and restoring objects in inventory. (diff) | |
download | opensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.zip opensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.tar.gz opensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.tar.bz2 opensim-SC_OLD-383eccc543e402710bb48802c6951b94d185a6a8.tar.xz |
hackish code to allow emptying of trash. This really should be done on the inventory server, and not from the region.
Also: it appeared to work the first try, so I have probably done something horribly wrong.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 22 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 4 |
2 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index fb4c3a6..342bb0d 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -136,7 +136,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
136 | /// <param name="fetchFolders"></param> | 136 | /// <param name="fetchFolders"></param> |
137 | /// <param name="fetchItems"></param> | 137 | /// <param name="fetchItems"></param> |
138 | /// <param name="sortOrder"></param> | 138 | /// <param name="sortOrder"></param> |
139 | public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, | 139 | public void HandleFetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, |
140 | bool fetchFolders, bool fetchItems, int sortOrder) | 140 | bool fetchFolders, bool fetchItems, int sortOrder) |
141 | { | 141 | { |
142 | InventoryFolderImpl fold = null; | 142 | InventoryFolderImpl fold = null; |
@@ -181,6 +181,26 @@ namespace OpenSim.Framework.Communications.Cache | |||
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) | ||
185 | { | ||
186 | CachedUserInfo userProfile; | ||
187 | if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) | ||
188 | { | ||
189 | if (userProfile.RootFolder != null) | ||
190 | { | ||
191 | InventoryFolderImpl subFolder = userProfile.RootFolder.HasSubFolder(folderID); | ||
192 | if (subFolder != null) | ||
193 | { | ||
194 | List<InventoryItemBase> items=subFolder.RequestListOfItems(); | ||
195 | foreach(InventoryItemBase item in items) | ||
196 | { | ||
197 | userProfile.DeleteItem(remoteClient.AgentId, item); | ||
198 | } | ||
199 | } | ||
200 | } | ||
201 | } | ||
202 | } | ||
203 | |||
184 | public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) | 204 | public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) |
185 | { | 205 | { |
186 | if (ownerID == libraryRoot.agentID) | 206 | if (ownerID == libraryRoot.agentID) |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 38309fd..773b5eb 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -306,6 +306,9 @@ namespace OpenSim.Framework | |||
306 | public delegate void FetchInventoryDescendents( | 306 | public delegate void FetchInventoryDescendents( |
307 | IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); | 307 | IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); |
308 | 308 | ||
309 | public delegate void PurgeInventoryDescendents( | ||
310 | IClientAPI remoteClient, LLUUID folderID); | ||
311 | |||
309 | public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID); | 312 | public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID); |
310 | 313 | ||
311 | public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); | 314 | public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); |
@@ -398,6 +401,7 @@ namespace OpenSim.Framework | |||
398 | event CreateNewInventoryItem OnCreateNewInventoryItem; | 401 | event CreateNewInventoryItem OnCreateNewInventoryItem; |
399 | event CreateInventoryFolder OnCreateNewInventoryFolder; | 402 | event CreateInventoryFolder OnCreateNewInventoryFolder; |
400 | event FetchInventoryDescendents OnFetchInventoryDescendents; | 403 | event FetchInventoryDescendents OnFetchInventoryDescendents; |
404 | event PurgeInventoryDescendents OnPurgeInventoryDescendents; | ||
401 | event FetchInventory OnFetchInventory; | 405 | event FetchInventory OnFetchInventory; |
402 | event RequestTaskInventory OnRequestTaskInventory; | 406 | event RequestTaskInventory OnRequestTaskInventory; |
403 | event UpdateInventoryItem OnUpdateInventoryItem; | 407 | event UpdateInventoryItem OnUpdateInventoryItem; |