Thanks, sempuki, for a patch that moves all Grid Server's plugins to

PluginLoader. Fix issue 1871.
0.6.0-stable
Mike Mazur 2008-07-31 09:24:28 +00:00
parent fcab0ecfba
commit 2270b25265
33 changed files with 354 additions and 279 deletions

View File

@ -30,7 +30,7 @@ using OpenSim.Framework;
namespace OpenSim.Data
{
public abstract class AssetDataBase : IAssetProvider
public abstract class AssetDataBase : IAssetProviderPlugin
{
public abstract AssetBase FetchAsset(LLUUID uuid);
public abstract void CreateAsset(AssetBase asset);

View File

@ -45,7 +45,7 @@ namespace OpenSim.Data.MSSQL
private MSSQLManager database;
#region IAssetProvider Members
#region IAssetProviderPlugin Members
/// <summary>
/// Migration method

View File

@ -39,7 +39,7 @@ namespace OpenSim.Data.MSSQL
/// <summary>
/// A MSSQL interface for the inventory server
/// </summary>
public class MSSQLInventoryData : IInventoryData
public class MSSQLInventoryData : IInventoryDataPlugin
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -59,6 +59,12 @@ namespace OpenSim.Data.MSSQL
/// </summary>
private MSSQLManager database;
public void Initialise()
{
m_log.Info("[MSSQLInventoryData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// Loads and initialises the MSSQL inventory storage interface
/// </summary>
@ -134,15 +140,15 @@ namespace OpenSim.Data.MSSQL
/// The name of this DB provider
/// </summary>
/// <returns>A string containing the name of the DB provider</returns>
public string getName()
public string Name
{
return "MSSQL Inventory Data Interface";
get { return "MSSQL Inventory Data Interface"; }
}
/// <summary>
/// Closes this DB provider
/// </summary>
public void Close()
public void Dispose()
{
// Do nothing.
}
@ -151,9 +157,9 @@ namespace OpenSim.Data.MSSQL
/// Returns the version of this DB provider
/// </summary>
/// <returns>A string containing the DB provider</returns>
public string getVersion()
public string Version
{
return database.getVersion();
get { return database.getVersion(); }
}
/// <summary>
@ -681,7 +687,7 @@ namespace OpenSim.Data.MSSQL
folders.Add(f);
}
// See IInventoryData
// See IInventoryDataPlugin
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
{
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();

View File

@ -52,6 +52,12 @@ namespace OpenSim.Data.MSSQL
private string m_usersTableName;
private string m_userFriendsTableName;
public override void Initialise()
{
m_log.Info("[MSSQLUserData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// Loads and initialises the MSSQL storage plugin
/// </summary>
@ -93,6 +99,8 @@ namespace OpenSim.Data.MSSQL
TestTables();
}
public override void Dispose () {}
/// <summary>
///

View File

@ -112,7 +112,7 @@ namespace OpenSim.Data.MySQL
override public void Dispose() { }
#region IAssetProvider Members
#region IAssetProviderPlugin Members
/// <summary>
/// <list type="bullet">

View File

@ -51,7 +51,7 @@ namespace OpenSim.Data.MySQL
override public void Initialise()
{
m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!");
m_log.Info("[MySQLGridData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}

View File

@ -38,7 +38,7 @@ namespace OpenSim.Data.MySQL
/// <summary>
/// A MySQL interface for the inventory server
/// </summary>
public class MySQLInventoryData : IInventoryData
public class MySQLInventoryData : IInventoryDataPlugin
{
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -48,6 +48,12 @@ namespace OpenSim.Data.MySQL
/// </summary>
private MySQLManager database;
public void Initialise()
{
m_log.Info("[MySQLInventoryData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// <para>Initialises Inventory interface</para>
/// <para>
@ -183,16 +189,16 @@ namespace OpenSim.Data.MySQL
/// The name of this DB provider
/// </summary>
/// <returns>Name of DB provider</returns>
public string getName()
public string Name
{
return "MySQL Inventory Data Interface";
get { return "MySQL Inventory Data Interface"; }
}
/// <summary>
/// Closes this DB provider
/// </summary>
/// <remarks>do nothing</remarks>
public void Close()
public void Dispose()
{
// Do nothing.
}
@ -201,9 +207,9 @@ namespace OpenSim.Data.MySQL
/// Returns the version of this DB provider
/// </summary>
/// <returns>A string containing the DB provider version</returns>
public string getVersion()
public string Version
{
return database.getVersion();
get { return database.getVersion(); }
}
/// <summary>
@ -692,7 +698,7 @@ namespace OpenSim.Data.MySQL
/// <summary>
/// See IInventoryData
/// See IInventoryDataPlugin
/// </summary>
/// <param name="parentID"></param>
/// <returns></returns>

View File

@ -55,6 +55,12 @@ namespace OpenSim.Data.MySQL
private string m_appearanceTableName = "avatarappearance";
private string m_connectString;
public override void Initialise()
{
m_log.Info("[MySQLUserData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// Initialise User Interface
/// Loads and initialises the MySQL storage plugin
@ -120,6 +126,9 @@ namespace OpenSim.Data.MySQL
m.Update();
}
public override void Dispose () { }
#region Test and initialization code
/// <summary>
@ -252,7 +261,7 @@ namespace OpenSim.Data.MySQL
UserProfileData row = database.readUserRow(reader);
reader.Close();
reader.Dispose();
result.Dispose();
return row;
}
@ -398,7 +407,7 @@ namespace OpenSim.Data.MySQL
Lfli.Add(fli);
}
reader.Close();
reader.Dispose();
result.Dispose();
}
}
@ -450,7 +459,7 @@ namespace OpenSim.Data.MySQL
user.lastName = (string) reader["lastname"];
returnlist.Add(user);
}
reader.Close();
reader.Dispose();
result.Dispose();
}
}
@ -484,7 +493,7 @@ namespace OpenSim.Data.MySQL
user.lastName = (string) reader["lastname"];
returnlist.Add(user);
}
reader.Close();
reader.Dispose();
result.Dispose();
}
}
@ -517,7 +526,7 @@ namespace OpenSim.Data.MySQL
UserProfileData row = database.readUserRow(reader);
reader.Close();
reader.Dispose();
result.Dispose();
return row;
@ -603,7 +612,7 @@ namespace OpenSim.Data.MySQL
UserAgentData row = database.readAgentRow(reader);
reader.Close();
reader.Dispose();
result.Dispose();
return row;
@ -725,7 +734,7 @@ namespace OpenSim.Data.MySQL
AvatarAppearance appearance = database.readAppearanceRow(reader);
reader.Close();
reader.Dispose();
result.Dispose();
return appearance;

View File

@ -42,7 +42,7 @@ using Environment=NHibernate.Cfg.Environment;
namespace OpenSim.Data.NHibernate
{
public class NHibernateInventoryData: IInventoryData
public class NHibernateInventoryData: IInventoryDataPlugin
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -50,6 +50,12 @@ namespace OpenSim.Data.NHibernate
private ISessionFactory factory;
private ISession session;
public void Initialise()
{
m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// Initialises the interface
/// </summary>
@ -257,7 +263,7 @@ namespace OpenSim.Data.NHibernate
/// <summary>
/// Closes the interface
/// </summary>
public void Close()
public void Dispose()
{
}
@ -265,25 +271,28 @@ namespace OpenSim.Data.NHibernate
/// The plugin being loaded
/// </summary>
/// <returns>A string containing the plugin name</returns>
public string getName()
public string Name
{
return "NHibernate Inventory Data Interface";
get { return "NHibernate Inventory Data Interface"; }
}
/// <summary>
/// The plugins version
/// </summary>
/// <returns>A string containing the plugin version</returns>
public string getVersion()
public string Version
{
Module module = GetType().Module;
// string dllName = module.Assembly.ManifestModule.Name;
Version dllVersion = module.Assembly.GetName().Version;
get
{
Module module = GetType().Module;
// string dllName = module.Assembly.ManifestModule.Name;
Version dllVersion = module.Assembly.GetName().Version;
return
string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
dllVersion.Revision);
return
string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
dllVersion.Revision);
}
}
// Move seems to be just update
@ -369,7 +378,7 @@ namespace OpenSim.Data.NHibernate
return folders;
}
// See IInventoryData
// See IInventoryDataPlugin
public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID)
{
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();

View File

@ -53,6 +53,12 @@ namespace OpenSim.Data.NHibernate
private ISessionFactory factory;
private ISession session;
public override void Initialise()
{
m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
public override void Initialise(string connect)
{
char[] split = {';'};
@ -320,7 +326,7 @@ namespace OpenSim.Data.NHibernate
get { return "0.1"; }
}
public void Dispose()
public override void Dispose()
{
}

View File

@ -39,7 +39,7 @@ namespace OpenSim.Data.SQLite
/// <summary>
/// An Inventory Interface to the SQLite database
/// </summary>
public class SQLiteInventoryStore : SQLiteUtil, IInventoryData
public class SQLiteInventoryStore : SQLiteUtil, IInventoryDataPlugin
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -50,6 +50,12 @@ namespace OpenSim.Data.SQLite
private SqliteDataAdapter invItemsDa;
private SqliteDataAdapter invFoldersDa;
public void Initialise()
{
m_log.Info("[SQLiteInventoryData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// <list type="bullet">
/// <item>Initialises Inventory interface</item>
@ -277,7 +283,7 @@ namespace OpenSim.Data.SQLite
/// <summary>
/// Closes the inventory interface
/// </summary>
public void Close()
public void Dispose()
{
}
@ -285,25 +291,28 @@ namespace OpenSim.Data.SQLite
/// The name of this DB provider
/// </summary>
/// <returns>Name of DB provider</returns>
public string getName()
public string Name
{
return "SQLite Inventory Data Interface";
get { return "SQLite Inventory Data Interface"; }
}
/// <summary>
/// Returns the version of this DB provider
/// </summary>
/// <returns>A string containing the DB provider version</returns>
public string getVersion()
public string Version
{
Module module = GetType().Module;
// string dllName = module.Assembly.ManifestModule.Name;
Version dllVersion = module.Assembly.GetName().Version;
get
{
Module module = GetType().Module;
// string dllName = module.Assembly.ManifestModule.Name;
Version dllVersion = module.Assembly.GetName().Version;
return
string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
dllVersion.Revision);
return
string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
dllVersion.Revision);
}
}
/// <summary>
@ -399,7 +408,7 @@ namespace OpenSim.Data.SQLite
}
/// <summary>
/// See IInventoryData
/// See IInventoryDataPlugin
/// </summary>
/// <param name="parentID"></param>
/// <returns></returns>

View File

@ -65,6 +65,12 @@ namespace OpenSim.Data.SQLite
private SqliteDataAdapter daf;
SqliteConnection g_conn;
public override void Initialise()
{
m_log.Info("[SQLiteUserData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
/// <summary>
/// <list type="bullet">
/// <item>Initialises User Interface</item>
@ -124,6 +130,8 @@ namespace OpenSim.Data.SQLite
return;
}
public override void Dispose () {}
/// <summary>
/// see IUserData,
/// Get user data profile by UUID

View File

@ -55,9 +55,6 @@ namespace OpenSim.Data
public abstract List<FriendListItem> GetUserFriendList(LLUUID friendlistowner);
public abstract bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount);
public abstract bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
public abstract string Version {get;}
public abstract string Name {get;}
public abstract void Initialise(string connect);
public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query);
public abstract AvatarAppearance GetUserAppearance(LLUUID user);
public abstract void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance);
@ -78,5 +75,11 @@ namespace OpenSim.Data
public abstract void AddAttachment(LLUUID user, LLUUID item);
public abstract void RemoveAttachment(LLUUID user, LLUUID item);
public abstract List<LLUUID> GetAttachments(LLUUID user);
public abstract string Version {get;}
public abstract string Name {get;}
public abstract void Initialise(string connect);
public abstract void Initialise();
public abstract void Dispose();
}
}

