diff options
author | Max Kellermann <max@duempel.org> | 2009-07-06 21:51:00 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-07-06 21:51:00 +0200 |
commit | 206392ad1a9f4aa22d11719fb19f036c9f860272 (patch) | |
tree | b3b95903f21c45e7b72f2030ed6bc8d9fcd84457 | |
parent | 171a9ee291ff079a2d70bd46f113acae3b6ef00b (diff) | |
download | mpd-206392ad1a9f4aa22d11719fb19f036c9f860272.tar.gz mpd-206392ad1a9f4aa22d11719fb19f036c9f860272.tar.xz mpd-206392ad1a9f4aa22d11719fb19f036c9f860272.zip |
command: removed the "volume" command
This command has been deprecated more than 5 years ago (0.10.0). Its
implementation is a kludge, let's remove it now.
Diffstat (limited to '')
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | doc/protocol.xml | 19 | ||||
-rw-r--r-- | src/command.c | 23 |
3 files changed, 2 insertions, 41 deletions
@@ -2,6 +2,7 @@ ver 0.16 (20??/??/??) * protocol: - send song modification time to client - added "update" idle event + - removed the deprecated "volume" command * decoders: - ffmpeg: support multiple tags * mixers: diff --git a/doc/protocol.xml b/doc/protocol.xml index 6b2ff587f..35ea39d8e 100644 --- a/doc/protocol.xml +++ b/doc/protocol.xml @@ -472,25 +472,6 @@ </para> </listitem> </varlistentry> - <varlistentry id="command_volume"> - <term> - <cmdsynopsis> - <command>volume</command> - <arg choice="req"><replaceable>CHANGE</replaceable></arg> - </cmdsynopsis> - </term> - <listitem> - <para> - Changes volume by amount <varname>CHANGE</varname>. - </para> - <note> - <para> - <command>volume</command> is deprecated, use - <command>setvol</command> instead. - </para> - </note> - </listitem> - </varlistentry> </variablelist> </section> diff --git a/src/command.c b/src/command.c index 5b2973d3e..7f4444cfb 100644 --- a/src/command.c +++ b/src/command.c @@ -58,7 +58,6 @@ #include <stdlib.h> #include <errno.h> -#define COMMAND_STATUS_VOLUME "volume" #define COMMAND_STATUS_STATE "state" #define COMMAND_STATUS_REPEAT "repeat" #define COMMAND_STATUS_SINGLE "single" @@ -470,7 +469,7 @@ handle_status(struct client *client, } client_printf(client, - COMMAND_STATUS_VOLUME ": %i\n" + "volume: %i\n" COMMAND_STATUS_REPEAT ": %i\n" COMMAND_STATUS_RANDOM ": %i\n" COMMAND_STATUS_SINGLE ": %i\n" @@ -1054,25 +1053,6 @@ handle_listall(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) } static enum command_return -handle_volume(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) -{ - int change; - bool success; - - if (!check_int(client, &change, argv[1], need_integer)) - return COMMAND_RETURN_ERROR; - - success = volume_level_change(change, true); - if (!success) { - command_error(client, ACK_ERROR_SYSTEM, - "problems setting volume"); - return COMMAND_RETURN_ERROR; - } - - return COMMAND_RETURN_OK; -} - -static enum command_return handle_setvol(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) { int level; @@ -1740,7 +1720,6 @@ static const struct command commands[] = { { "tagtypes", PERMISSION_READ, 0, 0, handle_tagtypes }, { "update", PERMISSION_ADMIN, 0, 1, handle_update }, { "urlhandlers", PERMISSION_READ, 0, 0, handle_urlhandlers }, - { "volume", PERMISSION_CONTROL, 1, 1, handle_volume }, }; static const unsigned num_commands = sizeof(commands) / sizeof(commands[0]); |