diff options
author | Mike Mazur | 2008-07-31 09:24:28 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-31 09:24:28 +0000 |
commit | 2270b252656146d9d74b84665a7ace6c3139db30 (patch) | |
tree | 7a967ee50349cf4301ed801e0b8c85f5060ffe1d /OpenSim/Data | |
parent | dropping intermediate GridInfoPlugin.addin.xml, as it's no longer (diff) | |
download | opensim-SC-2270b252656146d9d74b84665a7ace6c3139db30.zip opensim-SC-2270b252656146d9d74b84665a7ace6c3139db30.tar.gz opensim-SC-2270b252656146d9d74b84665a7ace6c3139db30.tar.bz2 opensim-SC-2270b252656146d9d74b84665a7ace6c3139db30.tar.xz |
Thanks, sempuki, for a patch that moves all Grid Server's plugins to
PluginLoader. Fix issue 1871.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/AssetDataBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAssetData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 20 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLUserData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGridData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 20 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserData.cs | 23 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 33 | ||||
-rw-r--r-- | OpenSim/Data/NHibernate/NHibernateUserData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 33 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserData.cs | 8 | ||||
-rw-r--r-- | OpenSim/Data/UserDataBase.cs | 9 |
13 files changed, 117 insertions, 53 deletions
diff --git a/OpenSim/Data/AssetDataBase.cs b/OpenSim/Data/AssetDataBase.cs index 6e9e085..690abd0 100644 --- a/OpenSim/Data/AssetDataBase.cs +++ b/OpenSim/Data/AssetDataBase.cs | |||
@@ -30,7 +30,7 @@ using OpenSim.Framework; | |||
30 | 30 | ||
31 | namespace OpenSim.Data | 31 | namespace OpenSim.Data |
32 | { | 32 | { |
33 | public abstract class AssetDataBase : IAssetProvider | 33 | public abstract class AssetDataBase : IAssetProviderPlugin |
34 | { | 34 | { |
35 | public abstract AssetBase FetchAsset(LLUUID uuid); | 35 | public abstract AssetBase FetchAsset(LLUUID uuid); |
36 | public abstract void CreateAsset(AssetBase asset); | 36 | public abstract void CreateAsset(AssetBase asset); |
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index e0e20df..443907f 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Data.MSSQL | |||
45 | 45 | ||
46 | private MSSQLManager database; | 46 | private MSSQLManager database; |
47 | 47 | ||
48 | #region IAssetProvider Members | 48 | #region IAssetProviderPlugin Members |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Migration method | 51 | /// Migration method |
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index 4a8d6e9..9e60b16 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Data.MSSQL | |||
39 | /// <summary> | 39 | /// <summary> |
40 | /// A MSSQL interface for the inventory server | 40 | /// A MSSQL interface for the inventory server |
41 | /// </summary> | 41 | /// </summary> |
42 | public class MSSQLInventoryData : IInventoryData | 42 | public class MSSQLInventoryData : IInventoryDataPlugin |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
@@ -59,6 +59,12 @@ namespace OpenSim.Data.MSSQL | |||
59 | /// </summary> | 59 | /// </summary> |
60 | private MSSQLManager database; | 60 | private MSSQLManager database; |
61 | 61 | ||
62 | public void Initialise() | ||
63 | { | ||
64 | m_log.Info("[MSSQLInventoryData]: " + Name + " cannot be default-initialized!"); | ||
65 | throw new PluginNotInitialisedException (Name); | ||
66 | } | ||
67 | |||
62 | /// <summary> | 68 | /// <summary> |
63 | /// Loads and initialises the MSSQL inventory storage interface | 69 | /// Loads and initialises the MSSQL inventory storage interface |
64 | /// </summary> | 70 | /// </summary> |
@@ -134,15 +140,15 @@ namespace OpenSim.Data.MSSQL | |||
134 | /// The name of this DB provider | 140 | /// The name of this DB provider |
135 | /// </summary> | 141 | /// </summary> |
136 | /// <returns>A string containing the name of the DB provider</returns> | 142 | /// <returns>A string containing the name of the DB provider</returns> |
137 | public string getName() | 143 | public string Name |
138 | { | 144 | { |
139 | return "MSSQL Inventory Data Interface"; | 145 | get { return "MSSQL Inventory Data Interface"; } |
140 | } | 146 | } |
141 | 147 | ||
142 | /// <summary> | 148 | /// <summary> |
143 | /// Closes this DB provider | 149 | /// Closes this DB provider |
144 | /// </summary> | 150 | /// </summary> |
145 | public void Close() | 151 | public void Dispose() |
146 | { | 152 | { |
147 | // Do nothing. | 153 | // Do nothing. |
148 | } | 154 | } |
@@ -151,9 +157,9 @@ namespace OpenSim.Data.MSSQL | |||
151 | /// Returns the version of this DB provider | 157 | /// Returns the version of this DB provider |
152 | /// </summary> | 158 | /// </summary> |
153 | /// <returns>A string containing the DB provider</returns> | 159 | /// <returns>A string containing the DB provider</returns> |
154 | public string getVersion() | 160 | public string Version |
155 | { | 161 | { |
156 | return database.getVersion(); | 162 | get { return database.getVersion(); } |
157 | } | 163 | } |
158 | 164 | ||
159 | /// <summary> | 165 | /// <summary> |
@@ -681,7 +687,7 @@ namespace OpenSim.Data.MSSQL | |||
681 | folders.Add(f); | 687 | folders.Add(f); |
682 | } | 688 | } |
683 | 689 | ||
684 | // See IInventoryData | 690 | // See IInventoryDataPlugin |
685 | public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) | 691 | public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) |
686 | { | 692 | { |
687 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 693 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index 0593c62..0703aab 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs | |||
@@ -52,6 +52,12 @@ namespace OpenSim.Data.MSSQL | |||
52 | private string m_usersTableName; | 52 | private string m_usersTableName; |
53 | private string m_userFriendsTableName; | 53 | private string m_userFriendsTableName; |
54 | 54 | ||
55 | public override void Initialise() | ||
56 | { | ||
57 | m_log.Info("[MSSQLUserData]: " + Name + " cannot be default-initialized!"); | ||
58 | throw new PluginNotInitialisedException (Name); | ||
59 | } | ||
60 | |||
55 | /// <summary> | 61 | /// <summary> |
56 | /// Loads and initialises the MSSQL storage plugin | 62 | /// Loads and initialises the MSSQL storage plugin |
57 | /// </summary> | 63 | /// </summary> |
@@ -93,6 +99,8 @@ namespace OpenSim.Data.MSSQL | |||
93 | 99 | ||
94 | TestTables(); | 100 | TestTables(); |
95 | } | 101 | } |
102 | |||
103 | public override void Dispose () {} | ||
96 | 104 | ||
97 | /// <summary> | 105 | /// <summary> |
98 | /// | 106 | /// |
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 9284ba9..cec736a 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Data.MySQL | |||
112 | 112 | ||
113 | override public void Dispose() { } | 113 | override public void Dispose() { } |
114 | 114 | ||
115 | #region IAssetProvider Members | 115 | #region IAssetProviderPlugin Members |
116 | 116 | ||
117 | /// <summary> | 117 | /// <summary> |
118 | /// <list type="bullet"> | 118 | /// <list type="bullet"> |
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs index fee457a..4cddbe5 100644 --- a/OpenSim/Data/MySQL/MySQLGridData.cs +++ b/OpenSim/Data/MySQL/MySQLGridData.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Data.MySQL | |||
51 | 51 | ||
52 | override public void Initialise() | 52 | override public void Initialise() |
53 | { | 53 | { |
54 | m_log.Info("[MySQLLogData]: " + Name + " cannot be default-initialized!"); | 54 | m_log.Info("[MySQLGridData]: " + Name + " cannot be default-initialized!"); |
55 | throw new PluginNotInitialisedException (Name); | 55 | throw new PluginNotInitialisedException (Name); |
56 | } | 56 | } |
57 | 57 | ||
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 5bde40a..0fb49c1 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Data.MySQL | |||
38 | /// <summary> | 38 | /// <summary> |
39 | /// A MySQL interface for the inventory server | 39 | /// A MySQL interface for the inventory server |
40 | /// </summary> | 40 | /// </summary> |
41 | public class MySQLInventoryData : IInventoryData | 41 | public class MySQLInventoryData : IInventoryDataPlugin |
42 | { | 42 | { |
43 | private static readonly ILog m_log | 43 | private static readonly ILog m_log |
44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -48,6 +48,12 @@ namespace OpenSim.Data.MySQL | |||
48 | /// </summary> | 48 | /// </summary> |
49 | private MySQLManager database; | 49 | private MySQLManager database; |
50 | 50 | ||
51 | public void Initialise() | ||
52 | { | ||
53 | m_log.Info("[MySQLInventoryData]: " + Name + " cannot be default-initialized!"); | ||
54 | throw new PluginNotInitialisedException (Name); | ||
55 | } | ||
56 | |||
51 | /// <summary> | 57 | /// <summary> |
52 | /// <para>Initialises Inventory interface</para> | 58 | /// <para>Initialises Inventory interface</para> |
53 | /// <para> | 59 | /// <para> |
@@ -183,16 +189,16 @@ namespace OpenSim.Data.MySQL | |||
183 | /// The name of this DB provider | 189 | /// The name of this DB provider |
184 | /// </summary> | 190 | /// </summary> |
185 | /// <returns>Name of DB provider</returns> | 191 | /// <returns>Name of DB provider</returns> |
186 | public string getName() | 192 | public string Name |
187 | { | 193 | { |
188 | return "MySQL Inventory Data Interface"; | 194 | get { return "MySQL Inventory Data Interface"; } |
189 | } | 195 | } |
190 | 196 | ||
191 | /// <summary> | 197 | /// <summary> |
192 | /// Closes this DB provider | 198 | /// Closes this DB provider |
193 | /// </summary> | 199 | /// </summary> |
194 | /// <remarks>do nothing</remarks> | 200 | /// <remarks>do nothing</remarks> |
195 | public void Close() | 201 | public void Dispose() |
196 | { | 202 | { |
197 | // Do nothing. | 203 | // Do nothing. |
198 | } | 204 | } |
@@ -201,9 +207,9 @@ namespace OpenSim.Data.MySQL | |||
201 | /// Returns the version of this DB provider | 207 | /// Returns the version of this DB provider |
202 | /// </summary> | 208 | /// </summary> |
203 | /// <returns>A string containing the DB provider version</returns> | 209 | /// <returns>A string containing the DB provider version</returns> |
204 | public string getVersion() | 210 | public string Version |
205 | { | 211 | { |
206 | return database.getVersion(); | 212 | get { return database.getVersion(); } |
207 | } | 213 | } |
208 | 214 | ||
209 | /// <summary> | 215 | /// <summary> |
@@ -692,7 +698,7 @@ namespace OpenSim.Data.MySQL | |||
692 | 698 | ||
693 | 699 | ||
694 | /// <summary> | 700 | /// <summary> |
695 | /// See IInventoryData | 701 | /// See IInventoryDataPlugin |
696 | /// </summary> | 702 | /// </summary> |
697 | /// <param name="parentID"></param> | 703 | /// <param name="parentID"></param> |
698 | /// <returns></returns> | 704 | /// <returns></returns> |
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 11d9c26..d8830de 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs | |||
@@ -55,6 +55,12 @@ namespace OpenSim.Data.MySQL | |||
55 | private string m_appearanceTableName = "avatarappearance"; | 55 | private string m_appearanceTableName = "avatarappearance"; |
56 | private string m_connectString; | 56 | private string m_connectString; |
57 | 57 | ||
58 | public override void Initialise() | ||
59 | { | ||
60 | m_log.Info("[MySQLUserData]: " + Name + " cannot be default-initialized!"); | ||
61 | throw new PluginNotInitialisedException (Name); | ||
62 | } | ||
63 | |||
58 | /// <summary> | 64 | /// <summary> |
59 | /// Initialise User Interface | 65 | /// Initialise User Interface |
60 | /// Loads and initialises the MySQL storage plugin | 66 | /// Loads and initialises the MySQL storage plugin |
@@ -120,6 +126,9 @@ namespace OpenSim.Data.MySQL | |||
120 | m.Update(); | 126 | m.Update(); |
121 | } | 127 | } |
122 | 128 | ||
129 | public override void Dispose () { } | ||
130 | |||
131 | |||
123 | #region Test and initialization code | 132 | #region Test and initialization code |
124 | 133 | ||
125 | /// <summary> | 134 | /// <summary> |
@@ -252,7 +261,7 @@ namespace OpenSim.Data.MySQL | |||
252 | 261 | ||
253 | UserProfileData row = database.readUserRow(reader); | 262 | UserProfileData row = database.readUserRow(reader); |
254 | 263 | ||
255 | reader.Close(); | 264 | reader.Dispose(); |
256 | result.Dispose(); | 265 | result.Dispose(); |
257 | return row; | 266 | return row; |
258 | } | 267 | } |
@@ -398,7 +407,7 @@ namespace OpenSim.Data.MySQL | |||
398 | 407 | ||
399 | Lfli.Add(fli); | 408 | Lfli.Add(fli); |
400 | } | 409 | } |
401 | reader.Close(); | 410 | reader.Dispose(); |
402 | result.Dispose(); | 411 | result.Dispose(); |
403 | } | 412 | } |
404 | } | 413 | } |
@@ -450,7 +459,7 @@ namespace OpenSim.Data.MySQL | |||
450 | user.lastName = (string) reader["lastname"]; | 459 | user.lastName = (string) reader["lastname"]; |
451 | returnlist.Add(user); | 460 | returnlist.Add(user); |
452 | } | 461 | } |
453 | reader.Close(); | 462 | reader.Dispose(); |
454 | result.Dispose(); | 463 | result.Dispose(); |
455 | } | 464 | } |
456 | } | 465 | } |
@@ -484,7 +493,7 @@ namespace OpenSim.Data.MySQL | |||
484 | user.lastName = (string) reader["lastname"]; | 493 | user.lastName = (string) reader["lastname"]; |
485 | returnlist.Add(user); | 494 | returnlist.Add(user); |
486 | } | 495 | } |
487 | reader.Close(); | 496 | reader.Dispose(); |
488 | result.Dispose(); | 497 | result.Dispose(); |
489 | } | 498 | } |
490 | } | 499 | } |
@@ -517,7 +526,7 @@ namespace OpenSim.Data.MySQL | |||
517 | 526 | ||
518 | UserProfileData row = database.readUserRow(reader); | 527 | UserProfileData row = database.readUserRow(reader); |
519 | 528 | ||
520 | reader.Close(); | 529 | reader.Dispose(); |
521 | result.Dispose(); | 530 | result.Dispose(); |
522 | 531 | ||
523 | return row; | 532 | return row; |
@@ -603,7 +612,7 @@ namespace OpenSim.Data.MySQL | |||
603 | 612 | ||
604 | UserAgentData row = database.readAgentRow(reader); | 613 | UserAgentData row = database.readAgentRow(reader); |
605 | 614 | ||
606 | reader.Close(); | 615 | reader.Dispose(); |
607 | result.Dispose(); | 616 | result.Dispose(); |
608 | 617 | ||
609 | return row; | 618 | return row; |
@@ -725,7 +734,7 @@ namespace OpenSim.Data.MySQL | |||
725 | 734 | ||
726 | AvatarAppearance appearance = database.readAppearanceRow(reader); | 735 | AvatarAppearance appearance = database.readAppearanceRow(reader); |
727 | 736 | ||
728 | reader.Close(); | 737 | reader.Dispose(); |
729 | result.Dispose(); | 738 | result.Dispose(); |
730 | 739 | ||
731 | return appearance; | 740 | return appearance; |
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index 153d2d5..657a7b2 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs | |||
@@ -42,7 +42,7 @@ using Environment=NHibernate.Cfg.Environment; | |||
42 | 42 | ||
43 | namespace OpenSim.Data.NHibernate | 43 | namespace OpenSim.Data.NHibernate |
44 | { | 44 | { |
45 | public class NHibernateInventoryData: IInventoryData | 45 | public class NHibernateInventoryData: IInventoryDataPlugin |
46 | { | 46 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
@@ -50,6 +50,12 @@ namespace OpenSim.Data.NHibernate | |||
50 | private ISessionFactory factory; | 50 | private ISessionFactory factory; |
51 | private ISession session; | 51 | private ISession session; |
52 | 52 | ||
53 | public void Initialise() | ||
54 | { | ||
55 | m_log.Info("[NHibernateInventoryData]: " + Name + " cannot be default-initialized!"); | ||
56 | throw new PluginNotInitialisedException (Name); | ||
57 | } | ||
58 | |||
53 | /// <summary> | 59 | /// <summary> |
54 | /// Initialises the interface | 60 | /// Initialises the interface |
55 | /// </summary> | 61 | /// </summary> |
@@ -257,7 +263,7 @@ namespace OpenSim.Data.NHibernate | |||
257 | /// <summary> | 263 | /// <summary> |
258 | /// Closes the interface | 264 | /// Closes the interface |
259 | /// </summary> | 265 | /// </summary> |
260 | public void Close() | 266 | public void Dispose() |
261 | { | 267 | { |
262 | } | 268 | } |
263 | 269 | ||
@@ -265,25 +271,28 @@ namespace OpenSim.Data.NHibernate | |||
265 | /// The plugin being loaded | 271 | /// The plugin being loaded |
266 | /// </summary> | 272 | /// </summary> |
267 | /// <returns>A string containing the plugin name</returns> | 273 | /// <returns>A string containing the plugin name</returns> |
268 | public string getName() | 274 | public string Name |
269 | { | 275 | { |
270 | return "NHibernate Inventory Data Interface"; | 276 | get { return "NHibernate Inventory Data Interface"; } |
271 | } | 277 | } |
272 | 278 | ||
273 | /// <summary> | 279 | /// <summary> |
274 | /// The plugins version | 280 | /// The plugins version |
275 | /// </summary> | 281 | /// </summary> |
276 | /// <returns>A string containing the plugin version</returns> | 282 | /// <returns>A string containing the plugin version</returns> |
277 | public string getVersion() | 283 | public string Version |
278 | { | 284 | { |
279 | Module module = GetType().Module; | 285 | get |
280 | // string dllName = module.Assembly.ManifestModule.Name; | 286 | { |
281 | Version dllVersion = module.Assembly.GetName().Version; | 287 | Module module = GetType().Module; |
288 | // string dllName = module.Assembly.ManifestModule.Name; | ||
289 | Version dllVersion = module.Assembly.GetName().Version; | ||
282 | 290 | ||
283 | 291 | ||
284 | return | 292 | return |
285 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, | 293 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, |
286 | dllVersion.Revision); | 294 | dllVersion.Revision); |
295 | } | ||
287 | } | 296 | } |
288 | 297 | ||
289 | // Move seems to be just update | 298 | // Move seems to be just update |
@@ -369,7 +378,7 @@ namespace OpenSim.Data.NHibernate | |||
369 | return folders; | 378 | return folders; |
370 | } | 379 | } |
371 | 380 | ||
372 | // See IInventoryData | 381 | // See IInventoryDataPlugin |
373 | public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) | 382 | public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) |
374 | { | 383 | { |
375 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 384 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 9d9aec9..bceae7c 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs | |||
@@ -53,6 +53,12 @@ namespace OpenSim.Data.NHibernate | |||
53 | private ISessionFactory factory; | 53 | private ISessionFactory factory; |
54 | private ISession session; | 54 | private ISession session; |
55 | 55 | ||
56 | public override void Initialise() | ||
57 | { | ||
58 | m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!"); | ||
59 | throw new PluginNotInitialisedException (Name); | ||
60 | } | ||
61 | |||
56 | public override void Initialise(string connect) | 62 | public override void Initialise(string connect) |
57 | { | 63 | { |
58 | char[] split = {';'}; | 64 | char[] split = {';'}; |
@@ -320,7 +326,7 @@ namespace OpenSim.Data.NHibernate | |||
320 | get { return "0.1"; } | 326 | get { return "0.1"; } |
321 | } | 327 | } |
322 | 328 | ||
323 | public void Dispose() | 329 | public override void Dispose() |
324 | { | 330 | { |
325 | 331 | ||
326 | } | 332 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 99560a0..ef4ef99 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Data.SQLite | |||
39 | /// <summary> | 39 | /// <summary> |
40 | /// An Inventory Interface to the SQLite database | 40 | /// An Inventory Interface to the SQLite database |
41 | /// </summary> | 41 | /// </summary> |
42 | public class SQLiteInventoryStore : SQLiteUtil, IInventoryData | 42 | public class SQLiteInventoryStore : SQLiteUtil, IInventoryDataPlugin |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
@@ -50,6 +50,12 @@ namespace OpenSim.Data.SQLite | |||
50 | private SqliteDataAdapter invItemsDa; | 50 | private SqliteDataAdapter invItemsDa; |
51 | private SqliteDataAdapter invFoldersDa; | 51 | private SqliteDataAdapter invFoldersDa; |
52 | 52 | ||
53 | public void Initialise() | ||
54 | { | ||
55 | m_log.Info("[SQLiteInventoryData]: " + Name + " cannot be default-initialized!"); | ||
56 | throw new PluginNotInitialisedException (Name); | ||
57 | } | ||
58 | |||
53 | /// <summary> | 59 | /// <summary> |
54 | /// <list type="bullet"> | 60 | /// <list type="bullet"> |
55 | /// <item>Initialises Inventory interface</item> | 61 | /// <item>Initialises Inventory interface</item> |
@@ -277,7 +283,7 @@ namespace OpenSim.Data.SQLite | |||
277 | /// <summary> | 283 | /// <summary> |
278 | /// Closes the inventory interface | 284 | /// Closes the inventory interface |
279 | /// </summary> | 285 | /// </summary> |
280 | public void Close() | 286 | public void Dispose() |
281 | { | 287 | { |
282 | } | 288 | } |
283 | 289 | ||
@@ -285,25 +291,28 @@ namespace OpenSim.Data.SQLite | |||
285 | /// The name of this DB provider | 291 | /// The name of this DB provider |
286 | /// </summary> | 292 | /// </summary> |
287 | /// <returns>Name of DB provider</returns> | 293 | /// <returns>Name of DB provider</returns> |
288 | public string getName() | 294 | public string Name |
289 | { | 295 | { |
290 | return "SQLite Inventory Data Interface"; | 296 | get { return "SQLite Inventory Data Interface"; } |
291 | } | 297 | } |
292 | 298 | ||
293 | /// <summary> | 299 | /// <summary> |
294 | /// Returns the version of this DB provider | 300 | /// Returns the version of this DB provider |
295 | /// </summary> | 301 | /// </summary> |
296 | /// <returns>A string containing the DB provider version</returns> | 302 | /// <returns>A string containing the DB provider version</returns> |
297 | public string getVersion() | 303 | public string Version |
298 | { | 304 | { |
299 | Module module = GetType().Module; | 305 | get |
300 | // string dllName = module.Assembly.ManifestModule.Name; | 306 | { |
301 | Version dllVersion = module.Assembly.GetName().Version; | 307 | Module module = GetType().Module; |
308 | // string dllName = module.Assembly.ManifestModule.Name; | ||
309 | Version dllVersion = module.Assembly.GetName().Version; | ||
302 | 310 | ||
303 | 311 | ||
304 | return | 312 | return |
305 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, | 313 | string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, |
306 | dllVersion.Revision); | 314 | dllVersion.Revision); |
315 | } | ||
307 | } | 316 | } |
308 | 317 | ||
309 | /// <summary> | 318 | /// <summary> |
@@ -399,7 +408,7 @@ namespace OpenSim.Data.SQLite | |||
399 | } | 408 | } |
400 | 409 | ||
401 | /// <summary> | 410 | /// <summary> |
402 | /// See IInventoryData | 411 | /// See IInventoryDataPlugin |
403 | /// </summary> | 412 | /// </summary> |
404 | /// <param name="parentID"></param> | 413 | /// <param name="parentID"></param> |
405 | /// <returns></returns> | 414 | /// <returns></returns> |
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index c7673bd..2d3687c 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -65,6 +65,12 @@ namespace OpenSim.Data.SQLite | |||
65 | private SqliteDataAdapter daf; | 65 | private SqliteDataAdapter daf; |
66 | SqliteConnection g_conn; | 66 | SqliteConnection g_conn; |
67 | 67 | ||
68 | public override void Initialise() | ||
69 | { | ||
70 | m_log.Info("[SQLiteUserData]: " + Name + " cannot be default-initialized!"); | ||
71 | throw new PluginNotInitialisedException (Name); | ||
72 | } | ||
73 | |||
68 | /// <summary> | 74 | /// <summary> |
69 | /// <list type="bullet"> | 75 | /// <list type="bullet"> |
70 | /// <item>Initialises User Interface</item> | 76 | /// <item>Initialises User Interface</item> |
@@ -124,6 +130,8 @@ namespace OpenSim.Data.SQLite | |||
124 | return; | 130 | return; |
125 | } | 131 | } |
126 | 132 | ||
133 | public override void Dispose () {} | ||
134 | |||
127 | /// <summary> | 135 | /// <summary> |
128 | /// see IUserData, | 136 | /// see IUserData, |
129 | /// Get user data profile by UUID | 137 | /// Get user data profile by UUID |
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs index eb21aee..e4e39d6 100644 --- a/OpenSim/Data/UserDataBase.cs +++ b/OpenSim/Data/UserDataBase.cs | |||
@@ -55,9 +55,6 @@ namespace OpenSim.Data | |||
55 | public abstract List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); | 55 | public abstract List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); |
56 | public abstract bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); | 56 | public abstract bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); |
57 | public abstract bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); | 57 | public abstract bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); |
58 | public abstract string Version {get;} | ||
59 | public abstract string Name {get;} | ||
60 | public abstract void Initialise(string connect); | ||
61 | public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); | 58 | public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); |
62 | public abstract AvatarAppearance GetUserAppearance(LLUUID user); | 59 | public abstract AvatarAppearance GetUserAppearance(LLUUID user); |
63 | public abstract void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); | 60 | public abstract void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); |
@@ -78,5 +75,11 @@ namespace OpenSim.Data | |||
78 | public abstract void AddAttachment(LLUUID user, LLUUID item); | 75 | public abstract void AddAttachment(LLUUID user, LLUUID item); |
79 | public abstract void RemoveAttachment(LLUUID user, LLUUID item); | 76 | public abstract void RemoveAttachment(LLUUID user, LLUUID item); |
80 | public abstract List<LLUUID> GetAttachments(LLUUID user); | 77 | public abstract List<LLUUID> GetAttachments(LLUUID user); |
78 | |||
79 | public abstract string Version {get;} | ||
80 | public abstract string Name {get;} | ||
81 | public abstract void Initialise(string connect); | ||
82 | public abstract void Initialise(); | ||
83 | public abstract void Dispose(); | ||
81 | } | 84 | } |
82 | } | 85 | } |