1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/storage/public/mozIStorageConnection.idl
3 : */
4 :
5 : #ifndef __gen_mozIStorageConnection_h__
6 : #define __gen_mozIStorageConnection_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class mozIStorageAggregateFunction; /* forward declaration */
18 :
19 : class mozIStorageCompletionCallback; /* forward declaration */
20 :
21 : class mozIStorageFunction; /* forward declaration */
22 :
23 : class mozIStorageProgressHandler; /* forward declaration */
24 :
25 : class mozIStorageBaseStatement; /* forward declaration */
26 :
27 : class mozIStorageStatement; /* forward declaration */
28 :
29 : class mozIStorageAsyncStatement; /* forward declaration */
30 :
31 : class mozIStorageStatementCallback; /* forward declaration */
32 :
33 : class mozIStoragePendingStatement; /* forward declaration */
34 :
35 : class nsIFile; /* forward declaration */
36 :
37 :
38 : /* starting interface: mozIStorageConnection */
39 : #define MOZISTORAGECONNECTION_IID_STR "b2a4b534-f92e-4387-9bd9-d10408173925"
40 :
41 : #define MOZISTORAGECONNECTION_IID \
42 : {0xb2a4b534, 0xf92e, 0x4387, \
43 : { 0x9b, 0xd9, 0xd1, 0x04, 0x08, 0x17, 0x39, 0x25 }}
44 :
45 3281 : class NS_NO_VTABLE NS_SCRIPTABLE mozIStorageConnection : public nsISupports {
46 : public:
47 :
48 : NS_DECLARE_STATIC_IID_ACCESSOR(MOZISTORAGECONNECTION_IID)
49 :
50 : enum {
51 : DEFAULT_PAGE_SIZE = 32768
52 : };
53 :
54 : /* void close (); */
55 : NS_SCRIPTABLE NS_IMETHOD Close(void) = 0;
56 :
57 : /* void asyncClose ([optional] in mozIStorageCompletionCallback aCallback); */
58 : NS_SCRIPTABLE NS_IMETHOD AsyncClose(mozIStorageCompletionCallback *aCallback) = 0;
59 :
60 : /* mozIStorageConnection clone ([optional] in boolean aReadOnly); */
61 : NS_SCRIPTABLE NS_IMETHOD Clone(bool aReadOnly, mozIStorageConnection * *_retval NS_OUTPARAM) = 0;
62 :
63 : /* readonly attribute boolean connectionReady; */
64 : NS_SCRIPTABLE NS_IMETHOD GetConnectionReady(bool *aConnectionReady) = 0;
65 :
66 : /* readonly attribute nsIFile databaseFile; */
67 : NS_SCRIPTABLE NS_IMETHOD GetDatabaseFile(nsIFile * *aDatabaseFile) = 0;
68 :
69 : /* readonly attribute long long lastInsertRowID; */
70 : NS_SCRIPTABLE NS_IMETHOD GetLastInsertRowID(PRInt64 *aLastInsertRowID) = 0;
71 :
72 : /* readonly attribute long affectedRows; */
73 : NS_SCRIPTABLE NS_IMETHOD GetAffectedRows(PRInt32 *aAffectedRows) = 0;
74 :
75 : /* readonly attribute long lastError; */
76 : NS_SCRIPTABLE NS_IMETHOD GetLastError(PRInt32 *aLastError) = 0;
77 :
78 : /* readonly attribute AUTF8String lastErrorString; */
79 : NS_SCRIPTABLE NS_IMETHOD GetLastErrorString(nsACString & aLastErrorString) = 0;
80 :
81 : /* attribute long schemaVersion; */
82 : NS_SCRIPTABLE NS_IMETHOD GetSchemaVersion(PRInt32 *aSchemaVersion) = 0;
83 : NS_SCRIPTABLE NS_IMETHOD SetSchemaVersion(PRInt32 aSchemaVersion) = 0;
84 :
85 : /* mozIStorageStatement createStatement (in AUTF8String aSQLStatement); */
86 : NS_SCRIPTABLE NS_IMETHOD CreateStatement(const nsACString & aSQLStatement, mozIStorageStatement * *_retval NS_OUTPARAM) = 0;
87 :
88 : /* mozIStorageAsyncStatement createAsyncStatement (in AUTF8String aSQLStatement); */
89 : NS_SCRIPTABLE NS_IMETHOD CreateAsyncStatement(const nsACString & aSQLStatement, mozIStorageAsyncStatement * *_retval NS_OUTPARAM) = 0;
90 :
91 : /* void executeSimpleSQL (in AUTF8String aSQLStatement); */
92 : NS_SCRIPTABLE NS_IMETHOD ExecuteSimpleSQL(const nsACString & aSQLStatement) = 0;
93 :
94 : /* mozIStoragePendingStatement executeAsync ([array, size_is (aNumStatements)] in mozIStorageBaseStatement aStatements, in unsigned long aNumStatements, [optional] in mozIStorageStatementCallback aCallback); */
95 : NS_SCRIPTABLE NS_IMETHOD ExecuteAsync(mozIStorageBaseStatement **aStatements, PRUint32 aNumStatements, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement * *_retval NS_OUTPARAM) = 0;
96 :
97 : /* boolean tableExists (in AUTF8String aTableName); */
98 : NS_SCRIPTABLE NS_IMETHOD TableExists(const nsACString & aTableName, bool *_retval NS_OUTPARAM) = 0;
99 :
100 : /* boolean indexExists (in AUTF8String aIndexName); */
101 : NS_SCRIPTABLE NS_IMETHOD IndexExists(const nsACString & aIndexName, bool *_retval NS_OUTPARAM) = 0;
102 :
103 : /* readonly attribute boolean transactionInProgress; */
104 : NS_SCRIPTABLE NS_IMETHOD GetTransactionInProgress(bool *aTransactionInProgress) = 0;
105 :
106 : /* void beginTransaction (); */
107 : NS_SCRIPTABLE NS_IMETHOD BeginTransaction(void) = 0;
108 :
109 : enum {
110 : TRANSACTION_DEFERRED = 0,
111 : TRANSACTION_IMMEDIATE = 1,
112 : TRANSACTION_EXCLUSIVE = 2
113 : };
114 :
115 : /* void beginTransactionAs (in PRInt32 transactionType); */
116 : NS_SCRIPTABLE NS_IMETHOD BeginTransactionAs(PRInt32 transactionType) = 0;
117 :
118 : /* void commitTransaction (); */
119 : NS_SCRIPTABLE NS_IMETHOD CommitTransaction(void) = 0;
120 :
121 : /* void rollbackTransaction (); */
122 : NS_SCRIPTABLE NS_IMETHOD RollbackTransaction(void) = 0;
123 :
124 : /* void createTable (in string aTableName, in string aTableSchema); */
125 : NS_SCRIPTABLE NS_IMETHOD CreateTable(const char * aTableName, const char * aTableSchema) = 0;
126 :
127 : /* void createFunction (in AUTF8String aFunctionName, in long aNumArguments, in mozIStorageFunction aFunction); */
128 : NS_SCRIPTABLE NS_IMETHOD CreateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageFunction *aFunction) = 0;
129 :
130 : /* void createAggregateFunction (in AUTF8String aFunctionName, in long aNumArguments, in mozIStorageAggregateFunction aFunction); */
131 : NS_SCRIPTABLE NS_IMETHOD CreateAggregateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageAggregateFunction *aFunction) = 0;
132 :
133 : /* void removeFunction (in AUTF8String aFunctionName); */
134 : NS_SCRIPTABLE NS_IMETHOD RemoveFunction(const nsACString & aFunctionName) = 0;
135 :
136 : /* mozIStorageProgressHandler setProgressHandler (in PRInt32 aGranularity, in mozIStorageProgressHandler aHandler); */
137 : NS_SCRIPTABLE NS_IMETHOD SetProgressHandler(PRInt32 aGranularity, mozIStorageProgressHandler *aHandler, mozIStorageProgressHandler * *_retval NS_OUTPARAM) = 0;
138 :
139 : /* mozIStorageProgressHandler removeProgressHandler (); */
140 : NS_SCRIPTABLE NS_IMETHOD RemoveProgressHandler(mozIStorageProgressHandler * *_retval NS_OUTPARAM) = 0;
141 :
142 : /* void setGrowthIncrement (in PRInt32 aIncrement, in AUTF8String aDatabaseName); */
143 : NS_SCRIPTABLE NS_IMETHOD SetGrowthIncrement(PRInt32 aIncrement, const nsACString & aDatabaseName) = 0;
144 :
145 : /* [noscript] void enableModule (in ACString aModuleName); */
146 : NS_IMETHOD EnableModule(const nsACString & aModuleName) = 0;
147 :
148 : };
149 :
150 : NS_DEFINE_STATIC_IID_ACCESSOR(mozIStorageConnection, MOZISTORAGECONNECTION_IID)
151 :
152 : /* Use this macro when declaring classes that implement this interface. */
153 : #define NS_DECL_MOZISTORAGECONNECTION \
154 : NS_SCRIPTABLE NS_IMETHOD Close(void); \
155 : NS_SCRIPTABLE NS_IMETHOD AsyncClose(mozIStorageCompletionCallback *aCallback); \
156 : NS_SCRIPTABLE NS_IMETHOD Clone(bool aReadOnly, mozIStorageConnection * *_retval NS_OUTPARAM); \
157 : NS_SCRIPTABLE NS_IMETHOD GetConnectionReady(bool *aConnectionReady); \
158 : NS_SCRIPTABLE NS_IMETHOD GetDatabaseFile(nsIFile * *aDatabaseFile); \
159 : NS_SCRIPTABLE NS_IMETHOD GetLastInsertRowID(PRInt64 *aLastInsertRowID); \
160 : NS_SCRIPTABLE NS_IMETHOD GetAffectedRows(PRInt32 *aAffectedRows); \
161 : NS_SCRIPTABLE NS_IMETHOD GetLastError(PRInt32 *aLastError); \
162 : NS_SCRIPTABLE NS_IMETHOD GetLastErrorString(nsACString & aLastErrorString); \
163 : NS_SCRIPTABLE NS_IMETHOD GetSchemaVersion(PRInt32 *aSchemaVersion); \
164 : NS_SCRIPTABLE NS_IMETHOD SetSchemaVersion(PRInt32 aSchemaVersion); \
165 : NS_SCRIPTABLE NS_IMETHOD CreateStatement(const nsACString & aSQLStatement, mozIStorageStatement * *_retval NS_OUTPARAM); \
166 : NS_SCRIPTABLE NS_IMETHOD CreateAsyncStatement(const nsACString & aSQLStatement, mozIStorageAsyncStatement * *_retval NS_OUTPARAM); \
167 : NS_SCRIPTABLE NS_IMETHOD ExecuteSimpleSQL(const nsACString & aSQLStatement); \
168 : NS_SCRIPTABLE NS_IMETHOD ExecuteAsync(mozIStorageBaseStatement **aStatements, PRUint32 aNumStatements, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement * *_retval NS_OUTPARAM); \
169 : NS_SCRIPTABLE NS_IMETHOD TableExists(const nsACString & aTableName, bool *_retval NS_OUTPARAM); \
170 : NS_SCRIPTABLE NS_IMETHOD IndexExists(const nsACString & aIndexName, bool *_retval NS_OUTPARAM); \
171 : NS_SCRIPTABLE NS_IMETHOD GetTransactionInProgress(bool *aTransactionInProgress); \
172 : NS_SCRIPTABLE NS_IMETHOD BeginTransaction(void); \
173 : NS_SCRIPTABLE NS_IMETHOD BeginTransactionAs(PRInt32 transactionType); \
174 : NS_SCRIPTABLE NS_IMETHOD CommitTransaction(void); \
175 : NS_SCRIPTABLE NS_IMETHOD RollbackTransaction(void); \
176 : NS_SCRIPTABLE NS_IMETHOD CreateTable(const char * aTableName, const char * aTableSchema); \
177 : NS_SCRIPTABLE NS_IMETHOD CreateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageFunction *aFunction); \
178 : NS_SCRIPTABLE NS_IMETHOD CreateAggregateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageAggregateFunction *aFunction); \
179 : NS_SCRIPTABLE NS_IMETHOD RemoveFunction(const nsACString & aFunctionName); \
180 : NS_SCRIPTABLE NS_IMETHOD SetProgressHandler(PRInt32 aGranularity, mozIStorageProgressHandler *aHandler, mozIStorageProgressHandler * *_retval NS_OUTPARAM); \
181 : NS_SCRIPTABLE NS_IMETHOD RemoveProgressHandler(mozIStorageProgressHandler * *_retval NS_OUTPARAM); \
182 : NS_SCRIPTABLE NS_IMETHOD SetGrowthIncrement(PRInt32 aIncrement, const nsACString & aDatabaseName); \
183 : NS_IMETHOD EnableModule(const nsACString & aModuleName);
184 :
185 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
186 : #define NS_FORWARD_MOZISTORAGECONNECTION(_to) \
187 : NS_SCRIPTABLE NS_IMETHOD Close(void) { return _to Close(); } \
188 : NS_SCRIPTABLE NS_IMETHOD AsyncClose(mozIStorageCompletionCallback *aCallback) { return _to AsyncClose(aCallback); } \
189 : NS_SCRIPTABLE NS_IMETHOD Clone(bool aReadOnly, mozIStorageConnection * *_retval NS_OUTPARAM) { return _to Clone(aReadOnly, _retval); } \
190 : NS_SCRIPTABLE NS_IMETHOD GetConnectionReady(bool *aConnectionReady) { return _to GetConnectionReady(aConnectionReady); } \
191 : NS_SCRIPTABLE NS_IMETHOD GetDatabaseFile(nsIFile * *aDatabaseFile) { return _to GetDatabaseFile(aDatabaseFile); } \
192 : NS_SCRIPTABLE NS_IMETHOD GetLastInsertRowID(PRInt64 *aLastInsertRowID) { return _to GetLastInsertRowID(aLastInsertRowID); } \
193 : NS_SCRIPTABLE NS_IMETHOD GetAffectedRows(PRInt32 *aAffectedRows) { return _to GetAffectedRows(aAffectedRows); } \
194 : NS_SCRIPTABLE NS_IMETHOD GetLastError(PRInt32 *aLastError) { return _to GetLastError(aLastError); } \
195 : NS_SCRIPTABLE NS_IMETHOD GetLastErrorString(nsACString & aLastErrorString) { return _to GetLastErrorString(aLastErrorString); } \
196 : NS_SCRIPTABLE NS_IMETHOD GetSchemaVersion(PRInt32 *aSchemaVersion) { return _to GetSchemaVersion(aSchemaVersion); } \
197 : NS_SCRIPTABLE NS_IMETHOD SetSchemaVersion(PRInt32 aSchemaVersion) { return _to SetSchemaVersion(aSchemaVersion); } \
198 : NS_SCRIPTABLE NS_IMETHOD CreateStatement(const nsACString & aSQLStatement, mozIStorageStatement * *_retval NS_OUTPARAM) { return _to CreateStatement(aSQLStatement, _retval); } \
199 : NS_SCRIPTABLE NS_IMETHOD CreateAsyncStatement(const nsACString & aSQLStatement, mozIStorageAsyncStatement * *_retval NS_OUTPARAM) { return _to CreateAsyncStatement(aSQLStatement, _retval); } \
200 : NS_SCRIPTABLE NS_IMETHOD ExecuteSimpleSQL(const nsACString & aSQLStatement) { return _to ExecuteSimpleSQL(aSQLStatement); } \
201 : NS_SCRIPTABLE NS_IMETHOD ExecuteAsync(mozIStorageBaseStatement **aStatements, PRUint32 aNumStatements, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement * *_retval NS_OUTPARAM) { return _to ExecuteAsync(aStatements, aNumStatements, aCallback, _retval); } \
202 : NS_SCRIPTABLE NS_IMETHOD TableExists(const nsACString & aTableName, bool *_retval NS_OUTPARAM) { return _to TableExists(aTableName, _retval); } \
203 : NS_SCRIPTABLE NS_IMETHOD IndexExists(const nsACString & aIndexName, bool *_retval NS_OUTPARAM) { return _to IndexExists(aIndexName, _retval); } \
204 : NS_SCRIPTABLE NS_IMETHOD GetTransactionInProgress(bool *aTransactionInProgress) { return _to GetTransactionInProgress(aTransactionInProgress); } \
205 : NS_SCRIPTABLE NS_IMETHOD BeginTransaction(void) { return _to BeginTransaction(); } \
206 : NS_SCRIPTABLE NS_IMETHOD BeginTransactionAs(PRInt32 transactionType) { return _to BeginTransactionAs(transactionType); } \
207 : NS_SCRIPTABLE NS_IMETHOD CommitTransaction(void) { return _to CommitTransaction(); } \
208 : NS_SCRIPTABLE NS_IMETHOD RollbackTransaction(void) { return _to RollbackTransaction(); } \
209 : NS_SCRIPTABLE NS_IMETHOD CreateTable(const char * aTableName, const char * aTableSchema) { return _to CreateTable(aTableName, aTableSchema); } \
210 : NS_SCRIPTABLE NS_IMETHOD CreateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageFunction *aFunction) { return _to CreateFunction(aFunctionName, aNumArguments, aFunction); } \
211 : NS_SCRIPTABLE NS_IMETHOD CreateAggregateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageAggregateFunction *aFunction) { return _to CreateAggregateFunction(aFunctionName, aNumArguments, aFunction); } \
212 : NS_SCRIPTABLE NS_IMETHOD RemoveFunction(const nsACString & aFunctionName) { return _to RemoveFunction(aFunctionName); } \
213 : NS_SCRIPTABLE NS_IMETHOD SetProgressHandler(PRInt32 aGranularity, mozIStorageProgressHandler *aHandler, mozIStorageProgressHandler * *_retval NS_OUTPARAM) { return _to SetProgressHandler(aGranularity, aHandler, _retval); } \
214 : NS_SCRIPTABLE NS_IMETHOD RemoveProgressHandler(mozIStorageProgressHandler * *_retval NS_OUTPARAM) { return _to RemoveProgressHandler(_retval); } \
215 : NS_SCRIPTABLE NS_IMETHOD SetGrowthIncrement(PRInt32 aIncrement, const nsACString & aDatabaseName) { return _to SetGrowthIncrement(aIncrement, aDatabaseName); } \
216 : NS_IMETHOD EnableModule(const nsACString & aModuleName) { return _to EnableModule(aModuleName); }
217 :
218 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
219 : #define NS_FORWARD_SAFE_MOZISTORAGECONNECTION(_to) \
220 : NS_SCRIPTABLE NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
221 : NS_SCRIPTABLE NS_IMETHOD AsyncClose(mozIStorageCompletionCallback *aCallback) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncClose(aCallback); } \
222 : NS_SCRIPTABLE NS_IMETHOD Clone(bool aReadOnly, mozIStorageConnection * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clone(aReadOnly, _retval); } \
223 : NS_SCRIPTABLE NS_IMETHOD GetConnectionReady(bool *aConnectionReady) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetConnectionReady(aConnectionReady); } \
224 : NS_SCRIPTABLE NS_IMETHOD GetDatabaseFile(nsIFile * *aDatabaseFile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDatabaseFile(aDatabaseFile); } \
225 : NS_SCRIPTABLE NS_IMETHOD GetLastInsertRowID(PRInt64 *aLastInsertRowID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastInsertRowID(aLastInsertRowID); } \
226 : NS_SCRIPTABLE NS_IMETHOD GetAffectedRows(PRInt32 *aAffectedRows) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAffectedRows(aAffectedRows); } \
227 : NS_SCRIPTABLE NS_IMETHOD GetLastError(PRInt32 *aLastError) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastError(aLastError); } \
228 : NS_SCRIPTABLE NS_IMETHOD GetLastErrorString(nsACString & aLastErrorString) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastErrorString(aLastErrorString); } \
229 : NS_SCRIPTABLE NS_IMETHOD GetSchemaVersion(PRInt32 *aSchemaVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSchemaVersion(aSchemaVersion); } \
230 : NS_SCRIPTABLE NS_IMETHOD SetSchemaVersion(PRInt32 aSchemaVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSchemaVersion(aSchemaVersion); } \
231 : NS_SCRIPTABLE NS_IMETHOD CreateStatement(const nsACString & aSQLStatement, mozIStorageStatement * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateStatement(aSQLStatement, _retval); } \
232 : NS_SCRIPTABLE NS_IMETHOD CreateAsyncStatement(const nsACString & aSQLStatement, mozIStorageAsyncStatement * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAsyncStatement(aSQLStatement, _retval); } \
233 : NS_SCRIPTABLE NS_IMETHOD ExecuteSimpleSQL(const nsACString & aSQLStatement) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExecuteSimpleSQL(aSQLStatement); } \
234 : NS_SCRIPTABLE NS_IMETHOD ExecuteAsync(mozIStorageBaseStatement **aStatements, PRUint32 aNumStatements, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExecuteAsync(aStatements, aNumStatements, aCallback, _retval); } \
235 : NS_SCRIPTABLE NS_IMETHOD TableExists(const nsACString & aTableName, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->TableExists(aTableName, _retval); } \
236 : NS_SCRIPTABLE NS_IMETHOD IndexExists(const nsACString & aIndexName, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IndexExists(aIndexName, _retval); } \
237 : NS_SCRIPTABLE NS_IMETHOD GetTransactionInProgress(bool *aTransactionInProgress) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransactionInProgress(aTransactionInProgress); } \
238 : NS_SCRIPTABLE NS_IMETHOD BeginTransaction(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginTransaction(); } \
239 : NS_SCRIPTABLE NS_IMETHOD BeginTransactionAs(PRInt32 transactionType) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginTransactionAs(transactionType); } \
240 : NS_SCRIPTABLE NS_IMETHOD CommitTransaction(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CommitTransaction(); } \
241 : NS_SCRIPTABLE NS_IMETHOD RollbackTransaction(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RollbackTransaction(); } \
242 : NS_SCRIPTABLE NS_IMETHOD CreateTable(const char * aTableName, const char * aTableSchema) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateTable(aTableName, aTableSchema); } \
243 : NS_SCRIPTABLE NS_IMETHOD CreateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageFunction *aFunction) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateFunction(aFunctionName, aNumArguments, aFunction); } \
244 : NS_SCRIPTABLE NS_IMETHOD CreateAggregateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageAggregateFunction *aFunction) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateAggregateFunction(aFunctionName, aNumArguments, aFunction); } \
245 : NS_SCRIPTABLE NS_IMETHOD RemoveFunction(const nsACString & aFunctionName) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveFunction(aFunctionName); } \
246 : NS_SCRIPTABLE NS_IMETHOD SetProgressHandler(PRInt32 aGranularity, mozIStorageProgressHandler *aHandler, mozIStorageProgressHandler * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProgressHandler(aGranularity, aHandler, _retval); } \
247 : NS_SCRIPTABLE NS_IMETHOD RemoveProgressHandler(mozIStorageProgressHandler * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveProgressHandler(_retval); } \
248 : NS_SCRIPTABLE NS_IMETHOD SetGrowthIncrement(PRInt32 aIncrement, const nsACString & aDatabaseName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetGrowthIncrement(aIncrement, aDatabaseName); } \
249 : NS_IMETHOD EnableModule(const nsACString & aModuleName) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableModule(aModuleName); }
250 :
251 : #if 0
252 : /* Use the code below as a template for the implementation class for this interface. */
253 :
254 : /* Header file */
255 : class _MYCLASS_ : public mozIStorageConnection
256 : {
257 : public:
258 : NS_DECL_ISUPPORTS
259 : NS_DECL_MOZISTORAGECONNECTION
260 :
261 : _MYCLASS_();
262 :
263 : private:
264 : ~_MYCLASS_();
265 :
266 : protected:
267 : /* additional members */
268 : };
269 :
270 : /* Implementation file */
271 : NS_IMPL_ISUPPORTS1(_MYCLASS_, mozIStorageConnection)
272 :
273 : _MYCLASS_::_MYCLASS_()
274 : {
275 : /* member initializers and constructor code */
276 : }
277 :
278 : _MYCLASS_::~_MYCLASS_()
279 : {
280 : /* destructor code */
281 : }
282 :
283 : /* void close (); */
284 : NS_IMETHODIMP _MYCLASS_::Close()
285 : {
286 : return NS_ERROR_NOT_IMPLEMENTED;
287 : }
288 :
289 : /* void asyncClose ([optional] in mozIStorageCompletionCallback aCallback); */
290 : NS_IMETHODIMP _MYCLASS_::AsyncClose(mozIStorageCompletionCallback *aCallback)
291 : {
292 : return NS_ERROR_NOT_IMPLEMENTED;
293 : }
294 :
295 : /* mozIStorageConnection clone ([optional] in boolean aReadOnly); */
296 : NS_IMETHODIMP _MYCLASS_::Clone(bool aReadOnly, mozIStorageConnection * *_retval NS_OUTPARAM)
297 : {
298 : return NS_ERROR_NOT_IMPLEMENTED;
299 : }
300 :
301 : /* readonly attribute boolean connectionReady; */
302 : NS_IMETHODIMP _MYCLASS_::GetConnectionReady(bool *aConnectionReady)
303 : {
304 : return NS_ERROR_NOT_IMPLEMENTED;
305 : }
306 :
307 : /* readonly attribute nsIFile databaseFile; */
308 : NS_IMETHODIMP _MYCLASS_::GetDatabaseFile(nsIFile * *aDatabaseFile)
309 : {
310 : return NS_ERROR_NOT_IMPLEMENTED;
311 : }
312 :
313 : /* readonly attribute long long lastInsertRowID; */
314 : NS_IMETHODIMP _MYCLASS_::GetLastInsertRowID(PRInt64 *aLastInsertRowID)
315 : {
316 : return NS_ERROR_NOT_IMPLEMENTED;
317 : }
318 :
319 : /* readonly attribute long affectedRows; */
320 : NS_IMETHODIMP _MYCLASS_::GetAffectedRows(PRInt32 *aAffectedRows)
321 : {
322 : return NS_ERROR_NOT_IMPLEMENTED;
323 : }
324 :
325 : /* readonly attribute long lastError; */
326 : NS_IMETHODIMP _MYCLASS_::GetLastError(PRInt32 *aLastError)
327 : {
328 : return NS_ERROR_NOT_IMPLEMENTED;
329 : }
330 :
331 : /* readonly attribute AUTF8String lastErrorString; */
332 : NS_IMETHODIMP _MYCLASS_::GetLastErrorString(nsACString & aLastErrorString)
333 : {
334 : return NS_ERROR_NOT_IMPLEMENTED;
335 : }
336 :
337 : /* attribute long schemaVersion; */
338 : NS_IMETHODIMP _MYCLASS_::GetSchemaVersion(PRInt32 *aSchemaVersion)
339 : {
340 : return NS_ERROR_NOT_IMPLEMENTED;
341 : }
342 : NS_IMETHODIMP _MYCLASS_::SetSchemaVersion(PRInt32 aSchemaVersion)
343 : {
344 : return NS_ERROR_NOT_IMPLEMENTED;
345 : }
346 :
347 : /* mozIStorageStatement createStatement (in AUTF8String aSQLStatement); */
348 : NS_IMETHODIMP _MYCLASS_::CreateStatement(const nsACString & aSQLStatement, mozIStorageStatement * *_retval NS_OUTPARAM)
349 : {
350 : return NS_ERROR_NOT_IMPLEMENTED;
351 : }
352 :
353 : /* mozIStorageAsyncStatement createAsyncStatement (in AUTF8String aSQLStatement); */
354 : NS_IMETHODIMP _MYCLASS_::CreateAsyncStatement(const nsACString & aSQLStatement, mozIStorageAsyncStatement * *_retval NS_OUTPARAM)
355 : {
356 : return NS_ERROR_NOT_IMPLEMENTED;
357 : }
358 :
359 : /* void executeSimpleSQL (in AUTF8String aSQLStatement); */
360 : NS_IMETHODIMP _MYCLASS_::ExecuteSimpleSQL(const nsACString & aSQLStatement)
361 : {
362 : return NS_ERROR_NOT_IMPLEMENTED;
363 : }
364 :
365 : /* mozIStoragePendingStatement executeAsync ([array, size_is (aNumStatements)] in mozIStorageBaseStatement aStatements, in unsigned long aNumStatements, [optional] in mozIStorageStatementCallback aCallback); */
366 : NS_IMETHODIMP _MYCLASS_::ExecuteAsync(mozIStorageBaseStatement **aStatements, PRUint32 aNumStatements, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement * *_retval NS_OUTPARAM)
367 : {
368 : return NS_ERROR_NOT_IMPLEMENTED;
369 : }
370 :
371 : /* boolean tableExists (in AUTF8String aTableName); */
372 : NS_IMETHODIMP _MYCLASS_::TableExists(const nsACString & aTableName, bool *_retval NS_OUTPARAM)
373 : {
374 : return NS_ERROR_NOT_IMPLEMENTED;
375 : }
376 :
377 : /* boolean indexExists (in AUTF8String aIndexName); */
378 : NS_IMETHODIMP _MYCLASS_::IndexExists(const nsACString & aIndexName, bool *_retval NS_OUTPARAM)
379 : {
380 : return NS_ERROR_NOT_IMPLEMENTED;
381 : }
382 :
383 : /* readonly attribute boolean transactionInProgress; */
384 : NS_IMETHODIMP _MYCLASS_::GetTransactionInProgress(bool *aTransactionInProgress)
385 : {
386 : return NS_ERROR_NOT_IMPLEMENTED;
387 : }
388 :
389 : /* void beginTransaction (); */
390 : NS_IMETHODIMP _MYCLASS_::BeginTransaction()
391 : {
392 : return NS_ERROR_NOT_IMPLEMENTED;
393 : }
394 :
395 : /* void beginTransactionAs (in PRInt32 transactionType); */
396 : NS_IMETHODIMP _MYCLASS_::BeginTransactionAs(PRInt32 transactionType)
397 : {
398 : return NS_ERROR_NOT_IMPLEMENTED;
399 : }
400 :
401 : /* void commitTransaction (); */
402 : NS_IMETHODIMP _MYCLASS_::CommitTransaction()
403 : {
404 : return NS_ERROR_NOT_IMPLEMENTED;
405 : }
406 :
407 : /* void rollbackTransaction (); */
408 : NS_IMETHODIMP _MYCLASS_::RollbackTransaction()
409 : {
410 : return NS_ERROR_NOT_IMPLEMENTED;
411 : }
412 :
413 : /* void createTable (in string aTableName, in string aTableSchema); */
414 : NS_IMETHODIMP _MYCLASS_::CreateTable(const char * aTableName, const char * aTableSchema)
415 : {
416 : return NS_ERROR_NOT_IMPLEMENTED;
417 : }
418 :
419 : /* void createFunction (in AUTF8String aFunctionName, in long aNumArguments, in mozIStorageFunction aFunction); */
420 : NS_IMETHODIMP _MYCLASS_::CreateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageFunction *aFunction)
421 : {
422 : return NS_ERROR_NOT_IMPLEMENTED;
423 : }
424 :
425 : /* void createAggregateFunction (in AUTF8String aFunctionName, in long aNumArguments, in mozIStorageAggregateFunction aFunction); */
426 : NS_IMETHODIMP _MYCLASS_::CreateAggregateFunction(const nsACString & aFunctionName, PRInt32 aNumArguments, mozIStorageAggregateFunction *aFunction)
427 : {
428 : return NS_ERROR_NOT_IMPLEMENTED;
429 : }
430 :
431 : /* void removeFunction (in AUTF8String aFunctionName); */
432 : NS_IMETHODIMP _MYCLASS_::RemoveFunction(const nsACString & aFunctionName)
433 : {
434 : return NS_ERROR_NOT_IMPLEMENTED;
435 : }
436 :
437 : /* mozIStorageProgressHandler setProgressHandler (in PRInt32 aGranularity, in mozIStorageProgressHandler aHandler); */
438 : NS_IMETHODIMP _MYCLASS_::SetProgressHandler(PRInt32 aGranularity, mozIStorageProgressHandler *aHandler, mozIStorageProgressHandler * *_retval NS_OUTPARAM)
439 : {
440 : return NS_ERROR_NOT_IMPLEMENTED;
441 : }
442 :
443 : /* mozIStorageProgressHandler removeProgressHandler (); */
444 : NS_IMETHODIMP _MYCLASS_::RemoveProgressHandler(mozIStorageProgressHandler * *_retval NS_OUTPARAM)
445 : {
446 : return NS_ERROR_NOT_IMPLEMENTED;
447 : }
448 :
449 : /* void setGrowthIncrement (in PRInt32 aIncrement, in AUTF8String aDatabaseName); */
450 : NS_IMETHODIMP _MYCLASS_::SetGrowthIncrement(PRInt32 aIncrement, const nsACString & aDatabaseName)
451 : {
452 : return NS_ERROR_NOT_IMPLEMENTED;
453 : }
454 :
455 : /* [noscript] void enableModule (in ACString aModuleName); */
456 : NS_IMETHODIMP _MYCLASS_::EnableModule(const nsACString & aModuleName)
457 : {
458 : return NS_ERROR_NOT_IMPLEMENTED;
459 : }
460 :
461 : /* End of implementation class template. */
462 : #endif
463 :
464 :
465 : #endif /* __gen_mozIStorageConnection_h__ */
|