diff options
Diffstat (limited to '')
27 files changed, 85 insertions, 68 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index 643361a..bfa27c3 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
74 | internal static IInventoryServices InventoryServices = null; | 74 | internal static IInventoryServices InventoryServices = null; |
75 | internal static IUserService UserServices = null; | 75 | internal static IUserService UserServices = null; |
76 | internal static IAvatarService AvatarServices = null; | 76 | internal static IAvatarService AvatarServices = null; |
77 | internal static AssetCache AssetServices = null; | 77 | internal static IAssetCache AssetServices = null; |
78 | internal static string Prefix = null; | 78 | internal static string Prefix = null; |
79 | internal static IConfig Config = null; | 79 | internal static IConfig Config = null; |
80 | internal static string GodKey = null; | 80 | internal static string GodKey = null; |
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 2b2467c..2296e46 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -37,7 +37,7 @@ using GlynnTucker.Cache; | |||
37 | 37 | ||
38 | namespace OpenSim.Framework.Communications.Cache | 38 | namespace OpenSim.Framework.Communications.Cache |
39 | { | 39 | { |
40 | public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); | 40 | // public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// Manages local cache of assets and their sending to viewers. | 43 | /// Manages local cache of assets and their sending to viewers. |
@@ -47,7 +47,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
47 | /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and | 47 | /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and |
48 | /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and | 48 | /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and |
49 | /// AssetNotFound(), which means they do share the same asset and texture caches.I agr | 49 | /// AssetNotFound(), which means they do share the same asset and texture caches.I agr |
50 | public class AssetCache : IAssetReceiver | 50 | |
51 | public class AssetCache : IAssetCache, IAssetReceiver | ||
51 | { | 52 | { |
52 | protected ICache m_memcache = new SimpleMemoryCache(); | 53 | protected ICache m_memcache = new SimpleMemoryCache(); |
53 | 54 | ||
@@ -148,7 +149,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
148 | /// Process the asset queue which holds data which is packeted up and sent | 149 | /// Process the asset queue which holds data which is packeted up and sent |
149 | /// directly back to the client. | 150 | /// directly back to the client. |
150 | /// </summary> | 151 | /// </summary> |
151 | public void RunAssetManager() | 152 | private void RunAssetManager() |
152 | { | 153 | { |
153 | while (true) | 154 | while (true) |
154 | { | 155 | { |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 25a69f7..cfe9002 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
98 | //private string eventQueue = "0100/"; | 98 | //private string eventQueue = "0100/"; |
99 | private BaseHttpServer m_httpListener; | 99 | private BaseHttpServer m_httpListener; |
100 | private UUID m_agentID; | 100 | private UUID m_agentID; |
101 | private AssetCache m_assetCache; | 101 | private IAssetCache m_assetCache; |
102 | private int m_eventQueueCount = 1; | 102 | private int m_eventQueueCount = 1; |
103 | private Queue<string> m_capsEventQueue = new Queue<string>(); | 103 | private Queue<string> m_capsEventQueue = new Queue<string>(); |
104 | private bool m_dumpAssetsToFile; | 104 | private bool m_dumpAssetsToFile; |
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
121 | public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null; | 121 | public FetchInventoryDescendentsCAPS CAPSFetchInventoryDescendents = null; |
122 | public GetClientDelegate GetClient = null; | 122 | public GetClientDelegate GetClient = null; |
123 | 123 | ||
124 | public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, | 124 | public Caps(IAssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, |
125 | UUID agent, bool dumpAssetsToFile, string regionName) | 125 | UUID agent, bool dumpAssetsToFile, string regionName) |
126 | { | 126 | { |
127 | m_assetCache = assetCache; | 127 | m_assetCache = assetCache; |
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index b4af991..2107f63 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -87,11 +87,11 @@ namespace OpenSim.Framework.Communications | |||
87 | } | 87 | } |
88 | protected IAvatarService m_avatarService; | 88 | protected IAvatarService m_avatarService; |
89 | 89 | ||
90 | public AssetCache AssetCache | 90 | public IAssetCache AssetCache |
91 | { | 91 | { |
92 | get { return m_assetCache; } | 92 | get { return m_assetCache; } |
93 | } | 93 | } |
94 | protected AssetCache m_assetCache; | 94 | protected IAssetCache m_assetCache; |
95 | 95 | ||
96 | public IInterServiceInventoryServices InterServiceInventoryService | 96 | public IInterServiceInventoryServices InterServiceInventoryService |
97 | { | 97 | { |
@@ -127,7 +127,7 @@ namespace OpenSim.Framework.Communications | |||
127 | /// <param name="httpServer"></param> | 127 | /// <param name="httpServer"></param> |
128 | /// <param name="assetCache"></param> | 128 | /// <param name="assetCache"></param> |
129 | /// <param name="dumpAssetsToFile"></param> | 129 | /// <param name="dumpAssetsToFile"></param> |
130 | public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, | 130 | public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, IAssetCache assetCache, |
131 | bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder) | 131 | bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder) |
132 | { | 132 | { |
133 | m_networkServersInfo = serversInfo; | 133 | m_networkServersInfo = serversInfo; |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index d032864..f2ea81d 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -309,37 +309,53 @@ namespace OpenSim | |||
309 | /// </summary> | 309 | /// </summary> |
310 | protected virtual void InitialiseAssetCache() | 310 | protected virtual void InitialiseAssetCache() |
311 | { | 311 | { |
312 | // If the assetcache is set to default, then use the grid asset service in grid mode and the local database | 312 | |
313 | // based asset service in standalone mode | 313 | IAssetServer assetServer = null; |
314 | 314 | string mode = m_configSettings.AssetStorage; | |
315 | IAssetServer assetServer; | 315 | |
316 | if (m_configSettings.AssetStorage == "grid" | 316 | if (m_configSettings.Standalone == false && |
317 | || (m_configSettings.AssetStorage == "default" && false == m_configSettings.Standalone)) | 317 | m_configSettings.AssetStorage == "default") |
318 | { | 318 | mode = "grid"; |
319 | assetServer = new GridAssetClient(m_networkServersInfo.AssetURL); | 319 | |
320 | } | 320 | switch (mode) |
321 | else if (m_configSettings.AssetStorage == "cryptogrid") // Decrypt-Only | ||
322 | { | 321 | { |
323 | assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL, | 322 | case "grid" : |
323 | assetServer = new GridAssetClient(m_networkServersInfo.AssetURL); | ||
324 | break; | ||
325 | case "cryptogrid" : | ||
326 | assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL, | ||
324 | Environment.CurrentDirectory, true); | 327 | Environment.CurrentDirectory, true); |
325 | } | 328 | break; |
326 | else if (m_configSettings.AssetStorage == "cryptogrid_eou") // Encrypts All Assets | 329 | case "cryptogrid_eou" : |
327 | { | 330 | assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL, |
328 | assetServer = new CryptoGridAssetClient(m_networkServersInfo.AssetURL, | ||
329 | Environment.CurrentDirectory, false); | 331 | Environment.CurrentDirectory, false); |
332 | break; | ||
333 | case "file" : | ||
334 | assetServer = new FileAssetClient(m_networkServersInfo.AssetURL); | ||
335 | break; | ||
336 | default : | ||
337 | if (!ResolveAssetServer(out assetServer)) | ||
338 | { | ||
339 | SQLAssetServer sqlAssetServer = new SQLAssetServer(m_configSettings.StandaloneAssetPlugin, m_configSettings.StandaloneAssetSource); | ||
340 | sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile); | ||
341 | assetServer = sqlAssetServer; | ||
342 | } | ||
343 | break; | ||
330 | } | 344 | } |
331 | else if (m_configSettings.AssetStorage == "file") | ||
332 | { | ||
333 | assetServer = new FileAssetClient(m_networkServersInfo.AssetURL); | ||
334 | } | ||
335 | else | ||
336 | { | ||
337 | SQLAssetServer sqlAssetServer = new SQLAssetServer(m_configSettings.StandaloneAssetPlugin, m_configSettings.StandaloneAssetSource); | ||
338 | sqlAssetServer.LoadDefaultAssets(m_configSettings.AssetSetsXMLFile); | ||
339 | assetServer = sqlAssetServer; | ||
340 | } | ||
341 | 345 | ||
342 | m_assetCache = new AssetCache(assetServer); | 346 | m_assetCache = ResolveAssetCache(assetServer); |
347 | |||
348 | } | ||
349 | |||
350 | private bool ResolveAssetServer(out IAssetServer assetServer) | ||
351 | { | ||
352 | assetServer = null; | ||
353 | return false; | ||
354 | } | ||
355 | |||
356 | private IAssetCache ResolveAssetCache(IAssetServer assetServer) | ||
357 | { | ||
358 | return new AssetCache(assetServer); | ||
343 | } | 359 | } |
344 | 360 | ||
345 | public void ProcessLogin(bool LoginEnabled) | 361 | public void ProcessLogin(bool LoginEnabled) |
diff --git a/OpenSim/Region/ClientStack/ClientStackManager.cs b/OpenSim/Region/ClientStack/ClientStackManager.cs index 6bc4c4b..6cad7c9 100644 --- a/OpenSim/Region/ClientStack/ClientStackManager.cs +++ b/OpenSim/Region/ClientStack/ClientStackManager.cs | |||
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment | |||
89 | /// <returns></returns> | 89 | /// <returns></returns> |
90 | public IClientNetworkServer CreateServer( | 90 | public IClientNetworkServer CreateServer( |
91 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, | 91 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, |
92 | AssetCache assetCache, AgentCircuitManager authenticateClass) | 92 | IAssetCache assetCache, AgentCircuitManager authenticateClass) |
93 | { | 93 | { |
94 | return CreateServer( | 94 | return CreateServer( |
95 | _listenIP, ref port, proxyPortOffset, allow_alternate_port, null, assetCache, authenticateClass); | 95 | _listenIP, ref port, proxyPortOffset, allow_alternate_port, null, assetCache, authenticateClass); |
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Environment | |||
110 | /// <returns></returns> | 110 | /// <returns></returns> |
111 | public IClientNetworkServer CreateServer( | 111 | public IClientNetworkServer CreateServer( |
112 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, | 112 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, |
113 | AssetCache assetCache, AgentCircuitManager authenticateClass) | 113 | IAssetCache assetCache, AgentCircuitManager authenticateClass) |
114 | { | 114 | { |
115 | if (plugin != null) | 115 | if (plugin != null) |
116 | { | 116 | { |
diff --git a/OpenSim/Region/ClientStack/IClientNetworkServer.cs b/OpenSim/Region/ClientStack/IClientNetworkServer.cs index 0073389..8bd5434 100644 --- a/OpenSim/Region/ClientStack/IClientNetworkServer.cs +++ b/OpenSim/Region/ClientStack/IClientNetworkServer.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Region.ClientStack | |||
38 | { | 38 | { |
39 | void Initialise( | 39 | void Initialise( |
40 | IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, | 40 | IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, |
41 | AssetCache assetCache, AgentCircuitManager authenticateClass); | 41 | IAssetCache assetCache, AgentCircuitManager authenticateClass); |
42 | 42 | ||
43 | Socket Server { get; } | 43 | Socket Server { get; } |
44 | bool HandlesRegion(Location x); | 44 | bool HandlesRegion(Location x); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 71fced9..f53174a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
65 | 65 | ||
66 | private int m_debugPacketLevel; | 66 | private int m_debugPacketLevel; |
67 | 67 | ||
68 | private readonly AssetCache m_assetCache; | 68 | private readonly IAssetCache m_assetCache; |
69 | private int m_cachedTextureSerial; | 69 | private int m_cachedTextureSerial; |
70 | private Timer m_clientPingTimer; | 70 | private Timer m_clientPingTimer; |
71 | 71 | ||
@@ -429,7 +429,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
429 | /// Constructor | 429 | /// Constructor |
430 | /// </summary> | 430 | /// </summary> |
431 | public LLClientView( | 431 | public LLClientView( |
432 | EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, | 432 | EndPoint remoteEP, IScene scene, IAssetCache assetCache, LLPacketServer packServer, |
433 | AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP, | 433 | AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP, |
434 | ClientStackUserSettings userSettings) | 434 | ClientStackUserSettings userSettings) |
435 | { | 435 | { |
@@ -3748,7 +3748,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3748 | handlerGenericMessage(sender, method, msg); | 3748 | handlerGenericMessage(sender, method, msg); |
3749 | return true; | 3749 | return true; |
3750 | } | 3750 | } |
3751 | catch(Exception e) | 3751 | catch (Exception e) |
3752 | { | 3752 | { |
3753 | m_log.Error("[GENERICMESSAGE] " + e); | 3753 | m_log.Error("[GENERICMESSAGE] " + e); |
3754 | } | 3754 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs index 9b71770..43a2e23 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
55 | new Dictionary<UUID, IPriorityQueueHandle<Prio<J2KImage>>>(); | 55 | new Dictionary<UUID, IPriorityQueueHandle<Prio<J2KImage>>>(); |
56 | 56 | ||
57 | private LLClientView m_client; | 57 | private LLClientView m_client; |
58 | private readonly AssetCache m_assetCache; | 58 | private readonly IAssetCache m_assetCache; |
59 | private bool m_shuttingdown = false; | 59 | private bool m_shuttingdown = false; |
60 | private readonly IJ2KDecoder m_j2kDecodeModule; | 60 | private readonly IJ2KDecoder m_j2kDecodeModule; |
61 | 61 | ||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
67 | /// <param name="client">LLClientView of client</param> | 67 | /// <param name="client">LLClientView of client</param> |
68 | /// <param name="pAssetCache">The Asset retrieval system</param> | 68 | /// <param name="pAssetCache">The Asset retrieval system</param> |
69 | /// <param name="pJ2kDecodeModule">The Jpeg2000 Decoder</param> | 69 | /// <param name="pJ2kDecodeModule">The Jpeg2000 Decoder</param> |
70 | public LLImageManager(LLClientView client, AssetCache pAssetCache, IJ2KDecoder pJ2kDecodeModule) | 70 | public LLImageManager(LLClientView client, IAssetCache pAssetCache, IJ2KDecoder pJ2kDecodeModule) |
71 | { | 71 | { |
72 | m_client = client; | 72 | m_client = client; |
73 | m_assetCache = pAssetCache; | 73 | m_assetCache = pAssetCache; |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs index 2b52220..a42ae04 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketServer.cs | |||
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
90 | /// <param name="proxyEP"></param> | 90 | /// <param name="proxyEP"></param> |
91 | /// <returns></returns> | 91 | /// <returns></returns> |
92 | protected virtual IClientAPI CreateNewCircuit( | 92 | protected virtual IClientAPI CreateNewCircuit( |
93 | EndPoint remoteEP, IScene scene, AssetCache assetCache, | 93 | EndPoint remoteEP, IScene scene, IAssetCache assetCache, |
94 | LLPacketServer packServer, AuthenticateResponse sessionInfo, | 94 | LLPacketServer packServer, AuthenticateResponse sessionInfo, |
95 | UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP) | 95 | UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP) |
96 | { | 96 | { |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
134 | /// true if a new circuit was created, false if a circuit with the given circuit code already existed | 134 | /// true if a new circuit was created, false if a circuit with the given circuit code already existed |
135 | /// </returns> | 135 | /// </returns> |
136 | public virtual bool AddNewClient( | 136 | public virtual bool AddNewClient( |
137 | EndPoint epSender, UseCircuitCodePacket useCircuit, AssetCache assetCache, | 137 | EndPoint epSender, UseCircuitCodePacket useCircuit, IAssetCache assetCache, |
138 | AuthenticateResponse sessionInfo, EndPoint proxyEP) | 138 | AuthenticateResponse sessionInfo, EndPoint proxyEP) |
139 | { | 139 | { |
140 | IClientAPI newuser; | 140 | IClientAPI newuser; |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index f53d485..bdc4490 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -76,7 +76,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
76 | protected bool Allow_Alternate_Port; | 76 | protected bool Allow_Alternate_Port; |
77 | protected IPAddress listenIP = IPAddress.Parse("0.0.0.0"); | 77 | protected IPAddress listenIP = IPAddress.Parse("0.0.0.0"); |
78 | protected IScene m_localScene; | 78 | protected IScene m_localScene; |
79 | protected AssetCache m_assetCache; | 79 | protected IAssetCache m_assetCache; |
80 | 80 | ||
81 | /// <value> | 81 | /// <value> |
82 | /// Manages authentication for agent circuits | 82 | /// Manages authentication for agent circuits |
@@ -131,7 +131,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
131 | 131 | ||
132 | public LLUDPServer( | 132 | public LLUDPServer( |
133 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, | 133 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, |
134 | AssetCache assetCache, AgentCircuitManager authenticateClass) | 134 | IAssetCache assetCache, AgentCircuitManager authenticateClass) |
135 | { | 135 | { |
136 | Initialise(_listenIP, ref port, proxyPortOffset, allow_alternate_port, configSource, assetCache, authenticateClass); | 136 | Initialise(_listenIP, ref port, proxyPortOffset, allow_alternate_port, configSource, assetCache, authenticateClass); |
137 | } | 137 | } |
@@ -148,7 +148,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
148 | /// <param name="circuitManager"></param> | 148 | /// <param name="circuitManager"></param> |
149 | public void Initialise( | 149 | public void Initialise( |
150 | IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, | 150 | IPAddress _listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, |
151 | AssetCache assetCache, AgentCircuitManager circuitManager) | 151 | IAssetCache assetCache, AgentCircuitManager circuitManager) |
152 | { | 152 | { |
153 | ClientStackUserSettings userSettings = new ClientStackUserSettings(); | 153 | ClientStackUserSettings userSettings = new ClientStackUserSettings(); |
154 | 154 | ||
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index dcc17a7..18d8c5c 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Region.ClientStack | |||
48 | private static readonly ILog m_log | 48 | private static readonly ILog m_log |
49 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 50 | ||
51 | protected AssetCache m_assetCache; | 51 | protected IAssetCache m_assetCache; |
52 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 52 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
53 | protected NetworkServersInfo m_networkServersInfo; | 53 | protected NetworkServersInfo m_networkServersInfo; |
54 | 54 | ||
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index c4d48a9..4de4b2b 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
51 | 51 | ||
52 | public HGCommunicationsGridMode( | 52 | public HGCommunicationsGridMode( |
53 | NetworkServersInfo serversInfo, BaseHttpServer httpServer, | 53 | NetworkServersInfo serversInfo, BaseHttpServer httpServer, |
54 | AssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder) | 54 | IAssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder) |
55 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) | 55 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) |
56 | { | 56 | { |
57 | 57 | ||
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs index 804640e..39e13d1 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
40 | public HGCommunicationsStandalone( | 40 | public HGCommunicationsStandalone( |
41 | NetworkServersInfo serversInfo, | 41 | NetworkServersInfo serversInfo, |
42 | BaseHttpServer httpServer, | 42 | BaseHttpServer httpServer, |
43 | AssetCache assetCache, | 43 | IAssetCache assetCache, |
44 | IUserService userService, | 44 | IUserService userService, |
45 | IUserAdminService userServiceAdmin, | 45 | IUserAdminService userServiceAdmin, |
46 | LocalInventoryService inventoryService, | 46 | LocalInventoryService inventoryService, |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs index 2ca956b..9b11a2c 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs | |||
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
83 | // This is key-ed on agent ID | 83 | // This is key-ed on agent ID |
84 | protected Dictionary<UUID, RegionInfo> m_knownRegions = new Dictionary<UUID, RegionInfo>(); | 84 | protected Dictionary<UUID, RegionInfo> m_knownRegions = new Dictionary<UUID, RegionInfo>(); |
85 | 85 | ||
86 | protected AssetCache m_assetcache; | 86 | protected IAssetCache m_assetcache; |
87 | protected UserProfileCacheService m_userProfileCache; | 87 | protected UserProfileCacheService m_userProfileCache; |
88 | protected SceneManager m_sceneman; | 88 | protected SceneManager m_sceneman; |
89 | 89 | ||
@@ -120,7 +120,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
120 | /// </summary> | 120 | /// </summary> |
121 | /// <param name="servers_info"></param> | 121 | /// <param name="servers_info"></param> |
122 | /// <param name="httpServe"></param> | 122 | /// <param name="httpServe"></param> |
123 | public HGGridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe, AssetCache asscache, SceneManager sman) | 123 | public HGGridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman) |
124 | { | 124 | { |
125 | serversInfo = servers_info; | 125 | serversInfo = servers_info; |
126 | httpServer = httpServe; | 126 | httpServer = httpServe; |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs index b1f9f63..d1f416d 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
71 | } | 71 | } |
72 | 72 | ||
73 | public HGGridServicesGridMode(NetworkServersInfo servers_info, BaseHttpServer httpServe, | 73 | public HGGridServicesGridMode(NetworkServersInfo servers_info, BaseHttpServer httpServe, |
74 | AssetCache asscache, SceneManager sman, UserProfileCacheService userv) | 74 | IAssetCache asscache, SceneManager sman, UserProfileCacheService userv) |
75 | : base(servers_info, httpServe, asscache, sman) | 75 | : base(servers_info, httpServe, asscache, sman) |
76 | { | 76 | { |
77 | m_remoteBackend = new OGS1GridServices(servers_info, httpServe); | 77 | m_remoteBackend = new OGS1GridServices(servers_info, httpServe); |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs index 27a7a0e..a2453db 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
79 | } | 79 | } |
80 | 80 | ||
81 | 81 | ||
82 | public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, AssetCache asscache, SceneManager sman) | 82 | public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman) |
83 | : base(servers_info, httpServe, asscache, sman) | 83 | : base(servers_info, httpServe, asscache, sman) |
84 | { | 84 | { |
85 | //Respond to Grid Services requests | 85 | //Respond to Grid Services requests |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 6489408..3a5c33e 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Communications.Local | |||
37 | public CommunicationsLocal( | 37 | public CommunicationsLocal( |
38 | NetworkServersInfo serversInfo, | 38 | NetworkServersInfo serversInfo, |
39 | BaseHttpServer httpServer, | 39 | BaseHttpServer httpServer, |
40 | AssetCache assetCache, | 40 | IAssetCache assetCache, |
41 | IUserService userService, | 41 | IUserService userService, |
42 | IUserAdminService userServiceAdmin, | 42 | IUserAdminService userServiceAdmin, |
43 | LocalInventoryService inventoryService, | 43 | LocalInventoryService inventoryService, |
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 7f6fbc8..c506dd0 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
36 | { | 36 | { |
37 | public CommunicationsOGS1( | 37 | public CommunicationsOGS1( |
38 | NetworkServersInfo serversInfo, BaseHttpServer httpServer, | 38 | NetworkServersInfo serversInfo, BaseHttpServer httpServer, |
39 | AssetCache assetCache, LibraryRootFolder libraryRootFolder) | 39 | IAssetCache assetCache, LibraryRootFolder libraryRootFolder) |
40 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) | 40 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) |
41 | { | 41 | { |
42 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); | 42 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs index 0ef1e1d..95ff468 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs | |||
@@ -59,9 +59,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
59 | /// <summary> | 59 | /// <summary> |
60 | /// Cache to which dearchived assets will be added | 60 | /// Cache to which dearchived assets will be added |
61 | /// </summary> | 61 | /// </summary> |
62 | protected AssetCache m_cache; | 62 | protected IAssetCache m_cache; |
63 | 63 | ||
64 | public AssetsDearchiver(AssetCache cache) | 64 | public AssetsDearchiver(IAssetCache cache) |
65 | { | 65 | { |
66 | m_cache = cache; | 66 | m_cache = cache; |
67 | } | 67 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs index 7a6c810..b7fd170 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs | |||
@@ -73,9 +73,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
73 | /// <summary> | 73 | /// <summary> |
74 | /// Asset cache used to request the assets | 74 | /// Asset cache used to request the assets |
75 | /// </summary> | 75 | /// </summary> |
76 | protected AssetCache m_assetCache; | 76 | protected IAssetCache m_assetCache; |
77 | 77 | ||
78 | protected internal AssetsRequest(ICollection<UUID> uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback) | 78 | protected internal AssetsRequest(ICollection<UUID> uuids, IAssetCache assetCache, AssetsRequestCallback assetsRequestCallback) |
79 | { | 79 | { |
80 | m_uuids = uuids; | 80 | m_uuids = uuids; |
81 | m_assetsRequestCallback = assetsRequestCallback; | 81 | m_assetsRequestCallback = assetsRequestCallback; |
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs index f36075e..ba81270 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
58 | 58 | ||
59 | public HGScene(RegionInfo regInfo, AgentCircuitManager authen, | 59 | public HGScene(RegionInfo regInfo, AgentCircuitManager authen, |
60 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 60 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
61 | AssetCache assetCach, StorageManager storeManager, | 61 | IAssetCache assetCach, StorageManager storeManager, |
62 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, | 62 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, |
63 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) | 63 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) |
64 | : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader, | 64 | : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader, |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 55fc02a..2fae8ac 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -272,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
272 | 272 | ||
273 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, | 273 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, |
274 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 274 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
275 | AssetCache assetCach, StorageManager storeManager, | 275 | IAssetCache assetCach, StorageManager storeManager, |
276 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, | 276 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, |
277 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) | 277 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) |
278 | { | 278 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index cee9037..b0f328d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -126,9 +126,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
126 | 126 | ||
127 | protected string m_datastore; | 127 | protected string m_datastore; |
128 | 128 | ||
129 | private AssetCache m_assetCache; | 129 | private IAssetCache m_assetCache; |
130 | 130 | ||
131 | public AssetCache AssetCache | 131 | public IAssetCache AssetCache |
132 | { | 132 | { |
133 | get { return m_assetCache; } | 133 | get { return m_assetCache; } |
134 | set { m_assetCache = value; } | 134 | set { m_assetCache = value; } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index efd486d..c15ac47 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -251,7 +251,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
251 | m_part.ScheduleFullUpdate(); | 251 | m_part.ScheduleFullUpdate(); |
252 | return; | 252 | return; |
253 | } | 253 | } |
254 | AssetCache cache = m_part.ParentGroup.Scene.AssetCache; | 254 | IAssetCache cache = m_part.ParentGroup.Scene.AssetCache; |
255 | 255 | ||
256 | cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset) | 256 | cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset) |
257 | { | 257 | { |
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 00920c8..122e51c 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Tests.Common.Mock | |||
40 | public TestScene( | 40 | public TestScene( |
41 | RegionInfo regInfo, AgentCircuitManager authen, | 41 | RegionInfo regInfo, AgentCircuitManager authen, |
42 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 42 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
43 | AssetCache assetCach, StorageManager storeManager, | 43 | IAssetCache assetCach, StorageManager storeManager, |
44 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, | 44 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, |
45 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) | 45 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) |
46 | : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader, | 46 | : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader, |
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 3a0f72a..81fccbb 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Tests.Common.Setup | |||
74 | SceneCommunicationService scs = new SceneCommunicationService(cm); | 74 | SceneCommunicationService scs = new SceneCommunicationService(cm); |
75 | 75 | ||
76 | SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin()); | 76 | SQLAssetServer assetService = new SQLAssetServer(new TestAssetDataPlugin()); |
77 | AssetCache ac = new AssetCache(assetService); | 77 | IAssetCache ac = (IAssetCache) new AssetCache(assetService); |
78 | 78 | ||
79 | StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", ""); | 79 | StorageManager sm = new StorageManager("OpenSim.Data.Null.dll", "", ""); |
80 | IConfigSource configSource = new IniConfigSource(); | 80 | IConfigSource configSource = new IniConfigSource(); |