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

PluginLoader. Fix issue 1871.
This commit is contained in:
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

@@ -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;