C:/projects/songbird/components/medialibrary/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© 2006 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 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 };

Generated on Mon Aug 21 21:01:55 2006 for Songbird by  doxygen 1.4.7