Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MPD 0.24 command stickernamestypes #129

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", "stickertypes", "searchplaylist"
- command "playlistlength", "stickertypes", "stickernamestypes", "searchplaylist"
- tag "ShowMovement"
- new sticker find api
* Support open end for mpd_search_add_window
Expand Down
14 changes: 14 additions & 0 deletions include/mpd/sticker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions libmpdclient.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions src/sticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading