Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _TVDB_CLIENT_H_
00022 #define _TVDB_CLIENT_H_
00023
00024 #include <QtCore/QObject>
00025 #include <QtCore/QList>
00026
00027 #include "tvdb_export.h"
00028 #include "series.h"
00029
00030 namespace Tvdb {
00044 class TVDB_EXPORT Client : public QObject
00045 {
00046 Q_OBJECT
00047
00048 public:
00052 Client( QObject* parent = 0 );
00053
00057 ~Client();
00058
00059 enum TvdbFlag {
00060 NoFlags = 0,
00062 FetchFullDetails = 1
00063 };
00064 Q_DECLARE_FLAGS(TvdbFlags, TvdbFlag)
00065
00066 public Q_SLOTS:
00070 void setApiKey( const QString& key );
00071
00075 void setFlags(TvdbFlags flags);
00076
00084 void getSeriesByName( const QString& name );
00085
00090 void getSeriesById( int id );
00091
00092 Q_SIGNALS:
00097 void finished( const Tvdb::Series& series );
00098
00105 void multipleResultsFound( const QList<Tvdb::Series>& series );
00106
00107 private:
00108 class Private;
00109 Private* const d;
00110
00111 Q_PRIVATE_SLOT( d, void _k_getMirrorListResult( KJob* job ) )
00112 Q_PRIVATE_SLOT( d, void _k_getSeriesByIdResult( KJob* job ) )
00113 Q_PRIVATE_SLOT( d, void _k_getSeriesByNameResult( KJob* job ) )
00114 };
00115 }
00116
00117 Q_DECLARE_OPERATORS_FOR_FLAGS(Tvdb::Client::TvdbFlags)
00118
00119 #endif