aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-08-11 16:45:16 +0100
committerJustin Clark-Casey (justincc)2009-08-11 16:45:16 +0100
commit226c082ed417f4a5f2295595e45eca2fcb1e42c9 (patch)
tree4bbe2f59176589e497a2f4fd16b3adfe3989c5cd /OpenSim/Framework/Communications/Cache
parentAdded some needed comments to SceneSetupHelper (actually just retriggering pa... (diff)
downloadopensim-SC_OLD-226c082ed417f4a5f2295595e45eca2fcb1e42c9.zip
opensim-SC_OLD-226c082ed417f4a5f2295595e45eca2fcb1e42c9.tar.gz
opensim-SC_OLD-226c082ed417f4a5f2295595e45eca2fcb1e42c9.tar.bz2
opensim-SC_OLD-226c082ed417f4a5f2295595e45eca2fcb1e42c9.tar.xz
Establish CachedUserInfo.OnInventoryReceived event so that region/test inventory code can be written with the async inventory fetch
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs19
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 10aff42..8ee1b1a 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -49,16 +49,24 @@ namespace OpenSim.Framework.Communications.Cache
49 IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems); 49 IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems);
50 50
51 public delegate void OnItemReceivedDelegate(UUID itemID); 51 public delegate void OnItemReceivedDelegate(UUID itemID);
52 public delegate void OnInventoryReceivedDelegate(UUID userID);
52 53
53 /// <summary> 54 /// <summary>
54 /// Stores user profile and inventory data received from backend services for a particular user. 55 /// Stores user profile and inventory data received from backend services for a particular user.
55 /// </summary> 56 /// </summary>
56 public class CachedUserInfo 57 public class CachedUserInfo
57 { 58 {
59 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60
61 //// <value>
62 /// Fired when a particular item has been received from the inventory service
63 /// </value>
58 public event OnItemReceivedDelegate OnItemReceived; 64 public event OnItemReceivedDelegate OnItemReceived;
59 65
60 private static readonly ILog m_log 66 /// <value>
61 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 67 /// Fired once the entire inventory has been received for the user
68 /// </value>
69 public event OnInventoryReceivedDelegate OnInventoryReceived;
62 70
63 /// <summary> 71 /// <summary>
64 /// The comms manager holds references to services (user, grid, inventory, etc.) 72 /// The comms manager holds references to services (user, grid, inventory, etc.)
@@ -133,7 +141,9 @@ namespace OpenSim.Framework.Communications.Cache
133 UUID parentFolderId = folder.ParentID; 141 UUID parentFolderId = folder.ParentID;
134 142
135 if (dictionary.ContainsKey(parentFolderId)) 143 if (dictionary.ContainsKey(parentFolderId))
144 {
136 dictionary[parentFolderId].Add(folder); 145 dictionary[parentFolderId].Add(folder);
146 }
137 else 147 else
138 { 148 {
139 IList<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); 149 IList<InventoryFolderImpl> folders = new List<InventoryFolderImpl>();
@@ -299,6 +309,9 @@ namespace OpenSim.Framework.Communications.Cache
299 request.Execute(); 309 request.Execute();
300 } 310 }
301 } 311 }
312
313 if (OnInventoryReceived != null)
314 OnInventoryReceived(UserProfile.ID);
302 } 315 }
303 316
304 /// <summary> 317 /// <summary>