event/*Monitor: add method GetEventLoop()

This commit is contained in:
Max Kellermann 2013-08-08 21:49:17 +02:00
parent b63db1c1aa
commit 090bc6fa79
4 changed files with 16 additions and 1 deletions

View File

@ -44,6 +44,10 @@ public:
Cancel();
}
EventLoop &GetEventLoop() {
return loop;
}
void Schedule();
void Cancel();

View File

@ -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);

View File

@ -66,6 +66,10 @@ public:
~SocketMonitor();
EventLoop &GetEventLoop() {
return loop;
}
bool IsDefined() const {
return fd >= 0;
}

View File

@ -38,6 +38,10 @@ public:
Cancel();
}
EventLoop &GetEventLoop() {
return loop;
}
bool IsActive() const {
return source != nullptr;
}