Commit 090bc6fa authored by Max Kellermann's avatar Max Kellermann

event/*Monitor: add method GetEventLoop()

parent b63db1c1
......@@ -44,6 +44,10 @@ public:
Cancel();
}
EventLoop &GetEventLoop() {
return loop;
}
void Schedule();
void Cancel();
......
......@@ -63,7 +63,10 @@ public:
MultiSocketMonitor(EventLoop &_loop);
~MultiSocketMonitor();
public:
EventLoop &GetEventLoop() {
return loop;
}
gcc_pure
gint64 GetTime() const {
return g_source_get_time(&source->base);
......
......@@ -66,6 +66,10 @@ public:
~SocketMonitor();
EventLoop &GetEventLoop() {
return loop;
}
bool IsDefined() const {
return fd >= 0;
}
......
......@@ -38,6 +38,10 @@ public:
Cancel();
}
EventLoop &GetEventLoop() {
return loop;
}
bool IsActive() const {
return source != nullptr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment