lib/curl/{Global,Request}: migrate from DeferredMonitor to DeferEvent

This commit is contained in:
Max Kellermann
2017-09-21 22:44:44 +02:00
parent 9df4853e23
commit 431eb7bc8c
4 changed files with 21 additions and 24 deletions

View File

@@ -32,7 +32,7 @@
#include "Multi.hxx"
#include "event/TimerEvent.hxx"
#include "event/DeferredMonitor.hxx"
#include "event/DeferEvent.hxx"
class CurlSocket;
class CurlRequest;
@@ -40,15 +40,19 @@ class CurlRequest;
/**
* Manager for the global CURLM object.
*/
class CurlGlobal final : DeferredMonitor {
class CurlGlobal final {
CurlMulti multi;
DeferEvent defer_read_info;
TimerEvent timeout_event;
public:
explicit CurlGlobal(EventLoop &_loop);
using DeferredMonitor::GetEventLoop;
EventLoop &GetEventLoop() {
return timeout_event.GetEventLoop();
}
void Add(CURL *easy, CurlRequest &request);
void Remove(CURL *easy);
@@ -86,9 +90,6 @@ private:
/* callback for #timeout_event */
void OnTimeout();
/* virtual methods from class DeferredMonitor */
void RunDeferred() override;
};
#endif