mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
* refactor: break out inter grid inventory services further
* more to follow
This commit is contained in:
@@ -36,68 +36,77 @@ using OpenSim.Framework.Servers;
|
||||
|
||||
namespace OpenSim.Framework.Communications
|
||||
{
|
||||
/// <summary>
|
||||
/// This class manages references to OpenSim non-region services (asset, inventory, user, etc.)
|
||||
/// </summary>
|
||||
public class CommunicationsManager
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected IUserService m_userService;
|
||||
|
||||
protected Dictionary<LLUUID, string[]> m_nameRequestCache = new Dictionary<LLUUID, string[]>();
|
||||
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="serversInfo"></param>
|
||||
/// <param name="httpServer"></param>
|
||||
/// <param name="assetCache"></param>
|
||||
/// <param name="dumpAssetsToFile"></param>
|
||||
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache,
|
||||
bool dumpAssetsToFile)
|
||||
{
|
||||
|
||||
@@ -34,12 +34,7 @@ namespace OpenSim.Framework.Communications
|
||||
/// Inventory operations used between grid services.
|
||||
/// </summary>
|
||||
public interface IInterGridInventoryServices
|
||||
{
|
||||
string Host
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a new inventory for the given user.
|
||||
/// </summary>
|
||||
|
||||
@@ -42,6 +42,11 @@ namespace OpenSim.Framework.Communications
|
||||
/// </summary>
|
||||
public interface IInventoryServices : IInterGridInventoryServices
|
||||
{
|
||||
string Host
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
|
||||
/// inventory has been received
|
||||
|
||||
@@ -31,7 +31,6 @@ using OpenSim.Framework.Communications.Cache;
|
||||
|
||||
namespace OpenSim.Framework.Communications
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Defines all the operations one can perform on a user's inventory.
|
||||
/// </summary>
|
||||
@@ -41,6 +40,7 @@ namespace OpenSim.Framework.Communications
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// <returns>true if the inventory was successfully created, false otherwise</returns>
|
||||
bool CreateNewUserInventory(LLUUID user);
|
||||
|
||||
bool HasInventoryForUser(LLUUID userID);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the root inventory folder for the given user.
|
||||
/// Does the given user have an inventory structure?
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <returns>null if no root folder was found</returns>
|
||||
InventoryFolderBase RequestRootFolder(LLUUID userID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of all the folders in a given user's inventory.
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns>A flat list of the user's inventory folder tree,
|
||||
/// null if there is no inventory for this user</returns>
|
||||
List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId);
|
||||
/// <returns></returns>
|
||||
bool HasInventoryForUser(LLUUID userID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications
|
||||
/// <summary>
|
||||
/// Abstract base class used by local and grid implementations of an inventory service.
|
||||
/// </summary>
|
||||
public abstract class InventoryServiceBase : IInventoryServices
|
||||
public abstract class InventoryServiceBase : IInventoryServices, IInterGridInventoryServices
|
||||
{
|
||||
private static readonly ILog m_log
|
||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
Reference in New Issue
Block a user