diff options
author | Max Kellermann <max@musicpd.org> | 2017-12-19 08:45:34 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-12-19 11:57:52 +0100 |
commit | 86a06a7acc1ada8cea245bfcb7277b3e50c488f0 (patch) | |
tree | 3e7444949dad83591762fa3ea377f20cbcb2eed8 /src/output/Interface.hxx | |
parent | d05c3f4e4d6ae64a9a2ce621a562bea919725cba (diff) |
output/Interface: add "attributes" map
These attributes are printed in the "outputs" response, and the new
command "outputset" allows setting new values.
No attributes are currently implemented.
Diffstat (limited to 'src/output/Interface.hxx')
-rw-r--r-- | src/output/Interface.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/output/Interface.hxx b/src/output/Interface.hxx index f1059ad75..86123dc7c 100644 --- a/src/output/Interface.hxx +++ b/src/output/Interface.hxx @@ -20,7 +20,10 @@ #ifndef MPD_AUDIO_OUTPUT_INTERFACE_HXX #define MPD_AUDIO_OUTPUT_INTERFACE_HXX +#include <map> +#include <string> #include <chrono> +#include <stdexcept> struct AudioFormat; struct Tag; @@ -58,6 +61,22 @@ public: } /** + * Returns a map of runtime attributes. + * + * This method must be thread-safe. + */ + virtual const std::map<std::string, std::string> GetAttributes() const noexcept { + return {}; + } + + /** + * Manipulate a runtime attribute on client request. + * + * This method must be thread-safe. + */ + virtual void SetAttribute(std::string &&name, std::string &&value); + + /** * Enable the device. This may allocate resources, preparing * for the device to be opened. * |