Rename IAssetProviderPlugin to IAssetDataPlugin aligning with the other data plugins.
parent
2c2f10e156
commit
f8e45e8e98
|
@ -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);
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace OpenSim.Data.MSSQL
|
|||
|
||||
#endregion
|
||||
|
||||
#region IAssetProviderPlugin Members
|
||||
#region IAssetDataPlugin Members
|
||||
|
||||
/// <summary>
|
||||
/// Fetch Asset from database
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
public override void Dispose() { }
|
||||
|
||||
#region IAssetProviderPlugin Members
|
||||
#region IAssetDataPlugin Members
|
||||
|
||||
/// <summary>
|
||||
/// Fetch Asset <paramref name="assetID"/> from database
|
||||
|
|
|
@ -43,9 +43,9 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
protected IAssetReceiver m_receiver;
|
||||
protected BlockingQueue<AssetRequest> m_assetRequests;
|
||||
protected Thread m_localAssetServerThread;
|
||||
protected IAssetProviderPlugin m_assetProvider;
|
||||
protected IAssetDataPlugin m_assetProvider;
|
||||
|
||||
public IAssetProviderPlugin AssetProviderPlugin
|
||||
public IAssetDataPlugin AssetProviderPlugin
|
||||
{
|
||||
get { return m_assetProvider; }
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<IAssetProviderPlugin> loader =
|
||||
new PluginLoader<IAssetProviderPlugin> (new AssetDataInitialiser (connect));
|
||||
PluginLoader<IAssetDataPlugin> loader =
|
||||
new PluginLoader<IAssetDataPlugin> (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
|
||||
|
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="assetManager"></param>
|
||||
/// <param name="assetProvider"></param>
|
||||
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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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.
|
||||
/// </summary>
|
||||
public class TestAssetDataPlugin : IAssetProviderPlugin
|
||||
public class TestAssetDataPlugin : IAssetDataPlugin
|
||||
{
|
||||
public string Version { get { return "0"; } }
|
||||
public string Name { get { return "TestAssetDataPlugin"; } }
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.ILogDataPlugin"/>
|
||||
</ExtensionPoint>
|
||||
<ExtensionPoint path = "/OpenSim/AssetData">
|
||||
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetProviderPlugin"/>
|
||||
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.IAssetDataPlugin"/>
|
||||
</ExtensionPoint>
|
||||
<ExtensionPoint path = "/OpenSim/InventoryData">
|
||||
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IInventoryDataPlugin"/>
|
||||
|
|
Loading…
Reference in New Issue