diff options
author | Max Kellermann <max@duempel.org> | 2015-08-14 19:02:08 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-08-14 19:04:00 +0200 |
commit | 8e408725e98f1f5dc0cc9299c70d22fcacfdb3a6 (patch) | |
tree | 02b507544fa7e2a2d4b3bcb327ba6d3eeeb4053e /src/client/Response.hxx | |
parent | d053797340ae16b16186fe31d60bb12979ba9b81 (diff) | |
download | mpd-8e408725e98f1f5dc0cc9299c70d22fcacfdb3a6.tar.gz mpd-8e408725e98f1f5dc0cc9299c70d22fcacfdb3a6.tar.xz mpd-8e408725e98f1f5dc0cc9299c70d22fcacfdb3a6.zip |
protocol/Result: move current_command to class Response
Diffstat (limited to '')
-rw-r--r-- | src/client/Response.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/Response.hxx b/src/client/Response.hxx index 044bdf307..5841e7f61 100644 --- a/src/client/Response.hxx +++ b/src/client/Response.hxx @@ -37,13 +37,22 @@ class Response { */ const unsigned list_index; + /** + * This command's name. Used to generate error messages. + */ + const char *command; + public: Response(Client &_client, unsigned _list_index) - :client(_client), list_index(_list_index) {} + :client(_client), list_index(_list_index), command("") {} Response(const Response &) = delete; Response &operator=(const Response &) = delete; + void SetCommand(const char *_command) { + command = _command; + } + bool Write(const void *data, size_t length); bool Write(const char *data); bool FormatV(const char *fmt, va_list args); |