diff options
Diffstat (limited to 'plugins/Page.hpp')
-rw-r--r-- | plugins/Page.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp index f65cd21..b4ea9a6 100644 --- a/plugins/Page.hpp +++ b/plugins/Page.hpp @@ -34,6 +34,11 @@ namespace QuickMedia { // Mutually exclusive with |is_manga_images_page|, |is_image_board_thread_page| and |is_video_page| virtual bool is_single_page() const { return false; } virtual bool is_trackable() const { return false; } + // Mutually exclusive with |is_manga_images_page|, |is_image_board_thread_page| and |is_video_page| + virtual bool is_lazy_fetch_page() const { return false; } + + // This is called both when first navigating to page and when going back to page + virtual void on_navigate_to_page() {}; bool is_tor_enabled(); std::unique_ptr<Body> create_body(); @@ -61,4 +66,11 @@ namespace QuickMedia { const std::string content_title; const std::string content_url; }; + + class LazyFetchPage : public Page { + public: + LazyFetchPage(Program *program) : Page(program) {} + bool is_lazy_fetch_page() const override { return true; } + virtual PluginResult lazy_fetch(BodyItems &result_items) = 0; + }; }
\ No newline at end of file |