aboutsummaryrefslogtreecommitdiff
path: root/plugins/DramaCool.hpp
blob: 428e632b3c78ca6ef2be623a3ef0542f508a89f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include "Page.hpp"

namespace QuickMedia {
    class DramaCoolSearchPage : public Page {
    public:
        DramaCoolSearchPage(Program *program) : Page(program) {}
        const char* get_title() const override { return "Search"; }
        bool search_is_filter() override { return false; }
        SearchResult search(const std::string &str, BodyItems &result_items) override;
        PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
    };

    class DramaCoolEpisodesPage : public Page {
    public:
        DramaCoolEpisodesPage(Program *program) : Page(program) {}
        const char* get_title() const override { return "Search"; }
        bool search_is_filter() override { return true; }
        PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override;
    };

    class DramaCoolVideoPage : public VideoPage {
    public:
        DramaCoolVideoPage(Program *program, std::string url, std::string title, std::string referer) : VideoPage(program, std::move(url), false), title(std::move(title)), referer(std::move(referer)) {}
        const char* get_title() const override { return title.c_str(); }
        PluginResult load(const SubmitArgs &args, VideoInfo &video_info, std::string &err_str) override;
    private:
        std::string title;
        std::string referer;
    };
}