aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_sticker.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-14 14:20:01 +0100
committerMax Kellermann <max@duempel.org>2009-03-14 14:20:01 +0100
commitdd67992a0c403ff23b071fe9b1e312cfaa4bd924 (patch)
tree7f5d03f53e48dc63ff6c0bea369dd249c6b6bcea /src/song_sticker.c
parent5b687795c499e9fef4eeed234552f1171a845a95 (diff)
downloadmpd-dd67992a0c403ff23b071fe9b1e312cfaa4bd924.tar.gz
mpd-dd67992a0c403ff23b071fe9b1e312cfaa4bd924.tar.xz
mpd-dd67992a0c403ff23b071fe9b1e312cfaa4bd924.zip
sticker: added "struct sticker"
The sticker struct can be used for enumerating values. This will replace the sticker_list_values() function.
Diffstat (limited to 'src/song_sticker.c')
-rw-r--r--src/song_sticker.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/song_sticker.c b/src/song_sticker.c
index 46673e737..951b28871 100644
--- a/src/song_sticker.c
+++ b/src/song_sticker.c
@@ -88,3 +88,19 @@ sticker_song_delete(const struct song *song)
return ret;
}
+
+struct sticker *
+sticker_song_get(const struct song *song)
+{
+ char *uri;
+ struct sticker *sticker;
+
+ assert(song != NULL);
+ assert(song_in_database(song));
+
+ uri = song_get_uri(song);
+ sticker = sticker_load("song", uri);
+ g_free(uri);
+
+ return sticker;
+}