From c2934be8485376571066a652e94ed16ba2bc8d81 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 2 Apr 2021 00:21:03 +0200 Subject: Cancel all tasks when pressing escape to go to previous page or when closing the window --- include/GoogleCaptcha.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/GoogleCaptcha.hpp') 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 #include #include @@ -15,7 +16,7 @@ namespace QuickMedia { }; using RequestChallengeResponse = std::function)>; - std::future google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback); + AsyncTask google_captcha_request_challenge(const std::string &api_key, const std::string &referer, RequestChallengeResponse challenge_response_callback); using PostSolutionResponse = std::function, std::optional)>; - std::future google_captcha_post_solution(const std::string &api_key, const std::string &captcha_id, std::array selected_images, PostSolutionResponse solution_response_callback); + AsyncTask google_captcha_post_solution(const std::string &api_key, const std::string &captcha_id, std::array selected_images, PostSolutionResponse solution_response_callback); } \ No newline at end of file -- cgit v1.2.3