diff options
Diffstat (limited to 'plugins/Page.hpp')
-rw-r--r-- | plugins/Page.hpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp index 2e85cad..de80b4f 100644 --- a/plugins/Page.hpp +++ b/plugins/Page.hpp @@ -9,6 +9,14 @@ namespace QuickMedia { constexpr int SEARCH_DELAY_FILTER = 50; + // TODO: Remove to PageType when the other PageType is removed + enum class PageTypez { + REGULAR, + MANGA_IMAGES, + IMAGE_BOARD_THREAD, + VIDEO + }; + class Page { public: Page(Program *program) : program(program) {} @@ -29,10 +37,8 @@ namespace QuickMedia { DownloadResult download_json(Json::Value &result, const std::string &url, std::vector<CommandArg> additional_args, bool use_browser_useragent = false, std::string *err_msg = nullptr); - virtual bool is_manga_images_page() const { return false; } - virtual bool is_image_board_thread_page() const { return false; } - virtual bool is_video_page() const { return false; } - // Mutually exclusive with |is_manga_images_page|, |is_image_board_thread_page| and |is_video_page| + virtual PageTypez get_type() const { return PageTypez::REGULAR; } + // Mutually exclusive with |get_type| when |get_type| is not PageTypez::REGULAR virtual bool is_single_page() const { return false; } virtual bool is_trackable() const { return false; } virtual bool is_lazy_fetch_page() const { return false; } |