diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs index 3afaba5..551a7eb 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs | |||
@@ -12,21 +12,23 @@ using log4net; | |||
12 | 12 | ||
13 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | 13 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory |
14 | { | 14 | { |
15 | public abstract class InventoryCache | 15 | public class InventoryCache |
16 | { | 16 | { |
17 | private static readonly ILog m_log = | 17 | private static readonly ILog m_log = |
18 | LogManager.GetLogger( | 18 | LogManager.GetLogger( |
19 | MethodBase.GetCurrentMethod().DeclaringType); | 19 | MethodBase.GetCurrentMethod().DeclaringType); |
20 | 20 | ||
21 | protected BaseInventoryConnector m_Connector; | ||
21 | protected List<Scene> m_Scenes; | 22 | protected List<Scene> m_Scenes; |
22 | 23 | ||
23 | // The cache proper | 24 | // The cache proper |
24 | protected Dictionary<UUID, Dictionary<AssetType, InventoryFolderBase>> m_InventoryCache; | 25 | protected Dictionary<UUID, Dictionary<AssetType, InventoryFolderBase>> m_InventoryCache; |
25 | 26 | ||
26 | protected virtual void Init(IConfigSource source) | 27 | public virtual void Init(IConfigSource source, BaseInventoryConnector connector) |
27 | { | 28 | { |
28 | m_Scenes = new List<Scene>(); | 29 | m_Scenes = new List<Scene>(); |
29 | m_InventoryCache = new Dictionary<UUID, Dictionary<AssetType, InventoryFolderBase>>(); | 30 | m_InventoryCache = new Dictionary<UUID, Dictionary<AssetType, InventoryFolderBase>>(); |
31 | m_Connector = connector; | ||
30 | } | 32 | } |
31 | 33 | ||
32 | public virtual void AddRegion(Scene scene) | 34 | public virtual void AddRegion(Scene scene) |
@@ -59,7 +61,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
59 | } | 61 | } |
60 | 62 | ||
61 | // If not, go get them and place them in the cache | 63 | // If not, go get them and place them in the cache |
62 | Dictionary<AssetType, InventoryFolderBase> folders = GetSystemFolders(presence.UUID); | 64 | Dictionary<AssetType, InventoryFolderBase> folders = m_Connector.GetSystemFolders(presence.UUID); |
63 | m_log.DebugFormat("[INVENTORY CACHE]: OnMakeRootAgent in {0}, fetched system folders for {1} {2}: count {3}", | 65 | m_log.DebugFormat("[INVENTORY CACHE]: OnMakeRootAgent in {0}, fetched system folders for {1} {2}: count {3}", |
64 | presence.Scene.RegionInfo.RegionName, presence.Firstname, presence.Lastname, folders.Count); | 66 | presence.Scene.RegionInfo.RegionName, presence.Firstname, presence.Lastname, folders.Count); |
65 | if (folders.Count > 0) | 67 | if (folders.Count > 0) |
@@ -95,7 +97,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
95 | } | 97 | } |
96 | } | 98 | } |
97 | 99 | ||
98 | public abstract Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID); | ||
99 | 100 | ||
100 | public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | 101 | public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) |
101 | { | 102 | { |