aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs1
-rw-r--r--OpenSim/Data/MySQL/MySQLGridData.cs22
-rw-r--r--OpenSim/Data/MySQL/MySQLLogData.cs26
-rw-r--r--OpenSim/Data/MySQL/MySQLManager.cs2
4 files changed, 39 insertions, 12 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 6cb0b4c..9284ba9 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -34,6 +34,7 @@ using log4net;
34using MySql.Data.MySqlClient; 34using MySql.Data.MySqlClient;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
37
37namespace OpenSim.Data.MySQL 38namespace OpenSim.Data.MySQL
38{ 39{
39 /// <summary> 40 /// <summary>
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs
index bb71c99..8142c74 100644
--- a/OpenSim/Data/MySQL/MySQLGridData.cs
+++ b/OpenSim/Data/MySQL/MySQLGridData.cs
@@ -33,12 +33,18 @@ using System.Security.Cryptography;
33using System.Text; 33using System.Text;
34using libsecondlife; 34using libsecondlife;
35using log4net; 35using log4net;
36using Mono.Addins;
37using OpenSim.Framework;
38
39[assembly : Addin]
40[assembly : AddinDependency("OpenSim.Data", "0.5")]
36 41
37namespace OpenSim.Data.MySQL 42namespace OpenSim.Data.MySQL
38{ 43{
39 /// <summary> 44 /// <summary>
40 /// A MySQL Interface for the Grid Server 45 /// A MySQL Interface for the Grid Server
41 /// </summary> 46 /// </summary>
47 [Extension("/OpenSim/GridDataStore")]
42 public class MySQLGridData : GridDataBase 48 public class MySQLGridData : GridDataBase
43 { 49 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -48,6 +54,12 @@ namespace OpenSim.Data.MySQL
48 /// </summary> 54 /// </summary>
49 private MySQLManager database; 55 private MySQLManager database;
50 56
57 override public void Initialise()
58 {
59 m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!");
60 throw new PluginNotInitialisedException (Name);
61 }
62
51 /// <summary> 63 /// <summary>
52 /// <para>Initialises Grid interface</para> 64 /// <para>Initialises Grid interface</para>
53 /// <para> 65 /// <para>
@@ -144,7 +156,7 @@ namespace OpenSim.Data.MySQL
144 /// <summary> 156 /// <summary>
145 /// Shuts down the grid interface 157 /// Shuts down the grid interface
146 /// </summary> 158 /// </summary>
147 override public void Close() 159 override public void Dispose()
148 { 160 {
149 database.Close(); 161 database.Close();
150 } 162 }
@@ -153,18 +165,18 @@ namespace OpenSim.Data.MySQL
153 /// Returns the plugin name 165 /// Returns the plugin name
154 /// </summary> 166 /// </summary>
155 /// <returns>Plugin name</returns> 167 /// <returns>Plugin name</returns>
156 override public string getName() 168 override public string Name
157 { 169 {
158 return "MySql OpenGridData"; 170 get { return "MySql OpenGridData"; }
159 } 171 }
160 172
161 /// <summary> 173 /// <summary>
162 /// Returns the plugin version 174 /// Returns the plugin version
163 /// </summary> 175 /// </summary>
164 /// <returns>Plugin version</returns> 176 /// <returns>Plugin version</returns>
165 override public string getVersion() 177 override public string Version
166 { 178 {
167 return "0.1"; 179 get { return "0.1"; }
168 } 180 }
169 181
170 /// <summary> 182 /// <summary>
diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs
index fee7f2f..f11aec5 100644
--- a/OpenSim/Data/MySQL/MySQLLogData.cs
+++ b/OpenSim/Data/MySQL/MySQLLogData.cs
@@ -28,20 +28,34 @@ using System;
28using System.Reflection; 28using System.Reflection;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using log4net; 30using log4net;
31using Mono.Addins;
32using OpenSim.Framework;
33
34// Only one attribute per assembly. See: *GridData.cs
35// [assembly : Addin]
36// [assembly : AddinDependency("OpenSim.Data", "0.5")]
31 37
32namespace OpenSim.Data.MySQL 38namespace OpenSim.Data.MySQL
33{ 39{
34 /// <summary> 40 /// <summary>
35 /// An interface to the log database for MySQL 41 /// An interface to the log database for MySQL
36 /// </summary> 42 /// </summary>
37 internal class MySQLLogData : ILogData 43 [Extension("/OpenSim/GridLogData")]
44 internal class MySQLLogData : ILogDataPlugin
38 { 45 {
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47
40 /// <summary> 48 /// <summary>
41 /// The database manager 49 /// The database manager
42 /// </summary> 50 /// </summary>
43 public MySQLManager database; 51 public MySQLManager database;
44 52
53 public void Initialise()
54 {
55 m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!");
56 throw new PluginNotInitialisedException (Name);
57 }
58
45 /// <summary> 59 /// <summary>
46 /// Artificial constructor called when the plugin is loaded 60 /// Artificial constructor called when the plugin is loaded
47 /// Uses the obsolete mysql_connection.ini if connect string is empty. 61 /// Uses the obsolete mysql_connection.ini if connect string is empty.
@@ -128,16 +142,16 @@ namespace OpenSim.Data.MySQL
128 /// Returns the name of this DB provider 142 /// Returns the name of this DB provider
129 /// </summary> 143 /// </summary>
130 /// <returns>A string containing the DB provider name</returns> 144 /// <returns>A string containing the DB provider name</returns>
131 public string getName() 145 public string Name
132 { 146 {
133 return "MySQL Logdata Interface"; 147 get { return "MySQL Logdata Interface";}
134 } 148 }
135 149
136 /// <summary> 150 /// <summary>
137 /// Closes the database provider 151 /// Closes the database provider
138 /// </summary> 152 /// </summary>
139 /// <remarks>do nothing</remarks> 153 /// <remarks>do nothing</remarks>
140 public void Close() 154 public void Dispose()
141 { 155 {
142 // Do nothing. 156 // Do nothing.
143 } 157 }
@@ -146,9 +160,9 @@ namespace OpenSim.Data.MySQL
146 /// Returns the version of this DB provider 160 /// Returns the version of this DB provider
147 /// </summary> 161 /// </summary>
148 /// <returns>A string containing the provider version</returns> 162 /// <returns>A string containing the provider version</returns>
149 public string getVersion() 163 public string Version
150 { 164 {
151 return "0.1"; 165 get { return "0.1"; }
152 } 166 }
153 } 167 }
154} 168}
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index cf4bce3..89d0672 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -227,7 +227,7 @@ namespace OpenSim.Data.MySQL
227 227
228 return 228 return
229 string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, 229 string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
230 dllVersion.Revision); 230 dllVersion.Revision);
231 } 231 }
232 232
233 /// <summary> 233 /// <summary>