diff options
Diffstat (limited to 'plugins/ImageBoard.hpp')
-rw-r--r-- | plugins/ImageBoard.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/ImageBoard.hpp b/plugins/ImageBoard.hpp index 651eabf..835d92a 100644 --- a/plugins/ImageBoard.hpp +++ b/plugins/ImageBoard.hpp @@ -14,6 +14,13 @@ namespace QuickMedia { ERR }; + struct ImageBoardCaptchaChallenge { + std::string challenge_id; + std::string img_data; + std::string bg_data; // optional + int ttl = 0; // optional + }; + class ImageBoardThreadPage : public VideoPage { public: ImageBoardThreadPage(Program *program, std::string board_id, std::string thread_id) : VideoPage(program, ""), board_id(std::move(board_id)), thread_id(std::move(thread_id)) {} @@ -27,9 +34,12 @@ namespace QuickMedia { } virtual PluginResult login(const std::string &token, const std::string &pin, std::string &response_msg); // If |filepath| is empty then no file is uploaded - virtual PostResult post_comment(const std::string &captcha_id, const std::string &comment, const std::string &filepath = "") = 0; + virtual PostResult post_comment(const std::string &captcha_id, const std::string &captcha_solution, const std::string &comment, const std::string &filepath = "") = 0; virtual const std::string& get_pass_id(); + // |bg_data|, |bg_size| and |ttl| are optional + virtual PluginResult request_captcha_challenge(ImageBoardCaptchaChallenge &challenge_response) = 0; + const std::string board_id; const std::string thread_id; }; |