From f8e45e8e981bfd87f3765d7452046515e11a9345 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Tue, 3 Feb 2009 05:20:03 +0000 Subject: [PATCH] Rename IAssetProviderPlugin to IAssetDataPlugin aligning with the other data plugins. --- OpenSim/Data/AssetDataBase.cs | 2 +- OpenSim/Data/MSSQL/MSSQLAssetData.cs | 2 +- OpenSim/Data/MySQL/MySQLAssetData.cs | 2 +- OpenSim/Framework/Communications/Cache/AssetServerBase.cs | 4 ++-- OpenSim/Framework/Communications/Cache/SQLAssetServer.cs | 8 ++++---- OpenSim/Framework/IAssetProvider.cs | 4 ++-- OpenSim/Grid/AssetServer/Main.cs | 8 ++++---- OpenSim/Grid/AssetServer/RestService.cs | 8 ++++---- .../Modules/Hypergrid/HGStandaloneAssetService.cs | 2 +- OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 2 +- bin/OpenSim.Data.addin.xml | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs index f38d5785be..2cdbbe1ed6 100644 --- a/OpenSim/Data/AssetDataBase.cs +++ b/OpenSim/Data/AssetDataBase.cs @@ -30,7 +30,7 @@ using OpenSim.Framework; namespace OpenSim.Data { - public abstract class AssetDataBase : IAssetProviderPlugin + public abstract class AssetDataBase : IAssetDataPlugin { public abstract AssetBase FetchAsset(UUID uuid); public abstract void CreateAsset(AssetBase asset); diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index b8753a101a..2fe89e223e 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs @@ -114,7 +114,7 @@ namespace OpenSim.Data.MSSQL #endregion - #region IAssetProviderPlugin Members + #region IAssetDataPlugin Members /// /// Fetch Asset from database diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 1e666180e3..3ff2a1a988 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs @@ -110,7 +110,7 @@ namespace OpenSim.Data.MySQL public override void Dispose() { } - #region IAssetProviderPlugin Members + #region IAssetDataPlugin Members /// /// Fetch Asset from database diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 137bde917c..7fb06b9e35 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -43,9 +43,9 @@ namespace OpenSim.Framework.Communications.Cache protected IAssetReceiver m_receiver; protected BlockingQueue m_assetRequests; protected Thread m_localAssetServerThread; - protected IAssetProviderPlugin m_assetProvider; + protected IAssetDataPlugin m_assetProvider; - public IAssetProviderPlugin AssetProviderPlugin + public IAssetDataPlugin AssetProviderPlugin { get { return m_assetProvider; } } diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs index 2f72e11532..00dbad0e1e 100644 --- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs +++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs @@ -40,7 +40,7 @@ namespace OpenSim.Framework.Communications.Cache AddPlugin(pluginName, connect); } - public SQLAssetServer(IAssetProviderPlugin assetProvider) + public SQLAssetServer(IAssetDataPlugin assetProvider) { m_assetProvider = assetProvider; } @@ -54,12 +54,12 @@ namespace OpenSim.Framework.Communications.Cache { if (!pluginType.IsAbstract) { - Type typeInterface = pluginType.GetInterface("IAssetProviderPlugin", true); + Type typeInterface = pluginType.GetInterface("IAssetDataPlugin", true); if (typeInterface != null) { - IAssetProviderPlugin plug = - (IAssetProviderPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); + IAssetDataPlugin plug = + (IAssetDataPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); m_assetProvider = plug; m_assetProvider.Initialise(connect); diff --git a/OpenSim/Framework/IAssetProvider.cs b/OpenSim/Framework/IAssetProvider.cs index 4c8627922a..77e0d0c6d8 100644 --- a/OpenSim/Framework/IAssetProvider.cs +++ b/OpenSim/Framework/IAssetProvider.cs @@ -29,7 +29,7 @@ using OpenMetaverse; namespace OpenSim.Framework { - public interface IAssetProviderPlugin : IPlugin + public interface IAssetDataPlugin : IPlugin { AssetBase FetchAsset(UUID uuid); void CreateAsset(AssetBase asset); @@ -44,7 +44,7 @@ namespace OpenSim.Framework public AssetDataInitialiser (string s) { connect = s; } public override void Initialise (IPlugin plugin) { - IAssetProviderPlugin p = plugin as IAssetProviderPlugin; + IAssetDataPlugin p = plugin as IAssetDataPlugin; p.Initialise (connect); } } diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 72300b5dfc..b5c8df01d1 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs @@ -51,7 +51,7 @@ namespace OpenSim.Grid.AssetServer // Temporarily hardcoded - should be a plugin protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); - private IAssetProviderPlugin m_assetProvider; + private IAssetDataPlugin m_assetProvider; public static void Main(string[] args) { @@ -111,10 +111,10 @@ namespace OpenSim.Grid.AssetServer return null; } - public IAssetProviderPlugin LoadDatabasePlugin(string provider, string connect) + public IAssetDataPlugin LoadDatabasePlugin(string provider, string connect) { - PluginLoader loader = - new PluginLoader (new AssetDataInitialiser (connect)); + PluginLoader loader = + new PluginLoader (new AssetDataInitialiser (connect)); // loader will try to load all providers (MySQL, MSSQL, etc) // unless it is constrainted to the correct "Provider" entry in the addin.xml diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index 7b5b334485..e81cb3fd79 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs @@ -45,14 +45,14 @@ namespace OpenSim.Grid.AssetServer private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private OpenAsset_Main m_assetManager; - private IAssetProviderPlugin m_assetProvider; + private IAssetDataPlugin m_assetProvider; /// /// Constructor. /// /// /// - public GetAssetStreamHandler(IAssetProviderPlugin assetProvider) + public GetAssetStreamHandler(IAssetDataPlugin assetProvider) : base("GET", "/assets") { m_log.Info("[REST]: In Get Request"); @@ -125,7 +125,7 @@ namespace OpenSim.Grid.AssetServer private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private OpenAsset_Main m_assetManager; - private IAssetProviderPlugin m_assetProvider; + private IAssetDataPlugin m_assetProvider; public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) @@ -146,7 +146,7 @@ namespace OpenSim.Grid.AssetServer return new byte[] {}; } - public PostAssetStreamHandler(IAssetProviderPlugin assetProvider) + public PostAssetStreamHandler(IAssetDataPlugin assetProvider) : base("POST", "/assets") { // m_assetManager = assetManager; diff --git a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs index a5b45ea4d0..24de4e88e3 100644 --- a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs +++ b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs @@ -119,7 +119,7 @@ namespace OpenSim.Region.Environment.Modules.Hypergrid protected void AddHttpHandlers(Scene m_scene) { - IAssetProviderPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin; + IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin; BaseHttpServer httpServer = m_scene.CommsManager.HttpServer; httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider)); diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs index f44339a82d..ebece27048 100644 --- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs @@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common.Mock /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit /// tests are single threaded. /// - public class TestAssetDataPlugin : IAssetProviderPlugin + public class TestAssetDataPlugin : IAssetDataPlugin { public string Version { get { return "0"; } } public string Name { get { return "TestAssetDataPlugin"; } } diff --git a/bin/OpenSim.Data.addin.xml b/bin/OpenSim.Data.addin.xml index 4859b658e7..b012f0eb1a 100644 --- a/bin/OpenSim.Data.addin.xml +++ b/bin/OpenSim.Data.addin.xml @@ -15,7 +15,7 @@ - +