Songbird / Development / Songbird Add-Ons API Documentation

components/dbengine/public/sbIDatabaseQuery.idl

Go to the documentation of this file.
00001 /*
00002  //
00003 // BEGIN SONGBIRD GPL
00004 // 
00005 // This file is part of the Songbird web player.
00006 //
00007 // Copyright(c) 2005-2008 POTI, Inc.
00008 // http://songbirdnest.com
00009 // 
00010 // This file may be licensed under the terms of of the
00011 // GNU General Public License Version 2 (the "GPL").
00012 // 
00013 // Software distributed under the License is distributed 
00014 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
00015 // express or implied. See the GPL for the specific language 
00016 // governing rights and limitations.
00017 //
00018 // You should have received a copy of the GPL along with this 
00019 // program. If not, go to http://www.gnu.org/licenses/gpl.html
00020 // or write to the Free Software Foundation, Inc., 
00021 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00022 // 
00023 // END SONGBIRD GPL
00024 //
00025  */
00026 
00033 #include "nsISupports.idl"
00034 
00035 interface nsIURI;
00036 interface sbIDatabaseResult;
00037 interface sbIDatabasePreparedStatement;
00038 
00053 [scriptable, uuid(918745AE-0F40-4d08-BA4E-27A739459952)]
00054 interface sbIDatabaseSimpleQueryCallback : nsISupports
00055 {
00066   void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery);
00067 };
00068 
00069 
00083 [scriptable, uuid(A901158A-3735-44fd-9AD2-1753F1407284)]
00084 interface sbIDatabaseQueryCallback : nsISupports
00085 {
00096   void onQueryError(in long dbError, in AString dbGUID, in AString strQuery);
00097 
00107   void onQueryStart(in AString dbGUID, in AString strQuery);
00108 
00119   void onQueryRow(in sbIDatabaseResult dbResultObject, in unsigned long dbRowResult, in unsigned long dbRowTotal);
00120 
00131   void onQueryEnd(in sbIDatabaseResult dbResultObject, in AString dbGUID, in AString strQuery); 
00132 };
00133 
00166 [scriptable, uuid(192FE564-1D86-49c8-A31A-5798D62B2525)]
00167 interface sbIDatabaseQuery : nsISupports
00168 {
00179   attribute nsIURI databaseLocation;
00180 
00188   void setAsyncQuery(in PRBool bAsyncQuery);
00189 
00196   PRBool isAyncQuery();
00197   
00203   void addSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB);
00204 
00210   void removeSimpleQueryCallback(in sbIDatabaseSimpleQueryCallback dbPersistCB);
00211 
00225   void setDatabaseGUID(in AString dbGUID);
00226 
00232   AString getDatabaseGUID();
00233 
00243   void addQuery(in AString strQuery);
00244 
00257   sbIDatabasePreparedStatement prepareQuery(in AString strQuery);
00258   
00266   void addPreparedStatement(in sbIDatabasePreparedStatement PreparedStatement);
00267 
00273   unsigned long getQueryCount();
00274 
00281   sbIDatabasePreparedStatement getQuery(in unsigned long nIndex);
00282 
00292   void resetQuery();
00293   
00301   sbIDatabaseResult getResultObject();
00302 
00310   long getLastError();
00311 
00319   void setLastError(in long dbError);
00320 
00326   long execute();
00327 
00335   long waitForCompletion();
00336 
00342   boolean isExecuting();
00343 
00349   unsigned long currentQuery();
00350 
00358   boolean abort();
00359 
00371   attribute unsigned long long rollingLimit;
00372 
00376   attribute unsigned long rollingLimitColumnIndex;
00377 
00382   attribute unsigned long rollingLimitResult;
00383 
00389   void bindUTF8StringParameter(in unsigned long aParamIndex,
00390                                in AUTF8String aValue);
00391 
00397   void bindStringParameter(in unsigned long aParamIndex,
00398                            in AString aValue);
00399 
00405   void bindDoubleParameter(in unsigned long aParamIndex,
00406                            in double aValue);
00407 
00413   void bindInt32Parameter(in unsigned long aParamIndex,
00414                           in long aValue);
00415 
00421   void bindInt64Parameter(in unsigned long aParamIndex,
00422                           in long long aValue);
00423 
00428   void bindNullParameter(in unsigned long aParamIndex);
00429 };

Generated on Tue Mar 10 14:28:54 2009 for Songbird by  doxygen 1.5.2