From 205b95f2e8b1f94379068c01c46777d7188fc2e5 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 11 Apr 2008 16:49:20 +0000 Subject: * minor documenting, cleanup, renaming in user profile cache service --- .../Communications/Cache/CachedUserInfo.cs | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/CachedUserInfo.cs') 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; namespace OpenSim.Framework.Communications.Cache { + /// + /// Stores user profile and inventory data received from backend services for a particular user. + /// public class CachedUserInfo { private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - private readonly CommunicationsManager m_parentCommsManager; + /// + /// The comms manager holds references to services (user, grid, inventory, etc.) + /// + private readonly CommunicationsManager m_commsManager; + private UserProfileData m_userProfile; + public UserProfileData UserProfile { get { return m_userProfile; } } + // FIXME: These need to be hidden behind accessors public InventoryFolderImpl RootFolder = null; - public UserProfileData UserProfile = null; /// /// Stores received folders for which we have not yet received the parents. @@ -49,9 +57,15 @@ namespace OpenSim.Framework.Communications.Cache private IDictionary> pendingCategorizationFolders = new Dictionary>(); - public CachedUserInfo(CommunicationsManager commsManager) + /// + /// Constructor + /// + /// + /// + public CachedUserInfo(CommunicationsManager commsManager, UserProfileData userProfile) { - m_parentCommsManager = commsManager; + m_commsManager = commsManager; + m_userProfile = userProfile; } /// @@ -197,7 +211,7 @@ namespace OpenSim.Framework.Communications.Cache if ((userID == UserProfile.ID) && (RootFolder != null)) { ItemReceive(userID, itemInfo); - m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); + m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); } } @@ -205,7 +219,7 @@ namespace OpenSim.Framework.Communications.Cache { if ((userID == UserProfile.ID) && (RootFolder != null)) { - m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); + m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); } } @@ -217,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache result = RootFolder.DeleteItem(item.ID); if (result) { - m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item); + m_commsManager.InventoryService.DeleteInventoryItem(userID, item); } } return result; -- cgit v1.1