aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-07-28 15:50:26 +0200
committerdec05eba <dec05eba@protonmail.com>2021-07-28 15:50:26 +0200
commit60f22a9cba69a8443ed1442c5294a0102ed6f1a3 (patch)
treee78736a46c878002ce266042731b085c9987435d /plugins
parentb8e40694b539e74f1778b380087764bb76213fc5 (diff)
4chan: add timeout for posting without pass, handle noop captcha challenge
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ImageBoard.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ImageBoard.hpp b/plugins/ImageBoard.hpp
index 835d92a..5b299b3 100644
--- a/plugins/ImageBoard.hpp
+++ b/plugins/ImageBoard.hpp
@@ -6,6 +6,7 @@ namespace QuickMedia {
enum class PostResult {
OK,
TRY_AGAIN,
+ INVALID_CAPTCHA,
BANNED,
//FILE_TOO_LARGE,
NO_SUCH_FILE,
@@ -14,11 +15,12 @@ namespace QuickMedia {
ERR
};
+ // All fields are optional
struct ImageBoardCaptchaChallenge {
std::string challenge_id;
std::string img_data;
- std::string bg_data; // optional
- int ttl = 0; // optional
+ std::string bg_data;
+ int ttl = 0;
};
class ImageBoardThreadPage : public VideoPage {
@@ -37,7 +39,6 @@ namespace QuickMedia {
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;