Tvdb 0.3.0

/home/trueg/kde/dev/kde/src/libtvdb/client.h

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2010-2012 Sebastian Trueg <trueg@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) version 3, or any
00008    later version accepted by the membership of KDE e.V. (or its
00009    successor approved by the membership of KDE e.V.), which shall
00010    act as a proxy defined in Section 6 of version 3 of the license.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
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

Get libtvdb at SourceForge.net. Fast, secure and Free Open Source software downloads
LibTvdb documentation generated by doxygen