diff --git a/NEWS b/NEWS index a0cbdeb..edc37f4 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ libmpdclient 2.23 (not yet released) * support MPD protocol 0.24.0 - allow window for listplaylist and listplaylistinfo - - command "playlistlength", "stickertypes", "searchplaylist" + - command "playlistlength", "stickertypes", "stickernamestypes", "searchplaylist" - tag "ShowMovement" - new sticker find api * Support open end for mpd_search_add_window diff --git a/include/mpd/sticker.h b/include/mpd/sticker.h index 63e4305..5007e00 100644 --- a/include/mpd/sticker.h +++ b/include/mpd/sticker.h @@ -231,10 +231,24 @@ mpd_send_stickernames(struct mpd_connection *connection); * @return true on success, false on error * * @since libmpdclient 2.23, MPD 0.24 + * */ bool mpd_send_stickertypes(struct mpd_connection *connection); +/** + * Obtains an uniq and sorted list of all sticker names and their types. Call + * mpd_recv_pair() to receive each response item. + * + * @param connection the connection to MPD + * @param type the object type, e.g. "song" or NULL for all types + * @return true on success, false on error + * + * @since libmpdclient 2.23, MPD 0.24 + */ +bool +mpd_send_stickernamestypes(struct mpd_connection *connection, const char *type); + /** * Search for stickers in the database. * Constraints may be specified. diff --git a/libmpdclient.ld b/libmpdclient.ld index 3ab36c0..8d3d38f 100644 --- a/libmpdclient.ld +++ b/libmpdclient.ld @@ -470,6 +470,7 @@ global: mpd_return_sticker; mpd_send_stickernames; mpd_send_stickertypes; + mpd_send_stickernamestypes; mpd_sticker_search_begin; mpd_sticker_search_add_value_constraint; mpd_sticker_search_add_sort; diff --git a/src/sticker.c b/src/sticker.c index e104404..6f7298d 100644 --- a/src/sticker.c +++ b/src/sticker.c @@ -156,6 +156,14 @@ mpd_send_stickertypes(struct mpd_connection *connection) return mpd_send_command(connection, "stickertypes", NULL); } +bool +mpd_send_stickernamestypes(struct mpd_connection *connection, const char *type) +{ + assert(connection != NULL); + + return mpd_send_command(connection, "stickernamestypes", type, NULL); +} + bool mpd_sticker_search_begin(struct mpd_connection *connection, const char *type, const char *base_uri, const char *name)