View File

@ -43,7 +43,7 @@ namespace OpenSim.Framework.Communications.Cache
protected IAssetReceiver m_receiver;
protected BlockingQueue<AssetRequest> m_assetRequests;
protected Thread m_localAssetServerThread;
protected IAssetProvider m_assetProvider;
protected IAssetProviderPlugin m_assetProvider;
// Temporarily hardcoded - should be a plugin
protected IAssetLoader assetLoader = new AssetLoaderFileSystem();

View File

@ -40,7 +40,7 @@ namespace OpenSim.Framework.Communications.Cache
AddPlugin(pluginName, connect);
}
public SQLAssetServer(IAssetProvider assetProvider)
public SQLAssetServer(IAssetProviderPlugin assetProvider)
{
m_assetProvider = assetProvider;
}
@ -54,12 +54,12 @@ namespace OpenSim.Framework.Communications.Cache
{
if (!pluginType.IsAbstract)
{
Type typeInterface = pluginType.GetInterface("IAssetProvider", true);
Type typeInterface = pluginType.GetInterface("IAssetProviderPlugin", true);
if (typeInterface != null)
{
IAssetProvider plug =
(IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
IAssetProviderPlugin plug =
(IAssetProviderPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
m_assetProvider = plug;
m_assetProvider.Initialise(connect);

View File

@ -43,38 +43,25 @@ namespace OpenSim.Framework.Communications
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
protected List<IInventoryDataPlugin> m_plugins = new List<IInventoryDataPlugin>();
#region Plugin methods
/// <summary>
/// Adds a new user server plugin - plugins will be requested in the order they were loaded.
/// </summary>
/// <param name="FileName">The filename to the user server plugin DLL</param>
public void AddPlugin(string FileName, string connect)
/// <param name="provider">The filename to the user server plugin DLL</param>
public void AddPlugin(string provider, string connect)
{
if (!String.IsNullOrEmpty(FileName))
{
m_log.Info("[AGENT INVENTORY]: Inventory storage: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
PluginLoader<IInventoryDataPlugin> loader =
new PluginLoader<IInventoryDataPlugin> (new InventoryDataInitialiser (connect));
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (!pluginType.IsAbstract)
{
Type typeInterface = pluginType.GetInterface("IInventoryData", true);
if (typeInterface != null)
{
IInventoryData plug =
(IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise(connect);
m_plugins.Add(plug.getName(), plug);
m_log.Info("[AGENTINVENTORY]: Added IInventoryData Interface");
}
}
}
}
// 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 = loader.Plugins;
}
#endregion
@ -103,9 +90,9 @@ namespace OpenSim.Framework.Communications
userFolders.Add(rootFolder);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.ID);
IList<InventoryFolderBase> folders = plugin.getFolderHierarchy(rootFolder.ID);
userFolders.AddRange(folders);
}
@ -127,9 +114,9 @@ namespace OpenSim.Framework.Communications
public InventoryFolderBase RequestRootFolder(LLUUID userID)
{
// FIXME: Probably doesn't do what was originally intended - only ever queries the first plugin
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
return plugin.Value.getUserRootFolder(userID);
return plugin.getUserRootFolder(userID);
}
return null;
}
@ -168,9 +155,9 @@ namespace OpenSim.Framework.Communications
public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID)
{
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
return plugin.Value.getInventoryFolders(parentFolderID);
return plugin.getInventoryFolders(parentFolderID);
}
return inventoryList;
}
@ -178,9 +165,9 @@ namespace OpenSim.Framework.Communications
public List<InventoryItemBase> RequestFolderItems(LLUUID folderID)
{
List<InventoryItemBase> itemsList = new List<InventoryItemBase>();
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
itemsList = plugin.Value.getInventoryInFolder(folderID);
itemsList = plugin.getInventoryInFolder(folderID);
return itemsList;
}
return itemsList;
@ -194,9 +181,9 @@ namespace OpenSim.Framework.Communications
m_log.DebugFormat(
"[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
plugin.Value.addInventoryFolder(folder);
plugin.addInventoryFolder(folder);
}
// FIXME: Should return false on failure
@ -209,9 +196,9 @@ namespace OpenSim.Framework.Communications
m_log.DebugFormat(
"[AGENT INVENTORY]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
plugin.Value.updateInventoryFolder(folder);
plugin.updateInventoryFolder(folder);
}
// FIXME: Should return false on failure
@ -224,9 +211,9 @@ namespace OpenSim.Framework.Communications
m_log.DebugFormat(
"[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
plugin.Value.moveInventoryFolder(folder);
plugin.moveInventoryFolder(folder);
}
// FIXME: Should return false on failure
@ -239,9 +226,9 @@ namespace OpenSim.Framework.Communications
m_log.DebugFormat(
"[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
plugin.Value.addInventoryItem(item);
plugin.addInventoryItem(item);
}
// FIXME: Should return false on failure
@ -254,9 +241,9 @@ namespace OpenSim.Framework.Communications
m_log.InfoFormat(
"[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
plugin.Value.updateInventoryItem(item);
plugin.updateInventoryItem(item);
}
// FIXME: Should return false on failure
@ -269,9 +256,9 @@ namespace OpenSim.Framework.Communications
m_log.InfoFormat(
"[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
plugin.Value.deleteInventoryItem(item.ID);
plugin.deleteInventoryItem(item.ID);
}
// FIXME: Should return false on failure
@ -296,9 +283,9 @@ namespace OpenSim.Framework.Communications
{
// m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
foreach (IInventoryDataPlugin plugin in m_plugins)
{
plugin.Value.deleteInventoryFolder(subFolder.ID);
plugin.deleteInventoryFolder(subFolder.ID);
}
}

View File

@ -47,42 +47,23 @@ namespace OpenSim.Framework.Communications
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public UserConfig _config;
private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
private List<IUserData> _plugins = new List<IUserData>();
/// <summary>
/// Adds a new user server plugin - user servers will be requested in the order they were loaded.
/// </summary>
/// <param name="FileName">The filename to the user server plugin DLL</param>
public void AddPlugin(string FileName, string connect)
/// <param name="provider">The filename to the user server plugin DLL</param>
public void AddPlugin(string provider, string connect)
{
if (!String.IsNullOrEmpty(FileName))
{
m_log.Info("[USERSTORAGE]: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
PluginLoader<IUserData> loader =
new PluginLoader<IUserData> (new UserDataInitialiser (connect));
m_log.Info("[USERSTORAGE]: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (!pluginType.IsAbstract)
{
Type typeInterface = pluginType.GetInterface("IUserData", true);
if (typeInterface != null)
{
IUserData plug =
(IUserData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
AddPlugin(plug, connect);
}
}
}
}
}
public void AddPlugin(IUserData plug, string connect)
{
plug.Initialise(connect);
_plugins.Add(plug.Name, plug);
m_log.Info("[USERSTORAGE]: Added IUserData Interface");
// 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 = loader.Plugins;
}
#region Get UserProfile
@ -90,9 +71,9 @@ namespace OpenSim.Framework.Communications
// see IUserService
public UserProfileData GetUserProfile(string fname, string lname)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
UserProfileData profile = plugin.Value.GetUserByName(fname, lname);
UserProfileData profile = plugin.GetUserByName(fname, lname);
if (profile != null)
{
@ -105,9 +86,9 @@ namespace OpenSim.Framework.Communications
}
public UserAgentData GetAgentByUUID(LLUUID userId)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
UserAgentData agent = plugin.Value.GetAgentByUUID(userId);
UserAgentData agent = plugin.GetAgentByUUID(userId);
if (agent != null)
{
@ -120,9 +101,9 @@ namespace OpenSim.Framework.Communications
// see IUserService
public UserProfileData GetUserProfile(LLUUID uuid)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
UserProfileData profile = plugin.Value.GetUserByUUID(uuid);
UserProfileData profile = plugin.GetUserByUUID(uuid);
if (null != profile)
{
@ -137,15 +118,15 @@ namespace OpenSim.Framework.Communications
public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query)
{
List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
pickerlist = plugin.Value.GeneratePickerResults(queryID, query);
pickerlist = plugin.GeneratePickerResults(queryID, query);
}
catch (Exception)
{
m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")");
m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Name + "(" + query + ")");
return new List<AvatarPickerAvatar>();
}
}
@ -159,17 +140,17 @@ namespace OpenSim.Framework.Communications
/// <returns></returns>
public bool UpdateUserProfile(UserProfileData data)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.UpdateUserProfile(data);
plugin.UpdateUserProfile(data);
return true;
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to set user {0} {1} via {2}: {3}", data.FirstName, data.SurName,
plugin.Key, e.ToString());
plugin.Name, e.ToString());
}
}
return false;
@ -186,15 +167,15 @@ namespace OpenSim.Framework.Communications
/// <returns>Agent profiles</returns>
public UserAgentData GetUserAgent(LLUUID uuid)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
return plugin.Value.GetAgentByUUID(uuid);
return plugin.GetAgentByUUID(uuid);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")");
}
}
@ -208,15 +189,15 @@ namespace OpenSim.Framework.Communications
/// <returns>A user agent</returns>
public UserAgentData GetUserAgent(string name)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
return plugin.Value.GetAgentByName(name);
return plugin.GetAgentByName(name);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")");
}
}
@ -231,15 +212,15 @@ namespace OpenSim.Framework.Communications
/// <returns>A user agent</returns>
public UserAgentData GetUserAgent(string fname, string lname)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
return plugin.Value.GetAgentByName(fname, lname);
return plugin.GetAgentByName(fname, lname);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Name + "(" + e.ToString() + ")");
}
}
@ -248,15 +229,15 @@ namespace OpenSim.Framework.Communications
public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.UpdateUserCurrentRegion(avatarid, regionuuid, regionhandle);
plugin.UpdateUserCurrentRegion(avatarid, regionuuid, regionhandle);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to updateuser location via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to updateuser location via " + plugin.Name + "(" + e.ToString() + ")");
}
}
}
@ -268,15 +249,15 @@ namespace OpenSim.Framework.Communications
/// <returns>A List of FriendListItems that contains info about the user's friends</returns>
public List<FriendListItem> GetUserFriendList(LLUUID ownerID)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
return plugin.Value.GetUserFriendList(ownerID);
return plugin.GetUserFriendList(ownerID);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to GetUserFriendList via " + plugin.Name + "(" + e.ToString() + ")");
}
}
@ -285,60 +266,60 @@ namespace OpenSim.Framework.Communications
public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.StoreWebLoginKey(agentID, webLoginKey);
plugin.StoreWebLoginKey(agentID, webLoginKey);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Name + "(" + e.ToString() + ")");
}
}
}
public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.AddNewUserFriend(friendlistowner,friend,perms);
plugin.AddNewUserFriend(friendlistowner,friend,perms);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Name + "(" + e.ToString() + ")");
}
}
}
public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.RemoveUserFriend(friendlistowner, friend);
plugin.RemoveUserFriend(friendlistowner, friend);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Name + "(" + e.ToString() + ")");
}
}
}
public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.UpdateUserFriendPerms(friendlistowner, friend, perms);
plugin.UpdateUserFriendPerms(friendlistowner, friend, perms);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Name + "(" + e.ToString() + ")");
}
}
}
@ -564,15 +545,15 @@ namespace OpenSim.Framework.Communications
user.HomeRegionX = regX;
user.HomeRegionY = regY;
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.AddNewUserProfile(user);
plugin.AddNewUserProfile(user);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to add user via " + plugin.Name + "(" + e.ToString() + ")");
}
}
@ -586,16 +567,16 @@ namespace OpenSim.Framework.Communications
m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.ID.ToString());
return false;
}
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.UpdateUserProfile(UserProfile);
plugin.UpdateUserProfile(UserProfile);
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.ID.ToString()
+ " via " + plugin.Key + "(" + e.ToString() + ")");
+ " via " + plugin.Name + "(" + e.ToString() + ")");
return false;
}
}
@ -612,16 +593,16 @@ namespace OpenSim.Framework.Communications
/// <param name="agentdata">The agent data to be added</param>
public bool AddUserAgent(UserAgentData agentdata)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.AddNewUserAgent(agentdata);
plugin.AddNewUserAgent(agentdata);
return true;
}
catch (Exception e)
{
m_log.Info("[USERSTORAGE]: Unable to add agent via " + plugin.Key + "(" + e.ToString() + ")");
m_log.Info("[USERSTORAGE]: Unable to add agent via " + plugin.Name + "(" + e.ToString() + ")");
}
}
return false;
@ -631,15 +612,15 @@ namespace OpenSim.Framework.Communications
/// TODO: stubs for now to get us to a compiling state gently
public AvatarAppearance GetUserAppearance(LLUUID user)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
return plugin.Value.GetUserAppearance(user);
return plugin.GetUserAppearance(user);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString());
m_log.InfoFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
}
}
return null;
@ -647,60 +628,60 @@ namespace OpenSim.Framework.Communications
public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.UpdateUserAppearance(user, appearance);
plugin.UpdateUserAppearance(user, appearance);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to update user appearance {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString());
m_log.InfoFormat("[USERSTORAGE]: Unable to update user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
}
}
}
public void AddAttachment(LLUUID user, LLUUID item)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.AddAttachment(user, item);
plugin.AddAttachment(user, item);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString(), item.ToString());
m_log.InfoFormat("[USERSTORAGE]: Unable to attach {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
}
}
}
public void RemoveAttachment(LLUUID user, LLUUID item)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
plugin.Value.RemoveAttachment(user, item);
plugin.RemoveAttachment(user, item);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString(), item.ToString());
m_log.InfoFormat("[USERSTORAGE]: Unable to remove attachment {3} => {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString(), item.ToString());
}
}
}
public List<LLUUID> GetAttachments(LLUUID user)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
foreach (IUserData plugin in _plugins)
{
try
{
return plugin.Value.GetAttachments(user);
return plugin.GetAttachments(user);
}
catch (Exception e)
{
m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Key, e.ToString());
m_log.InfoFormat("[USERSTORAGE]: Unable to get attachments for {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString());
}
}
return new List<LLUUID>();

