From c1e284360ec02b06ccb0a97a00fed05ef0bb2c60 Mon Sep 17 00:00:00 2001 From: Martin Koch Date: Fri, 17 Jan 2020 09:07:47 +0100 Subject: AM: add plural form of setSystemProperties for global configuration attributes to command and control interface - implement plural form of requests and acknowledgments in core - provide empty default implementations in interfaces to ensure backward compatibility with older plugins - accommodate extension in module tests Main purpose of this extension is to allow for one-shot (uninterrupted), consistent change of multiple, possibly interrelated configuration attributes. Signed-off-by: Martin Koch --- include/IAmCommand.h | 11 ++++++++++- include/IAmControl.h | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/IAmCommand.h b/include/IAmCommand.h index 4f70389..72a4373 100644 --- a/include/IAmCommand.h +++ b/include/IAmCommand.h @@ -25,7 +25,6 @@ #include #include -#include "audiomanagertypes.h" namespace am { class CAmDbusWrapper; class CAmSocketHandler; @@ -133,6 +132,12 @@ public: * case of an error */ virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0; + /** + * is used to set a specific system properties. + * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in + * case of an error + */ + virtual am_Error_e setSystemProperties(const std::vector&/*listSystemProperties*/ ) { return E_OK; }; /** * returns the actual list of MainConnections * @return E_OK on success, E_DATABASE_ERROR on error @@ -365,6 +370,10 @@ public: * is fired if a systemProperty changed */ virtual void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty) =0; + /** + * is fired if a systemProperties changed + */ + virtual void cbSystemPropertiesChanged(const std::vector&/*listSystemProperties*/) { return; }; /** * This callback is fired if the timinginformation for a mainConnectionID changed */ diff --git a/include/IAmControl.h b/include/IAmControl.h index 872177f..2f2f083 100644 --- a/include/IAmControl.h +++ b/include/IAmControl.h @@ -331,6 +331,12 @@ public: * was not found */ virtual am_Error_e changeSystemPropertyDB(const am_SystemProperty_s& property) =0; + /** + * changes systemProperties + * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if property + * was not found + */ + virtual am_Error_e changeSystemPropertiesDB(const std::vector&/*listSystemProperties*/){ return E_OK; }; /** * removes a mainconnection from the DB * @return E_OK on success, E_NON_EXISTENT if main connection was not found, @@ -757,6 +763,11 @@ public: * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error */ virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) =0; + /** + * sets a user SystemProperties list + * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error + */ + virtual am_Error_e hookUserSetSystemProperties(const std::vector& /*listproperties*/){ return E_OK; } /** * sets a user volume * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error -- cgit v1.2.1