Thanks, sempuki, for a patch that moves all grid plugins to new PluginLoader (issue 1763).

This commit is contained in:
Mike Mazur
2008-07-18 04:51:41 +00:00
parent 2558f8ac31
commit e0e0db3660
16 changed files with 313 additions and 207 deletions

View File

@@ -28,20 +28,34 @@ 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>
internal class MySQLLogData : ILogData
[Extension("/OpenSim/GridLogData")]
internal class MySQLLogData : ILogDataPlugin
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// The database manager
/// </summary>
public MySQLManager database;
public void Initialise()
{
m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// Artificial constructor called when the plugin is loaded
/// Uses the obsolete mysql_connection.ini if connect string is empty.
@@ -128,16 +142,16 @@ namespace OpenSim.Data.MySQL
/// Returns the name of this DB provider
/// </summary>
/// <returns>A string containing the DB provider name</returns>
public string getName()
public string Name
{
return "MySQL Logdata Interface";
get { return "MySQL Logdata Interface";}
}
/// <summary>
/// Closes the database provider
/// </summary>
/// <remarks>do nothing</remarks>
public void Close()
public void Dispose()
{
// Do nothing.
}
@@ -146,9 +160,9 @@ namespace OpenSim.Data.MySQL
/// Returns the version of this DB provider
/// </summary>
/// <returns>A string containing the provider version</returns>
public string getVersion()
public string Version
{
return "0.1";
get { return "0.1"; }
}
}
}