DatabaseGlue: remove db_walk(), db_visit()

Unused.
This commit is contained in:
Max Kellermann 2012-08-02 19:05:45 +02:00
parent 0a3ada4fea
commit 6f3c65dc64
2 changed files with 0 additions and 61 deletions

View File

@ -124,55 +124,6 @@ db_get_song(const char *file)
return db->GetSong(file, NULL);
}
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)
{

View File

@ -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);