From d259238c748aafe366fd1d04e0248ef23116fd28 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Tue, 3 Feb 2009 05:20:44 +0000 Subject: - moved data plugin loading code from various places to OpenSim/Data/DataPluginFactory.cs - removed dependencies on a few executable assemblies in bin/OpenSim.Data.addin.xml - trim trailing whitespace --- .../Communications/InventoryServiceBase.cs | 20 +++++++++----------- OpenSim/Framework/Communications/UserManagerBase.cs | 21 +++++++++------------ 2 files changed, 18 insertions(+), 23 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index ec5c493..a031bdf 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -59,20 +59,18 @@ namespace OpenSim.Framework.Communications } /// - /// Adds a new inventory data plugin - plugins will be requested in the order they were loaded. + /// Adds a list of inventory data plugins, as described by `provider' + /// and `connect', to `m_plugins'. /// - /// The filename of the inventory server plugin DLL + /// + /// The filename of the inventory server plugin DLL. + /// + /// + /// The connection string for the storage backend. + /// public void AddPlugin(string provider, string connect) { - PluginLoader loader = - new PluginLoader (new InventoryDataInitialiser(connect)); - - // loader will try to load all providers (MySQL, MSSQL, etc) - // unless it is constrainted to the correct "Provider" entry in the addin.xml - loader.Add ("/OpenSim/InventoryData", new PluginProviderFilter(provider)); - loader.Load(); - - m_plugins.AddRange(loader.Plugins); + m_plugins.AddRange(DataPluginFactory.LoadInventoryDataPlugins(provider, connect)); } #endregion diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index b12abb3..886900d 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -74,21 +74,18 @@ namespace OpenSim.Framework.Communications } /// - /// Add a new user data plugin - plugins will be requested in the order they were added. + /// Adds a list of user data plugins, as described by `provider' and + /// `connect', to `_plugins'. /// - /// The filename to the user data plugin DLL - /// + /// + /// The filename of the inventory server plugin DLL. + /// + /// + /// The connection string for the storage backend. + /// public void AddPlugin(string provider, string connect) { - PluginLoader loader = - new PluginLoader(new UserDataInitialiser(connect)); - - // loader will try to load all providers (MySQL, MSSQL, etc) - // unless it is constrainted to the correct "Provider" entry in the addin.xml - loader.Add("/OpenSim/UserData", new PluginProviderFilter(provider)); - loader.Load(); - - _plugins.AddRange(loader.Plugins); + _plugins.AddRange(DataPluginFactory.LoadUserDataPlugins(provider, connect)); } #region Get UserProfile -- cgit v1.1