aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-14 18:37:00 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-14 18:37:34 +0200
commitd6131b8ba482414be76f2478aea90bd7a4a2379b (patch)
tree9ea48087f0db0d7c956b87d09a93d8b3a335551a /plugins
parent6208faf754b76a7c9a806220c97484ea2e9c0a2e (diff)
Add support for 4chan pass
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Fourchan.hpp4
-rw-r--r--plugins/ImageBoard.hpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Fourchan.hpp b/plugins/Fourchan.hpp
index c9d649f..564271a 100644
--- a/plugins/Fourchan.hpp
+++ b/plugins/Fourchan.hpp
@@ -24,6 +24,9 @@ namespace QuickMedia {
Page get_page_after_search() const override { return Page::IMAGE_BOARD_THREAD_LIST; }
bool search_is_filter() override { return true; }
BodyItems get_related_media(const std::string &url) override;
+
+ PluginResult login(const std::string &token, const std::string &pin, std::string &response_msg);
+ const std::string& get_pass_id() const override;
private:
PluginResult get_threads_internal(const std::string &url, BodyItems &result_items);
void set_board_url(const std::string &new_url);
@@ -43,5 +46,6 @@ namespace QuickMedia {
bool running = true;
std::vector<std::string> cached_media_urls;
std::string resources_root;
+ std::string pass_id;
};
} \ No newline at end of file
diff --git a/plugins/ImageBoard.hpp b/plugins/ImageBoard.hpp
index e2a43a9..abab22e 100644
--- a/plugins/ImageBoard.hpp
+++ b/plugins/ImageBoard.hpp
@@ -16,6 +16,7 @@ namespace QuickMedia {
virtual ~ImageBoard() = default;
bool is_image_board() override { return true; }
+ virtual const std::string& get_pass_id() const = 0;
virtual PluginResult get_threads(const std::string &url, BodyItems &result_items) = 0;
virtual PluginResult get_thread_comments(const std::string &list_url, const std::string &url, BodyItems &result_items) = 0;