home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bcddb.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  2.3 KB  |  104 lines

  1. /* 
  2.  *
  3.  * $Id: k3bcddb.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16.  
  17. #ifndef K3BCDDB_H
  18. #define K3BCDDB_H
  19.  
  20. #include <qstring.h>
  21. #include <qstringlist.h>
  22. #include <qobject.h>
  23.  
  24. #include <k3btoc.h>
  25.  
  26. #include "k3bcddbresult.h"
  27. #include "k3b_export.h"
  28.  
  29. class KConfig;
  30. class K3bCddbQuery;
  31. class K3bCddbHttpQuery;
  32. class K3bCddbpQuery;
  33. class K3bCddbLocalQuery;
  34. class K3bCddbSubmit;
  35. class K3bCddbLocalSubmit;
  36.  
  37.  
  38. class LIBK3B_EXPORT K3bCddb : public QObject 
  39. {
  40.   Q_OBJECT
  41.  
  42.  public:
  43.   K3bCddb( QObject* parent = 0, const char* name = 0 );
  44.   ~K3bCddb();
  45.  
  46.   QString errorString() const;
  47.  
  48.   /**
  49.    * Do NOT call this before queryResult has
  50.    * been emitted
  51.    */
  52.   const K3bCddbResultEntry& result() const;
  53.  
  54.  public slots:  
  55.   /** query a cd and connect to the queryFinished signal */
  56.   void query( const K3bDevice::Toc& );
  57.   void readConfig( KConfig* c );
  58.   void saveEntry( const K3bCddbResultEntry& );
  59.  
  60.  signals:
  61.   void queryFinished( int error );
  62.   void submitFinished( bool success );
  63.   void infoMessage( const QString& );
  64.  
  65.  private slots:
  66.   void localQuery();
  67.   void remoteQuery();
  68.   void slotQueryFinished( K3bCddbQuery* );
  69.   void slotSubmitFinished( K3bCddbSubmit* );
  70.   void slotMultibleMatches( K3bCddbQuery* );
  71.   void slotNoEntry();
  72.  
  73.  private:
  74.   K3bCddbQuery* getQuery( const QString& );
  75.  
  76.   K3bCddbHttpQuery* m_httpQuery;
  77.   K3bCddbpQuery* m_cddbpQuery;
  78.   K3bCddbLocalQuery* m_localQuery;
  79.   K3bCddbLocalSubmit* m_localSubmit;
  80.  
  81.   K3bDevice::Toc m_toc;
  82.   unsigned int m_iCurrentQueriedServer;
  83.   unsigned int m_iCurrentQueriedLocalDir;
  84.  
  85.   const K3bCddbQuery* m_lastUsedQuery;
  86.   K3bCddbResultEntry m_lastResult;
  87.  
  88.   // config
  89.   QStringList m_cddbServer;
  90.   QString m_proxyServer;
  91.   int m_proxyPort;
  92.   QString m_cgiPath;
  93.   bool m_bUseProxyServer;
  94.   bool m_bUseKdeSettings;
  95.   QStringList m_localCddbDirs;
  96.   bool m_bSaveCddbEntriesLocally;
  97.   bool m_bUseManualCgiPath;
  98.   bool m_bRemoteCddbQuery;
  99.   bool m_bLocalCddbQuery;
  100. };
  101.   
  102.  
  103. #endif
  104.