From 024755d8b7c96fc9a14b6ebbe40765533b685d94 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 10 Aug 2009 07:13:13 -0700
Subject: Slowly working my way towards the elimination of IAssetServer and
IAssetCache.
---
OpenSim/Framework/IAssetCache.cs | 24 ++-------
OpenSim/Framework/IAssetServer.cs | 104 ++------------------------------------
2 files changed, 6 insertions(+), 122 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/IAssetCache.cs b/OpenSim/Framework/IAssetCache.cs
index 201504b..751fdd5 100644
--- a/OpenSim/Framework/IAssetCache.cs
+++ b/OpenSim/Framework/IAssetCache.cs
@@ -35,14 +35,13 @@ namespace OpenSim.Framework
///
/// Interface to the local asset cache. This is the mechanism through which assets can be added and requested.
///
- public interface IAssetCache : IAssetReceiver, IPlugin
+ public interface IAssetCache : IPlugin
{
///
/// The 'server' from which assets can be requested and to which assets are persisted.
///
- IAssetServer AssetServer { get; }
-
- void Initialise(ConfigSettings cs, IAssetServer server);
+
+ void Initialise(ConfigSettings cs);
///
/// Report statistical data to the log.
@@ -112,21 +111,4 @@ namespace OpenSim.Framework
void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest);
}
- public class AssetCachePluginInitialiser : PluginInitialiserBase
- {
- private ConfigSettings config;
- private IAssetServer server;
-
- public AssetCachePluginInitialiser (ConfigSettings p_sv, IAssetServer p_as)
- {
- config = p_sv;
- server = p_as;
- }
- public override void Initialise (IPlugin plugin)
- {
- IAssetCache p = plugin as IAssetCache;
- p.Initialise (config, server);
- }
- }
-
}
diff --git a/OpenSim/Framework/IAssetServer.cs b/OpenSim/Framework/IAssetServer.cs
index 756ef8b..dbdf544 100644
--- a/OpenSim/Framework/IAssetServer.cs
+++ b/OpenSim/Framework/IAssetServer.cs
@@ -29,108 +29,10 @@ using OpenMetaverse;
namespace OpenSim.Framework
{
- ///
- /// Description of IAssetServer.
- ///
+ /////
+ ///// Description of IAssetServer.
+ /////
public interface IAssetServer : IPlugin
{
- void Initialise(ConfigSettings settings);
- void Initialise(ConfigSettings settings, string url, string dir, bool test);
- void Initialise(ConfigSettings settings, string url);
-
- ///
- /// Start the asset server
- ///
- void Start();
-
- ///
- /// Stop the asset server
- ///
- void Stop();
-
- void SetReceiver(IAssetReceiver receiver);
- void RequestAsset(UUID assetID, bool isTexture);
- void StoreAsset(AssetBase asset);
- void UpdateAsset(AssetBase asset);
}
-
- ///
- /// Implemented by classes which with to asynchronously receive asset data from the asset service
- ///
- /// could change to delegate?
- public interface IAssetReceiver
- {
- ///
- /// Call back made when a requested asset has been retrieved by an asset server
- ///
- ///
- ///
- void AssetReceived(AssetBase asset, bool IsTexture);
-
- ///
- /// Call back made when an asset server could not retrieve a requested asset
- ///
- ///
- ///
- void AssetNotFound(UUID assetID, bool IsTexture);
- }
-
- public class AssetClientPluginInitialiser : PluginInitialiserBase
- {
- private ConfigSettings config;
-
- public AssetClientPluginInitialiser (ConfigSettings p_sv)
- {
- config = p_sv;
- }
- public override void Initialise (IPlugin plugin)
- {
- IAssetServer p = plugin as IAssetServer;
- p.Initialise (config);
- }
- }
-
- public class LegacyAssetClientPluginInitialiser : PluginInitialiserBase
- {
- private ConfigSettings config;
- private string assetURL;
-
- public LegacyAssetClientPluginInitialiser (ConfigSettings p_sv, string p_url)
- {
- config = p_sv;
- assetURL = p_url;
- }
- public override void Initialise (IPlugin plugin)
- {
- IAssetServer p = plugin as IAssetServer;
- p.Initialise (config, assetURL);
- }
- }
-
- public class CryptoAssetClientPluginInitialiser : PluginInitialiserBase
- {
- private ConfigSettings config;
- private string assetURL;
- private string currdir;
- private bool test;
-
- public CryptoAssetClientPluginInitialiser (ConfigSettings p_sv, string p_url, string p_dir, bool p_test)
- {
- config = p_sv;
- assetURL = p_url;
- currdir = p_dir;
- test = p_test;
- }
- public override void Initialise (IPlugin plugin)
- {
- IAssetServer p = plugin as IAssetServer;
- p.Initialise (config, assetURL, currdir, test);
- }
- }
-
- public interface IAssetPlugin
- {
- IAssetServer GetAssetServer();
- }
-
}
--
cgit v1.1