]> git.sur5r.net Git - minitube/blob - src/yt/searchvideosource.h
New upstream version 3.8
[minitube] / src / yt / searchvideosource.h
1 #ifndef SEARCHVIDEOSOURCE_H
2 #define SEARCHVIDEOSOURCE_H
3
4 #include <QObject>
5 #include <videosource.h>
6
7 class SearchParams;
8
9 class SearchVideoSource : public VideoSource {
10     Q_OBJECT
11
12 public:
13     SearchVideoSource(SearchParams *searchParams, QObject *parent = 0);
14
15     SearchParams *getSearchParams() const { return searchParams; }
16
17     void loadVideos(int max, int startIndex);
18     bool hasMoreVideos();
19     void abort() { aborted = true; }
20     QString getName();
21     const QList<QAction *> &getActions();
22     int maxResults();
23
24 private:
25     void connectSource(int max, int startIndex);
26
27     SearchParams *searchParams;
28     VideoSource *source = nullptr;
29     bool aborted = false;
30 };
31
32 #endif // SEARCHVIDEOSOURCE_H