From 808b9f64656321a71095cb4f0a8825aa613a068b Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 4 May 2007 04:19:30 +0000 Subject: Added Close() function to sanely terminate the grid data interfaces. Declaring this complete (other than bugfixes), going to work on integrating into GridServer. --- OpenGrid.Framework.Data.MySQL/MySQLGridData.cs | 35 ++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'OpenGrid.Framework.Data.MySQL/MySQLGridData.cs') diff --git a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs index 2ea2db4..3db32f3 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. /// -- cgit v1.1