aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/MultiSocketMonitor.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 10:57:00 +0200
committerMax Kellermann <max@duempel.org>2013-08-10 11:52:31 +0200
commitbe0c8495cdb60847279ffbb6b6e1c1efed607e98 (patch)
tree8bac73de8f2cad0695ff819326e073f23c40e424 /src/event/MultiSocketMonitor.hxx
parentcbd0709d1cf8f7a33e57b3d1bb84d7fd527e2ff2 (diff)
downloadmpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.tar.gz
mpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.tar.xz
mpd-be0c8495cdb60847279ffbb6b6e1c1efed607e98.zip
event/MultiSocketMonitor: PrepareSockets() returns timeout
Simplify the API, don't use GLib specific integer type.
Diffstat (limited to 'src/event/MultiSocketMonitor.hxx')
-rw-r--r--src/event/MultiSocketMonitor.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/event/MultiSocketMonitor.hxx b/src/event/MultiSocketMonitor.hxx
index 781fdeca6..50be18070 100644
--- a/src/event/MultiSocketMonitor.hxx
+++ b/src/event/MultiSocketMonitor.hxx
@@ -101,7 +101,10 @@ public:
}
protected:
- virtual void PrepareSockets(gcc_unused gint *timeout_r) {}
+ /**
+ * @return timeout [ms] or -1 for no timeout
+ */
+ virtual int PrepareSockets() = 0;
virtual bool CheckSockets() const { return false; }
virtual void DispatchSockets() = 0;
@@ -114,7 +117,7 @@ public:
private:
bool Prepare(gint *timeout_r) {
- PrepareSockets(timeout_r);
+ *timeout_r = PrepareSockets();
return false;
}