Hello community,

here is the log from the commit of package libmpdclient for openSUSE:Factory 
checked in at 2020-07-05 01:22:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libmpdclient (Old)
 and      /work/SRC/openSUSE:Factory/.libmpdclient.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libmpdclient"

Sun Jul  5 01:22:20 2020 rev:6 rq:818651 version:2.19

Changes:
--------
--- /work/SRC/openSUSE:Factory/libmpdclient/libmpdclient.changes        
2020-01-27 20:17:01.588507465 +0100
+++ /work/SRC/openSUSE:Factory/.libmpdclient.new.3060/libmpdclient.changes      
2020-07-05 01:23:45.154004901 +0200
@@ -1,0 +2,13 @@
+Fri Jul  3 23:11:53 UTC 2020 - Илья Индиго <[email protected]>
+
+- Update to 2.19
+  * https://raw.githubusercontent.com/MusicPlayerDaemon/libmpdclient/v2.19/NEWS
+  * fix off-by-one bug in MPD_HOST parser
+  * add function mpd_lookup_replay_gain_mode()
+  * identify messages with length over the buffer limit
+  * support MPD protocol 0.16: replay gain
+  * support MPD protocol 0.19: idle events "neighbor" and "mount"
+  * support MPD protocol 0.20: rangeid
+  * support MPD protocol 0.21: command "tagtypes all"
+
+-------------------------------------------------------------------

Old:
----
  libmpdclient-2.18.tar.xz

New:
----
  libmpdclient-2.19.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libmpdclient.spec ++++++
--- /var/tmp/diff_new_pack.LWzwUJ/_old  2020-07-05 01:23:47.218011054 +0200
+++ /var/tmp/diff_new_pack.LWzwUJ/_new  2020-07-05 01:23:47.222011066 +0200
@@ -18,7 +18,7 @@
 
 %define so_name 2
 Name:           libmpdclient
-Version:        2.18
+Version:        2.19
 Release:        0
 Summary:        Library for interfacing the Music Player Daemon
 License:        BSD-3-Clause

++++++ libmpdclient-2.18.tar.xz -> libmpdclient-2.19.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/.travis.yml 
new/libmpdclient-2.19/.travis.yml
--- old/libmpdclient-2.18/.travis.yml   2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/.travis.yml   2020-07-03 18:17:12.000000000 +0200
@@ -1,6 +1,6 @@
 language: c
 
-matrix:
+jobs:
   include:
     # Ubuntu Bionic (18.04) with GCC 7
     - os: linux
@@ -28,6 +28,7 @@
             - meson
             - ninja
             - check
+          update: true
 
 cache:
   apt: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/NEWS new/libmpdclient-2.19/NEWS
--- old/libmpdclient-2.18/NEWS  2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/NEWS  2020-07-03 18:17:12.000000000 +0200
@@ -1,3 +1,16 @@
+libmpdclient 2.19 (2020/07/03)
+* fix off-by-one bug in MPD_HOST parser
+* add function mpd_lookup_replay_gain_mode()
+* identify messages with length over the buffer limit
+* support MPD protocol 0.16
+ - replay gain
+* support MPD protocol 0.19
+ - idle events "neighbor" and "mount"
+* support MPD protocol 0.20
+ - rangeid
+* support MPD protocol 0.21
+  - command "tagtypes all"
+
 libmpdclient 2.18 (2020/01/20)
 * more out-of-memory checks
 * partition: add mpd_recv_partition()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/doc/doxygen.conf.in 
new/libmpdclient-2.19/doc/doxygen.conf.in
--- old/libmpdclient-2.18/doc/doxygen.conf.in   2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/doc/doxygen.conf.in   2020-07-03 18:17:12.000000000 
+0200
@@ -35,6 +35,7 @@
 
 INPUT = @abs_top_srcdir@/include/mpd
 FILE_PATTERNS = *.h
+EXCLUDE_PATTERNS = compiler.h
 
 #---------------------------------------------------------------------------
 # configuration options related to source browsing
@@ -95,7 +96,10 @@
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-ENABLE_PREPROCESSING = NO
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+PREDEFINED = mpd_pure= mpd_const= mpd_malloc=
 
 #---------------------------------------------------------------------------
 # Configuration options related to the dot tool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/capabilities.h 
new/libmpdclient-2.19/include/mpd/capabilities.h
--- old/libmpdclient-2.18/include/mpd/capabilities.h    2020-01-20 
17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/include/mpd/capabilities.h    2020-07-03 
18:17:12.000000000 +0200
@@ -209,6 +209,26 @@
 bool
 mpd_run_clear_tag_types(struct mpd_connection *connection);
 
