From e3c2cf74256daf8131f39631d349a9fa9cacacc2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 18 Jun 2014 17:33:35 -0700 Subject: Adding basic CurlTask, as well as support for it in Balau. Also removing c++11-surrogates.h, as we're on a modern compiler now. --- includes/TaskMan.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'includes/TaskMan.h') diff --git a/includes/TaskMan.h b/includes/TaskMan.h index a9eb490..a51653b 100644 --- a/includes/TaskMan.h +++ b/includes/TaskMan.h @@ -103,10 +103,15 @@ class TaskMan { int m_stopCode = 0; bool m_stopped = false; bool m_allowedToSignal = false; + ev::timer m_curlTimer; CURLM * m_curlMulti = false; int m_curlStillRunning = 0; - static int curlSocketCallback(CURL * easy, curl_socket_t s, int what, void * userp, void * socketp); - static int curlMultiTimerCallback(CURLM * multi, long timeout_ms, void * userp); + static int curlSocketCallbackStatic(CURL * easy, curl_socket_t s, int what, void * userp, void * socketp); + int curlSocketCallback(CURL * easy, curl_socket_t s, int what, void * socketp); + void curlSocketEventCallback(ev::io & w, int revents); + static int curlMultiTimerCallbackStatic(CURLM * multi, long timeout_ms, void * userp); + int curlMultiTimerCallback(CURLM * multi, long timeout_ms); + void curlMultiTimerEventCallback(ev::timer & w, int revents); TaskMan(const TaskMan &) = delete; TaskMan & operator=(const TaskMan &) = delete; -- cgit v1.2.3