The start of a beautiful thing! (eeek inventory!)
parent
6c003ee83f
commit
9505128e6f
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue