diff --git a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs index 2ea2db4a0d..3db32f3c46 100644 --- a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs +++ b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs @@ -7,12 +7,29 @@ namespace OpenGrid.Framework.Data.MySQL { public class MySQLGridData : IGridData { - MySQLManager database; + private MySQLManager database; + /// + /// Initialises the Grid Interface + /// public void Initialise() { database = new MySQLManager("localhost", "db", "user", "password", "false"); } + + /// + /// Shuts down the grid interface + /// + public void Close() + { + database.Close(); + } + + /// + /// Returns a sim profile from it's location + /// + /// Region location handle + /// Sim profile public SimProfileData GetProfileByHandle(ulong handle) { Dictionary param = new Dictionary(); @@ -27,6 +44,12 @@ namespace OpenGrid.Framework.Data.MySQL return row; } + + /// + /// Returns a sim profile from it's UUID + /// + /// The region UUID + /// The sim profile public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) { Dictionary param = new Dictionary(); @@ -41,6 +64,14 @@ namespace OpenGrid.Framework.Data.MySQL return row; } + + /// + /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. + /// + /// The UUID of the challenger + /// The attempted regionHandle of the challenger + /// The secret + /// Whether the secret and regionhandle match the database entry for UUID public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) { bool throwHissyFit = false; // Should be true by 1.0 @@ -54,7 +85,7 @@ namespace OpenGrid.Framework.Data.MySQL } /// - /// Provides a cryptographic authentication of a region + /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region /// /// This requires a security audit. /// diff --git a/OpenGrid.Framework.Data/GridData.cs b/OpenGrid.Framework.Data/GridData.cs index 9bc2ce3565..8ace484cec 100644 --- a/OpenGrid.Framework.Data/GridData.cs +++ b/OpenGrid.Framework.Data/GridData.cs @@ -10,5 +10,6 @@ namespace OpenGrid.Framework.Data SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID); bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey); void Initialise(); + void Close(); } }