diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 116 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 7 |
2 files changed, 99 insertions, 24 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 3127bd6..524f314 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -87,6 +87,24 @@ namespace OpenSim.Framework.Communications.Cache | |||
87 | private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders | 87 | private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders |
88 | = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); | 88 | = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); |
89 | 89 | ||
90 | private string m_inventoryHost | ||
91 | { | ||
92 | get | ||
93 | { | ||
94 | if (m_userProfile != null) | ||
95 | { | ||
96 | if (m_userProfile.UserInventoryURI != String.Empty) | ||
97 | { | ||
98 | Uri uri = new Uri(m_userProfile.UserInventoryURI); | ||
99 | return uri.Host; | ||
100 | } | ||
101 | } | ||
102 | |||
103 | return ""; | ||
104 | } | ||
105 | |||
106 | } | ||
107 | |||
90 | /// <summary> | 108 | /// <summary> |
91 | /// Constructor | 109 | /// Constructor |
92 | /// </summary> | 110 | /// </summary> |
@@ -325,9 +343,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
325 | createdBaseFolder.Type = createdFolder.Type; | 343 | createdBaseFolder.Type = createdFolder.Type; |
326 | createdBaseFolder.Version = createdFolder.Version; | 344 | createdBaseFolder.Version = createdFolder.Version; |
327 | 345 | ||
328 | m_commsManager.InventoryService.AddFolder(createdBaseFolder); | 346 | IInventoryServices invService = GetInventoryService(); |
347 | if (invService != null) | ||
348 | { | ||
349 | //m_commsManager.InventoryService | ||
350 | invService.AddFolder(createdBaseFolder); | ||
351 | return true; | ||
352 | } | ||
329 | 353 | ||
330 | return true; | 354 | return false; |
331 | } | 355 | } |
332 | else | 356 | else |
333 | { | 357 | { |
@@ -379,14 +403,19 @@ namespace OpenSim.Framework.Communications.Cache | |||
379 | baseFolder.Type = (short) type; | 403 | baseFolder.Type = (short) type; |
380 | baseFolder.Version = RootFolder.Version; | 404 | baseFolder.Version = RootFolder.Version; |
381 | 405 | ||
382 | m_commsManager.InventoryService.UpdateFolder(baseFolder); | 406 | IInventoryServices invService = GetInventoryService(); |
383 | 407 | if (invService != null) | |
384 | InventoryFolderImpl folder=RootFolder.FindFolder(folderID); | 408 | { |
385 | if(folder != null) | 409 | //m_commsManager.InventoryService. |
386 | { | 410 | invService.UpdateFolder(baseFolder); |
387 | folder.Name = name; | 411 | |
388 | folder.ParentID = parentID; | 412 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); |
389 | } | 413 | if (folder != null) |
414 | { | ||
415 | folder.Name = name; | ||
416 | folder.ParentID = parentID; | ||
417 | } | ||
418 | } | ||
390 | } | 419 | } |
391 | else | 420 | else |
392 | { | 421 | { |
@@ -421,13 +450,24 @@ namespace OpenSim.Framework.Communications.Cache | |||
421 | baseFolder.ID = folderID; | 450 | baseFolder.ID = folderID; |
422 | baseFolder.ParentID = parentID; | 451 | baseFolder.ParentID = parentID; |
423 | 452 | ||
424 | m_commsManager.InventoryService.MoveFolder(baseFolder); | 453 | IInventoryServices invService = GetInventoryService(); |
425 | 454 | if (invService != null) | |
426 | InventoryFolderImpl folder=RootFolder.FindFolder(folderID); | 455 | { |
427 | if(folder != null) | 456 | // m_commsManager.InventoryService |
428 | folder.ParentID = parentID; | 457 | invService.MoveFolder(baseFolder); |
429 | 458 | ||
430 | return true; | 459 | InventoryFolderImpl folder = RootFolder.FindFolder(folderID); |
460 | if (folder != null) | ||
461 | { | ||
462 | folder.ParentID = parentID; | ||
463 | } | ||
464 | |||
465 | return true; | ||
466 | } | ||
467 | else | ||
468 | { | ||
469 | return false; | ||
470 | } | ||
431 | } | 471 | } |
432 | else | 472 | else |
433 | { | 473 | { |
@@ -468,11 +508,16 @@ namespace OpenSim.Framework.Communications.Cache | |||
468 | purgedBaseFolder.Type = purgedFolder.Type; | 508 | purgedBaseFolder.Type = purgedFolder.Type; |
469 | purgedBaseFolder.Version = purgedFolder.Version; | 509 | purgedBaseFolder.Version = purgedFolder.Version; |
470 | 510 | ||
471 | m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder); | 511 | IInventoryServices invService = GetInventoryService(); |
512 | if (invService != null) | ||
513 | { | ||
514 | //m_commsManager.InventoryService | ||
515 | invService.PurgeFolder(purgedBaseFolder); | ||
472 | 516 | ||
473 | purgedFolder.Purge(); | 517 | purgedFolder.Purge(); |
474 | 518 | ||
475 | return true; | 519 | return true; |
520 | } | ||
476 | } | 521 | } |
477 | } | 522 | } |
478 | else | 523 | else |
@@ -505,7 +550,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
505 | item.Folder=RootFolder.ID; | 550 | item.Folder=RootFolder.ID; |
506 | } | 551 | } |
507 | ItemReceive(item); | 552 | ItemReceive(item); |
508 | m_commsManager.InventoryService.AddItem(item); | 553 | |
554 | IInventoryServices invService = GetInventoryService(); | ||
555 | if (invService != null) | ||
556 | { | ||
557 | //m_commsManager.InventoryService | ||
558 | invService.AddItem(item); | ||
559 | } | ||
509 | } | 560 | } |
510 | else | 561 | else |
511 | { | 562 | { |
@@ -525,7 +576,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
525 | { | 576 | { |
526 | if (HasInventory) | 577 | if (HasInventory) |
527 | { | 578 | { |
528 | m_commsManager.InventoryService.UpdateItem(item); | 579 | IInventoryServices invService = GetInventoryService(); |
580 | if (invService != null) | ||
581 | { | ||
582 | //m_commsManager.InventoryService | ||
583 | invService.UpdateItem(item); | ||
584 | } | ||
529 | } | 585 | } |
530 | else | 586 | else |
531 | { | 587 | { |
@@ -564,7 +620,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
564 | 620 | ||
565 | if (RootFolder.DeleteItem(item.ID)) | 621 | if (RootFolder.DeleteItem(item.ID)) |
566 | { | 622 | { |
567 | return m_commsManager.InventoryService.DeleteItem(item); | 623 | IInventoryServices invService = GetInventoryService(); |
624 | if (invService != null) | ||
625 | { | ||
626 | //return m_commsManager.InventoryService | ||
627 | return invService.DeleteItem(item); | ||
628 | } | ||
629 | |||
630 | return false; | ||
568 | } | 631 | } |
569 | } | 632 | } |
570 | else | 633 | else |
@@ -641,6 +704,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
641 | } | 704 | } |
642 | return null; | 705 | return null; |
643 | } | 706 | } |
707 | |||
708 | public IInventoryServices GetInventoryService() | ||
709 | { | ||
710 | IInventoryServices invService; | ||
711 | m_commsManager.TryGetInventoryService(m_inventoryHost, out invService); | ||
712 | return invService; | ||
713 | } | ||
644 | } | 714 | } |
645 | 715 | ||
646 | /// <summary> | 716 | /// <summary> |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index fe61406..37451ab 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -119,7 +119,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
119 | CachedUserInfo userInfo = GetUserDetails(userID); | 119 | CachedUserInfo userInfo = GetUserDetails(userID); |
120 | if (userInfo != null) | 120 | if (userInfo != null) |
121 | { | 121 | { |
122 | m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); | 122 | //m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); |
123 | IInventoryServices invService = userInfo.GetInventoryService(); | ||
124 | if (invService != null) | ||
125 | { | ||
126 | invService.RequestInventoryForUser(userID, userInfo.InventoryReceive); | ||
127 | } | ||
123 | } | 128 | } |
124 | else | 129 | else |
125 | { | 130 | { |