aboutsummaryrefslogtreecommitdiff
path: root/src/GoogleCaptcha.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GoogleCaptcha.cpp')
-rw-r--r--src/GoogleCaptcha.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GoogleCaptcha.cpp b/src/GoogleCaptcha.cpp
index 3bd91eb..137eb24 100644
--- a/src/GoogleCaptcha.cpp
+++ b/src/GoogleCaptcha.cpp
@@ -99,8 +99,8 @@ namespace QuickMedia {
return strip_html_tags(html_source.substr(start_index, end_index - start_index));
}
- std::future<bool> google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback) {
- return std::async(std::launch::async, [challenge_response_callback, api_key, referer]() {
+ AsyncTask<bool> google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback) {
+ return AsyncTask<bool>([challenge_response_callback, api_key, referer]() {
std::string captcha_url = "https://www.google.com/recaptcha/api/fallback?k=" + api_key;
std::string response;
std::vector<CommandArg> additional_args = {
@@ -131,8 +131,8 @@ namespace QuickMedia {
return result;
}
- 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) {
- return std::async(std::launch::async, [solution_response_callback, api_key, captcha_id, selected_images]() {
+ 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) {
+ return AsyncTask<bool>([solution_response_callback, api_key, captcha_id, selected_images]() {
std::string captcha_url = "https://www.google.com/recaptcha/api/fallback?k=" + api_key;
std::string response;
std::vector<CommandArg> additional_args = {