+/**
+ * Add all tags to the list of tag types this client is interested in.
+ * This means that MPD will send all tags to this client.
+ *
+ * @param connection the connection to MPD
+ * @return true on success, false on error
+ *
+ * @since libmpdclient 2.19, MPD 0.21
+ */
+bool
+mpd_send_all_tag_types(struct mpd_connection *connection);
+
+/**
+ * Shortcut for mpd_send_all_tag_types() and mpd_response_finish().
+ *
+ * @since libmpdclient 2.19, MPD 0.21
+ */
+bool
+mpd_run_all_tag_types(struct mpd_connection *connection);
+
 #ifdef __cplusplus
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/client.h 
new/libmpdclient-2.19/include/mpd/client.h
--- old/libmpdclient-2.18/include/mpd/client.h  2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/client.h  2020-07-03 18:17:12.000000000 
+0200
@@ -26,10 +26,11 @@
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-/*! \file
- * \brief MPD client library
+/**
+ * @mainpage
  *
- * This is a client library for the Music Player Daemon, written in C.
+ * This is a client library for the [Music Player
+ * Daemon](https://www.musicpd.org/), written in C.
  *
  * You can choose one of several APIs, depending on your requirements:
  *
@@ -68,6 +69,7 @@
 #include "playlist.h"
 #include "queue.h"
 #include "recv.h"
+#include "replay_gain.h"
 #include "response.h"
 #include "search.h"
 #include "send.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/connection.h 
new/libmpdclient-2.19/include/mpd/connection.h
--- old/libmpdclient-2.18/include/mpd/connection.h      2020-01-20 
17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/include/mpd/connection.h      2020-07-03 
18:17:12.000000000 +0200
@@ -52,9 +52,28 @@
  *
  * This opaque object represents a connection to a MPD server.  Call
  * mpd_connection_new() to create a new instance.  To free an
- * instance, call mpd_connection_free().
+ * instance, call mpd_connection_free().  Example:
  *
- * Error handling: most functions return a "bool" indicating success
+ *     struct mpd_connection *conn = mpd_connection_new(NULL, 0, 0);
+ *
+ *     // error handling
+ *     if (conn == NULL) {
+ *         fprintf(stderr, "Out of memory\n");
+ *         return;
+ *     }
+ *     if (mpd_connection_get_error(conn) != MPD_ERROR_SUCCESS) {
+ *         fprintf(stderr, "%s\n", mpd_connection_get_error_message(c));
+ *         mpd_connection_free(c);
+ *         return;
+ *     }
+ *
+ *     // we can now use the connection
+ *     mpd_run_next(conn);
+ *
+ *     // close the connection and free memory
+ *     mpd_connection_free(conn);
+ *
+ * Error handling: most functions return a `bool` indicating success
  * or failure.  In this case, you may query the nature of the error
  * with the functions mpd_connection_get_error(),
  * mpd_connection_get_error_message(),
@@ -66,8 +85,11 @@
  * mpd_connection_clear_error() returns false.
  *
  * 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().
+ *
+ * To integrate this object in a non-blocking event I/O loop, use
+ * mpd_connection_get_fd() to obtain the underlying socket descriptor.
  */
 struct mpd_connection;
 
@@ -77,27 +99,27 @@
 
 /**
  * Opens a new connection to a MPD server.  Both the name server
- * lookup and the connect() call are done synchronously.  After this
+ * lookup and the `connect()` call are done synchronously.  After this
  * function has returned, you should check if the connection was
  * successful with mpd_connection_get_error().
  *
  * @param host the server's host name, IP address or Unix socket path.
  * If the resolver returns more than one IP address for a host name,
  * this functions tries all of them until one accepts the connection.
- * NULL is allowed here, which will connect to the default host
- * (using the MPD_HOST environment variable if present).
+ * `NULL` is allowed here, which will connect to the default host
+ * (using the `MPD_HOST` environment variable if present).
  * @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.
  * @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); you may modify it later with
  * mpd_connection_set_timeout()
  * @return a mpd_connection object (which may have failed to connect),
- * or NULL on out-of-memory
+ * or `NULL` on out-of-memory
  *
- * @since libmpdclient 2.3 added support for #MPD_HOST, #MPD_PORT and
- * #MPD_TIMEOUT.
+ * @since libmpdclient 2.3 added support for `MPD_HOST`, `MPD_PORT`
+ * and `MPD_TIMEOUT`.
  */
 mpd_malloc
 struct mpd_connection *
@@ -114,7 +136,7 @@
  *
  * @param async a #mpd_async instance
  * @param welcome the first line sent by MPD (the welcome message)
- * @return a mpd_connection object, or NULL on out-of-memory
+ * @return a mpd_connection object, or `NULL` on out-of-memory
  */
 mpd_malloc
 struct mpd_connection *
@@ -129,7 +151,7 @@
 
 /**
  * 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.
  *
  * @since libmpdclient 2.4
  */
@@ -175,6 +197,22 @@
  * Do not use the file descriptor for anything except polling!  The
  * file descriptor never changes during the lifetime of this
  * #mpd_connection object.
+ *
+ * To integrate this library in a non-blocking event I/O loop, use
+ * this function to obtain the underlying socket descriptor and
+ * register it in the event loop.  As soon as it becomes ready for
+ * reading, use this library's functions to receive responses from
+ * MPD.  Example:
+ *
+ *     if (!mpd_send_idle(conn))
+ *         return handle_error();
+ *     register_socket(mpd_connection_get_fd(conn));
+ *
+ * And in the event callback:
+ *
+ *     enum mpd_idle events = mpd_recv_idle(conn);
+ *     // handle the events
+ *     // .. and then call mpd_send_idle() again to keep listening
  */
 mpd_pure
 int
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/entity.h 
new/libmpdclient-2.19/include/mpd/entity.h
--- old/libmpdclient-2.18/include/mpd/entity.h  2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/entity.h  2020-07-03 18:17:12.000000000 
+0200
@@ -41,7 +41,6 @@
 
 #include "song.h"
 #include "directory.h"
