From 169db88c20dc7601f8589cfa298254c932f0947a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Sep 2011 19:24:30 +0200 Subject: database: add struct db_visitor Use this struct for db_walk(). --- src/database.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/database.h') diff --git a/src/database.h b/src/database.h index 3e834ab84..ab9114f2d 100644 --- a/src/database.h +++ b/src/database.h @@ -27,6 +27,7 @@ struct config_param; struct directory; +struct db_visitor; /** * Initialize the database library. @@ -52,9 +53,10 @@ db_get_directory(const char *name); struct song * db_get_song(const char *file); -int db_walk(const char *name, - int (*forEachSong)(struct song *, void *), - int (*forEachDir)(struct directory *, void *), void *data); +bool +db_walk(const char *uri, + const struct db_visitor *visitor, void *ctx, + GError **error_r); bool db_check(GError **error_r); -- cgit v1.2.3