aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-22 20:24:48 +0000
committerJustin Clarke Casey2008-04-22 20:24:48 +0000
commitfc6e23371fe5439d138f4358038fd4ebc7db87dc (patch)
tree964a095ce946211e1e8f2050dfcb9e0bf29f515b /OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
parentFrom: Dr Scofield <hud@zurich.ibm.com> (diff)
downloadopensim-SC_OLD-fc6e23371fe5439d138f4358038fd4ebc7db87dc.zip
opensim-SC_OLD-fc6e23371fe5439d138f4358038fd4ebc7db87dc.tar.gz
opensim-SC_OLD-fc6e23371fe5439d138f4358038fd4ebc7db87dc.tar.bz2
opensim-SC_OLD-fc6e23371fe5439d138f4358038fd4ebc7db87dc.tar.xz
* Extend functionality to better handle delayed inventory service transfers to create folder, move folder and purge folder.
* Old 1.18 get folder functionality requires a little more consideration
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs39
1 files changed, 30 insertions, 9 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index eb85ec8..f9835f6 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -35,6 +35,10 @@ using log4net;
35 35
36namespace OpenSim.Framework.Communications.Cache 36namespace OpenSim.Framework.Communications.Cache
37{ 37{
38 internal delegate void CreateInventoryFolderDelegate(
39 IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
40 internal delegate void MoveInventoryFolderDelegate(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID);
41 internal delegate void PurgeInventoryDescendentsDelegate(IClientAPI remoteClient, LLUUID folderID);
38 internal delegate void UpdateInventoryFolderDelegate( 42 internal delegate void UpdateInventoryFolderDelegate(
39 IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID); 43 IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID);
40 44
@@ -188,6 +192,13 @@ namespace OpenSim.Framework.Communications.Cache
188 } 192 }
189 } 193 }
190 } 194 }
195 else
196 {
197 userProfile.AddRequest(
198 new InventoryRequest(
199 Delegate.CreateDelegate(typeof(CreateInventoryFolderDelegate), this, "HandleCreateInventoryFolder"),
200 new object[] { remoteClient, folderID, folderType, folderName, parentID }));
201 }
191 } 202 }
192 } 203 }
193 204
@@ -207,7 +218,7 @@ namespace OpenSim.Framework.Communications.Cache
207 LLUUID parentID) 218 LLUUID parentID)
208 { 219 {
209// m_log.DebugFormat( 220// m_log.DebugFormat(
210// "[AGENT INVENTORY] Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 221// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
211 222
212 CachedUserInfo userProfile; 223 CachedUserInfo userProfile;
213 224
@@ -242,9 +253,9 @@ namespace OpenSim.Framework.Communications.Cache
242 /// <param name="parentID"></param> 253 /// <param name="parentID"></param>
243 public void HandleMoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID) 254 public void HandleMoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID)
244 { 255 {
245 m_log.DebugFormat( 256// m_log.DebugFormat(
246 "[AGENT INVENTORY] Moving inventory folder {0} into folder {1} for {2} {3}", 257// "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}",
247 parentID, remoteClient.Name, remoteClient.AgentId); 258// parentID, remoteClient.Name, remoteClient.Name, remoteClient.AgentId);
248 259
249 CachedUserInfo userProfile; 260 CachedUserInfo userProfile;
250 261
@@ -258,10 +269,13 @@ namespace OpenSim.Framework.Communications.Cache
258 baseFolder.ParentID = parentID; 269 baseFolder.ParentID = parentID;
259 m_commsManager.InventoryService.MoveInventoryFolder(remoteClient.AgentId, baseFolder); 270 m_commsManager.InventoryService.MoveInventoryFolder(remoteClient.AgentId, baseFolder);
260 } 271 }
261// else 272 else
262// { 273 {
263// userProfile.AddRequest(new MoveFolderRequest(remoteClient, folderID, parentID)); 274 userProfile.AddRequest(
264// } 275 new InventoryRequest(
276 Delegate.CreateDelegate(typeof(MoveInventoryFolderDelegate), this, "HandleMoveInventoryFolder"),
277 new object[] { remoteClient, folderID, parentID }));
278 }
265 } 279 }
266 } 280 }
267 281
@@ -471,7 +485,7 @@ namespace OpenSim.Framework.Communications.Cache
471 485
472 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) 486 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)
473 { 487 {
474// m_log.InfoFormat("[INVENTORYCACHE]: Purging folder {0} for {1} uuid {2}", 488// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
475// folderID, remoteClient.Name, remoteClient.AgentId); 489// folderID, remoteClient.Name, remoteClient.AgentId);
476 490
477 CachedUserInfo userProfile; 491 CachedUserInfo userProfile;
@@ -489,6 +503,13 @@ namespace OpenSim.Framework.Communications.Cache
489 } 503 }
490 } 504 }
491 } 505 }
506 else
507 {
508 userProfile.AddRequest(
509 new InventoryRequest(
510 Delegate.CreateDelegate(typeof(PurgeInventoryDescendentsDelegate), this, "HandlePurgeInventoryDescendents"),
511 new object[] { remoteClient, folderID }));
512 }
492 } 513 }
493 } 514 }
494 515