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/IGridData.cs | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'OpenSim/Data/IGridData.cs') diff --git a/OpenSim/Data/IGridData.cs b/OpenSim/Data/IGridData.cs index e242312..fa24d82 100644 --- a/OpenSim/Data/IGridData.cs +++ b/OpenSim/Data/IGridData.cs @@ -26,6 +26,10 @@ */ using libsecondlife; +using Mono.Addins; +using OpenSim.Framework; + +[assembly : AddinRoot("OpenSim.Data", "0.5")] namespace OpenSim.Data { @@ -40,9 +44,15 @@ namespace OpenSim.Data /// /// A standard grid interface /// - public interface IGridData + [TypeExtensionPoint("/OpenSim/GridDataStore")] + public interface IGridDataPlugin : IPlugin { /// + /// Initialises the interface + /// + void Initialise(string connect); + + /// /// Returns a sim profile from a regionHandle /// /// A 64bit Region Handle @@ -84,28 +94,6 @@ namespace OpenSim.Data bool AuthenticateSim(LLUUID UUID, ulong regionHandle, string simrecvkey); /// - /// Initialises the interface - /// - void Initialise(string connect); - - /// - /// Closes the interface - /// - void Close(); - - /// - /// The plugin being loaded - /// - /// A string containing the plugin name - string getName(); - - /// - /// The plugins version - /// - /// A string containing the plugin version - string getVersion(); - - /// /// Adds a new profile to the database /// /// The profile to add @@ -116,4 +104,15 @@ namespace OpenSim.Data ReservationData GetReservationAtPoint(uint x, uint y); } + + public class GridDataStoreInitialiser : PluginInitialiserBase + { + private string connect; + public GridDataStoreInitialiser (string s) { connect = s; } + public override void Initialise (IPlugin plugin) + { + IGridDataPlugin p = plugin as IGridDataPlugin; + p.Initialise (connect); + } + } } -- cgit v1.1