aboutsummaryrefslogtreecommitdiff
path: root/include/GoogleCaptcha.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-04-02 00:21:03 +0200
committerdec05eba <dec05eba@protonmail.com>2021-04-02 00:21:03 +0200
commitc2934be8485376571066a652e94ed16ba2bc8d81 (patch)
tree381e69b5b2ebdb42313fab7fa6978fcb966d580c /include/GoogleCaptcha.hpp
parentcfa37b674e9493388e7ebd89f53eacbb197cbdcb (diff)
Cancel all tasks when pressing escape to go to previous page or when closing the window
Diffstat (limited to 'include/GoogleCaptcha.hpp')
-rw-r--r--include/GoogleCaptcha.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/GoogleCaptcha.hpp b/include/GoogleCaptcha.hpp
index 62e47fa..f8063f3 100644
--- a/include/GoogleCaptcha.hpp
+++ b/include/GoogleCaptcha.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "AsyncTask.hpp"
#include <string>
#include <optional>
#include <functional>
@@ -15,7 +16,7 @@ namespace QuickMedia {
};
using RequestChallengeResponse = std::function<void(std::optional<GoogleCaptchaChallengeInfo>)>;
- std::future<bool> google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback);
+ AsyncTask<bool> google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback);
using PostSolutionResponse = std::function<void(std::optional<std::string>, std::optional<GoogleCaptchaChallengeInfo>)>;
- std::future<bool> google_captcha_post_solution(const std::string &api_key, const std::string &captcha_id, std::array<bool, 9> selected_images, PostSolutionResponse solution_response_callback);
+ AsyncTask<bool> google_captcha_post_solution(const std::string &api_key, const std::string &captcha_id, std::array<bool, 9> selected_images, PostSolutionResponse solution_response_callback);
} \ No newline at end of file