diff options
author | Max Kellermann <max@duempel.org> | 2015-08-11 22:18:40 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-08-11 23:02:34 +0200 |
commit | b1480167be487d09ff46bb86ad02041fb28acff1 (patch) | |
tree | d819a825fb82c4258cc17d5f40793409f61600a1 /src/command/OutputCommands.cxx | |
parent | e118e958f7f9b87054679ebf6102d6923abbba81 (diff) | |
download | mpd-b1480167be487d09ff46bb86ad02041fb28acff1.tar.gz mpd-b1480167be487d09ff46bb86ad02041fb28acff1.tar.xz mpd-b1480167be487d09ff46bb86ad02041fb28acff1.zip |
command/Request: add parser methods
Wrapper for protocol/ArgParser.cxx.
Diffstat (limited to 'src/command/OutputCommands.cxx')
-rw-r--r-- | src/command/OutputCommands.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/command/OutputCommands.cxx b/src/command/OutputCommands.cxx index 885144168..39602aba8 100644 --- a/src/command/OutputCommands.cxx +++ b/src/command/OutputCommands.cxx @@ -23,7 +23,6 @@ #include "output/OutputPrint.hxx" #include "output/OutputCommand.hxx" #include "protocol/Result.hxx" -#include "protocol/ArgParser.hxx" #include "client/Client.hxx" #include "Partition.hxx" #include "util/ConstBuffer.hxx" @@ -34,7 +33,7 @@ handle_enableoutput(Client &client, Request args) assert(args.size == 1); unsigned device; - if (!ParseCommandArg(client, device, args.front())) + if (!args.Parse(0, device, client)) return CommandResult::ERROR; if (!audio_output_enable_index(client.partition.outputs, device)) { @@ -52,7 +51,7 @@ handle_disableoutput(Client &client, Request args) assert(args.size == 1); unsigned device; - if (!ParseCommandArg(client, device, args.front())) + if (!args.Parse(0, device, client)) return CommandResult::ERROR; if (!audio_output_disable_index(client.partition.outputs, device)) { @@ -70,7 +69,7 @@ handle_toggleoutput(Client &client, Request args) assert(args.size == 1); unsigned device; - if (!ParseCommandArg(client, device, args.front())) + if (!args.Parse(0, device, client)) return CommandResult::ERROR; if (!audio_output_toggle_index(client.partition.outputs, device)) { |