diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/CurlTask.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/includes/CurlTask.h b/includes/CurlTask.h index f9ac492..0d67aa4 100644 --- a/includes/CurlTask.h +++ b/includes/CurlTask.h @@ -1,15 +1,24 @@ #pragma once #include <curl/curl.h> -#include <Task.h> +#include <StacklessTask.h> #include <TaskMan.h> namespace Balau { -class CurlTask : public Task { +class CurlTask : public StacklessTask { +public: + CurlTask(); friend class TaskMan; protected: CURL * m_curlHandle; +private: + static size_t writeFunctionStatic(char * ptr, size_t size, size_t nmemb, void * userdata); + virtual size_t writeFunction(char * ptr, size_t size, size_t nmemb) { return size * nmemb; } + static size_t readFunctionStatic(void * ptr, size_t size, size_t nmemb, void * userdata); + virtual size_t readFunction(void * ptr, size_t size, size_t nmemb) { return CURL_READFUNC_ABORT; } + static int debugFunctionStatic(CURL * easy, curl_infotype info, char * str, size_t str_len, void * userdata); + virtual int debugFunction(curl_infotype info, char * str, size_t str_len) { return 0; } }; }; |