aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
diff options
context:
space:
mode:
authorMW2008-03-15 12:53:03 +0000
committerMW2008-03-15 12:53:03 +0000
commitc04899b60ab15c7614108ac61fbf1f22fccab5a7 (patch)
tree7fa4880b501f52bf30da23859543206516bb6579 /OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
parentPart 1 of making inventory work again in the 1.19.1 (RC) client. Implemented ... (diff)
downloadopensim-SC-c04899b60ab15c7614108ac61fbf1f22fccab5a7.zip
opensim-SC-c04899b60ab15c7614108ac61fbf1f22fccab5a7.tar.gz
opensim-SC-c04899b60ab15c7614108ac61fbf1f22fccab5a7.tar.bz2
opensim-SC-c04899b60ab15c7614108ac61fbf1f22fccab5a7.tar.xz
Part 2 of fixing inventory for client 1.19.1 (RC), inventory items should now show up.
Most likely still some problems and most like needs some more work (and still a couple of things to finish off).
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs60
1 files changed, 60 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 455f722..b066fdc 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -254,6 +254,66 @@ namespace OpenSim.Framework.Communications.Cache
254 folderID, remoteClient.Name); 254 folderID, remoteClient.Name);
255 } 255 }
256 256
257 public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID,
258 bool fetchFolders, bool fetchItems, int sortOrder)
259 {
260 // XXX We're not handling sortOrder yet!
261 // with CAPS we are only return items in the folders at the moment
262 // need to find the format that sub folder details are sent in
263 // if (fetchItems)
264 // {
265 InventoryFolderImpl fold = null;
266 if (folderID == libraryRoot.folderID)
267 {
268 return libraryRoot.RequestListOfItems();
269 }
270
271 if ((fold = libraryRoot.HasSubFolder(folderID)) != null)
272 {
273 return fold.RequestListOfItems();
274 }
275
276 CachedUserInfo userProfile;
277 if (m_userProfiles.TryGetValue(agentID, out userProfile))
278 {
279 if (userProfile.RootFolder != null)
280 {
281 if (userProfile.RootFolder.folderID == folderID)
282 {
283 return userProfile.RootFolder.RequestListOfItems();
284 }
285 else
286 {
287 if ((fold = userProfile.RootFolder.HasSubFolder(folderID)) != null)
288 {
289 return fold.RequestListOfItems();
290 }
291 }
292 }
293 else
294 {
295 m_log.ErrorFormat("[INVENTORYCACHE]: Could not find root folder for user {0}", agentID.ToString());
296
297 return new List<InventoryItemBase>(); ;
298 }
299 }
300 else
301 {
302 m_log.ErrorFormat("[INVENTORYCACHE]: " +
303 "Could not find user profile for {0} for folder {1}",
304 agentID.ToString(), folderID);
305 return new List<InventoryItemBase>();
306 }
307
308 // If we've reached this point then we couldn't find the folder, even though the client thinks
309 // it exists
310 m_log.ErrorFormat("[INVENTORYCACHE]: " +
311 "Could not find folder {0} for user {1}",
312 folderID, agentID.ToString());
313 // }
314 return new List<InventoryItemBase>();
315 }
316
257 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) 317 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)
258 { 318 {
259// m_log.InfoFormat("[INVENTORYCACHE]: Purging folder {0} for {1} uuid {2}", 319// m_log.InfoFormat("[INVENTORYCACHE]: Purging folder {0} for {1} uuid {2}",