aboutsummaryrefslogtreecommitdiffstats
path: root/src/InotifyQueue.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-14 10:10:21 +0100
committerMax Kellermann <max@duempel.org>2013-01-14 10:13:28 +0100
commitc8b408beae9bf2118c7792dff5d37f3109646c39 (patch)
treeb408eccf2bb9a9c0f70b6432283270d49d19b9df /src/InotifyQueue.hxx
parent8e3982dd422671d26a653f393639cd12cd01ff18 (diff)
downloadmpd-c8b408beae9bf2118c7792dff5d37f3109646c39.tar.gz
mpd-c8b408beae9bf2118c7792dff5d37f3109646c39.tar.xz
mpd-c8b408beae9bf2118c7792dff5d37f3109646c39.zip
InotifyQueue: convert to a class
Diffstat (limited to 'src/InotifyQueue.hxx')
-rw-r--r--src/InotifyQueue.hxx22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/InotifyQueue.hxx b/src/InotifyQueue.hxx
index 158a5dbb5..a30cdf094 100644
--- a/src/InotifyQueue.hxx
+++ b/src/InotifyQueue.hxx
@@ -20,13 +20,23 @@
#ifndef MPD_INOTIFY_QUEUE_HXX
#define MPD_INOTIFY_QUEUE_HXX
-void
-mpd_inotify_queue_init(void);
+#include <glib.h>
-void
-mpd_inotify_queue_finish(void);
+#include <list>
+#include <string>
-void
-mpd_inotify_enqueue(const char *uri_utf8);
+class InotifyQueue {
+ std::list<std::string> queue;
+ guint source_id;
+
+public:
+ ~InotifyQueue();
+
+ void Enqueue(const char *uri_utf8);
+
+private:
+ bool Run();
+ static gboolean Run(gpointer ctx);
+};
#endif