From 599d77643b57246dc877a2bbf65b932575fbf2c7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Feb 2017 18:26:00 +0100 Subject: [PATCH] client/Response: add method GetClient() --- src/client/Response.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/client/Response.hxx b/src/client/Response.hxx index 174a4240b..280dc1d55 100644 --- a/src/client/Response.hxx +++ b/src/client/Response.hxx @@ -49,6 +49,16 @@ public: Response(const Response &) = delete; Response &operator=(const Response &) = delete; + /** + * Returns a const reference to the associated #Client object. + * This should only be used to access a client's settings, to + * determine how to format the response. For this reason, the + * returned reference is "const". + */ + const Client &GetClient() const { + return client; + } + void SetCommand(const char *_command) { command = _command; }