The start of a beautiful thing! (eeek inventory!)

zircon^2
Adam Frisby 2007-05-31 10:47:38 +00:00
parent 6c003ee83f
commit 9505128e6f
2 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenGrid.Framework.Data.MySQL
{
class MySQLInventoryData
{
public MySQLManager database;
public void Initialise()
{
IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
}
public string getName()
{
return "MySQL Logdata Interface";
}
public void Close()
{
// Do nothing.
}
public string getVersion()
{
return "0.1";
}
}
}

View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenGrid.Framework.Data
{
public interface IInventoryData
{
/// <summary>
/// Initialises the interface
/// </summary>
void Initialise();
/// <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();
}
}