View File

@ -29,7 +29,7 @@ using libsecondlife;
namespace OpenSim.Framework
{
public interface IAssetProvider : IPlugin
public interface IAssetProviderPlugin : IPlugin
{
AssetBase FetchAsset(LLUUID uuid);
void CreateAsset(AssetBase asset);
@ -37,4 +37,15 @@ namespace OpenSim.Framework
bool ExistsAsset(LLUUID uuid);
void Initialise(string connect);
}
public class AssetDataInitialiser : PluginInitialiserBase
{
private string connect;
public AssetDataInitialiser (string s) { connect = s; }
public override void Initialise (IPlugin plugin)
{
IAssetProviderPlugin p = plugin as IAssetProviderPlugin;
p.Initialise (connect);
}
}
}

View File

@ -33,30 +33,13 @@ namespace OpenSim.Framework
/// <summary>
/// An interface for accessing inventory data from a storage server
/// </summary>
public interface IInventoryData
public interface IInventoryDataPlugin : IPlugin
{
/// <summary>
/// Initialises the interface
/// </summary>
void Initialise(string connect);
/// <summary>
/// Closes the interface
/// </summary>
void Close();
/// <summary>
/// The plugin being loaded
/// </summary>
/// <returns>A string containing the plugin name</returns>
string getName();
/// <summary>
/// The plugins version
/// </summary>
/// <returns>A string containing the plugin version</returns>
string getVersion();
/// <summary>
/// Returns all child folders in the hierarchy from the parent folder and down.
/// Does not return the parent folder itself.
@ -149,4 +132,15 @@ namespace OpenSim.Framework
/// <param name="folder">The id of the folder</param>
void deleteInventoryFolder(LLUUID folder);
}
}
public class InventoryDataInitialiser : PluginInitialiserBase
{
private string connect;
public InventoryDataInitialiser (string s) { connect = s; }
public override void Initialise (IPlugin plugin)
{
IInventoryDataPlugin p = plugin as IInventoryDataPlugin;
p.Initialise (connect);
}
}
}

