00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00033 #include "nsISupports.idl"
00034
00035 interface sbIDatabaseResult;
00036
00055 [scriptable, uuid(918745AE-0F40-4d08-BA4E-27A739459952)]
00056 interface sbIDatabaseSimpleQueryCallback : nsISupports
00057 {
00068 void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery);
00069 };
00070
00071
00089 [scriptable, uuid(A901158A-3735-44fd-9AD2-1753F1407284)]
00090 interface sbIDatabaseQueryCallback : nsISupports
00091 {
00102 void onQueryError(in PRInt32 dbError, in AString dbGUID, in AString strQuery);
00103
00113 void onQueryStart(in AString dbGUID, in AString strQuery);
00114
00125 void onQueryRow(in sbIDatabaseResult dbResultObject, in PRInt32 dbRowResult, in PRInt32 dbRowTotal);
00126
00137 void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery);
00138 };
00139
00172 [scriptable, uuid(192FE564-1D86-49c8-A31A-5798D62B2525)]
00173 interface sbIDatabaseQuery : nsISupports
00174 {
00182 void setAsyncQuery(in PRBool bAsyncQuery);
00183
00190 PRBool isAyncQuery();
00191
00203 void setPersistentQuery(in PRBool bPersistentQuery);
00204
00211 PRBool isPersistentQuery();
00212
00218 void addSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB);
00219
00225 void removeSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB);
00226
00240 void setDatabaseGUID(in AString dbGUID);
00241
00247 AString getDatabaseGUID();
00248
00258 void addQuery(in AString strQuery);
00259
00265 PRInt32 getQueryCount();
00266
00272 AString getQuery(in PRInt32 nIndex);
00273
00283 void resetQuery();
00284
00292 sbIDatabaseResult getResultObject();
00293
00297 [noscript] sbIDatabaseResult getResultObjectOrphan();
00298
00306 PRInt32 getLastError();
00307
00315 void setLastError(in PRInt32 dbError);
00316
00322 PRInt32 execute();
00323
00331 PRInt32 waitForCompletion();
00332
00338 void addCallback(in sbIDatabaseQueryCallback dbCallback);
00339
00345 void removeCallback(in sbIDatabaseQueryCallback dbCallback);
00346
00352 PRBool isExecuting();
00353
00359 PRInt32 currentQuery();
00360
00368 PRBool abort();
00369 };