diff options
author | Justin Clarke Casey | 2008-04-11 16:49:20 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-11 16:49:20 +0000 |
commit | 205b95f2e8b1f94379068c01c46777d7188fc2e5 (patch) | |
tree | f02cac20eed4a970085aba2a11880721816f163c /OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |
parent | * documenting and minor refactoring in UserProfileCacheService (diff) | |
download | opensim-SC_OLD-205b95f2e8b1f94379068c01c46777d7188fc2e5.zip opensim-SC_OLD-205b95f2e8b1f94379068c01c46777d7188fc2e5.tar.gz opensim-SC_OLD-205b95f2e8b1f94379068c01c46777d7188fc2e5.tar.bz2 opensim-SC_OLD-205b95f2e8b1f94379068c01c46777d7188fc2e5.tar.xz |
* minor documenting, cleanup, renaming in user profile cache service
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 6e07e7c..9ece581 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -32,16 +32,24 @@ using libsecondlife; | |||
32 | 32 | ||
33 | namespace OpenSim.Framework.Communications.Cache | 33 | namespace OpenSim.Framework.Communications.Cache |
34 | { | 34 | { |
35 | /// <summary> | ||
36 | /// Stores user profile and inventory data received from backend services for a particular user. | ||
37 | /// </summary> | ||
35 | public class CachedUserInfo | 38 | public class CachedUserInfo |
36 | { | 39 | { |
37 | private static readonly log4net.ILog m_log | 40 | private static readonly log4net.ILog m_log |
38 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
39 | 42 | ||
40 | private readonly CommunicationsManager m_parentCommsManager; | 43 | /// <summary> |
44 | /// The comms manager holds references to services (user, grid, inventory, etc.) | ||
45 | /// </summary> | ||
46 | private readonly CommunicationsManager m_commsManager; | ||
41 | 47 | ||
48 | private UserProfileData m_userProfile; | ||
49 | public UserProfileData UserProfile { get { return m_userProfile; } } | ||
50 | |||
42 | // FIXME: These need to be hidden behind accessors | 51 | // FIXME: These need to be hidden behind accessors |
43 | public InventoryFolderImpl RootFolder = null; | 52 | public InventoryFolderImpl RootFolder = null; |
44 | public UserProfileData UserProfile = null; | ||
45 | 53 | ||
46 | /// <summary> | 54 | /// <summary> |
47 | /// Stores received folders for which we have not yet received the parents. | 55 | /// Stores received folders for which we have not yet received the parents. |
@@ -49,9 +57,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
49 | private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders | 57 | private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders |
50 | = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); | 58 | = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); |
51 | 59 | ||
52 | public CachedUserInfo(CommunicationsManager commsManager) | 60 | /// <summary> |
61 | /// Constructor | ||
62 | /// </summary> | ||
63 | /// <param name="commsManager"></param> | ||
64 | /// <param name="userProfile"></param> | ||
65 | public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile) | ||
53 | { | 66 | { |
54 | m_parentCommsManager = commsManager; | 67 | m_commsManager = commsManager; |
68 | m_userProfile = userProfile; | ||
55 | } | 69 | } |
56 | 70 | ||
57 | /// <summary> | 71 | /// <summary> |
@@ -197,7 +211,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
197 | if ((userID == UserProfile.ID) && (RootFolder != null)) | 211 | if ((userID == UserProfile.ID) && (RootFolder != null)) |
198 | { | 212 | { |
199 | ItemReceive(userID, itemInfo); | 213 | ItemReceive(userID, itemInfo); |
200 | m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); | 214 | m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); |
201 | } | 215 | } |
202 | } | 216 | } |
203 | 217 | ||
@@ -205,7 +219,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
205 | { | 219 | { |
206 | if ((userID == UserProfile.ID) && (RootFolder != null)) | 220 | if ((userID == UserProfile.ID) && (RootFolder != null)) |
207 | { | 221 | { |
208 | m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); | 222 | m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); |
209 | } | 223 | } |
210 | } | 224 | } |
211 | 225 | ||
@@ -217,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
217 | result = RootFolder.DeleteItem(item.ID); | 231 | result = RootFolder.DeleteItem(item.ID); |
218 | if (result) | 232 | if (result) |
219 | { | 233 | { |
220 | m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item); | 234 | m_commsManager.InventoryService.DeleteInventoryItem(userID, item); |
221 | } | 235 | } |
222 | } | 236 | } |
223 | return result; | 237 | return result; |