View File

@ -33,7 +33,7 @@ namespace OpenSim.Framework
/// <summary>
/// An interface for connecting to user storage servers.
/// </summary>
public interface IUserData
public interface IUserData : IPlugin
{
/// <summary>
/// Returns a user profile from a database via their UUID
@ -153,18 +153,6 @@ namespace OpenSim.Framework
/// <returns>Successful?</returns>
bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
/// <summary>
/// Returns the plugin version
/// </summary>
/// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
string Version {get;}
/// <summary>
/// Returns the plugin name
/// </summary>
/// <returns>Plugin name, eg MySQL User Provider</returns>
string Name {get;}
/// <summary>
/// Initialises the plugin (artificial constructor)
/// </summary>
@ -182,4 +170,15 @@ namespace OpenSim.Framework
void RemoveAttachment(LLUUID user, LLUUID item);
List<LLUUID> GetAttachments(LLUUID user);
}
}
public class UserDataInitialiser : PluginInitialiserBase
{
private string connect;
public UserDataInitialiser (string s) { connect = s; }
public override void Initialise (IPlugin plugin)
{
IUserData p = plugin as IUserData;
p.Initialise (connect);
}
}
}

View File

@ -96,6 +96,11 @@ namespace OpenSim.Framework
get { return loaded; }
}
public T Plugin
{
get { return (loaded.Count == 1)? loaded [0] : default (T); }
}
public PluginLoader ()
{
Initialiser = new PluginInitialiserBase();
@ -114,11 +119,26 @@ namespace OpenSim.Framework
initialise_plugin_dir_ (dir);
}
public void AddExtensionPoint (string extpoint)
public void Add (string extpoint)
{
if (extpoints.Contains (extpoint))
return;
extpoints.Add (extpoint);
}
public void Add (string extpoint, IPluginConstraint cons)
{
Add (extpoint);
AddConstraint (extpoint, cons);
}
public void Add (string extpoint, IPluginFilter filter)
{
Add (extpoint);
AddFilter (extpoint, filter);
}
public void AddConstraint (string extpoint, IPluginConstraint cons)
{
constraints.Add (extpoint, cons);
@ -131,7 +151,7 @@ namespace OpenSim.Framework
public void Load (string extpoint)
{
AddExtensionPoint (extpoint);
Add (extpoint);
Load();
}

View File

@ -53,7 +53,7 @@ namespace OpenSim.Grid.AssetServer
// Temporarily hardcoded - should be a plugin
protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
private IAssetProvider m_assetProvider;
private IAssetProviderPlugin m_assetProvider;
[STAThread]
public static void Main(string[] args)
@ -116,36 +116,19 @@ namespace OpenSim.Grid.AssetServer
return null;
}
public IAssetProvider LoadDatabasePlugin(string FileName, string connect)
public IAssetProviderPlugin LoadDatabasePlugin(string provider, string connect)
{
m_log.Info("[ASSET SERVER]: LoadDatabasePlugin: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
IAssetProvider assetPlugin = null;
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (!pluginType.IsAbstract)
{
Type typeInterface = pluginType.GetInterface("IAssetProvider", true);
PluginLoader<IAssetProviderPlugin> loader =
new PluginLoader<IAssetProviderPlugin> (new AssetDataInitialiser (connect));
if (typeInterface != null)
{
IAssetProvider plug =
(IAssetProvider) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
assetPlugin = plug;
assetPlugin.Initialise(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/AssetData", new PluginProviderFilter (provider));
loader.Load();
m_log.Info("[ASSET SERVER]: Added " + assetPlugin.Name + " " + assetPlugin.Version);
break;
}
typeInterface = null;
}
}
pluginAssembly = null;
return assetPlugin;
return loader.Plugin;
}
public void setupDB(AssetConfig config)
{
try

View File

@ -45,14 +45,14 @@ namespace OpenSim.Grid.AssetServer
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private OpenAsset_Main m_assetManager;
private IAssetProvider m_assetProvider;
private IAssetProviderPlugin m_assetProvider;
/// <summary>
/// Constructor.
/// </summary>
/// <param name="assetManager"></param>
/// <param name="assetProvider"></param>
public GetAssetStreamHandler(OpenAsset_Main assetManager, IAssetProvider assetProvider)
public GetAssetStreamHandler(OpenAsset_Main assetManager, IAssetProviderPlugin assetProvider)
: base("GET", "/assets")
{
m_log.Info("[REST]: In Get Request");
@ -121,7 +121,7 @@ namespace OpenSim.Grid.AssetServer
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private OpenAsset_Main m_assetManager;
private IAssetProvider m_assetProvider;
private IAssetProviderPlugin m_assetProvider;
public override byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
@ -142,7 +142,7 @@ namespace OpenSim.Grid.AssetServer
return new byte[] {};
}
public PostAssetStreamHandler(OpenAsset_Main assetManager, IAssetProvider assetProvider)
public PostAssetStreamHandler(OpenAsset_Main assetManager, IAssetProviderPlugin assetProvider)
: base("POST", "/assets")
{
// m_assetManager = assetManager;

View File

@ -67,13 +67,10 @@ namespace OpenSim.Grid.GridServer
PluginLoader<ILogDataPlugin> logloader =
new PluginLoader<ILogDataPlugin> (new LogDataInitialiser (connect));
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 "Provider" entry in the addin.xml
gridloader.AddFilter ("/OpenSim/GridData", new PluginProviderFilter (provider));
logloader.AddFilter ("/OpenSim/LogData", new PluginProviderFilter (provider));
gridloader.Add ("/OpenSim/GridData", new PluginProviderFilter (provider));
logloader.Add ("/OpenSim/LogData", new PluginProviderFilter (provider));
gridloader.Load();
logloader.Load();

View File

@ -42,7 +42,7 @@ namespace OpenSim.Test.Inventory
[TestFixture]
public class TestInventory
{
IInventoryData _dbPlugin;
IInventoryDataPlugin _dbPlugin;
LLUUID _agent_1_id;
public static LLUUID LibraryFolderRootUuid = new LLUUID("5926de2a-c2d7-4c11-ac4e-74512ffeb6d1");

View File

@ -6,6 +6,6 @@
<Addin id="OpenSim" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/Startup">
<Plugin type="OpenSim.ApplicationPlugins.LoadRegions.LoadRegionsPlugin" />
<Plugin id="LoadRegions" type="OpenSim.ApplicationPlugins.LoadRegions.LoadRegionsPlugin" />
</Extension>
</Addin>

View File

@ -6,9 +6,18 @@
<Addin id="OpenSim.Data" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/GridData">
<Plugin provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLGridData" />
<Plugin id="MSSQLGridData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLGridData" />
</Extension>
<Extension path = "/OpenSim/LogData">
<Plugin provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLLogData" />
<Plugin id="MSSQLLogData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLLogData" />
</Extension>
<Extension path = "/OpenSim/AssetData">
<Plugin id="MSSQLAssetData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLAssetData" />
</Extension>
<Extension path = "/OpenSim/InventoryData">
<Plugin id="MSSQLInventoryData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLInventoryData" />
</Extension>
<Extension path = "/OpenSim/UserData">
<Plugin id="MSSQLUserData" provider="OpenSim.Data.MSSQL.dll" type="OpenSim.Data.MSSQL.MSSQLUserData" />
</Extension>
</Addin>

View File

@ -6,9 +6,18 @@
<Addin id="OpenSim.Data" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/GridData">
<Plugin provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLGridData" />
<Plugin id="MySQLGridData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLGridData" />
</Extension>
<Extension path = "/OpenSim/LogData">
<Plugin provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLLogData" />
<Plugin id="MySQLLogData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLLogData" />
</Extension>
<Extension path = "/OpenSim/AssetData">
<Plugin id="MySQLAssetData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLAssetData" />
</Extension>
<Extension path = "/OpenSim/InventoryData">
<Plugin id="MySQLInventoryData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLInventoryData" />
</Extension>
<Extension path = "/OpenSim/UserData">
<Plugin id="MySQLUserData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLUserData" />
</Extension>
</Addin>

View File

@ -6,6 +6,15 @@
<Addin id="OpenSim.Data" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/GridData">
<Plugin provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteGridData" />
<Plugin id="SQLiteGridData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteGridData" />
</Extension>
<Extension path = "/OpenSim/AssetData">
<Plugin id="SQLiteAssetData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteAssetData" />
</Extension>
<Extension path = "/OpenSim/InventoryData">
<Plugin id="SQLiteInventoryData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteInventoryStore" />
</Extension>
<Extension path = "/OpenSim/UserData">
<Plugin id="SQLiteUserData" provider="OpenSim.Data.SQLite.dll" type="OpenSim.Data.SQLite.SQLiteUserData" />
</Extension>
</Addin>

View File

@ -1,6 +1,9 @@
<Addin id="OpenSim.Data" isroot="true" version="0.5">
<Runtime>
<Import assembly="OpenSim.Grid.UserServer.exe"/>
<Import assembly="OpenSim.Grid.GridServer.exe"/>
<Import assembly="OpenSim.Grid.AssetServer.exe"/>
<Import assembly="OpenSim.Grid.InventoryServer.exe"/>
<Import assembly="OpenSim.Data.dll"/>
<Import assembly="OpenSim.Framework.dll"/>
</Runtime>
@ -10,4 +13,13 @@
<ExtensionPoint path = "/OpenSim/LogData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Data.ILogDataPlugin"/>
</ExtensionPoint>
<ExtensionPoint path = "/OpenSim/AssetData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetProviderPlugin"/>
</ExtensionPoint>
<ExtensionPoint path = "/OpenSim/InventoryData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IInventoryDataPlugin"/>
</ExtensionPoint>
<ExtensionPoint path = "/OpenSim/UserData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IUserData"/>
</ExtensionPoint>
</Addin>

View File

@ -6,6 +6,6 @@
<Addin id="OpenSim" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/Startup">
<Plugin type="OpenSim.ApplicationPlugins.RemoteController.RemoteAdminPlugin" />
<Plugin id="RemoteController" type="OpenSim.ApplicationPlugins.RemoteController.RemoteAdminPlugin" />
</Extension>
</Addin>

View File

@ -6,6 +6,6 @@
<Addin id="OpenSim" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/Startup">
<Plugin type="OpenSim.ApplicationPlugins.Rest.Inventory.RestHandler" />
<Plugin id="RestInventory" type="OpenSim.ApplicationPlugins.Rest.Inventory.RestHandler" />
</Extension>
</Addin>

View File

@ -6,6 +6,6 @@
<Addin id="OpenSim" version="0.5" />
</Dependencies>
<Extension path = "/OpenSim/Startup">
<Plugin type="OpenSim.ApplicationPlugins.Rest.Regions.RestRegionPlugin" />
<Plugin id="RestRegions" type="OpenSim.ApplicationPlugins.Rest.Regions.RestRegionPlugin" />
</Extension>
</Addin>