aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-07-30 07:26:08 +0200
committerMax Kellermann <max@duempel.org>2012-08-01 09:59:12 +0200
commit9dc9459f3a75d7500720d2294a9eca80d7d3f5bb (patch)
tree0d046c7f20e414537a3518d378a81f23c29df6c5 /src/directory.h
parent37b92967c5a8d233536216ac435ebb0d0b17782c (diff)
downloadmpd-9dc9459f3a75d7500720d2294a9eca80d7d3f5bb.tar.gz
mpd-9dc9459f3a75d7500720d2294a9eca80d7d3f5bb.tar.xz
mpd-9dc9459f3a75d7500720d2294a9eca80d7d3f5bb.zip
db_plugin: convert to C++
Diffstat (limited to '')
-rw-r--r--src/directory.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/directory.h b/src/directory.h
index b3cd9c8c9..c7e70121f 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -23,6 +23,10 @@
#include "check.h"
#include "util/list.h"
+#ifdef __cplusplus
+#include "DatabaseVisitor.hxx"
+#endif
+
#include <glib.h>
#include <stdbool.h>
#include <sys/types.h>
@@ -86,8 +90,20 @@ struct directory {
dev_t device;
bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */
char path[sizeof(long)];
+
+#ifdef __cplusplus
+ /**
+ * Caller must lock #db_mutex.
+ */
+ bool Walk(bool recursive,
+ VisitDirectory visit_directory, VisitSong visit_song,
+ VisitPlaylist visit_playlist,
+ GError **error_r) const;
+#endif
};
+G_BEGIN_DECLS
+
static inline bool
isRootDirectory(const char *name)
{
@@ -251,12 +267,6 @@ directory_lookup_song(struct directory *directory, const char *uri);
void
directory_sort(struct directory *directory);
-/**
- * Caller must lock #db_mutex.
- */
-bool
-directory_walk(const struct directory *directory, bool recursive,
- const struct db_visitor *visitor, void *ctx,
- GError **error_r);
+G_END_DECLS
#endif