]> git.sur5r.net Git - minitube/blobdiff - src/yt/ytjs/ytjschannelsource.h
Update upstream source from tag 'upstream/3.8'
[minitube] / src / yt / ytjs / ytjschannelsource.h
diff --git a/src/yt/ytjs/ytjschannelsource.h b/src/yt/ytjs/ytjschannelsource.h
new file mode 100644 (file)
index 0000000..58e76aa
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef YTJSCHANNELSOURCE_H
+#define YTJSCHANNELSOURCE_H
+
+#include "videosource.h"
+
+class SearchParams;
+class Video;
+
+class YTJSChannelSource : public VideoSource {
+    Q_OBJECT
+
+public:
+    YTJSChannelSource(SearchParams *searchParams, QObject *parent = 0);
+    void loadVideos(int max, int startIndex);
+    bool hasMoreVideos() { return !continuation.isEmpty(); }
+    void abort() { aborted = true; }
+    QString getName();
+    const QList<QAction *> &getActions();
+    SearchParams *getSearchParams() const { return searchParams; }
+
+private:
+    SearchParams *searchParams;
+    bool aborted = false;
+    QString name;
+
+    QString continuation;
+};
+
+#endif // YTJSCHANNELSOURCE_H