diff -Nru libmpdclient-2.7+git20120808.0845c79/debian/changelog libmpdclient-2.7+git20120814.b3a3853/debian/changelog --- libmpdclient-2.7+git20120808.0845c79/debian/changelog 2012-08-15 03:15:31.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/debian/changelog 2012-08-15 03:15:31.000000000 +0000 @@ -1,5 +1,5 @@ -libmpdclient (2.7+git20120808.0845c79-0ubuntu1~ripps1~lucid) lucid; urgency=low +libmpdclient (2.7+git20120814.b3a3853-0ubuntu1~ripps1~lucid) lucid; urgency=low * Daily Release Build - -- Taylor LeMasurier-Wren Wed, 08 Aug 2012 04:11:46 -0500 + -- Taylor LeMasurier-Wren Tue, 14 Aug 2012 22:00:20 -0500 diff -Nru libmpdclient-2.7+git20120808.0845c79/include/mpd/song.h libmpdclient-2.7+git20120814.b3a3853/include/mpd/song.h --- libmpdclient-2.7+git20120808.0845c79/include/mpd/song.h 2010-07-26 08:42:48.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/include/mpd/song.h 2012-08-15 03:00:32.000000000 +0000 @@ -160,6 +160,14 @@ mpd_song_get_id(const struct mpd_song *song); /** + * Returns the priority of this song in the playlist. The value is + * undefined if you did not obtain this song from the queue. + */ +mpd_pure +unsigned +mpd_song_get_prio(const struct mpd_song *song); + +/** * Begins parsing a new song. * * @param pair the first pair in this song (name must be "file") diff -Nru libmpdclient-2.7+git20120808.0845c79/libmpdclient.ld libmpdclient-2.7+git20120814.b3a3853/libmpdclient.ld --- libmpdclient-2.7+git20120808.0845c79/libmpdclient.ld 2012-01-05 09:22:31.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/libmpdclient.ld 2012-08-15 03:00:32.000000000 +0000 @@ -280,6 +280,7 @@ mpd_song_set_pos; mpd_song_get_pos; mpd_song_get_id; + mpd_song_get_prio; mpd_song_begin; mpd_song_feed; mpd_recv_song; diff -Nru libmpdclient-2.7+git20120808.0845c79/Makefile.am libmpdclient-2.7+git20120814.b3a3853/Makefile.am --- libmpdclient-2.7+git20120808.0845c79/Makefile.am 2011-02-23 03:12:42.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/Makefile.am 2012-08-15 03:00:32.000000000 +0000 @@ -167,6 +167,9 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libmpdclient.pc +vapidir = $(datadir)/vala/vapi +vapi_DATA = vapi/libmpdclient.vapi + # # Distribution # @@ -175,4 +178,5 @@ libmpdclient.ld \ libmpdclient.pc.in \ autogen.sh \ + vapi/libmpdclient.vapi \ $(doc_DATA) diff -Nru libmpdclient-2.7+git20120808.0845c79/Makefile.in libmpdclient-2.7+git20120814.b3a3853/Makefile.in --- libmpdclient-2.7+git20120808.0845c79/Makefile.in 2012-08-08 09:12:00.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/Makefile.in 2012-08-15 03:00:35.000000000 +0000 @@ -108,7 +108,8 @@ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \ - "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(mpdincludedir)" + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(vapidir)" \ + "$(DESTDIR)$(mpdincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) src_libmpdclient_la_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp @@ -162,7 +163,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -DATA = $(doc_DATA) $(pkgconfig_DATA) +DATA = $(doc_DATA) $(pkgconfig_DATA) $(vapi_DATA) HEADERS = $(mpdinclude_HEADERS) ETAGS = etags CTAGS = ctags @@ -419,6 +420,8 @@ # pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libmpdclient.pc +vapidir = $(datadir)/vala/vapi +vapi_DATA = vapi/libmpdclient.vapi # # Distribution @@ -427,6 +430,7 @@ libmpdclient.ld \ libmpdclient.pc.in \ autogen.sh \ + vapi/libmpdclient.vapi \ $(doc_DATA) all: config.h @@ -858,6 +862,27 @@ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-vapiDATA: $(vapi_DATA) + @$(NORMAL_INSTALL) + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(vapidir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(vapidir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vapidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(vapidir)" || exit $$?; \ + done + +uninstall-vapiDATA: + @$(NORMAL_UNINSTALL) + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(vapidir)'; $(am__uninstall_files_from_dir) install-mpdincludeHEADERS: $(mpdinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(mpdinclude_HEADERS)'; test -n "$(mpdincludedir)" || list=; \ @@ -1195,7 +1220,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \ config.h all-local installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(mpdincludedir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(vapidir)" "$(DESTDIR)$(mpdincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1260,7 +1285,8 @@ info-am: install-data-am: install-data-local install-docDATA \ - install-mpdincludeHEADERS install-pkgconfigDATA + install-mpdincludeHEADERS install-pkgconfigDATA \ + install-vapiDATA install-dvi: install-dvi-am @@ -1310,7 +1336,7 @@ uninstall-am: uninstall-docDATA uninstall-libLTLIBRARIES \ uninstall-local uninstall-mpdincludeHEADERS \ - uninstall-pkgconfigDATA + uninstall-pkgconfigDATA uninstall-vapiDATA .MAKE: all check-am install-am install-strip @@ -1328,13 +1354,14 @@ install-info install-info-am install-libLTLIBRARIES \ install-man install-mpdincludeHEADERS install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - mostlyclean-local pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-docDATA uninstall-libLTLIBRARIES \ - uninstall-local uninstall-mpdincludeHEADERS \ - uninstall-pkgconfigDATA + install-strip install-vapiDATA installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ + uninstall uninstall-am uninstall-docDATA \ + uninstall-libLTLIBRARIES uninstall-local \ + uninstall-mpdincludeHEADERS uninstall-pkgconfigDATA \ + uninstall-vapiDATA -I$(shell $(CC) -print-file-name=include) \ -I$(shell $(CC) -print-file-name=include-fixed) diff -Nru libmpdclient-2.7+git20120808.0845c79/NEWS libmpdclient-2.7+git20120814.b3a3853/NEWS --- libmpdclient-2.7+git20120808.0845c79/NEWS 2012-08-08 09:11:56.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/NEWS 2012-08-15 03:00:32.000000000 +0000 @@ -1,5 +1,5 @@ libmpdclient 2.8 (2012/??/??) - +* song: support attribute "Prio" libmpdclient 2.7 (2012/02/04) * status: add nextsong/nextsongid support diff -Nru libmpdclient-2.7+git20120808.0845c79/src/song.c libmpdclient-2.7+git20120814.b3a3853/src/song.c --- libmpdclient-2.7+git20120808.0845c79/src/song.c 2010-07-26 08:42:48.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/src/song.c 2012-08-15 03:00:32.000000000 +0000 @@ -87,6 +87,11 @@ */ unsigned id; + /** + * The priority of this song within the queue. + */ + unsigned prio; + #ifndef NDEBUG /** * This flag is used in an assertion: when it is set, you must @@ -125,6 +130,7 @@ song->last_modified = 0; song->pos = 0; song->id = 0; + song->prio = 0; #ifndef NDEBUG song->finished = false; @@ -201,6 +207,7 @@ ret->last_modified = song->last_modified; ret->pos = song->pos; ret->id = song->id; + ret->prio = song->prio; #ifndef NDEBUG ret->finished = true; @@ -366,6 +373,18 @@ return song->id; } +static void +mpd_song_set_prio(struct mpd_song *song, unsigned prio) +{ + song->prio = prio; +} + +unsigned +mpd_song_get_prio(const struct mpd_song *song) +{ + return song->prio; +} + struct mpd_song * mpd_song_begin(const struct mpd_pair *pair) { @@ -450,6 +469,8 @@ mpd_song_set_pos(song, atoi(pair->value)); else if (strcmp(pair->name, "Id") == 0) mpd_song_set_id(song, atoi(pair->value)); + else if (strcmp(pair->name, "Prio") == 0) + mpd_song_set_prio(song, atoi(pair->value)); return true; } diff -Nru libmpdclient-2.7+git20120808.0845c79/vapi/libmpdclient.vapi libmpdclient-2.7+git20120814.b3a3853/vapi/libmpdclient.vapi --- libmpdclient-2.7+git20120808.0845c79/vapi/libmpdclient.vapi 1970-01-01 00:00:00.000000000 +0000 +++ libmpdclient-2.7+git20120814.b3a3853/vapi/libmpdclient.vapi 2012-08-15 03:00:32.000000000 +0000 @@ -0,0 +1,759 @@ +[CCode (cprefix = "mpd_", cheader_filename = "mpd/client.h")] + +namespace Mpd { + [CCode (cname = "enum mpd_error")] + public enum Error { + SUCCESS = 0, + OOM, + ARGUMENT, + STATE, + TIMEOUT, + SYSTEM, + RESOLVER, + MALFORMED, + CLOSED, + SERVER + } + + [CCode (cname = "enum mpd_async_event")] + public enum AsyncEvent { + READ = 1, + WRITE = 2, + HUP = 4, + ERROR = 8 + } + + [CCode (cname = "enum mpd_server_error")] + public enum ServerError { + UNK = -1, + NOT_LIST = 1, + ARG = 2, + PASSWORD = 3, + PERMISSION = 4, + UNKNOWN_CMD = 5, + NO_EXIST = 50, + PLAYLIST_MAX = 51, + SYSTEM = 52, + PLAYLIST_LOAD = 53, + UPDATE_ALREADY = 54, + PLAYER_SYNC = 55, + ERROR_EXIST = 56 + } + + [CCode (cname = "enum mpd_entity_type")] + public enum EntityType { + UNKNOWN, + DIRECTORY, + SONG, + PLAYLIST + } + + [CCode (cname = "enum mpd_idle")] + public enum Idle { + DATABASE = 0x1, + STORED_PLAYLIST = 0x2, + QUEUE = 0x4, + PLAYLIST = QUEUE, + PLAYER = 0x8, + MIXER = 0x10, + OUTPUT = 0x20, + OPTIONS = 0x40, + UPDATE = 0x80, + STICKER = 0x100, + SUBSCRIPTION = 0x200, + MESSAGE = 0x400 + } + + [CCode (cname = "enum mpd_parser_result")] + public enum ParserResult { + MALFORMED, + SUCCESS, + ERROR, + PAIR + } + + [CCode (cname = "enum mpd_operator")] + public enum Operator { + DEFAULT + } + + [CCode (cname = "enum mpd_tag_type", + cprefix = "MPD_TAG_")] + public enum TagType { + UNKNOWN = -1, + ARTIST, + ALBUM, + ALBUM_ARTIST, + TITLE, + TRACK, + NAME, + GENRE, + DATE, + COMPOSER, + PERFORMER, + COMMENT, + DISC, + MUSICBRAINZ_ARTISTID, + MUSICBRAINZ_ALBUMID, + MUSICBRAINZ_ALBUMARTISTID, + MUSICBRAINZ_TRACKID, + COUNT + } + + [CCode (cname = "enum mpd_state")] + public enum State { + UNKNOWN = 0, + STOP = 1, + PLAY = 2, + PAUSE = 3 + } + + [CCode (cname = "struct mpd_async", + free_function = "mpd_async_free")] + [Compact] + [Compact] + public class Async { + public Mpd.Error error { get; } + public string? error_message { get; } + public int system_error { get; } + public int fd { get; } + + public Async(int fd); + public Mpd.Error get_error(); + public unowned string? get_error_message(); + public int get_system_error(); + public int get_fd(); + public Mpd.AsyncEvent events(); + public bool async_io(Mpd.AsyncEvent events); + public bool send_command_v(string command, va_list args); + public bool send_command(string command, ...); + public string? recv_line(); + } + + [CCode (cname = "struct mpd_audio_format")] + [Compact] + public class AudioFormat { + public uint8 bits; + public uint8 channels; + public uint32 sample_rate; + } + + [CCode (cname = "struct mpd_connection", + free_function="mpd_connection_free")] + [Compact] + public class Connection { + public int fd { get; } + public Mpd.Async async { get; } + public Mpd.Error error { get; } + public string error_message { get; } + public Mpd.ServerError server_error { get; } + public int system_error { get; } + public uint[] server_version { get; } + public uint server_error_location { get; } + public uint timeout { set; } + public Settings settings { get; } + + public Connection(string? host = null, uint port = 0, uint timeout_ms = 0); + [CCode (cname = "mpd_connection_new_async")] + public Connection.from_async(Mpd.Async async, string welcome); + public void set_timeout(uint timeout_ms); + public int get_fd(); + public Mpd.Async get_async(); + public Mpd.Error get_error(); + public unowned string get_error_message(); + public Mpd.ServerError get_server_error(); + public uint get_server_error_location(); + public int get_system_error(); + public bool clear_error(); + public uint[] get_server_version(); + public int cmp_server_version(uint major, uint minor, uint patch); + public Settings get_settings(); + [CCode (cname = "mpd_recv_directory")] + public Directory? recv_directory(); + [CCode (cname = "mpd_recv_entity")] + public Entity? recv_entity(); + [CCode (cname = "mpd_command_list_begin")] + public bool command_list_begin(bool discrete_ok = false); + [CCode (cname = "mpd_command_list_end")] + public bool command_list_end(); + [CCode (cname = "mpd_send_set_volume")] + public bool send_set_volume(uint volume); + [CCode (cname = "mpd_run_set_volume")] + public bool run_set_volume(uint volume); + [CCode (cname = "mpd_send_outputs")] + public bool send_outputs(); + [CCode (cname = "mpd_recv_output")] + public Output recv_output(); + [CCode (cname = "mpd_send_enable_output")] + public bool send_enable_output(uint output_id); + [CCode (cname = "mpd_run_enable_output")] + public bool run_enable_output(uint output_id); + [CCode (cname = "mpd_send_disable_output")] + public bool send_disable_output(uint output_id); + [CCode (cname = "mpd_run_disable_output")] + public bool run_disable_output(uint output_id); + [CCode (cname = "mpd_send_password")] + public bool send_password(string password); + [CCode (cname = "mpd_run_password")] + public bool run_password(string password); + [CCode (cname = "mpd_recv_playlist")] + public Playlist recv_playlist(); + [CCode (cname = "mpd_send_list_playlist")] + public bool send_list_playlist(string name); + [CCode (cname = "mpd_send_list_playlist_meta")] + public bool send_list_playlist_meta(string name); + [CCode (cname = "mpd_send_playlist_clear")] + public bool send_playlist_clear(string name); + [CCode (cname = "mpd_run_playlist_clear")] + public bool run_playlist_clear(string name); + [CCode (cname = "mpd_send_playlist_add")] + public bool send_playlist_add(string name, string path); + [CCode (cname = "mpd_run_playlist_add")] + public bool run_playlist_add(string name, string path); + [CCode (cname = "mpd_send_playlist_move")] + public bool send_playlist_move(string name, uint from, uint to); + [CCode (cname = "mpd_send_playlist_delete")] + public bool send_playlist_delete(string name, uint pos); + [CCode (cname = "mpd_run_playlist_delete")] + public bool run_playlist_delete(string name, uint pos); + [CCode (cname = "mpd_send_save")] + public bool send_save(string name); + [CCode (cname = "mpd_run_save")] + public bool run_save(string name); + [CCode (cname = "mpd_send_load")] + public bool send_load(string name); + [CCode (cname = "mpd_run_load")] + public bool run_load(string name); + [CCode (cname = "mpd_send_rename")] + public bool send_rename(string from, string to); + [CCode (cname = "mpd_run_rename")] + public bool run_rename(string from, string to); + [CCode (cname = "mpd_send_rm")] + public bool send_rm(string name); + [CCode (cname = "mpd_run_rm")] + public bool run_rm(string name); + [CCode (cname = "mpd_recv_pair")] + public Pair recv_pair(); + [CCode (cname = "mpd_recv_pair_named")] + public Pair recv_pair_named(string name); + [CCode (cname = "mpd_return_pair")] + public void return_pair(Pair pair); + [CCode (cname = "mpd_enqueue_pair")] + public void enqueue_pair(Pair pair); + [CCode (cname = "mpd_response_finish")] + public bool response_finish(); + [CCode (cname = "mpd_response_next")] + public bool response_next(); + [CCode (cname = "mpd_search_db_songs")] + public bool search_db_songs(bool exact); + [CCode (cname = "mpd_search_add_db_songs")] + public bool search_add_db_songs(bool exact); + [CCode (cname = "mpd_search_queue_songs")] + public bool search_queue_songs(bool exact); + [CCode (cname = "mpd_search_db_tags")] + public bool search_db_tags(TagType type); + [CCode (cname = "mpd_count_db_songs")] + public bool count_db_songs(); + [CCode (cname = "mpd_search_add_uri_constraint")] + public bool search_add_uri_constraint(Operator oper, string value); + [CCode (cname = "mpd_search_add_tag_constraint")] + public bool search_add_tag_constraint(Operator oper, TagType type, string value); + [CCode (cname = "mpd_search_add_any_tag_constraint")] + public bool search_add_any_tag_constraint(Operator oper, string value); + [CCode (cname = "mpd_search_commit")] + public bool search_commit(); + [CCode (cname = "mpd_search_cancel")] + public bool search_cancel(); + [CCode (cname = "mpd_recv_pair_tag")] + public Pair recv_pair_tag(TagType type); + [CCode (cname = "mpd_send_command")] + public bool send_command(string command, ...); + [CCode (cname = "mpd_recv_song")] + public Song recv_song(); + [CCode (cname = "mpd_send_status")] + public bool send_status(); + [CCode (cname = "mpd_recv_status")] + public Status recv_status(); + [CCode (cname = "mpd_run_status")] + public Status run_status(); + [CCode (cname = "mpd_send_allowed_commands")] + public bool send_allowed_commands(); + [CCode (cname = "mpd_send_disallowed_commands")] + public bool send_disallowed_commands(); + [CCode (cname = "mpd_recv_command_pair")] + public Pair? recv_command_pair(); + [CCode (cname = "mpd_send_list_url_schemes")] + public bool send_list_url_schemas(); + [CCode (cname = "mpd_recv_url_scheme_pair")] + public Pair? recv_url_scheme_pair(); + [CCode (cname = "mpd_send_list_tag_types")] + public bool send_list_tag_types(); + [CCode (cname = "mpd_recv_tag_type_pair")] + public Pair? recv_tag_type_pair(); + [CCode (cname = "mpd_send_list_all")] + public bool send_list_all(string path); + [CCode (cname = "mpd_send_list_all_meta")] + public bool send_list_all_meta(string path); + [CCode (cname = "mpd_send_list_meta")] + public bool send_list_meta(string path); + [CCode (cname = "mpd_send_update")] + public bool send_update(string? path = null); + [CCode (cname = "mpd_send_rescan")] + public bool send_rescan(string? path = null); + [CCode (cname = "mpd_recv_update_id")] + public uint recv_update_id(); + [CCode (cname = "mpd_run_update")] + public uint run_update(string? path = null); + [CCode (cname = "mpd_run_rescan")] + public uint run_rescan(string? path = null); + [CCode (cname = "mpd_send_idle")] + public bool send_idle(); + [CCode (cname = "mpd_send_idle_mask")] + public bool send_idle_mask(Idle mask); + [CCode (cname = "mpd_send_noidle")] + public bool send_noidle(); + [CCode (cname = "mpd_recv_idle")] + public Idle recv_idle(bool disable_timeout); + [CCode (cname = "mpd_run_idle")] + public Idle run_idle(); + [CCode (cname = "mpd_run_idle_mask")] + public Idle run_idle_mask(Idle mask); + [CCode (cname = "mpd_run_noidle")] + public Idle run_noidle(); + [CCode (cname = "mpd_send_stats")] + public bool send_stats(); + [CCode (cname = "mpd_recv_stats")] + public Stats recv_stats(); + [CCode (cname = "mpd_run_stats")] + public Stats run_stats(); + [CCode (cname = "mpd_send_sticker_set")] + public bool send_sticker_set(string type, string uri, string name, string value); + [CCode (cname = "mpd_run_sticker_set")] + public bool run_sticker_set(string type, string uri, string name, string value); + [CCode (cname = "mpd_send_sticker_delete")] + public bool send_sticker_delete(string type, string uri, string name); + [CCode (cname = "mpd_run_sticker_delete")] + public bool run_sticker_delete(string type, string uri, string name); + [CCode (cname = "mpd_send_sticker_get")] + public bool send_sticker_get(string type, string uri, string name); + [CCode (cname = "mpd_send_sticker_list")] + public bool send_sticker_list(string type, string uri); + [CCode (cname = "mpd_send_sticker_find")] + public bool send_sticker_find(string type, string base_uri, string name); + [CCode (cname = "mpd_recv_sticker")] + public Pair recv_sticker(); + [CCode (cname = "mpd_return_sticker")] + public void return_sticker(Pair pair); + [CCode (cname = "mpd_send_list_queue_meta")] + public bool send_list_queue_meta(); + [CCode (cname = "mpd_send_list_queue_range_meta")] + public bool send_list_queue_range_meta(uint start, uint end); + [CCode (cname = "mpd_send_get_queue_song_pos")] + public bool send_get_queue_song_pos(uint pos); + [CCode (cname = "mpd_run_get_queue_song_pos")] + public Song run_get_queue_song_pos(uint pos); + [CCode (cname = "mpd_send_get_queue_song_id")] + public bool send_get_queue_song_id(uint id); + [CCode (cname = "mpd_run_get_queue_song_id")] + public Song run_get_queue_song_id(uint id); + [CCode (cname = "mpd_send_queue_changes_meta")] + public bool send_queue_changes_meta(uint version); + [CCode (cname = "mpd_send_queue_changes_brief")] + public bool send_queue_changes_brief(uint version); + [CCode (cname = "mpd_recv_queue_change_brief")] + public bool recv_queue_change_brief(out uint position_r, out uint id_r); + [CCode (cname = "mpd_send_add")] + public bool send_add(string file); + [CCode (cname = "mpd_run_add")] + public bool run_add(string uri); + [CCode (cname = "mpd_send_add_id")] + public bool send_add_id(string file); + [CCode (cname = "mpd_send_add_id_to")] + public bool send_add_id_to(string uri, uint to); + [CCode (cname = "mpd_recv_song_id")] + public int recv_song_id(); + [CCode (cname = "mpd_run_add_id")] + public int run_add_id(string file); + [CCode (cname = "mpd_run_add_id_to")] + public int run_add_id_to(string uri, uint to); + [CCode (cname = "mpd_send_delete")] + public bool send_delete(uint pos); + [CCode (cname = "mpd_run_delete")] + public bool run_delete(uint pos); + [CCode (cname = "mpd_send_delete_range")] + public bool send_delete_range(uint start, uint end); + [CCode (cname = "mpd_run_delete_range")] + public bool run_delete_range(uint start, uint end); + [CCode (cname = "mpd_send_delete_id")] + public bool send_delete_id(uint id); + [CCode (cname = "mpd_run_delete_id")] + public bool run_delete_id(uint id); + [CCode (cname = "mpd_send_shuffle")] + public bool send_shuffle(); + [CCode (cname = "mpd_run_shuffle")] + public bool run_shuffle(); + [CCode (cname = "mpd_send_shuffle_range")] + public bool send_shuffle_range(uint start, uint end); + [CCode (cname = "mpd_run_shuffle_range")] + public bool run_shuffle_range(uint start, uint end); + [CCode (cname = "mpd_send_clear")] + public bool send_clear(); + [CCode (cname = "mpd_run_clear")] + public bool run_clear(); + [CCode (cname = "mpd_send_move")] + public bool send_move(uint from, uint to); + [CCode (cname = "mpd_run_move")] + public bool run_move(uint from, uint to); + [CCode (cname = "mpd_send_move_id")] + public bool send_move_id(uint from, uint to); + [CCode (cname = "mpd_run_move_id")] + public bool run_move_id(uint from, uint to); + [CCode (cname = "mpd_send_move_range")] + public bool send_move_range(uint start, uint end, uint to); + [CCode (cname = "mpd_run_move_range")] + public bool run_move_range(uint start, uint end, uint to); + [CCode (cname = "mpd_send_swap")] + public bool send_swap(uint pos1, uint pos2); + [CCode (cname = "mpd_run_swap")] + public bool run_swap(uint pos1, uint pos2); + [CCode (cname = "mpd_send_swap_id")] + public bool send_swap_id(uint id1, uint id2); + [CCode (cname = "mpd_run_swap_id")] + public bool run_swap_id(uint id1, uint id2); + [CCode (cname = "mpd_send_prio")] + public bool send_prio(int priority, uint position); + [CCode (cname = "mpd_run_prio")] + public bool run_prio(int priority, uint position); + [CCode (cname = "mpd_send_prio_range")] + public bool send_prio_range(int priority, uint start, uint end); + [CCode (cname = "mpd_run_prio_range")] + public bool run_prio_range(int priority, uint start, uint end); + [CCode (cname = "mpd_send_prio_id")] + public bool send_prio_id(int priority, uint id); + [CCode (cname = "mpd_run_prio_id")] + public bool run_prio_id(int priority, uint id); + [CCode (cname = "mpd_send_current_song")] + public bool send_current_song(); + [CCode (cname = "mpd_run_current_song")] + public Song run_current_song(); + [CCode (cname = "mpd_send_play")] + public bool send_play(); + [CCode (cname = "mpd_run_play")] + public bool run_play(); + [CCode (cname = "mpd_send_play_pos")] + public bool send_play_pos(uint song_pos); + [CCode (cname = "mpd_run_play_pos")] + public bool run_play_pos(uint song_pos); + [CCode (cname = "mpd_send_play_id")] + public bool send_play_id(uint id); + [CCode (cname = "mpd_run_play_id")] + public bool run_play_id(uint song_id); + [CCode (cname = "mpd_send_stop")] + public bool send_stop(); + [CCode (cname = "mpd_run_stop")] + public bool run_stop(); + [CCode (cname = "mpd_send_toggle_pause")] + public bool send_toggle_pause(); + [CCode (cname = "mpd_run_toggle_pause")] + public bool run_toggle_pause(); + [CCode (cname = "mpd_send_pause")] + public bool send_pause(bool mode); + [CCode (cname = "mpd_run_pause")] + public bool run_pause(bool mode); + [CCode (cname = "mpd_send_next")] + public bool send_next(); + [CCode (cname = "mpd_run_next")] + public bool run_next(); + [CCode (cname = "mpd_send_previous")] + public bool send_previous(); + [CCode (cname = "mpd_run_previous")] + public bool run_previous(); + [CCode (cname = "mpd_send_seek_pos")] + public bool send_seek_pos(uint song_pos, uint t); + [CCode (cname = "mpd_run_seek_pos")] + public bool run_seek_pos(uint song_pos, uint t); + [CCode (cname = "mpd_send_seek_id")] + public bool send_seek_id(uint id, uint t); + [CCode (cname = "mpd_run_seek_id")] + public bool run_seek_id(uint song_id, uint t); + [CCode (cname = "mpd_send_repeat")] + public bool send_repeat(bool mode); + [CCode (cname = "mpd_run_repeat")] + public bool run_repeat(bool mode); + [CCode (cname = "mpd_send_random")] + public bool send_random(bool mode); + [CCode (cname = "mpd_run_random")] + public bool run_random(bool mode); + [CCode (cname = "mpd_send_single")] + public bool send_single(bool mode); + [CCode (cname = "mpd_run_single")] + public bool run_single(bool mode); + [CCode (cname = "mpd_send_consume")] + public bool send_consume(bool mode); + [CCode (cname = "mpd_run_consume")] + public bool run_consume(bool mode); + [CCode (cname = "mpd_send_crossfade")] + public bool send_crossfade(uint seconds); + [CCode (cname = "mpd_run_crossfade")] + public bool run_crossfade(uint seconds); + [CCode (cname = "mpd_send_mixrampdb")] + public bool send_mixrampdb(float db); + [CCode (cname = "mpd_run_mixrampdb")] + public bool run_mixrampdb(float db); + [CCode (cname = "mpd_send_mixrampdelay")] + public bool send_mixrampdelay(float seconds); + [CCode (cname = "mpd_run_mixrampdelay")] + public bool run_mixrampdelay(float seconds); + [CCode (cname = "mpd_send_clearerror")] + public bool send_clearerror(); + [CCode (cname = "mpd_run_clearerror")] + public bool run_clearerror(); + [CCode (cname = "mpd_send_list_playlists")] + public bool send_list_playlists(); + [CCode (cname = "mpd_send_subscribe")] + public bool send_subscribe(string channel); + [CCode (cname = "mpd_run_subscribe")] + public bool run_subscribe(string channel); + [CCode (cname = "mpd_send_unsubscribe")] + public bool send_unsubscribe(string channel); + [CCode (cname = "mpd_run_unsubscribe")] + public bool run_unsubscribe(string channel); + [CCode (cname = "mpd_send_send_message")] + public bool send_send_message(string channel, string text); + [CCode (cname = "mpd_run_send_message")] + public bool run_send_message(string channel, string text); + [CCode (cname = "mpd_send_read_messages")] + public bool send_read_messages(); + [CCode (cname = "mpd_recv_message")] + public Message recv_message(); + [CCode (cname = "mpd_send_channels")] + public bool send_channels(); + [CCode (cname = "mpd_recv_channel_pair")] + public Pair recv_channel_pair(); + } + + [CCode (cname = "struct mpd_directory", + copy_function = "mpd_directory_dup", + free_function = "mpd_directory_free")] + [Compact] + public class Directory { + public string path { get; } + + public unowned string get_path(); + public bool feed(Mpd.Pair pair); + public Entity? entity_begin(); + } + + [CCode (cname = "struct mpd_entity", + free_function = "mpd_entity_free")] + [Compact] + public class Entity { + public EntityType type { get; } + public Directory directory { get; } + public Song song { get; } + public Playlist playlist { get; } + + public EntityType get_type(); + public Directory get_directory(); + public Song get_song(); + public Playlist get_playlist(); + public bool feed(Pair pair); + } + + [CCode (cname = "struct mpd_output", + free_function = "mpd_output_free")] + [Compact] + public class Output { + public uint id { get; } + public string name { get; } + public bool enabled { get; } + + public bool feed(Pair pair); + public uint get_id(); + public unowned string get_name(); + public bool get_enabled(); + } + + [CCode (cname = "struct mpd_pair", + free_function = "")] + [Compact] + public class Pair { + public unowned string name; + public unowned string value; + [CCode (cname = "mpd_directory_begin")] + public Directory? directory_begin(); + [CCode (cname = "mpd_output_begin")] + public Output output_begin(); + [CCode (cname = "mpd_playlist_begin")] + public Playlist playlist_begin(); + [CCode (cname = "mpd_song_begin")] + public Song song_begin(); + [CCode (cname = "mpd_idle_parse_pair")] + public Idle idle_parse_pair(); + } + + [CCode (cname = "struct mpd_parser", + free_function = "mpd_parser_free")] + [Compact] + public class Parser { + public ServerError server_error { get; } + public uint at { get; } + public string message { get; } + public string name { get; } + public string value { get; } + + public ParserResult feed(string line); + public bool is_discrete(); + public ServerError get_server_error(); + public uint get_at(); + public unowned string get_message(); + public unowned string get_name(); + public unowned string get_value(); + } + + [CCode (cname = "struct mpd_playlist", + copy_function = "mpd_playlist_dup", + free_function = "mpd_playlist_free")] + [Compact] + public class Playlist { + public string path { get; } + public int64 last_modified { get; } + + public string get_path(); + public int64 get_last_modified(); + public bool feed(Pair pair); + } + + [CCode (cname = "struct mpd_song", + copy_function = "mpd_song_dup", + free_function = "mpd_song_free")] + [Compact] + public class Song { + public string uri { get; } + public uint duration { get; } + public int64 last_modified { get; } + public uint pos { get; set; } + public uint id { get; } + + public unowned string get_uri(); + public unowned string get_tag(TagType type, uint idx = 0); + public uint get_duration(); + public int64 get_last_modified(); + public void set_pos(uint pos); + public uint get_pos(); + public uint get_id(); + public bool feed(Pair pair); + } + + [CCode (cname = "struct mpd_stats", + free_function = "mpd_stats_free")] + [Compact] + public class Stats { + public uint number_of_artist { get; } + public uint number_of_albums { get; } + public uint number_of_songs { get; } + public ulong uptime { get; } + public ulong db_update_time { get; } + public ulong play_time { get; } + public ulong db_play_time { get; } + + public void feed(Pair pair); + public uint get_number_of_artists(); + public uint get_number_of_albums(); + public uint get_number_of_songs(); + public ulong get_uptime(); + public ulong get_db_update_time(); + public ulong get_play_time(); + public ulong get_db_play_time(); + } + + [CCode (cname = "struct mpd_status", + free_function = "mpd_status_free")] + [Compact] + public class Status { + public int volume { get; } + public bool repeat { get; } + public bool random { get; } + public bool single { get; } + public bool consume { get; } + public uint queue_length { get; } + public uint queue_version { get; } + public State state { get; } + public uint crossfade { get; } + public float mixrampdb { get; } + public float mixrampdelay { get; } + public int song_pos { get; } + public int song_id { get; } + public uint elapsed_time { get; } + public uint elapsed_ms { get; } + public uint total_time { get; } + public uint kbit_rate { get; } + public AudioFormat audio_format { get; } + public uint update_id { get; } + public string error { get; } + + public int get_volume(); + public bool get_repeat(); + public bool get_random(); + public bool get_single(); + public bool get_consume(); + public uint get_queue_length(); + public uint get_queue_version(); + public State get_state(); + public uint get_crossfade(); + public float get_mixrampdb(); + public float get_mixrampdelay(); + public int get_song_pos(); + public int get_song_id(); + public int get_next_song_pos(); + public int get_next_song_id(); + public uint get_elapsed_time(); + public uint get_elapsed_ms(); + public uint get_total_time(); + public uint get_kbit_rate(); + public AudioFormat get_audio_format(); + public uint get_update_id(); + public unowned string get_error(); + } + + [CCode (cname = "struct mpd_settings", + free_function = "mpd_settings_free")] + [Compact] + public class Settings { + public string? host { get; } + public uint port { get; } + public uint timeout_ms { get; } + public string? password { get; } + + public Settings(string? host = null, uint port = 0, uint timeout_ms = 0, string? reserved = null, string? password = null); + public string? get_host(); + public uint get_port(); + public uint get_timeout_ms(); + public string? get_password(); + } + + [CCode (cname = "struct mpd_message", + free_function = "mpd_message_free")] + [Compact] + public class Message { + public string channel { get; } + public string text { get; } + + public bool feed(Pair pair); + public unowned string get_channel(); + public unowned string get_text(); + } + + public Status status_begin(); + public unowned string tag_name(TagType type); + public TagType tag_name_parse(string name); + public TagType tag_name_iparse(string name); + public unowned string? idle_name(Idle idle); + public Idle idle_name_parse(string name); + public Stats stats_begin(); + public unowned string parse_sticker(string input, out int64 name_length_r); + + public const string LIBMPDCLIENT_MAJOR_VERSION; + public const string LIBMPDCLIENT_MINOR_VERSION; + public const string LIBMPDCLIENT_PATCH_VERSION; +}