aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/CachedUserInfo.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 9ece581..1208605 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -49,7 +49,8 @@ namespace OpenSim.Framework.Communications.Cache
49 public UserProfileData UserProfile { get { return m_userProfile; } } 49 public UserProfileData UserProfile { get { return m_userProfile; } }
50 50
51 // FIXME: These need to be hidden behind accessors 51 // FIXME: These need to be hidden behind accessors
52 public InventoryFolderImpl RootFolder = null; 52 private InventoryFolderImpl m_rootFolder;
53 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
53 54
54 /// <summary> 55 /// <summary>
55 /// Stores received folders for which we have not yet received the parents. 56 /// Stores received folders for which we have not yet received the parents.
@@ -67,6 +68,11 @@ namespace OpenSim.Framework.Communications.Cache
67 m_commsManager = commsManager; 68 m_commsManager = commsManager;
68 m_userProfile = userProfile; 69 m_userProfile = userProfile;
69 } 70 }
71
72 /// <summary>
73 /// Has this user info object yet received its inventory information from the invetnroy service?
74 /// </summary>
75 public bool HasInventory { get { return RootFolder != null; } }
70 76
71 /// <summary> 77 /// <summary>
72 /// Store a folder pending categorization when its parent is received. 78 /// Store a folder pending categorization when its parent is received.
@@ -134,7 +140,7 @@ namespace OpenSim.Framework.Communications.Cache
134 { 140 {
135 if (folderInfo.ParentID == LLUUID.Zero) 141 if (folderInfo.ParentID == LLUUID.Zero)
136 { 142 {
137 RootFolder = folderInfo; 143 m_rootFolder = folderInfo;
138 } 144 }
139 } 145 }
140 else if (RootFolder.ID == folderInfo.ParentID) 146 else if (RootFolder.ID == folderInfo.ParentID)
@@ -208,7 +214,7 @@ namespace OpenSim.Framework.Communications.Cache
208 214
209 public void AddItem(LLUUID userID, InventoryItemBase itemInfo) 215 public void AddItem(LLUUID userID, InventoryItemBase itemInfo)
210 { 216 {
211 if ((userID == UserProfile.ID) && (RootFolder != null)) 217 if ((userID == UserProfile.ID) && HasInventory)
212 { 218 {
213 ItemReceive(userID, itemInfo); 219 ItemReceive(userID, itemInfo);
214 m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); 220 m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo);
@@ -217,7 +223,7 @@ namespace OpenSim.Framework.Communications.Cache
217 223
218 public void UpdateItem(LLUUID userID, InventoryItemBase itemInfo) 224 public void UpdateItem(LLUUID userID, InventoryItemBase itemInfo)
219 { 225 {
220 if ((userID == UserProfile.ID) && (RootFolder != null)) 226 if ((userID == UserProfile.ID) && HasInventory)
221 { 227 {
222 m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); 228 m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo);
223 } 229 }
@@ -226,7 +232,7 @@ namespace OpenSim.Framework.Communications.Cache
226 public bool DeleteItem(LLUUID userID, InventoryItemBase item) 232 public bool DeleteItem(LLUUID userID, InventoryItemBase item)
227 { 233 {
228 bool result = false; 234 bool result = false;
229 if ((userID == UserProfile.ID) && (RootFolder != null)) 235 if ((userID == UserProfile.ID) && HasInventory)
230 { 236 {
231 result = RootFolder.DeleteItem(item.ID); 237 result = RootFolder.DeleteItem(item.ID);
232 if (result) 238 if (result)