aboutsummaryrefslogtreecommitdiff
path: root/src/InotifyUpdate.cxx
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/InotifyUpdate.cxx
parent8e3982dd422671d26a653f393639cd12cd01ff18 (diff)
InotifyQueue: convert to a class
Diffstat (limited to 'src/InotifyUpdate.cxx')
-rw-r--r--src/InotifyUpdate.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/InotifyUpdate.cxx b/src/InotifyUpdate.cxx
index 41b93a29..9fe657a1 100644
--- a/src/InotifyUpdate.cxx
+++ b/src/InotifyUpdate.cxx
@@ -57,6 +57,7 @@ struct watch_directory {
};
static InotifySource *inotify_source;
+static InotifyQueue *inotify_queue;
static unsigned inotify_max_depth;
static struct watch_directory inotify_root;
@@ -295,7 +296,7 @@ mpd_inotify_callback(int wd, unsigned mask,
: g_strdup("");
if (uri_utf8 != NULL) {
- mpd_inotify_enqueue(uri_utf8);
+ inotify_queue->Enqueue(uri_utf8);
g_free(uri_utf8);
}
}
@@ -341,7 +342,7 @@ mpd_inotify_init(unsigned max_depth)
recursive_watch_subdirectories(&inotify_root, path, 0);
- mpd_inotify_queue_init();
+ inotify_queue = new InotifyQueue();
g_debug("watching music directory");
}
@@ -367,7 +368,7 @@ mpd_inotify_finish(void)
if (inotify_source == NULL)
return;
- mpd_inotify_queue_finish();
+ delete inotify_queue;
delete inotify_source;
g_tree_foreach(inotify_directories, free_watch_directory, NULL);