aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-02 19:05:45 +0200
committerMax Kellermann <max@duempel.org>2012-08-02 19:15:01 +0200
commit6f3c65dc647673e20960ba8546db25ae66898ede (patch)
tree0ef0d6cd2a3581b1f6604f9d27673c4616fd4e59 /src
parent0a3ada4fead32da5b6cd1b4738fbe4304e028213 (diff)
downloadmpd-6f3c65dc647673e20960ba8546db25ae66898ede.tar.gz
mpd-6f3c65dc647673e20960ba8546db25ae66898ede.tar.xz
mpd-6f3c65dc647673e20960ba8546db25ae66898ede.zip
DatabaseGlue: remove db_walk(), db_visit()
Unused.
Diffstat (limited to 'src')
-rw-r--r--src/DatabaseGlue.cxx49
-rw-r--r--src/database.h12
2 files changed, 0 insertions, 61 deletions
diff --git a/src/DatabaseGlue.cxx b/src/DatabaseGlue.cxx
index 0f946d3ed..a9b5e240a 100644
--- a/src/DatabaseGlue.cxx
+++ b/src/DatabaseGlue.cxx
@@ -125,55 +125,6 @@ db_get_song(const char *file)
}
bool
-db_visit(const struct db_selection *selection,
- const struct db_visitor *visitor, void *ctx,
- GError **error_r)
-{
- if (db == NULL) {
- g_set_error_literal(error_r, db_quark(), DB_DISABLED,
- "No database");
- return false;
- }
-
- VisitDirectory visit_directory;
- if (visitor->directory != NULL)
- visit_directory = [&](const struct directory *directory,
- GError **error_r2) {
- return visitor->directory(directory, ctx, error_r2);
- };
-
- VisitSong visit_song;
- if (visitor->song != NULL)
- visit_song = [&](struct song *song, GError **error_r2) {
- return visitor->song(song, ctx, error_r2);
- };
-
- VisitPlaylist visit_playlist;
- if (visitor->playlist != NULL)
- visit_playlist = [&](const struct playlist_metadata *playlist,
- const struct directory *directory,
- GError **error_r2) {
- return visitor->playlist(playlist, directory, ctx,
- error_r2);
- };
-
- return db->Visit(selection,
- visit_directory, visit_song, visit_playlist,
- error_r);
-}
-
-bool
-db_walk(const char *uri,
- const struct db_visitor *visitor, void *ctx,
- GError **error_r)
-{
- struct db_selection selection;
- db_selection_init(&selection, uri, true);
-
- return db_visit(&selection, visitor, ctx, error_r);
-}
-
-bool
db_save(GError **error_r)
{
assert(db != NULL);
diff --git a/src/database.h b/src/database.h
index 47d52da65..20d132ea1 100644
--- a/src/database.h
+++ b/src/database.h
@@ -64,18 +64,6 @@ gcc_pure
struct song *
db_get_song(const char *file);
-gcc_nonnull(1,2)
-bool
-db_visit(const struct db_selection *selection,
- const struct db_visitor *visitor, void *ctx,
- GError **error_r);
-
-gcc_nonnull(1,2)
-bool
-db_walk(const char *uri,
- const struct db_visitor *visitor, void *ctx,
- GError **error_r);
-
bool
db_save(GError **error_r);