From e0e0db366061eae148364e3d5670f275b1ab25b7 Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Fri, 18 Jul 2008 04:51:41 +0000
Subject: Thanks, sempuki, for a patch that moves all grid plugins to new
PluginLoader (issue 1763).
---
OpenSim/Data/MSSQL/MSSQLLogData.cs | 30 ++++++++++++++++++++++++------
1 file changed, 24 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Data/MSSQL/MSSQLLogData.cs')
diff --git a/OpenSim/Data/MSSQL/MSSQLLogData.cs b/OpenSim/Data/MSSQL/MSSQLLogData.cs
index 849d0fb..d0d81b6 100644
--- a/OpenSim/Data/MSSQL/MSSQLLogData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLLogData.cs
@@ -25,21 +25,39 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
+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
{
///
/// An interface to the log database for MSSQL
///
- internal class MSSQLLogData : ILogData
+ [Extension("/OpenSim/GridLogData")]
+ internal class MSSQLLogData : ILogDataPlugin
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
///
/// The database manager
///
public MSSQLManager database;
+ public void Initialise()
+ {
+ m_log.Info("[MSSQLLogData]: " + Name + " cannot be default-initialized!");
+ throw new PluginNotInitialisedException (Name);
+ }
+
///
/// Artificial constructor called when the plugin is loaded
///
@@ -97,15 +115,15 @@ namespace OpenSim.Data.MSSQL
/// Returns the name of this DB provider
///
/// A string containing the DB provider name
- public string getName()
+ public string Name
{
- return "MSSQL Logdata Interface";
+ get { return "MSSQL Logdata Interface"; }
}
///
/// Closes the database provider
///
- public void Close()
+ public void Dispose()
{
// Do nothing.
}
@@ -114,9 +132,9 @@ namespace OpenSim.Data.MSSQL
/// Returns the version of this DB provider
///
/// A string containing the provider version
- public string getVersion()
+ public string Version
{
- return "0.1";
+ get { return "0.1"; }
}
}
}
--
cgit v1.1