diff options
author | Mike Mazur | 2009-02-03 05:20:03 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-03 05:20:03 +0000 |
commit | f8e45e8e981bfd87f3765d7452046515e11a9345 (patch) | |
tree | 1633c1c52b5a42ce5da507faa84dca0d5e96726f /OpenSim | |
parent | * Establish OnOarFileSaved EventManager event and subscribe to that instead o... (diff) | |
download | opensim-SC_OLD-f8e45e8e981bfd87f3765d7452046515e11a9345.zip opensim-SC_OLD-f8e45e8e981bfd87f3765d7452046515e11a9345.tar.gz opensim-SC_OLD-f8e45e8e981bfd87f3765d7452046515e11a9345.tar.bz2 opensim-SC_OLD-f8e45e8e981bfd87f3765d7452046515e11a9345.tar.xz |
Rename IAssetProviderPlugin to IAssetDataPlugin aligning with the other data plugins.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/AssetDataBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAssetData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetServerBase.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/SQLAssetServer.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/IAssetProvider.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/AssetServer/Main.cs | 8 | ||||
-rw-r--r-- | OpenSim/Grid/AssetServer/RestService.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs | 2 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 2 |
10 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs index f38d578..2cdbbe1 100644 --- a/OpenSim/Data/AssetDataBase.cs +++ b/OpenSim/Data/AssetDataBase.cs | |||
@@ -30,7 +30,7 @@ using OpenSim.Framework; | |||
30 | 30 | ||
31 | namespace OpenSim.Data | 31 | namespace OpenSim.Data |
32 | { | 32 | { |
33 | public abstract class AssetDataBase : IAssetProviderPlugin | 33 | public abstract class AssetDataBase : IAssetDataPlugin |
34 | { | 34 | { |
35 | public abstract AssetBase FetchAsset(UUID uuid); | 35 | public abstract AssetBase FetchAsset(UUID uuid); |
36 | public abstract void CreateAsset(AssetBase asset); | 36 | public abstract void CreateAsset(AssetBase asset); |
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index b8753a1..2fe89e2 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -114,7 +114,7 @@ namespace OpenSim.Data.MSSQL | |||
114 | 114 | ||
115 | #endregion | 115 | #endregion |
116 | 116 | ||
117 | #region IAssetProviderPlugin Members | 117 | #region IAssetDataPlugin Members |
118 | 118 | ||
119 | /// <summary> | 119 | /// <summary> |
120 | /// Fetch Asset from database | 120 | /// Fetch Asset from database |
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 1e66618..3ff2a1a 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -110,7 +110,7 @@ namespace OpenSim.Data.MySQL | |||
110 | 110 | ||
111 | public override void Dispose() { } | 111 | public override void Dispose() { } |
112 | 112 | ||
113 | #region IAssetProviderPlugin Members | 113 | #region IAssetDataPlugin Members |
114 | 114 | ||
115 | /// <summary> | 115 | /// <summary> |
116 | /// Fetch Asset <paramref name="assetID"/> from database | 116 | /// Fetch Asset <paramref name="assetID"/> from database |
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 137bde9..7fb06b9 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs | |||
@@ -43,9 +43,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
43 | protected IAssetReceiver m_receiver; | 43 | protected IAssetReceiver m_receiver; |
44 | protected BlockingQueue<AssetRequest> m_assetRequests; | 44 | protected BlockingQueue<AssetRequest> m_assetRequests; |
45 | protected Thread m_localAssetServerThread; | 45 | protected Thread m_localAssetServerThread; |
46 | protected IAssetProviderPlugin m_assetProvider; | 46 | protected IAssetDataPlugin m_assetProvider; |
47 | 47 | ||
48 | public IAssetProviderPlugin AssetProviderPlugin | 48 | public IAssetDataPlugin AssetProviderPlugin |
49 | { | 49 | { |
50 | get { return m_assetProvider; } | 50 | get { return m_assetProvider; } |
51 | } | 51 | } |
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs index 2f72e11..00dbad0 100644 --- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs +++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
40 | AddPlugin(pluginName, connect); | 40 | AddPlugin(pluginName, connect); |
41 | } | 41 | } |
42 | 42 | ||
43 | public SQLAssetServer(IAssetProviderPlugin assetProvider) | 43 | public SQLAssetServer(IAssetDataPlugin assetProvider) |
44 | { | 44 | { |
45 | m_assetProvider = assetProvider; | 45 | m_assetProvider = assetProvider; |
46 | } | 46 | } |
@@ -54,12 +54,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
54 | { | 54 | { |
55 | if (!pluginType.IsAbstract) | 55 | if (!pluginType.IsAbstract) |
56 | { | 56 | { |
57 | Type typeInterface = pluginType.GetInterface("IAssetProviderPlugin", true); | 57 | Type typeInterface = pluginType.GetInterface("IAssetDataPlugin", true); |
58 | 58 | ||
59 | if (typeInterface != null) | 59 | if (typeInterface != null) |
60 | { | 60 | { |
61 | IAssetProviderPlugin plug = | 61 | IAssetDataPlugin plug = |
62 | (IAssetProviderPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 62 | (IAssetDataPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
63 | m_assetProvider = plug; | 63 | m_assetProvider = plug; |
64 | m_assetProvider.Initialise(connect); | 64 | m_assetProvider.Initialise(connect); |
65 | 65 | ||
diff --git a/OpenSim/Framework/IAssetProvider.cs b/OpenSim/Framework/IAssetProvider.cs index 4c86279..77e0d0c 100644 --- a/OpenSim/Framework/IAssetProvider.cs +++ b/OpenSim/Framework/IAssetProvider.cs | |||
@@ -29,7 +29,7 @@ using OpenMetaverse; | |||
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public interface IAssetProviderPlugin : IPlugin | 32 | public interface IAssetDataPlugin : IPlugin |
33 | { | 33 | { |
34 | AssetBase FetchAsset(UUID uuid); | 34 | AssetBase FetchAsset(UUID uuid); |
35 | void CreateAsset(AssetBase asset); | 35 | void CreateAsset(AssetBase asset); |
@@ -44,7 +44,7 @@ namespace OpenSim.Framework | |||
44 | public AssetDataInitialiser (string s) { connect = s; } | 44 | public AssetDataInitialiser (string s) { connect = s; } |
45 | public override void Initialise (IPlugin plugin) | 45 | public override void Initialise (IPlugin plugin) |
46 | { | 46 | { |
47 | IAssetProviderPlugin p = plugin as IAssetProviderPlugin; | 47 | IAssetDataPlugin p = plugin as IAssetDataPlugin; |
48 | p.Initialise (connect); | 48 | p.Initialise (connect); |
49 | } | 49 | } |
50 | } | 50 | } |
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 72300b5..b5c8df0 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Grid.AssetServer | |||
51 | // Temporarily hardcoded - should be a plugin | 51 | // Temporarily hardcoded - should be a plugin |
52 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); | 52 | protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); |
53 | 53 | ||
54 | private IAssetProviderPlugin m_assetProvider; | 54 | private IAssetDataPlugin m_assetProvider; |
55 | 55 | ||
56 | public static void Main(string[] args) | 56 | public static void Main(string[] args) |
57 | { | 57 | { |
@@ -111,10 +111,10 @@ namespace OpenSim.Grid.AssetServer | |||
111 | return null; | 111 | return null; |
112 | } | 112 | } |
113 | 113 | ||
114 | public IAssetProviderPlugin LoadDatabasePlugin(string provider, string connect) | 114 | public IAssetDataPlugin LoadDatabasePlugin(string provider, string connect) |
115 | { | 115 | { |
116 | PluginLoader<IAssetProviderPlugin> loader = | 116 | PluginLoader<IAssetDataPlugin> loader = |
117 | new PluginLoader<IAssetProviderPlugin> (new AssetDataInitialiser (connect)); | 117 | new PluginLoader<IAssetDataPlugin> (new AssetDataInitialiser (connect)); |
118 | 118 | ||
119 | // loader will try to load all providers (MySQL, MSSQL, etc) | 119 | // loader will try to load all providers (MySQL, MSSQL, etc) |
120 | // unless it is constrainted to the correct "Provider" entry in the addin.xml | 120 | // 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 7b5b334..e81cb3f 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs | |||
@@ -45,14 +45,14 @@ namespace OpenSim.Grid.AssetServer | |||
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | // private OpenAsset_Main m_assetManager; | 47 | // private OpenAsset_Main m_assetManager; |
48 | private IAssetProviderPlugin m_assetProvider; | 48 | private IAssetDataPlugin m_assetProvider; |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Constructor. | 51 | /// Constructor. |
52 | /// </summary> | 52 | /// </summary> |
53 | /// <param name="assetManager"></param> | 53 | /// <param name="assetManager"></param> |
54 | /// <param name="assetProvider"></param> | 54 | /// <param name="assetProvider"></param> |
55 | public GetAssetStreamHandler(IAssetProviderPlugin assetProvider) | 55 | public GetAssetStreamHandler(IAssetDataPlugin assetProvider) |
56 | : base("GET", "/assets") | 56 | : base("GET", "/assets") |
57 | { | 57 | { |
58 | m_log.Info("[REST]: In Get Request"); | 58 | m_log.Info("[REST]: In Get Request"); |
@@ -125,7 +125,7 @@ namespace OpenSim.Grid.AssetServer | |||
125 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 125 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
126 | 126 | ||
127 | // private OpenAsset_Main m_assetManager; | 127 | // private OpenAsset_Main m_assetManager; |
128 | private IAssetProviderPlugin m_assetProvider; | 128 | private IAssetDataPlugin m_assetProvider; |
129 | 129 | ||
130 | public override byte[] Handle(string path, Stream request, | 130 | public override byte[] Handle(string path, Stream request, |
131 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 131 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
@@ -146,7 +146,7 @@ namespace OpenSim.Grid.AssetServer | |||
146 | return new byte[] {}; | 146 | return new byte[] {}; |
147 | } | 147 | } |
148 | 148 | ||
149 | public PostAssetStreamHandler(IAssetProviderPlugin assetProvider) | 149 | public PostAssetStreamHandler(IAssetDataPlugin assetProvider) |
150 | : base("POST", "/assets") | 150 | : base("POST", "/assets") |
151 | { | 151 | { |
152 | // m_assetManager = assetManager; | 152 | // m_assetManager = assetManager; |
diff --git a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs index a5b45ea..24de4e8 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 | |||
119 | 119 | ||
120 | protected void AddHttpHandlers(Scene m_scene) | 120 | protected void AddHttpHandlers(Scene m_scene) |
121 | { | 121 | { |
122 | IAssetProviderPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin; | 122 | IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin; |
123 | 123 | ||
124 | BaseHttpServer httpServer = m_scene.CommsManager.HttpServer; | 124 | BaseHttpServer httpServer = m_scene.CommsManager.HttpServer; |
125 | httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider)); | 125 | httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider)); |
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs index f44339a..ebece27 100644 --- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Tests.Common.Mock | |||
36 | /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit | 36 | /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit |
37 | /// tests are single threaded. | 37 | /// tests are single threaded. |
38 | /// </summary> | 38 | /// </summary> |
39 | public class TestAssetDataPlugin : IAssetProviderPlugin | 39 | public class TestAssetDataPlugin : IAssetDataPlugin |
40 | { | 40 | { |
41 | public string Version { get { return "0"; } } | 41 | public string Version { get { return "0"; } } |
42 | public string Name { get { return "TestAssetDataPlugin"; } } | 42 | public string Name { get { return "TestAssetDataPlugin"; } } |