Remove some deprecated libraries
[mono.git] / mcs / class / FirebirdSql.Data.Firebird / FirebirdSql.Data.Common / IDatabase.cs
1 /*
2  *  Firebird ADO.NET Data provider for .NET and Mono 
3  * 
4  *     The contents of this file are subject to the Initial 
5  *     Developer's Public License Version 1.0 (the "License"); 
6  *     you may not use this file except in compliance with the 
7  *     License. You may obtain a copy of the License at 
8  *     http://www.firebirdsql.org/index.php?op=doc&id=idpl
9  *
10  *     Software distributed under the License is distributed on 
11  *     an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
12  *     express or implied.  See the License for the specific 
13  *     language governing rights and limitations under the License.
14  * 
15  *  Copyright (c) 2002, 2005 Carlos Guzman Alvarez
16  *  All Rights Reserved.
17  */
18
19 using System;
20 using System.Data;
21 using System.Collections;
22 using System.Collections.Specialized;
23
24 namespace FirebirdSql.Data.Common
25 {
26         #region Delegates
27
28         internal delegate void WarningMessageCallback(IscException warning);
29
30         #endregion
31
32         internal interface IDatabase : IDisposable
33         {
34                 #region Callback
35
36                 WarningMessageCallback WarningMessage
37                 {
38                         get;
39                         set;
40                 }
41
42                 #endregion
43
44                 #region Properties
45
46                 int Handle
47                 {
48                         get;
49                 }
50
51                 int TransactionCount
52                 {
53                         get;
54                         set;
55                 }
56
57                 string ServerVersion
58                 {
59                         get;
60                 }
61
62                 Charset Charset
63                 {
64                         get;
65                         set;
66                 }
67
68                 short PacketSize
69                 {
70                         get;
71                         set;
72                 }
73
74                 short Dialect
75                 {
76                         get;
77                         set;
78                 }
79
80                 bool HasRemoteEventSupport
81                 {
82                         get;
83                 }
84
85                 #endregion
86
87                 #region Methods
88
89                 void Attach(DatabaseParameterBuffer dpb, string dataSource, int port, string database);
90                 void Detach();
91
92                 void CreateDatabase(DatabaseParameterBuffer dpb, string dataSource, int port, string database);
93                 void DropDatabase();
94
95                 ITransaction BeginTransaction(TransactionParameterBuffer tpb);
96
97                 StatementBase CreateStatement();
98                 StatementBase CreateStatement(ITransaction transaction);
99
100                 BlobParameterBuffer CreateBlobParameterBuffer();
101                 DatabaseParameterBuffer CreateDatabaseParameterBuffer();
102                 EventParameterBuffer CreateEventParameterBuffer();
103                 TransactionParameterBuffer CreateTransactionParameterBuffer();
104
105                 ArrayList GetDatabaseInfo(byte[] items);
106                 ArrayList GetDatabaseInfo(byte[] items, int bufferLength);
107
108                 void CloseEventManager();
109                 RemoteEvent CreateEvent();
110                 void QueueEvents(RemoteEvent events);
111                 void CancelEvents(RemoteEvent events);
112
113                 #endregion
114         }
115 }