diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-10-23 10:25:08 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-10-23 11:06:25 +0200 |
commit | 2a973ff9402dab9d6c751a146a9f83617d0e5211 (patch) | |
tree | aacd0ebae55cbe622974d64b464652ffd65a1268 /plugins/Page.hpp | |
parent | 96c9ed391270347c4c7036179fd2815f679ca7cf (diff) |
Matrix: start on room tags, fix thread race condition on accessing room variables (name, avatar url, prev batch)
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; } |