From c51e1bf1c093f823fca3ecbf3fe87e1ce1c6059a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 1 Apr 2009 18:44:26 +0200 Subject: song_sticker: added song_sticker_find() This is a wrapper for sticker_find(), which looks up the song object. --- src/song_sticker.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/song_sticker.h') diff --git a/src/song_sticker.h b/src/song_sticker.h index 9b32c9215..435e4c935 100644 --- a/src/song_sticker.h +++ b/src/song_sticker.h @@ -24,6 +24,7 @@ #include struct song; +struct directory; struct sticker; /** @@ -56,4 +57,19 @@ sticker_song_delete(const struct song *song); struct sticker * sticker_song_get(const struct song *song); +/** + * Finds stickers with the specified name below the specified + * directory. + * + * @param directory the base directory to search in + * @param name the name of the sticker + * @return true on success (even if no sticker was found), false on + * failure + */ +bool +sticker_song_find(struct directory *directory, const char *name, + void (*func)(struct song *song, const char *value, + gpointer user_data), + gpointer user_data); + #endif -- cgit v1.2.3