mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Thanks, sempuki, for a patch that moves control of Mono.Addins from source attributes to external XML files. Fix issues 1682 and 1786.
This commit is contained in:
@@ -28,18 +28,13 @@
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.RegionLoader.Filesystem;
|
||||
using OpenSim.Framework.RegionLoader.Web;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim", "0.5")]
|
||||
|
||||
namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
{
|
||||
[Extension("/OpenSim/Startup")]
|
||||
public class LoadRegionsPlugin : IApplicationPlugin
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -33,19 +33,14 @@ using System.Reflection;
|
||||
using System.Timers;
|
||||
using libsecondlife;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Region.Environment.Modules.World.Terrain;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim", "0.5")]
|
||||
|
||||
namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
[Extension("/OpenSim/Startup")]
|
||||
public class RemoteAdminPlugin : IApplicationPlugin
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -32,16 +32,9 @@ using System.Reflection;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.ApplicationPlugins.Rest;
|
||||
using Mono.Addins;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim", "0.5")]
|
||||
|
||||
namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||
{
|
||||
|
||||
[Extension("/OpenSim/Startup")]
|
||||
|
||||
public class RestHandler : RestPlugin, IHttpAgentHandler
|
||||
{
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ using System.Timers;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using libsecondlife;
|
||||
using Mono.Addins;
|
||||
using Nwc.XmlRpc;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
@@ -47,13 +46,8 @@ using OpenSim.Framework.Communications;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
using OpenSim.ApplicationPlugins.Rest;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim", "0.5")]
|
||||
|
||||
namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||
{
|
||||
|
||||
[Extension("/OpenSim/Startup")]
|
||||
public partial class RestRegionPlugin : RestPlugin
|
||||
{
|
||||
private static XmlSerializerNamespaces _xmlNs;
|
||||
|
||||
@@ -35,7 +35,6 @@ using System.Reflection;
|
||||
using System.Timers;
|
||||
using System.Xml;
|
||||
using libsecondlife;
|
||||
using Mono.Addins;
|
||||
using Nwc.XmlRpc;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
@@ -44,13 +43,8 @@ using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
|
||||
// [assembly : Addin]
|
||||
// [assembly : AddinDependency("OpenSim", "0.5")]
|
||||
|
||||
namespace OpenSim.ApplicationPlugins.Rest
|
||||
{
|
||||
|
||||
// [Extension("/OpenSim/Startup")]
|
||||
public abstract class RestPlugin : IApplicationPlugin
|
||||
{
|
||||
#region properties
|
||||
|
||||
@@ -26,11 +26,8 @@
|
||||
*/
|
||||
|
||||
using libsecondlife;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
[assembly : AddinRoot("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data
|
||||
{
|
||||
public enum DataResponse
|
||||
@@ -44,7 +41,6 @@ namespace OpenSim.Data
|
||||
/// <summary>
|
||||
/// A standard grid interface
|
||||
/// </summary>
|
||||
[TypeExtensionPoint("/OpenSim/GridDataStore")]
|
||||
public interface IGridDataPlugin : IPlugin
|
||||
{
|
||||
/// <summary>
|
||||
@@ -105,10 +101,10 @@ namespace OpenSim.Data
|
||||
ReservationData GetReservationAtPoint(uint x, uint y);
|
||||
}
|
||||
|
||||
public class GridDataStoreInitialiser : PluginInitialiserBase
|
||||
public class GridDataInitialiser : PluginInitialiserBase
|
||||
{
|
||||
private string connect;
|
||||
public GridDataStoreInitialiser (string s) { connect = s; }
|
||||
public GridDataInitialiser (string s) { connect = s; }
|
||||
public override void Initialise (IPlugin plugin)
|
||||
{
|
||||
IGridDataPlugin p = plugin as IGridDataPlugin;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
namespace OpenSim.Data
|
||||
@@ -64,7 +63,6 @@ namespace OpenSim.Data
|
||||
/// <summary>
|
||||
/// An interface to a LogData storage system
|
||||
/// </summary>
|
||||
[TypeExtensionPoint("/OpenSim/GridLogData")]
|
||||
public interface ILogDataPlugin : IPlugin
|
||||
{
|
||||
void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,
|
||||
|
||||
@@ -33,18 +33,13 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
/// <summary>
|
||||
/// A grid data interface for MSSQL Server
|
||||
/// </summary>
|
||||
[Extension("/OpenSim/GridDataStore")]
|
||||
public class MSSQLGridData : GridDataBase
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -30,19 +30,13 @@ using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
// Only one attribute per assembly. See: *GridData.cs
|
||||
// [assembly : Addin]
|
||||
// [assembly : AddinDependency("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface to the log database for MSSQL
|
||||
/// </summary>
|
||||
[Extension("/OpenSim/GridLogData")]
|
||||
internal class MSSQLLogData : ILogDataPlugin
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -33,18 +33,13 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data.MySQL
|
||||
{
|
||||
/// <summary>
|
||||
/// A MySQL Interface for the Grid Server
|
||||
/// </summary>
|
||||
[Extension("/OpenSim/GridDataStore")]
|
||||
public class MySQLGridData : GridDataBase
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -28,19 +28,13 @@ using System;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
// Only one attribute per assembly. See: *GridData.cs
|
||||
// [assembly : Addin]
|
||||
// [assembly : AddinDependency("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data.MySQL
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface to the log database for MySQL
|
||||
/// </summary>
|
||||
[Extension("/OpenSim/GridLogData")]
|
||||
internal class MySQLLogData : ILogDataPlugin
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -33,18 +33,13 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
[assembly : Addin]
|
||||
[assembly : AddinDependency("OpenSim.Data", "0.5")]
|
||||
|
||||
namespace OpenSim.Data.SQLite
|
||||
{
|
||||
/// <summary>
|
||||
/// A Grid Interface to the SQLite database
|
||||
/// </summary>
|
||||
[Extension("/OpenSim/GridDataStore")]
|
||||
public class SQLiteGridData : GridDataBase
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
@@ -197,7 +197,9 @@ namespace OpenSim.Framework
|
||||
|
||||
private void on_addinloaderror_(object sender, AddinErrorEventArgs args)
|
||||
{
|
||||
log.Error ("[PLUGINS]: Plugin Error: " + args.Message);
|
||||
log.Error ("[PLUGINS]: Plugin Error: " + args.Message
|
||||
+ ": " + args.Exception.Message
|
||||
+ "\n"+ args.Exception.StackTrace);
|
||||
}
|
||||
|
||||
private void clear_registry_ ()
|
||||
|
||||
@@ -73,18 +73,18 @@ namespace OpenSim.Grid.GridServer
|
||||
provider = String.Join (".", s);
|
||||
|
||||
PluginLoader<IGridDataPlugin> gridloader =
|
||||
new PluginLoader<IGridDataPlugin> (new GridDataStoreInitialiser (connect));
|
||||
new PluginLoader<IGridDataPlugin> (new GridDataInitialiser (connect));
|
||||
|
||||
PluginLoader<ILogDataPlugin> logloader =
|
||||
new PluginLoader<ILogDataPlugin> (new LogDataInitialiser (connect));
|
||||
|
||||
gridloader.AddExtensionPoint ("/OpenSim/GridDataStore");
|
||||
logloader.AddExtensionPoint ("/OpenSim/GridLogData");
|
||||
gridloader.AddExtensionPoint ("/OpenSim/GridData");
|
||||
logloader.AddExtensionPoint ("/OpenSim/LogData");
|
||||
|
||||
// loader will try to load all providers (MySQL, MSSQL, etc)
|
||||
// unless it is constrainted to the correct "id"
|
||||
gridloader.AddFilter ("/OpenSim/GridDataStore", new PluginIdFilter (provider + "GridData"));
|
||||
logloader.AddFilter ("/OpenSim/GridLogData", new PluginIdFilter (provider + "LogData"));
|
||||
//gridloader.AddFilter ("/OpenSim/GridData", new PluginIdFilter (provider + "GridData"));
|
||||
//logloader.AddFilter ("/OpenSim/LogData", new PluginIdFilter (provider + "LogData"));
|
||||
|
||||
gridloader.Load();
|
||||
logloader.Load();
|
||||
@@ -111,7 +111,7 @@ namespace OpenSim.Grid.GridServer
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
m_log.Warn("[storage]: Unable to write log via ");
|
||||
m_log.Warn("[storage]: Unable to write log via " + plugin.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,14 +26,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
[assembly : AddinRoot("OpenSim.Grid.GridServer", "0.5")]
|
||||
|
||||
namespace OpenSim.Grid.GridServer
|
||||
{
|
||||
[TypeExtensionPoint("/OpenSim/GridServer")]
|
||||
public interface IGridPlugin : IPlugin
|
||||
{
|
||||
void Initialise(GridServerBase gridServer);
|
||||
|
||||
@@ -25,14 +25,10 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using Mono.Addins;
|
||||
using OpenSim.Framework;
|
||||
|
||||
[assembly : AddinRoot("OpenSim", "0.5")]
|
||||
|
||||
namespace OpenSim
|
||||
{
|
||||
[TypeExtensionPoint("/OpenSim/Startup")]
|
||||
public interface IApplicationPlugin : IPlugin
|
||||
{
|
||||
void Initialise(OpenSimBase openSim);
|
||||
|
||||
Reference in New Issue
Block a user