-#include "client.h"
 #include "compiler.h"
 
 struct mpd_pair;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/idle.h 
new/libmpdclient-2.19/include/mpd/idle.h
--- old/libmpdclient-2.18/include/mpd/idle.h    2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/idle.h    2020-07-03 18:17:12.000000000 
+0200
@@ -93,6 +93,12 @@
 
        /** a partition was added or changed */
        MPD_IDLE_PARTITION = 0x800,
+
+       /** a neighbor was found or lost */
+       MPD_IDLE_NEIGHBOR = 0x1000,
+
+       /** the mount list has changed */
+       MPD_IDLE_MOUNT = 0x2000,
 };
 
 #ifdef __cplusplus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/mount.h 
new/libmpdclient-2.19/include/mpd/mount.h
--- old/libmpdclient-2.18/include/mpd/mount.h   2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/mount.h   2020-07-03 18:17:12.000000000 
+0200
@@ -85,7 +85,7 @@
  * @since libmpdclient 2.16
  */
 void
-mpd_mount_free(struct mpd_mount *mnt);
+mpd_mount_free(struct mpd_mount *mount);
 
 /**
  * @return the mount point URI of the specified #mpd_mount object
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/output.h 
new/libmpdclient-2.19/include/mpd/output.h
--- old/libmpdclient-2.18/include/mpd/output.h  2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/output.h  2020-07-03 18:17:12.000000000 
+0200
@@ -277,7 +277,7 @@
  * @param output_name the name of the output to be moved
  * @return true on success
  *
- * @since libmpdclient 2.18
+ * @since libmpdclient 2.18, MPD 0.22.
  */
 bool
 mpd_send_move_output(struct mpd_connection *connection,
@@ -290,7 +290,7 @@
  * @param output_name the name of the output to be moved
  * @return true on success
  *
- * @since libmpdclient 2.18
+ * @since libmpdclient 2.18, MPD 0.22.
  */
 bool
 mpd_run_move_output(struct mpd_connection *connection,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/partition.h 
new/libmpdclient-2.19/include/mpd/partition.h
--- old/libmpdclient-2.18/include/mpd/partition.h       2020-01-20 
17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/include/mpd/partition.h       2020-07-03 
18:17:12.000000000 +0200
@@ -114,7 +114,7 @@
  * @param partition the partition name
  * @return true on success
  *
- * @since libmpdclient 2.18
+ * @since libmpdclient 2.18, MPD 0.22
  */
 bool
 mpd_send_delete_partition(struct mpd_connection *connection,
@@ -127,7 +127,7 @@
  * @param partition the partition name
  * @return true on success
  *
- * @since libmpdclient 2.18
+ * @since libmpdclient 2.18, MPD 0.22
  */
 bool
 mpd_run_delete_partition(struct mpd_connection *connection,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/player.h 
new/libmpdclient-2.19/include/mpd/player.h
--- old/libmpdclient-2.18/include/mpd/player.h  2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/player.h  2020-07-03 18:17:12.000000000 
+0200
@@ -130,7 +130,7 @@
  * Starts playing the specified song from the beginning.
  *
  * @param connection the connection to MPD
- * @param id the id of the song
+ * @param song_id the id of the song
  * @return true on success, false on error
  */
 bool
@@ -270,7 +270,7 @@
  * Seeks to the position t (in seconds) of song id song_id.
  *
  * @param connection the connection to MPD
- * @param id the id of the song
+ * @param song_id the id of the song
  * @param t the position within the song, in seconds
  * @return true on success, false on error
  */
@@ -332,6 +332,9 @@
  * Shortcut for mpd_send_seek_current() and mpd_response_finish().
  *
  * @param connection the connection to MPD
+ * @param t the new position (in seconds)
+ * @param relative true to seek relative to the current position and
+ * false to seek to an absolute time stamp within the song
  * @return true on success, false on error
  *
  * @since MPD 0.17, libmpdclient 2.15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/playlist.h 
new/libmpdclient-2.19/include/mpd/playlist.h
--- old/libmpdclient-2.18/include/mpd/playlist.h        2020-01-20 
17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/include/mpd/playlist.h        2020-07-03 
18:17:12.000000000 +0200
@@ -219,6 +219,19 @@
                       unsigned from, unsigned to);
 
 /**
+ * Shortcut for mpd_send_playlist_move() and mpd_response_finish().
+ *
+ * @param connection the connection to MPD
+ * @param name the name of the playlist
+ * @param from previous song place in the playlist
+ * @param to next song position in the playlist
+ * @return true on success, false on error
+ */
+bool
+mpd_run_playlist_move(struct mpd_connection *connection, const char *name,
+                     unsigned from, unsigned to);
+
+/**
  * Delete a position from a playlist.
  *
  * @param connection the connection to MPD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/queue.h 
new/libmpdclient-2.19/include/mpd/queue.h
--- old/libmpdclient-2.18/include/mpd/queue.h   2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/queue.h   2020-07-03 18:17:12.000000000 
+0200
@@ -182,6 +182,7 @@
  * Use mpd_recv_queue_change_brief() for the response.
  *
  * @param connection the connection to MPD
+ * @param version The playlist version you want the diff with.
  * @param start the start position of the range (including)
  * @param end the end position of the range (excluding); the special
  * value "UINT_MAX" makes the end of the range open
@@ -222,7 +223,7 @@
  * Shortcut for mpd_send_add() and mpd_response_finish().
  *
  * @param connection the connection to MPD
- * @param file URI of a song or directory (added recursively)
+ * @param uri URI of a song or directory (added recursively)
  * @return true on success, false on error
  */
 bool
@@ -714,6 +715,42 @@
 mpd_run_prio_id(struct mpd_connection *connection, int priority,
                unsigned id);
 
+/**
+ * Specify the portion of a song that shall be played.
+ * The song is identified by its id and cannot be the currently playing song.
+ *
+ * The start/end values are offsets in seconds (fractional seconds allowed);
+ * both are optional.
+ *
+ * @param connection the connection to MPD
+ * @param id the id of the song (cannot be the currently playing song)
+ * @param start the offset in seconds for starting the song
+ * @param end the offset in seconds for ending the song; a negative
+ * value makes the end of the range open
+ * @return true on success, false on error
+ *
+ * @since libmpdclient 2.19, MPD 0.20
+ */
+bool
+mpd_send_range_id(struct mpd_connection *connection, unsigned id,
+                 float start, float end);
+
+/**
+ *
+ * Shortcut for mpd_send_range_id() and mpd_response_finish().
+ *
+ * @param connection the connection to MPD
+ * @param id the id of the song (cannot be the currently playing song)
+ * @param start the offset in seconds for starting the song
+ * @param end the offset in seconds for ending the song; a negative
+ * value makes the end of the range open
+ * @return true on success, false on error
+ *
+ * @since libmpdclient 2.19, MPD 0.20
+ */
+bool
+mpd_run_range_id(struct mpd_connection *connection, unsigned id,
+                float start, float end);
 #ifdef __cplusplus
 }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/replay_gain.h 
new/libmpdclient-2.19/include/mpd/replay_gain.h
--- old/libmpdclient-2.18/include/mpd/replay_gain.h     1970-01-01 
01:00:00.000000000 +0100
+++ new/libmpdclient-2.19/include/mpd/replay_gain.h     2020-07-03 
18:17:12.000000000 +0200
@@ -0,0 +1,151 @@
+/* libmpdclient
+   (c) 2003-2019 The Music Player Daemon Project
+   This project's homepage is: http://www.musicpd.org
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+   - Neither the name of the Music Player Daemon nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*! \file
+ * \brief MPD client library
+ *
+ * Do not include this header directly.  Use mpd/client.h instead.
+ */
+
+#ifndef MPD_REPLAY_GAIN_H
+#define MPD_REPLAY_GAIN_H
+
+#include "compiler.h"
+
+#include <stdbool.h>
+
+struct mpd_connection;
+
+/**
+ * MPD's replay gain mode.
+ *
+ * @since libmpdclient 2.19, MPD 0.16.
+ */
+enum mpd_replay_gain_mode {
+       /** ignore ReplayGain tag values */
+       MPD_REPLAY_OFF = 0,
+
+       /** use per-track ReplayGain values */
+       MPD_REPLAY_TRACK,
+
+       /** use per-album ReplayGain values */
+       MPD_REPLAY_ALBUM,
+
+       /**
+        * use available ReplayGain value; if both track and album tags are
+        * available, prefer track values.
+        **/
+       MPD_REPLAY_AUTO,
+
+       /** Unknown mode */
+       MPD_REPLAY_UNKNOWN,
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Parse a #mpd_pair value to check which replay gain mode it contains.
+ */
+mpd_pure
+enum mpd_replay_gain_mode
+mpd_parse_replay_gain_name(const char *name);
+
+/**
+ * Looks up the name of the specified replay gain mode.
+ *
+ * @return the name, or NULL if the replay gain mode is not valid
+ */
+mpd_pure
+const char *
+mpd_lookup_replay_gain_mode(enum mpd_replay_gain_mode mode);
+
+/**
+ * Queries the current state of replay gain mode on MPD.
+ *
+ * Sends the "replay_gain_status" command to MPD. Call mpd_recv_pair() to
+ * read response lines. The pair's name should be "replay_gain_mode". Use
+ * mpd_parse_replay_gain_name() to check each pair's value.
+ *
+ * @param connection the connection to MPD
+ * @return true on success, false on error
+ *
+ * @since MPD 0.16, libmpdclient 2.19.
+ */
+bool
+mpd_send_replay_gain_status(struct mpd_connection *connection);
+
+/**
+ * Shortcut for mpd_send_replay_gain_status(), mpd_recv_pair_named() and
+ * mpd_response_finish().
+ *
+ * @param connection the connection to MPD
+ * @return #mpd_replay_gain_mode object: #MPD_REPLAY_UNKNOWN on error (or
+ * unknown ReplayGain mode); other modes on success.
+ *
+ * @since MPD 0.16, libmpdclient 2.19.
+ */
+enum mpd_replay_gain_mode
+mpd_run_replay_gain_status(struct mpd_connection *connection);
+
+/**
+ * Sets the current state of replay gain mode on MPD.
+ *
+ * @param connection the connection to MPD
+ * @param mode the desired replay gain mode
+ * @return true on success, false on error
+ *
+ * @since MPD 0.16, libmpdclient 2.19.
+ */
+bool
+mpd_send_replay_gain_mode(struct mpd_connection *connection,
+                         enum mpd_replay_gain_mode mode);
+
+/**
+ * Shortcut for mpd_send_replay_gain_mode() and mpd_response_finish().
+ *
+ * @param connection the connection to MPD
+ * @param mode mode the desired replay gain mode
+ * @return true on success, false on error
+ *
+ * @since MPD 0.16, libmpdclient 2.19.
+ */
+bool
+mpd_run_replay_gain_mode(struct mpd_connection *connection,
+                        enum mpd_replay_gain_mode mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/search.h 
new/libmpdclient-2.19/include/mpd/search.h
--- old/libmpdclient-2.18/include/mpd/search.h  2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/search.h  2020-07-03 18:17:12.000000000 
+0200
@@ -97,6 +97,8 @@
  * Send the search command with mpd_search_commit().
  *
  * @param connection the connection to MPD
+ * @param playlist_name the name of the playlist where songs shall be
+ * added
  * @return true on success, false on error
  *
  * @since libmpdclient 2.17.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/include/mpd/stats.h 
new/libmpdclient-2.19/include/mpd/stats.h
--- old/libmpdclient-2.18/include/mpd/stats.h   2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/include/mpd/stats.h   2020-07-03 18:17:12.000000000 
+0200
@@ -82,7 +82,7 @@
  * object.
  */
 void
-mpd_stats_feed(struct mpd_stats *status, const struct mpd_pair *pair);
+mpd_stats_feed(struct mpd_stats *stats, const struct mpd_pair *pair);
 
 /**
  * Reads the "stats" response from MPD.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/libmpdclient.ld 
new/libmpdclient-2.19/libmpdclient.ld
--- old/libmpdclient-2.18/libmpdclient.ld       2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/libmpdclient.ld       2020-07-03 18:17:12.000000000 
+0200
@@ -26,6 +26,8 @@
        mpd_run_enable_tag_types;
        mpd_send_clear_tag_types;
        mpd_run_clear_tag_types;
+       mpd_send_all_tag_types;
+       mpd_run_all_tag_types;
 
        /* mpd/connection.h */
        mpd_connection_new;
@@ -237,6 +239,7 @@
        mpd_send_playlist_add;
        mpd_run_playlist_add;
        mpd_send_playlist_move;
+       mpd_run_playlist_move;
        mpd_send_playlist_delete;
        mpd_run_playlist_delete;
        mpd_send_save;
@@ -303,6 +306,8 @@
        mpd_run_prio_range;
        mpd_send_prio_id;
        mpd_run_prio_id;
+       mpd_send_range_id;
+       mpd_run_range_id;
 
        /* mpd/recv.h */
        mpd_recv_pair;
@@ -450,6 +455,14 @@
        mpd_settings_get_timeout_ms;
        mpd_settings_get_password;
 
+       /* mpd/replay_gain.h */
+       mpd_parse_replay_gain_name;
+       mpd_lookup_replay_gain_mode;
+       mpd_send_replay_gain_status;
+       mpd_run_replay_gain_status;
+       mpd_send_replay_gain_mode;
+       mpd_run_replay_gain_mode;
+
 local:
        *;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/meson.build 
new/libmpdclient-2.19/meson.build
--- old/libmpdclient-2.18/meson.build   2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/meson.build   2020-07-03 18:17:12.000000000 +0200
@@ -1,6 +1,7 @@
-project('libmpdclient', 'c', version: '2.18',
+project('libmpdclient', 'c', version: '2.19',
   default_options: [
     'c_std=c99',
+    'warning_level=3',
   ],
   license: 'BSD',
 )
@@ -135,6 +136,7 @@
   'src/queue.c',
   'src/quote.c',
   'src/recv.c',
+  'src/replay_gain.c',
   'src/response.c',
   'src/run.c',
   'src/search.c',
@@ -199,6 +201,7 @@
   'include/mpd/protocol.h',
   'include/mpd/queue.h',
   'include/mpd/recv.h',
+  'include/mpd/replay_gain.h',
   'include/mpd/response.h',
   'include/mpd/send.h',
   'include/mpd/status.h',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/async.c 
new/libmpdclient-2.19/src/async.c
--- old/libmpdclient-2.18/src/async.c   2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/async.c   2020-07-03 18:17:12.000000000 +0200
@@ -31,7 +31,6 @@
 #include "ierror.h"
 #include "quote.h"
 #include "socket.h"
-#include "binary.h"
 
 #include <mpd/socket.h>
 
@@ -129,6 +128,20 @@
        return mpd_error_copy(dest, &async->error);
 }
 
+bool
+mpd_async_set_error(struct mpd_async *async, enum mpd_error error,
+                   const char *error_message)
+{
+       assert(async != NULL);
+
+       if (mpd_error_is_defined(&async->error))
+               return false;
+
+       mpd_error_code(&async->error, error);
+       mpd_error_message(&async->error, error_message);
+       return true;
+}
+
 int
 mpd_async_get_fd(const struct mpd_async *async)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/binary.h 
new/libmpdclient-2.19/src/binary.h
--- old/libmpdclient-2.18/src/binary.h  2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/binary.h  1970-01-01 01:00:00.000000000 +0100
@@ -1,51 +0,0 @@
-/* libmpdclient
-   (c) 2003-2019 The Music Player Daemon Project
-   This project's homepage is: http://www.musicpd.org
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-
-   - Neither the name of the Music Player Daemon nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*! \file
- * \brief MPD client library
- *
- * Do not include this header directly.  Use mpd/client.h instead.
- */
-
-#ifndef MPD_BINARY_H
-#define MPD_BINARY_H
-
-#include <stddef.h>
-
-struct mpd_binary {
-        /** the binary data */
-        void *data;
-        /** the size of the binary data */
-        size_t size;
-};
-
-#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/capabilities.c 
new/libmpdclient-2.19/src/capabilities.c
--- old/libmpdclient-2.18/src/capabilities.c    2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/src/capabilities.c    2020-07-03 18:17:12.000000000 
+0200
@@ -140,3 +140,16 @@
        return mpd_send_clear_tag_types(connection) &&
                mpd_response_finish(connection);
 }
+
+bool
+mpd_send_all_tag_types(struct mpd_connection *connection)
+{
+       return mpd_send_command(connection, "tagtypes", "all", NULL);
+}
+
+bool
+mpd_run_all_tag_types(struct mpd_connection *connection)
+{
+       return mpd_send_all_tag_types(connection) &&
+               mpd_response_finish(connection);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/connection.c 
new/libmpdclient-2.19/src/connection.c
--- old/libmpdclient-2.18/src/connection.c      2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/src/connection.c      2020-07-03 18:17:12.000000000 
+0200
@@ -56,7 +56,7 @@
        const char *tmp;
        char * test;
 
-       if (strncmp(output,MPD_WELCOME_MESSAGE,strlen(MPD_WELCOME_MESSAGE))) {
+       if (strncmp(output,MPD_WELCOME_MESSAGE,strlen(MPD_WELCOME_MESSAGE)) != 
0) {
                mpd_error_code(&connection->error, MPD_ERROR_MALFORMED);
                mpd_error_message(&connection->error,
                                  "Malformed connect message received");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/cplaylist.c 
new/libmpdclient-2.19/src/cplaylist.c
--- old/libmpdclient-2.18/src/cplaylist.c       2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/src/cplaylist.c       2020-07-03 18:17:12.000000000 
+0200
@@ -102,6 +102,15 @@
 }
 
 bool
+mpd_run_playlist_move(struct mpd_connection *connection, const char *name,
+                      unsigned from, unsigned to)
+{
+       return mpd_run_check(connection) &&
+               mpd_send_playlist_move(connection, name, from, to) &&
+               mpd_response_finish(connection);
+}
+
+bool
 mpd_send_playlist_delete(struct mpd_connection *connection, const char *name,
                         unsigned pos)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/entity.c 
new/libmpdclient-2.19/src/entity.c
--- old/libmpdclient-2.18/src/entity.c  2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/entity.c  2020-07-03 18:17:12.000000000 +0200
@@ -32,6 +32,7 @@
 
 #include <mpd/entity.h>
 #include <mpd/playlist.h>
+#include <mpd/recv.h>
 #include "internal.h"
 
 #include <stdlib.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/example.c 
new/libmpdclient-2.19/src/example.c
--- old/libmpdclient-2.18/src/example.c 2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/example.c 2020-07-03 18:17:12.000000000 +0200
@@ -411,6 +411,25 @@
                if (!mpd_run_switch_partition(conn, argv[2]))
                        return handle_error(conn);
                printf("switched to partition %s\n", argv[2]);
+       } else if (argc == 2 && strcmp(argv[1], "replay_gain_status") == 0) {
+               const enum mpd_replay_gain_mode mode =
+                       mpd_run_replay_gain_status(conn);
+
+               if (mode == MPD_REPLAY_UNKNOWN)
+                       return handle_error(conn);
+
+               printf("replay gain status: %d\n", mode);
+       } else if (argc == 3 && strcmp(argv[1], "replay_gain_mode") == 0) {
+               const enum mpd_replay_gain_mode mode =
+                       mpd_parse_replay_gain_name(argv[2]);
+
+               if (mode == MPD_REPLAY_UNKNOWN) {
+                       printf("Unknown replay mode %s\n", argv[2]);
+                       return EXIT_FAILURE;
+               }
+
+               if (!mpd_run_replay_gain_mode(conn, mode))
+                       return handle_error(conn);
        }
 
        mpd_connection_free(conn);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/iasync.h 
new/libmpdclient-2.19/src/iasync.h
--- old/libmpdclient-2.18/src/iasync.h  2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/iasync.h  2020-07-03 18:17:12.000000000 +0200
@@ -44,4 +44,15 @@
 mpd_async_copy_error(const struct mpd_async *async,
                     struct mpd_error_info *dest);
 
+/**
+ * Sets the object's error condition.
+ *
+ * @return true if there was no error in #async, false if an error
+ * condition is stored in #async; the #error is only set if there was no error
+ * previously present
+ */
+bool
+mpd_async_set_error(struct mpd_async *async, enum mpd_error error,
+                   const char *error_message);
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/idle.c 
new/libmpdclient-2.19/src/idle.c
--- old/libmpdclient-2.18/src/idle.c    2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/idle.c    2020-07-03 18:17:12.000000000 +0200
@@ -55,6 +55,8 @@
        "subscription",
        "message",
        "partition",
+       "neighbor",
+       "mount",
        NULL
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/isend.h 
new/libmpdclient-2.19/src/isend.h
--- old/libmpdclient-2.18/src/isend.h   2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/isend.h   2020-07-03 18:17:12.000000000 +0200
@@ -102,6 +102,10 @@
 mpd_send_range_u_command(struct mpd_connection *connection,
                         const char *command,
                         unsigned start, unsigned end, unsigned arg2);
+bool
+mpd_send_u_frange_command(struct mpd_connection *connection,
+                         const char *command, unsigned arg1,
+                         float start, float end);
 
 bool
 mpd_send_ll_command(struct mpd_connection *connection, const char *command,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/queue.c 
new/libmpdclient-2.19/src/queue.c
--- old/libmpdclient-2.18/src/queue.c   2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/queue.c   2020-07-03 18:17:12.000000000 +0200
@@ -500,3 +500,19 @@
                mpd_send_prio_id(connection, priority, id) &&
                mpd_response_finish(connection);
 }
+
+bool
+mpd_send_range_id(struct mpd_connection *connection, unsigned id,
+                 float start, float end)
+{
+       return mpd_send_u_frange_command(connection, "rangeid", id, start, end);
+}
+
+bool
+mpd_run_range_id(struct mpd_connection *connection, unsigned id,
+                float start, float end)
+{
+       return mpd_run_check(connection) &&
+               mpd_send_range_id(connection, id, start, end) &&
+               mpd_response_finish(connection);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/recv.c 
new/libmpdclient-2.19/src/recv.c
--- old/libmpdclient-2.18/src/recv.c    2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/recv.c    2020-07-03 18:17:12.000000000 +0200
@@ -31,7 +31,6 @@
 #include <mpd/parser.h>
 #include "internal.h"
 #include "iasync.h"
-#include "binary.h"
 #include "sync.h"
 
 #include <string.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/replay_gain.c 
new/libmpdclient-2.19/src/replay_gain.c
--- old/libmpdclient-2.18/src/replay_gain.c     1970-01-01 01:00:00.000000000 
+0100
+++ new/libmpdclient-2.19/src/replay_gain.c     2020-07-03 18:17:12.000000000 
+0200
@@ -0,0 +1,122 @@
+/* libmpdclient
+   (c) 2003-2019 The Music Player Daemon Project
+   This project's homepage is: http://www.musicpd.org
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+   - Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+   - Neither the name of the Music Player Daemon nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <mpd/replay_gain.h>
+#include <mpd/send.h>
+#include <mpd/recv.h>
+#include <mpd/pair.h>
+#include <mpd/response.h>
+#include "run.h"
+
+#include <string.h>
+#include <stdio.h>
+
+enum mpd_replay_gain_mode
+mpd_parse_replay_gain_name(const char *name)
+{
+       if (strcmp(name, "off") == 0)
+               return MPD_REPLAY_OFF;
+       else if (strcmp(name, "track") == 0)
+               return MPD_REPLAY_TRACK;
+       else if (strcmp(name, "album") == 0)
+               return MPD_REPLAY_ALBUM;
+       else if (strcmp(name, "auto") == 0)
+               return MPD_REPLAY_AUTO;
+       else
+               return MPD_REPLAY_UNKNOWN;
+}
+
+bool
+mpd_send_replay_gain_status(struct mpd_connection *connection)
+{
+       return mpd_send_command(connection, "replay_gain_status", NULL);
+}
+
+const char *
+mpd_lookup_replay_gain_mode(enum mpd_replay_gain_mode mode)
+{
+       switch (mode) {
+       case MPD_REPLAY_OFF:
+               return "off";
+       case MPD_REPLAY_TRACK:
+               return "track";
+       case MPD_REPLAY_ALBUM:
+               return "album";
+       case MPD_REPLAY_AUTO:
+               return "auto";
+       case MPD_REPLAY_UNKNOWN:
+               return NULL;
+       }
+
+       return NULL;
+}
+
+enum mpd_replay_gain_mode
+mpd_run_replay_gain_status(struct mpd_connection *connection)
+{
+       enum mpd_replay_gain_mode mode;
+       struct mpd_pair *pair;
+
+       if (!mpd_run_check(connection) ||
+           !mpd_send_replay_gain_status(connection))
+               return MPD_REPLAY_UNKNOWN;
+
+       pair = mpd_recv_pair_named(connection, "replay_gain_mode");
+       if (pair != NULL) {
+               mode = mpd_parse_replay_gain_name(pair->value);
+               mpd_return_pair(connection, pair);
+       } else
+               mode = MPD_REPLAY_UNKNOWN;
+
+       if (!mpd_response_finish(connection))
+               return MPD_REPLAY_UNKNOWN;
+
+       return mode;
+}
+
+bool
+mpd_send_replay_gain_mode(struct mpd_connection *connection,
+                         enum mpd_replay_gain_mode mode)
+{
+       return mpd_send_command(connection, "replay_gain_mode",
+                               mpd_lookup_replay_gain_mode(mode), NULL);
+}
+
+bool
+mpd_run_replay_gain_mode(struct mpd_connection *connection,
+                         enum mpd_replay_gain_mode mode)
+{
+       return mpd_run_check(connection) &&
+               mpd_send_replay_gain_mode(connection, mode) &&
+               mpd_response_finish(connection);
+
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/send.c 
new/libmpdclient-2.19/src/send.c
--- old/libmpdclient-2.18/src/send.c    2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/send.c    2020-07-03 18:17:12.000000000 +0200
@@ -53,6 +53,16 @@
                snprintf(buffer, size, "%u:%u", start, end);
 }
 
+static void
+format_frange(char *buffer, size_t size, float start, float end)
+{
+       /* the special value 0.0 means "open range" */
+       if (end >= 0)
+               snprintf(buffer, size, "%1.3f:%1.3f", start, end);
+       else
+               snprintf(buffer, size, "%1.3f:", start);
+}
+
 /**
  * Checks whether it is possible to send a command now.
  */
@@ -281,6 +291,22 @@
 }
 
 bool
+mpd_send_u_frange_command(struct mpd_connection *connection,
+                        const char *command, unsigned arg1,
+                        float start, float end)
+{
+       /* <start>:<end> */
+       char arg1_string[INTLEN + 1];
+       char range_string[FLOATLEN * 2 + 1 + 1];
+
+       snprintf(arg1_string, sizeof(arg1_string), "%u", arg1);
+       format_frange(range_string, sizeof(range_string), start, end);
+
+       return mpd_send_command(connection, command,
+                               arg1_string, range_string, NULL);
+}
+
+bool
 mpd_send_ll_command(struct mpd_connection *connection, const char *command,
                    long long arg)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/settings.c 
new/libmpdclient-2.19/src/settings.c
--- old/libmpdclient-2.18/src/settings.c        2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/src/settings.c        2020-07-03 18:17:12.000000000 
+0200
@@ -86,7 +86,7 @@
        }
 
        memcpy(settings->host, &oldhost[at_pos + 1], host_len - 1);
-       settings->host[host_len] = 0;
+       settings->host[host_len - 1] = 0;
        free(oldhost);
        return true;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/src/sync.c 
new/libmpdclient-2.19/src/sync.c
--- old/libmpdclient-2.18/src/sync.c    2020-01-20 17:55:20.000000000 +0100
+++ new/libmpdclient-2.19/src/sync.c    2020-07-03 18:17:12.000000000 +0200
@@ -27,8 +27,8 @@
 */
 
 #include "sync.h"
+#include "iasync.h"
 #include "socket.h"
-#include "binary.h"
 
 #include <mpd/async.h>
 
@@ -118,6 +118,16 @@
                if (success)
                        return true;
 
+               /* no characters were written to async buffer and no
+                  space will be made available with mpd_sync_io()
+                  hence we do not have enough space */
+               if ((mpd_async_events(async) & MPD_ASYNC_EVENT_WRITE) == 0) {
+                       mpd_async_set_error(async, MPD_ERROR_ARGUMENT,
+                                           "Not enough buffer space for 
message");
+                       return false;
+               }
+
+
                if (!mpd_sync_io(async, tvp))
                        return false;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmpdclient-2.18/test/t_commands.c 
new/libmpdclient-2.19/test/t_commands.c
--- old/libmpdclient-2.18/test/t_commands.c     2020-01-20 17:55:20.000000000 
+0100
+++ new/libmpdclient-2.19/test/t_commands.c     2020-07-03 18:17:12.000000000 
+0200
@@ -117,6 +117,14 @@
        ck_assert_str_eq(test_capture_receive(&capture), "cleartagid \"42\"\n");
        abort_command(&capture, c);
 
+       ck_assert(mpd_send_range_id(c, 42, 0, 666));
+       ck_assert_str_eq(test_capture_receive(&capture), "rangeid \"42\" 
\"0.000:666.000\"\n");
+       abort_command(&capture, c);
+
+       ck_assert(mpd_send_range_id(c, 42, 6, -1));
+       ck_assert_str_eq(test_capture_receive(&capture), "rangeid \"42\" 
\"6.000:\"\n");
+       abort_command(&capture, c);
+
        mpd_connection_free(c);
        test_capture_deinit(&capture);
 }


Reply via email to