aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-05-04 04:19:30 +0000
committerAdam Frisby2007-05-04 04:19:30 +0000
commit808b9f64656321a71095cb4f0a8825aa613a068b (patch)
tree3cce0b2233dd8ae857c68769e1287efde6cd2846 /OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
parentI dub thee working. Maybe. (diff)
downloadopensim-SC_OLD-808b9f64656321a71095cb4f0a8825aa613a068b.zip
opensim-SC_OLD-808b9f64656321a71095cb4f0a8825aa613a068b.tar.gz
opensim-SC_OLD-808b9f64656321a71095cb4f0a8825aa613a068b.tar.bz2
opensim-SC_OLD-808b9f64656321a71095cb4f0a8825aa613a068b.tar.xz
Added Close() function to sanely terminate the grid data interfaces. Declaring this complete (other than bugfixes), going to work on integrating into GridServer.
Diffstat (limited to 'OpenGrid.Framework.Data.MySQL/MySQLGridData.cs')
-rw-r--r--OpenGrid.Framework.Data.MySQL/MySQLGridData.cs35
1 files changed, 33 insertions, 2 deletions
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
7{ 7{
8 public class MySQLGridData : IGridData 8 public class MySQLGridData : IGridData
9 { 9 {
10 MySQLManager database; 10 private MySQLManager database;
11 11
12 /// <summary>
13 /// Initialises the Grid Interface
14 /// </summary>
12 public void Initialise() 15 public void Initialise()
13 { 16 {
14 database = new MySQLManager("localhost", "db", "user", "password", "false"); 17 database = new MySQLManager("localhost", "db", "user", "password", "false");
15 } 18 }
19
20 /// <summary>
21 /// Shuts down the grid interface
22 /// </summary>
23 public void Close()
24 {
25 database.Close();
26 }
27
28 /// <summary>
29 /// Returns a sim profile from it's location
30 /// </summary>
31 /// <param name="handle">Region location handle</param>
32 /// <returns>Sim profile</returns>
16 public SimProfileData GetProfileByHandle(ulong handle) 33 public SimProfileData GetProfileByHandle(ulong handle)
17 { 34 {
18 Dictionary<string,string> param = new Dictionary<string,string>(); 35 Dictionary<string,string> param = new Dictionary<string,string>();
@@ -27,6 +44,12 @@ namespace OpenGrid.Framework.Data.MySQL
27 44
28 return row; 45 return row;
29 } 46 }
47
48 /// <summary>
49 /// Returns a sim profile from it's UUID
50 /// </summary>
51 /// <param name="uuid">The region UUID</param>
52 /// <returns>The sim profile</returns>
30 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) 53 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
31 { 54 {
32 Dictionary<string, string> param = new Dictionary<string, string>(); 55 Dictionary<string, string> param = new Dictionary<string, string>();
@@ -41,6 +64,14 @@ namespace OpenGrid.Framework.Data.MySQL
41 64
42 return row; 65 return row;
43 } 66 }
67
68 /// <summary>
69 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
70 /// </summary>
71 /// <param name="uuid">The UUID of the challenger</param>
72 /// <param name="handle">The attempted regionHandle of the challenger</param>
73 /// <param name="authkey">The secret</param>
74 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
44 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) 75 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
45 { 76 {
46 bool throwHissyFit = false; // Should be true by 1.0 77 bool throwHissyFit = false; // Should be true by 1.0
@@ -54,7 +85,7 @@ namespace OpenGrid.Framework.Data.MySQL
54 } 85 }
55 86
56 /// <summary> 87 /// <summary>
57 /// Provides a cryptographic authentication of a region 88 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
58 /// </summary> 89 /// </summary>
59 /// <remarks>This requires a security audit.</remarks> 90 /// <remarks>This requires a security audit.</remarks>
60 /// <param name="uuid"></param> 91 /// <param name="uuid"></param>