aboutsummaryrefslogtreecommitdiff
path: root/src/InotifyQueue.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-10 19:08:42 +0100
committerMax Kellermann <max@duempel.org>2013-01-14 11:12:28 +0100
commitd3a479b7fa1d1e52f9d3950139643fe7e3ff5a57 (patch)
tree4996c42d621876770a6d80bc8d031be9ee97676a /src/InotifyQueue.hxx
parent92fb0e829a9b61d1b1db4bdbe6096c1772b7c819 (diff)
event/TimeoutMonitor: wrapper for g_timeout_source_new()
Diffstat (limited to 'src/InotifyQueue.hxx')
-rw-r--r--src/InotifyQueue.hxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/InotifyQueue.hxx b/src/InotifyQueue.hxx
index a30cdf09..761df574 100644
--- a/src/InotifyQueue.hxx
+++ b/src/InotifyQueue.hxx
@@ -20,23 +20,22 @@
#ifndef MPD_INOTIFY_QUEUE_HXX
#define MPD_INOTIFY_QUEUE_HXX
-#include <glib.h>
+#include "event/TimeoutMonitor.hxx"
+#include "gcc.h"
#include <list>
#include <string>
-class InotifyQueue {
+class InotifyQueue final : private TimeoutMonitor {
std::list<std::string> queue;
- guint source_id;
public:
- ~InotifyQueue();
+ InotifyQueue(EventLoop &_loop):TimeoutMonitor(_loop) {}
void Enqueue(const char *uri_utf8);
private:
- bool Run();
- static gboolean Run(gpointer ctx);
+ virtual bool OnTimeout() override;
};
#endif