]> git.sur5r.net Git - minitube/blob - src/ytsinglevideosource.h
Imported Upstream version 2.0
[minitube] / src / ytsinglevideosource.h
1 #ifndef YTSINGLEVIDEOSOURCE_H
2 #define YTSINGLEVIDEOSOURCE_H
3
4 #include <QtNetwork>
5 #include "videosource.h"
6
7 class YTSingleVideoSource : public VideoSource {
8
9     Q_OBJECT
10
11 public:
12     YTSingleVideoSource(QObject *parent = 0);
13     void loadVideos(int max, int skip);
14     void abort();
15     const QStringList & getSuggestions();
16     QString getName();
17
18     void setVideoId(QString videoId) { this->videoId = videoId; }
19
20 private slots:
21     void parse(QByteArray data);
22     void requestError(QNetworkReply *reply);
23
24 private:
25     QString videoId;
26     bool aborted;
27     int skip;
28     int max;
29     QString name;
30 };
31
32 #endif // YTSINGLEVIDEOSOURCE_H