From a2af83777be4860d554bceaf28c87218729cf309 Mon Sep 17 00:00:00 2001 From: Martin Koch Date: Thu, 16 Jan 2020 15:31:05 +0100 Subject: AM: add plural form of set...SoundProperties for sources and sinks 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 extensions in module tests - leave existing singular form untouched Main purpose of this extension is to allow for one-shot (uninterrupted), consistent change of multiple, possibly interrelated sound properties. Signed-off-by: Martin Koch --- include/IAmCommand.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'include/IAmCommand.h') diff --git a/include/IAmCommand.h b/include/IAmCommand.h index 9d59e8a..4f70389 100644 --- a/include/IAmCommand.h +++ b/include/IAmCommand.h @@ -34,7 +34,7 @@ class CAmSocketHandler; #include "audiomanagertypes.h" -#define CommandVersion "4.0" +#define CommandVersion "4.1" namespace am { /** @@ -107,6 +107,12 @@ public: * case of an error */ virtual am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0; + /** + * This method is used to set the list of sound 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 setMainSinkSoundProperties(const std::vector &/*listSoundProperties*/, const am_sinkID_t /*sinkID*/) { return E_OK; }; /** * This method is used to set sound properties, e.g. Equalizer Values. Since the * capabilities of the system can differ, the exact key value pairs can be @@ -115,6 +121,12 @@ public: * case of an error */ virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0; + /** + * This method is used to set the list of sound 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 setMainSourceSoundProperties(const std::vector &/*listSoundProperties*/, const am_sourceID_t /*sourceID*/) { return E_OK; }; /** * is used to set a specific system property. * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in @@ -321,10 +333,18 @@ public: * this callback indicates that a sinkSoundProperty has changed. */ virtual void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0; + /** + * this callback indicates that sourceSoundProperties have changed. + */ + virtual void cbMainSinkSoundPropertiesChanged(const am_sinkID_t /*sinkID*/, const std::vector &/*listSoundProperties*/) { return; }; /** * this callback indicates that a sourceSoundProperty has changed. */ virtual void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0; + /** + * this callback indicates that sourceSoundProperties have changed. + */ + virtual void cbMainSourceSoundPropertiesChanged(const am_sourceID_t /*sourceID*/, const std::vector &/*listSoundProperties*/) { return; }; /** * this callback is called when the availability of a sink has changed */ -- cgit v1.2.1