From 9af05d0bc3253376cecb7cf6586c53e8067bb2a4 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 23 Jul 2008 22:18:09 +0000 Subject: * refactor: break out inter grid inventory services further * more to follow --- .../Communications/CommunicationsManager.cs | 43 +++++++++++++--------- .../Communications/IInterGridInventoryServices.cs | 7 +--- .../Framework/Communications/IInventoryServices.cs | 5 +++ .../Communications/ISecureInventoryService.cs | 18 ++------- .../Communications/InventoryServiceBase.cs | 2 +- 5 files changed, 37 insertions(+), 38 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 80dfa2c..6272872 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -36,68 +36,77 @@ using OpenSim.Framework.Servers; namespace OpenSim.Framework.Communications { + /// + /// This class manages references to OpenSim non-region services (asset, inventory, user, etc.) + /// public class CommunicationsManager { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - protected IUserService m_userService; + protected Dictionary m_nameRequestCache = new Dictionary(); public IUserService UserService { get { return m_userService; } } - - protected IGridServices m_gridService; + protected IUserService m_userService; public IGridServices GridService { get { return m_gridService; } } - - - protected IInterRegionCommunications m_interRegion; - + protected IGridServices m_gridService; + public IInterRegionCommunications InterRegion { get { return m_interRegion; } } - - protected UserProfileCacheService m_userProfileCacheService; + protected IInterRegionCommunications m_interRegion; public UserProfileCacheService UserProfileCacheService { get { return m_userProfileCacheService; } } + protected UserProfileCacheService m_userProfileCacheService; // protected AgentAssetTransactionsManager m_transactionsManager; // public AgentAssetTransactionsManager TransactionsManager // { // get { return m_transactionsManager; } - // } - - protected IAvatarService m_avatarService; + // } public IAvatarService AvatarService { get { return m_avatarService; } } - - protected AssetCache m_assetCache; + protected IAvatarService m_avatarService; public AssetCache AssetCache { get { return m_assetCache; } } - - protected NetworkServersInfo m_networkServersInfo; + protected AssetCache m_assetCache; + + public IInterGridInventoryServices InterGridInventoryService + { + get { return m_interGridInventoryService; } + } + protected IInterGridInventoryServices m_interGridInventoryService; public NetworkServersInfo NetworkServersInfo { get { return m_networkServersInfo; } } + protected NetworkServersInfo m_networkServersInfo; + /// + /// Constructor + /// + /// + /// + /// + /// public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool dumpAssetsToFile) { diff --git a/OpenSim/Framework/Communications/IInterGridInventoryServices.cs b/OpenSim/Framework/Communications/IInterGridInventoryServices.cs index 1ef1452..e820c5e 100644 --- a/OpenSim/Framework/Communications/IInterGridInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInterGridInventoryServices.cs @@ -34,12 +34,7 @@ namespace OpenSim.Framework.Communications /// Inventory operations used between grid services. /// public interface IInterGridInventoryServices - { - string Host - { - get; - } - + { /// /// Create a new inventory for the given user. /// diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index 18e1a2d..bb16a49 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs @@ -42,6 +42,11 @@ namespace OpenSim.Framework.Communications /// public interface IInventoryServices : IInterGridInventoryServices { + string Host + { + get; + } + /// /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the /// inventory has been received diff --git a/OpenSim/Framework/Communications/ISecureInventoryService.cs b/OpenSim/Framework/Communications/ISecureInventoryService.cs index 0e7861a..1da3115 100644 --- a/OpenSim/Framework/Communications/ISecureInventoryService.cs +++ b/OpenSim/Framework/Communications/ISecureInventoryService.cs @@ -31,7 +31,6 @@ using OpenSim.Framework.Communications.Cache; namespace OpenSim.Framework.Communications { - /// /// Defines all the operations one can perform on a user's inventory. /// @@ -41,6 +40,7 @@ namespace OpenSim.Framework.Communications { get; } + /// /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the /// inventory has been received @@ -105,21 +105,11 @@ namespace OpenSim.Framework.Communications /// true if the inventory was successfully created, false otherwise bool CreateNewUserInventory(LLUUID user); - bool HasInventoryForUser(LLUUID userID); - /// - /// Retrieve the root inventory folder for the given user. + /// Does the given user have an inventory structure? /// /// - /// null if no root folder was found - InventoryFolderBase RequestRootFolder(LLUUID userID); - - /// - /// Returns a list of all the folders in a given user's inventory. - /// - /// - /// A flat list of the user's inventory folder tree, - /// null if there is no inventory for this user - List GetInventorySkeleton(LLUUID userId); + /// + bool HasInventoryForUser(LLUUID userID); } } diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index d26a3bb..fd2e6b1 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications /// /// Abstract base class used by local and grid implementations of an inventory service. /// - public abstract class InventoryServiceBase : IInventoryServices + public abstract class InventoryServiceBase : IInventoryServices, IInterGridInventoryServices { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); -- cgit v1.1