From 31ca3a8d4d53fc82a3b4cb62ad4edaebc4111302 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 12 Feb 2009 17:07:44 +0000 Subject: * refactor: Move RequestInventoryForUser() from service to CachedUserInfo * This simplifies callers in most cases - CachedUserInfo is already handling the rest of the fetch inventory work anyway --- .../Framework/Communications/Cache/CachedUserInfo.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (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 15066cd..c5bbd6a 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -202,6 +202,25 @@ namespace OpenSim.Framework.Communications.Cache m_rootFolder = null; } } + + /// + /// Fetch inventory for this user. + /// + /// This has to be executed as a separate step once user information is retreived. + /// This will occur synchronously if the inventory service is in the same process as this class, and + /// asynchronously otherwise. + public void FetchInventory() + { + if (m_commsManager.SecureInventoryService != null) + { + m_commsManager.SecureInventoryService.RequestInventoryForUser( + UserProfile.ID, SessionID, InventoryReceive); + } + else + { + m_commsManager.InventoryService.RequestInventoryForUser(UserProfile.ID, InventoryReceive); + } + } /// /// Callback invoked when the inventory is received from an async request to the inventory service -- cgit v1.1