aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/simple_db_plugin.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/db/simple_db_plugin.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/DatabaseVisitor.hxx (renamed from src/db/simple_db_plugin.h)27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/db/simple_db_plugin.h b/src/DatabaseVisitor.hxx
index 511505846..1676cae19 100644
--- a/src/db/simple_db_plugin.h
+++ b/src/DatabaseVisitor.hxx
@@ -17,26 +17,19 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MPD_SIMPLE_DB_PLUGIN_H
-#define MPD_SIMPLE_DB_PLUGIN_H
+#ifndef MPD_DATABASE_VISITOR_HXX
+#define MPD_DATABASE_VISITOR_HXX
-#include <glib.h>
-#include <stdbool.h>
-#include <time.h>
-
-extern const struct db_plugin simple_db_plugin;
+#include <functional>
-struct db;
-
-G_GNUC_PURE
-struct directory *
-simple_db_get_root(struct db *db);
+#include <glib.h>
-bool
-simple_db_save(struct db *db, GError **error_r);
+struct directory;
+struct song;
+struct playlist_metadata;
-G_GNUC_PURE
-time_t
-simple_db_get_mtime(const struct db *db);
+typedef std::function<bool(const struct directory *, GError **)> VisitDirectory;
+typedef std::function<bool(struct song *, GError **)> VisitSong;
+typedef std::function<bool(const struct playlist_metadata *, const struct directory *, GError **)> VisitPlaylist;
#endif