Skip to content

Commit

Permalink
Merge pull request #126 from jcorporation/stickertypes
Browse files Browse the repository at this point in the history
Add stickertypes protocol command support
  • Loading branch information
jcorporation authored Aug 30, 2024
2 parents bcbde7f + 749b6eb commit cf0c8ba
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
libmpdclient 2.23 (not yet released)
* support MPD protocol 0.24.0
- allow window for listplaylist and listplaylistinfo
- command "playlistlength"
- command "playlistlength", "stickertypes""
- tag "ShowMovement"
* Support open end for mpd_search_add_window

Expand Down
12 changes: 12 additions & 0 deletions include/mpd/sticker.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ mpd_return_sticker(struct mpd_connection *connection, struct mpd_pair *pair);
bool
mpd_send_stickernames(struct mpd_connection *connection);

/**
* Obtains an uniq list of all sticker types. Call
* mpd_recv_pair() to receive each response item.
*
* @param connection the connection to MPD
* @return true on success, false on error
*
* @since libmpdclient 2.23, MPD 0.24
*/
bool
mpd_send_stickertypes(struct mpd_connection *connection);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 1 addition & 0 deletions libmpdclient.ld
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ global:
mpd_recv_sticker;
mpd_return_sticker;
mpd_send_stickernames;
mpd_send_stickertypes;

/* mpd/fingerprint.h */
mpd_parse_fingerprint_type;
Expand Down
8 changes: 8 additions & 0 deletions src/sticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,11 @@ mpd_send_stickernames(struct mpd_connection *connection)

return mpd_send_command(connection, "stickernames", NULL);
}

bool
mpd_send_stickertypes(struct mpd_connection *connection)
{
assert(connection != NULL);

return mpd_send_command(connection, "stickertypes", NULL);
}

0 comments on commit cf0c8ba

Please sign in to comment.