| audio_format.h | | audio_format.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| * \brief MPD client library | | * \brief MPD client library | |
| * | | * | |
| * Do not include this header directly. Use mpd/client.h instead. | | * Do not include this header directly. Use mpd/client.h instead. | |
| */ | | */ | |
| | | | |
| #ifndef MPD_AUDIO_FORMAT_H | | #ifndef MPD_AUDIO_FORMAT_H | |
| #define MPD_AUDIO_FORMAT_H | | #define MPD_AUDIO_FORMAT_H | |
| | | | |
| #include <stdint.h> | | #include <stdint.h> | |
| | | | |
|
| | | enum { | |
| | | /** | |
| | | * 32 bit floating point samples. | |
| | | */ | |
| | | MPD_SAMPLE_FORMAT_FLOAT = 0xe0, | |
| | | | |
| | | /** | |
| | | * DSD samples. | |
| | | */ | |
| | | MPD_SAMPLE_FORMAT_DSD = 0xe1, | |
| | | }; | |
| | | | |
| /** | | /** | |
| * This structure describes the format of a raw PCM stream. | | * This structure describes the format of a raw PCM stream. | |
| */ | | */ | |
| struct mpd_audio_format { | | struct mpd_audio_format { | |
| /** | | /** | |
| * The sample rate in Hz. A better name for this attribute is | | * The sample rate in Hz. A better name for this attribute is | |
| * "frame rate", because technically, you have two samples per | | * "frame rate", because technically, you have two samples per | |
| * frame in stereo sound. | | * frame in stereo sound. | |
| */ | | */ | |
| uint32_t sample_rate; | | uint32_t sample_rate; | |
| | | | |
| /** | | /** | |
| * The number of significant bits per sample. Samples are | | * The number of significant bits per sample. Samples are | |
| * currently always signed. Supported values are 8, 16, 24, | | * currently always signed. Supported values are 8, 16, 24, | |
|
| * 32. 24 bit samples are packed in 32 bit integers. | | * 32 and the special values #MPD_SAMPLE_FORMAT_FLOAT, | |
| | | * #MPD_SAMPLE_FORMAT_DSD. | |
| */ | | */ | |
| uint8_t bits; | | uint8_t bits; | |
| | | | |
| /** | | /** | |
| * The number of channels. Only mono (1) and stereo (2) are | | * The number of channels. Only mono (1) and stereo (2) are | |
| * fully supported currently. | | * fully supported currently. | |
| */ | | */ | |
| uint8_t channels; | | uint8_t channels; | |
| | | | |
| /** reserved for future use */ | | /** reserved for future use */ | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 15 lines changed or added | |
|
| connection.h | | connection.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 63 | |
| * This opaque object represents a connection to a MPD server. Call | | * This opaque object represents a connection to a MPD server. Call | |
| * mpd_connection_new() to create a new instance. To free an | | * mpd_connection_new() to create a new instance. To free an | |
| * instance, call mpd_connection_free(). | | * instance, call mpd_connection_free(). | |
| * | | * | |
| * Error handling: most functions return a "bool" indicating success | | * Error handling: most functions return a "bool" indicating success | |
| * or failure. In this case, you may query the nature of the error | | * or failure. In this case, you may query the nature of the error | |
| * with the functions mpd_connection_get_error(), | | * with the functions mpd_connection_get_error(), | |
| * mpd_connection_get_error_message(), | | * mpd_connection_get_error_message(), | |
| * mpd_connection_get_server_error(). | | * mpd_connection_get_server_error(). | |
| * | | * | |
|
| * Some errors can be cleared by calling mpd_clear_error(), like | | * Some errors can be cleared by calling mpd_connection_clear_error(), | |
| * #MPD_ERROR_SERVER, #MPD_ERROR_ARGUMENT. Most others are fatal, and | | * like #MPD_ERROR_SERVER, #MPD_ERROR_ARGUMENT. Most others are | |
| * cannot be recovered, like #MPD_ERROR_CLOSED - mpd_clear_error() | | * fatal, and cannot be recovered, like #MPD_ERROR_CLOSED - | |
| * returns false. | | * mpd_connection_clear_error() returns false. | |
| * | | * | |
| * Some functions like mpd_recv_pair() cannot differentiate between | | * Some functions like mpd_recv_pair() cannot differentiate between | |
| * "end of response" and "error". If this function returns NULL, you | | * "end of response" and "error". If this function returns NULL, you | |
| * have to check mpd_connection_get_error(). | | * have to check mpd_connection_get_error(). | |
| */ | | */ | |
| struct mpd_connection; | | struct mpd_connection; | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| skipping to change at line 135 | | skipping to change at line 135 | |
| void mpd_connection_free(struct mpd_connection *connection); | | void mpd_connection_free(struct mpd_connection *connection); | |
| | | | |
| /** | | /** | |
| * Returns the settings which were used to connect to the server. May | | * Returns the settings which were used to connect to the server. May | |
| * be NULL if the settings are not known. | | * be NULL if the settings are not known. | |
| */ | | */ | |
| const struct mpd_settings * | | const struct mpd_settings * | |
| mpd_connection_get_settings(const struct mpd_connection *connection); | | mpd_connection_get_settings(const struct mpd_connection *connection); | |
| | | | |
| /** | | /** | |
|
| | | * Enables (or disables) TCP keepalives. | |
| | | * | |
| | | * Keepalives are enabled using the SO_KEEPALIVE socket option. They may b | |
| | | e | |
| | | * required for long-idled connections to persist on some networks that | |
| | | * would otherwise terminate inactive TCP sessions. | |
| | | * | |
| | | * The default value is false. | |
| | | * | |
| | | * @param connection the connection to MPD | |
| | | * @param keepalive whether TCP keepalives should be enabled | |
| | | */ | |
| | | void mpd_connection_set_keepalive(struct mpd_connection *connection, | |
| | | bool keepalive); | |
| | | | |
| | | /** | |
| * Sets the timeout for synchronous operations. If the MPD server | | * Sets the timeout for synchronous operations. If the MPD server | |
| * does not send a response during this time span, the operation is | | * does not send a response during this time span, the operation is | |
| * aborted by libmpdclient. | | * aborted by libmpdclient. | |
| * | | * | |
| * The initial value is the one passed to mpd_connection_new(). If | | * The initial value is the one passed to mpd_connection_new(). If | |
| * you have used mpd_connection_new_async(), then the default value is | | * you have used mpd_connection_new_async(), then the default value is | |
| * 30 seconds. | | * 30 seconds. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param timeout_ms the desired timeout in milliseconds; must not be 0 | | * @param timeout_ms the desired timeout in milliseconds; must not be 0 | |
| | | | |
End of changes. 3 change blocks. |
| 5 lines changed or deleted | | 21 lines changed or added | |
|
| database.h | | database.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 90 | |
| * To read the response, you may use mpd_recv_entity(). | | * To read the response, you may use mpd_recv_entity(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param path the directory to be listed | | * @param path the directory to be listed | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_list_meta(struct mpd_connection *connection, const char *path); | | mpd_send_list_meta(struct mpd_connection *connection, const char *path); | |
| | | | |
| /** | | /** | |
|
| | | * Send "readcomments". Read the "comments" of a song file. This | |
| | | * returns key/value pairs which can be read using mpd_recv_pair(). | |
| | | * | |
| | | * @param connection the connection to MPD | |
| | | * @param path the relative path of the song file within the music | |
| | | * directory or an arbitrary file path starting with file:/// | |
| | | * @return true on success, false on error | |
| | | */ | |
| | | bool | |
| | | mpd_send_read_comments(struct mpd_connection *connection, const char *path) | |
| | | ; | |
| | | | |
| | | /** | |
| * Instructs MPD to update the music database: find new files, remove | | * Instructs MPD to update the music database: find new files, remove | |
| * deleted files, update modified files. | | * deleted files, update modified files. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param path optional path to update; if NULL, then all of the music | | * @param path optional path to update; if NULL, then all of the music | |
| * directory is updated | | * directory is updated | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_update(struct mpd_connection *connection, const char *path); | | mpd_send_update(struct mpd_connection *connection, const char *path); | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 14 lines changed or added | |
|
| directory.h | | directory.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 45 | | skipping to change at line 45 | |
| * | | * | |
| * Do not include this header directly. Use mpd/client.h instead. | | * Do not include this header directly. Use mpd/client.h instead. | |
| */ | | */ | |
| | | | |
| #ifndef MPD_DIRECTORY_H | | #ifndef MPD_DIRECTORY_H | |
| #define MPD_DIRECTORY_H | | #define MPD_DIRECTORY_H | |
| | | | |
| #include <mpd/compiler.h> | | #include <mpd/compiler.h> | |
| | | | |
| #include <stdbool.h> | | #include <stdbool.h> | |
|
| | | #include <time.h> | |
| | | | |
| struct mpd_pair; | | struct mpd_pair; | |
| struct mpd_connection; | | struct mpd_connection; | |
| | | | |
| /** | | /** | |
| * \struct mpd_directory | | * \struct mpd_directory | |
| * | | * | |
| * An opaque directory object. This is a container for more songs, | | * An opaque directory object. This is a container for more songs, | |
| * directories or playlists. | | * directories or playlists. | |
| */ | | */ | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 85 | |
| | | | |
| /** | | /** | |
| * Returns the path of this directory, relative to the MPD music | | * Returns the path of this directory, relative to the MPD music | |
| * directory. It does not begin with a slash. | | * directory. It does not begin with a slash. | |
| */ | | */ | |
| mpd_pure | | mpd_pure | |
| const char * | | const char * | |
| mpd_directory_get_path(const struct mpd_directory *directory); | | mpd_directory_get_path(const struct mpd_directory *directory); | |
| | | | |
| /** | | /** | |
|
| | | * @return the POSIX UTC time stamp of the last modification, or 0 if | |
| | | * that is unknown | |
| | | */ | |
| | | mpd_pure | |
| | | time_t | |
| | | mpd_directory_get_last_modified(const struct mpd_directory *directory); | |
| | | | |
| | | /** | |
| * Begins parsing a new directory. | | * Begins parsing a new directory. | |
| * | | * | |
| * @param pair the first pair in this directory (name must be "directory") | | * @param pair the first pair in this directory (name must be "directory") | |
| * @return the new #mpd_entity object, or NULL on error (out of | | * @return the new #mpd_entity object, or NULL on error (out of | |
| * memory, or pair name is not "directory") | | * memory, or pair name is not "directory") | |
| */ | | */ | |
| mpd_malloc | | mpd_malloc | |
| struct mpd_directory * | | struct mpd_directory * | |
| mpd_directory_begin(const struct mpd_pair *pair); | | mpd_directory_begin(const struct mpd_pair *pair); | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 10 lines changed or added | |
|
| queue.h | | queue.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 62 | | skipping to change at line 62 | |
| * including meta information. | | * including meta information. | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_list_queue_meta(struct mpd_connection *connection); | | mpd_send_list_queue_meta(struct mpd_connection *connection); | |
| | | | |
| /** | | /** | |
| * Like mpd_send_list_queue_meta(), but specifies a (position) range. | | * Like mpd_send_list_queue_meta(), but specifies a (position) range. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param start the start position of the range (including) | | * @param start the start position of the range (including) | |
|
| * @param end the end position of the range (excluding) | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_list_queue_range_meta(struct mpd_connection *connection, | | mpd_send_list_queue_range_meta(struct mpd_connection *connection, | |
| unsigned start, unsigned end); | | unsigned start, unsigned end); | |
| | | | |
| /** | | /** | |
| * Requests information (including tags) about one song in the | | * Requests information (including tags) about one song in the | |
| * playlist (command "playlistid"). | | * playlist (command "playlistid"). | |
| * | | * | |
| | | | |
| skipping to change at line 236 | | skipping to change at line 237 | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_delete(struct mpd_connection *connection, unsigned pos); | | mpd_run_delete(struct mpd_connection *connection, unsigned pos); | |
| | | | |
| /** | | /** | |
| * Deletes songs from the queue. | | * Deletes songs from the queue. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param start the start position of the range (including) | | * @param start the start position of the range (including) | |
|
| * @param end the end position of the range (excluding) | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_delete_range(struct mpd_connection *connection, | | mpd_send_delete_range(struct mpd_connection *connection, | |
| unsigned start, unsigned end); | | unsigned start, unsigned end); | |
| | | | |
| /** | | /** | |
| * Shortcut for mpd_send_delete_range() and mpd_response_finish(). | | * Shortcut for mpd_send_delete_range() and mpd_response_finish(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param start the start position of the range (including) | | * @param start the start position of the range (including) | |
|
| * @param end the end position of the range (excluding) | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_delete_range(struct mpd_connection *connection, | | mpd_run_delete_range(struct mpd_connection *connection, | |
| unsigned start, unsigned end); | | unsigned start, unsigned end); | |
| | | | |
| /** | | /** | |
| * Deletes a song from the queue. | | * Deletes a song from the queue. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| | | | |
| skipping to change at line 295 | | skipping to change at line 298 | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_shuffle(struct mpd_connection *connection); | | mpd_run_shuffle(struct mpd_connection *connection); | |
| | | | |
| /** | | /** | |
| * Shuffles a range within the queue. | | * Shuffles a range within the queue. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param start the start position of the range (including) | | * @param start the start position of the range (including) | |
|
| * @param end the end position of the range (excluding) | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_shuffle_range(struct mpd_connection *connection, unsigned start, u
nsigned end); | | mpd_send_shuffle_range(struct mpd_connection *connection, unsigned start, u
nsigned end); | |
| | | | |
| /** | | /** | |
| * Shortcut for mpd_send_shuffle_range() and mpd_response_finish(). | | * Shortcut for mpd_send_shuffle_range() and mpd_response_finish(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param start the start position of the range (including) | | * @param start the start position of the range (including) | |
|
| * @param end the end position of the range (excluding) | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_shuffle_range(struct mpd_connection *connection, | | mpd_run_shuffle_range(struct mpd_connection *connection, | |
| unsigned start, unsigned end); | | unsigned start, unsigned end); | |
| | | | |
| /** | | /** | |
| * Clear the queue. | | * Clear the queue. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| */ | | */ | |
| | | | |
| skipping to change at line 372 | | skipping to change at line 377 | |
| * @param to the new position of the song (not an id!) | | * @param to the new position of the song (not an id!) | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_move_id(struct mpd_connection *connection, unsigned from, unsigned
to); | | mpd_run_move_id(struct mpd_connection *connection, unsigned from, unsigned
to); | |
| | | | |
| /** | | /** | |
| * Moves a range of songs within the queue. | | * Moves a range of songs within the queue. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param start the start position of the range (including) | | * @param start the start position of the range (including) | |
|
| * @param end the end position of the range (excluding) | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| * @param to the new position of the song range | | * @param to the new position of the song range | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_move_range(struct mpd_connection *connection, | | mpd_send_move_range(struct mpd_connection *connection, | |
| unsigned start, unsigned end, unsigned to); | | unsigned start, unsigned end, unsigned to); | |
| | | | |
| /** | | /** | |
| * Shortcut for mpd_send_move_id() and mpd_response_finish(). | | * Shortcut for mpd_send_move_id() and mpd_response_finish(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param start the start position of the range (including) | | * @param start the start position of the range (including) | |
|
| * @param end the end position of the range (excluding) | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| * @param to the new position of the song range | | * @param to the new position of the song range | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_move_range(struct mpd_connection *connection, | | mpd_run_move_range(struct mpd_connection *connection, | |
| unsigned start, unsigned end, unsigned to); | | unsigned start, unsigned end, unsigned to); | |
| | | | |
| /** | | /** | |
| * Swap the position of two songs in the queue. | | * Swap the position of two songs in the queue. | |
| * | | * | |
| | | | |
| skipping to change at line 449 | | skipping to change at line 456 | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_prio(struct mpd_connection *connection, int priority, | | mpd_send_prio(struct mpd_connection *connection, int priority, | |
| unsigned position); | | unsigned position); | |
| | | | |
| /** | | /** | |
| * Shortcut for mpd_send_prio() and mpd_response_finish(). | | * Shortcut for mpd_send_prio() and mpd_response_finish(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param priority a number between 0 and 255 | | * @param priority a number between 0 and 255 | |
|
| * @param start the start position of the range (including) | | * @param position the position of the song | |
| * @param end the end position of the range (excluding) | | | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_prio(struct mpd_connection *connection, int priority, | | mpd_run_prio(struct mpd_connection *connection, int priority, | |
| unsigned position); | | unsigned position); | |
| | | | |
| /** | | /** | |
| * Change the priority of a song range. | | * Change the priority of a song range. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param priority a number between 0 and 255 | | * @param priority a number between 0 and 255 | |
|
| * @param position the position of the song | | * @param start the start position of the range (including) | |
| | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| */ | | */ | |
| bool | | bool | |
| mpd_send_prio_range(struct mpd_connection *connection, int priority, | | mpd_send_prio_range(struct mpd_connection *connection, int priority, | |
| unsigned start, unsigned end); | | unsigned start, unsigned end); | |
| | | | |
| /** | | /** | |
| * Shortcut for mpd_send_prio_range() and mpd_response_finish(). | | * Shortcut for mpd_send_prio_range() and mpd_response_finish(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param priority a number between 0 and 255 | | * @param priority a number between 0 and 255 | |
|
| * @param position the position of the song | | * @param start the start position of the range (including) | |
| | | * @param end the end position of the range (excluding); the special | |
| | | * value "(unsigned)-1" makes the end of the range open | |
| */ | | */ | |
| bool | | bool | |
| mpd_run_prio_range(struct mpd_connection *connection, int priority, | | mpd_run_prio_range(struct mpd_connection *connection, int priority, | |
| unsigned start, unsigned end); | | unsigned start, unsigned end); | |
| | | | |
| /** | | /** | |
| * Change the priority of the specified song. | | * Change the priority of the specified song. | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @param priority a number between 0 and 255 | | * @param priority a number between 0 and 255 | |
| | | | |
End of changes. 11 change blocks. |
| 12 lines changed or deleted | | 22 lines changed or added | |
|
| search.h | | search.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 49 | | skipping to change at line 49 | |
| */ | | */ | |
| | | | |
| #ifndef MPD_DB_H | | #ifndef MPD_DB_H | |
| #define MPD_DB_H | | #define MPD_DB_H | |
| | | | |
| #include <mpd/connection.h> | | #include <mpd/connection.h> | |
| #include <mpd/tag.h> | | #include <mpd/tag.h> | |
| #include <mpd/compiler.h> | | #include <mpd/compiler.h> | |
| | | | |
| #include <stdbool.h> | | #include <stdbool.h> | |
|
| | | #include <time.h> | |
| | | | |
| /** | | /** | |
| * This type is not yet used, it is reserved for a future protocol | | * This type is not yet used, it is reserved for a future protocol | |
| * extension which will allow us to specify a comparison operator for | | * extension which will allow us to specify a comparison operator for | |
| * constraints. | | * constraints. | |
| */ | | */ | |
| enum mpd_operator { | | enum mpd_operator { | |
| /** | | /** | |
| * The default search operator. If "exact" was passed as | | * The default search operator. If "exact" was passed as | |
| * "true", then it means "full string comparison"; if false, | | * "true", then it means "full string comparison"; if false, | |
| | | | |
| skipping to change at line 131 | | skipping to change at line 132 | |
| * Constraints may be specified with mpd_search_add_tag_constraint(). | | * Constraints may be specified with mpd_search_add_tag_constraint(). | |
| * Send the command with mpd_search_commit(), and read the response | | * Send the command with mpd_search_commit(), and read the response | |
| * with mpd_recv_stats(). | | * with mpd_recv_stats(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool mpd_count_db_songs(struct mpd_connection *connection); | | bool mpd_count_db_songs(struct mpd_connection *connection); | |
| | | | |
| /** | | /** | |
|
| | | * Limit the search to a certain directory. | |
| | | * | |
| | | * @param connection a #mpd_connection | |
| | | * @param oper reserved, pass #MPD_OPERATOR_DEFAULT | |
| | | * @param value the URI relative to the music directory | |
| | | * @return true on success, false on error | |
| | | */ | |
| | | bool | |
| | | mpd_search_add_base_constraint(struct mpd_connection *connection, | |
| | | enum mpd_operator oper, | |
| | | const char *value); | |
| | | | |
| | | /** | |
| * Add a constraint on the song's URI. | | * Add a constraint on the song's URI. | |
| * | | * | |
| * @param connection a #mpd_connection | | * @param connection a #mpd_connection | |
| * @param oper reserved, pass #MPD_OPERATOR_DEFAULT | | * @param oper reserved, pass #MPD_OPERATOR_DEFAULT | |
| * @param value The value of the constraint | | * @param value The value of the constraint | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_search_add_uri_constraint(struct mpd_connection *connection, | | mpd_search_add_uri_constraint(struct mpd_connection *connection, | |
| enum mpd_operator oper, | | enum mpd_operator oper, | |
| | | | |
| skipping to change at line 172 | | skipping to change at line 186 | |
| * @param oper reserved, pass #MPD_OPERATOR_DEFAULT | | * @param oper reserved, pass #MPD_OPERATOR_DEFAULT | |
| * @param value The value of the constraint | | * @param value The value of the constraint | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_search_add_any_tag_constraint(struct mpd_connection *connection, | | mpd_search_add_any_tag_constraint(struct mpd_connection *connection, | |
| enum mpd_operator oper, | | enum mpd_operator oper, | |
| const char *value); | | const char *value); | |
| | | | |
| /** | | /** | |
|
| | | * Limit the search to files modified after the given time stamp. | |
| | | * | |
| | | * @param connection a #mpd_connection | |
| | | * @param oper reserved, pass #MPD_OPERATOR_DEFAULT | |
| | | * @param value the reference time stamp | |
| | | * @return true on success, false on error | |
| | | */ | |
| | | bool | |
| | | mpd_search_add_modified_since_constraint(struct mpd_connection *connection, | |
| | | enum mpd_operator oper, | |
| | | time_t value); | |
| | | | |
| | | /** | |
| | | * Request only a portion of the result set. | |
| | | * | |
| | | * @param connection a #mpd_connection | |
| | | * @param oper reserved, pass #MPD_OPERATOR_DEFAULT | |
| | | * @param type The tag type of the constraint | |
| | | * @param value The value of the constraint | |
| | | * @return true on success, false on error | |
| | | */ | |
| | | bool | |
| | | mpd_search_add_window(struct mpd_connection *connection, | |
| | | unsigned start, unsigned end); | |
| | | | |
| | | /** | |
| * Starts the real search with constraints added with | | * Starts the real search with constraints added with | |
| * mpd_search_add_constraint(). | | * mpd_search_add_constraint(). | |
| * | | * | |
| * @param connection the connection to MPD | | * @param connection the connection to MPD | |
| * @return true on success, false on error | | * @return true on success, false on error | |
| */ | | */ | |
| bool | | bool | |
| mpd_search_commit(struct mpd_connection *connection); | | mpd_search_commit(struct mpd_connection *connection); | |
| | | | |
| /** | | /** | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 41 lines changed or added | |
|
| settings.h | | settings.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 59 | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * Creates a new #mpd_settings object. The values which are not | | * Creates a new #mpd_settings object. The values which are not | |
| * passed by the caller are taken from environment variables. | | * passed by the caller are taken from environment variables. | |
| * | | * | |
| * @param host the server's host name, IP address or Unix socket path. | | * @param host the server's host name, IP address or Unix socket path. | |
|
| | | * An address starting with '@' denotes an "abstract socket". | |
| * NULL is allowed here, which will connect to the default host | | * NULL is allowed here, which will connect to the default host | |
| * (using the MPD_HOST environment variable if present). | | * (using the MPD_HOST environment variable if present). | |
| * @param port the TCP port to connect to, 0 for default port (using | | * @param port the TCP port to connect to, 0 for default port (using | |
| * the MPD_PORT environment variable if present). If "host" is a Unix | | * the MPD_PORT environment variable if present). If "host" is a Unix | |
| * socket path, this parameter is ignored. | | * socket path, this parameter is ignored. | |
| * @param timeout_ms the timeout in milliseconds, 0 for the default | | * @param timeout_ms the timeout in milliseconds, 0 for the default | |
| * timeout (the environment variable MPD_TIMEOUT may specify a timeout | | * timeout (the environment variable MPD_TIMEOUT may specify a timeout | |
| * in seconds) | | * in seconds) | |
| * @param reserved reserved for future use, pass NULL | | * @param reserved reserved for future use, pass NULL | |
| * @param password the password, or NULL to use the default (MPD_HOST | | * @param password the password, or NULL to use the default (MPD_HOST | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| song.h | | song.h | |
| /* libmpdclient | | /* libmpdclient | |
|
| (c) 2003-2010 The Music Player Daemon Project | | (c) 2003-2015 The Music Player Daemon Project | |
| This project's homepage is: http://www.musicpd.org | | This project's homepage is: http://www.musicpd.org | |
| | | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions | | modification, are permitted provided that the following conditions | |
| are met: | | are met: | |
| | | | |
| - Redistributions of source code must retain the above copyright | | - Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | | notice, this list of conditions and the following disclaimer. | |
| | | | |
| - Redistributions in binary form must reproduce the above copyright | | - Redistributions in binary form must reproduce the above copyright | |
| | | | |
| skipping to change at line 112 | | skipping to change at line 112 | |
| | | | |
| /** | | /** | |
| * Returns the duration of this song in seconds. 0 means the duration | | * Returns the duration of this song in seconds. 0 means the duration | |
| * is unknown. | | * is unknown. | |
| */ | | */ | |
| mpd_pure | | mpd_pure | |
| unsigned | | unsigned | |
| mpd_song_get_duration(const struct mpd_song *song); | | mpd_song_get_duration(const struct mpd_song *song); | |
| | | | |
| /** | | /** | |
|
| | | * Returns the duration of this song in milliseconds. 0 means the | |
| | | * duration is unknown. | |
| | | */ | |
| | | mpd_pure | |
| | | unsigned | |
| | | mpd_song_get_duration_ms(const struct mpd_song *song); | |
| | | | |
| | | /** | |
| * Returns the start of the virtual song within the physical file in | | * Returns the start of the virtual song within the physical file in | |
| * seconds. | | * seconds. | |
| */ | | */ | |
| mpd_pure | | mpd_pure | |
| unsigned | | unsigned | |
| mpd_song_get_start(const struct mpd_song *song); | | mpd_song_get_start(const struct mpd_song *song); | |
| | | | |
| /** | | /** | |
| * Returns the end of the virtual song within the physical file in | | * Returns the end of the virtual song within the physical file in | |
| * seconds. Zero means that the physical song file is played to the | | * seconds. Zero means that the physical song file is played to the | |
| | | | |
| skipping to change at line 163 | | skipping to change at line 171 | |
| | | | |
| /** | | /** | |
| * Returns the id of this song in the playlist. The value is | | * Returns the id of this song in the playlist. The value is | |
| * undefined if you did not obtain this song from the queue. | | * undefined if you did not obtain this song from the queue. | |
| */ | | */ | |
| mpd_pure | | mpd_pure | |
| unsigned | | unsigned | |
| mpd_song_get_id(const struct mpd_song *song); | | 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. | | * Begins parsing a new song. | |
| * | | * | |
| * @param pair the first pair in this song (name must be "file") | | * @param pair the first pair in this song (name must be "file") | |
| * @return the new #mpd_entity object, or NULL on error (out of | | * @return the new #mpd_entity object, or NULL on error (out of | |
| * memory, or pair name is not "file") | | * memory, or pair name is not "file") | |
| */ | | */ | |
| mpd_malloc | | mpd_malloc | |
| struct mpd_song * | | struct mpd_song * | |
| mpd_song_begin(const struct mpd_pair *pair); | | mpd_song_begin(const struct mpd_pair *pair); | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 17 lines changed or added | |
|