summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartin Koch <mkoch@de.adit-jv.com>2020-01-16 15:31:05 +0100
committerMartin Koch <mkoch@de.adit-jv.com>2020-01-17 09:14:36 +0100
commita2af83777be4860d554bceaf28c87218729cf309 (patch)
tree58472fdde28c6660ba60d1efd4f8b119eafd1ab5 /include
parentce501a931e9eeb20013406373156bf70fb007cda (diff)
downloadaudiomanager-a2af83777be4860d554bceaf28c87218729cf309.tar.gz
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 <mkoch@de.adit-jv.com>
Diffstat (limited to 'include')
-rw-r--r--include/IAmCommand.h22
-rw-r--r--include/IAmControl.h24
2 files changed, 44 insertions, 2 deletions
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 {
/**
@@ -108,6 +108,12 @@ public:
*/
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<am_MainSoundProperty_s> &/*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
* extended in each product
@@ -116,6 +122,12 @@ public:
*/
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<am_MainSoundProperty_s> &/*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
* case of an error
@@ -322,10 +334,18 @@ public:
*/
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<am_MainSoundProperty_s> &/*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<am_MainSoundProperty_s> &/*listSoundProperties*/) { return; };
+ /**
* this callback is called when the availability of a sink has changed
*/
virtual void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
diff --git a/include/IAmControl.h b/include/IAmControl.h
index 9bfab6b..872177f 100644
--- a/include/IAmControl.h
+++ b/include/IAmControl.h
@@ -32,7 +32,7 @@ class CAmSocketHandler;
#include "audiomanagertypes.h"
-#define ControlVersion "5.1"
+#define ControlVersion "5.2"
namespace am {
/**
@@ -302,12 +302,24 @@ public:
*/
virtual am_Error_e changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
/**
+ * changes the mainsinksoundproperties of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e changeMainSinkSoundPropertiesDB(const std::vector<am_MainSoundProperty_s>& /*listSoundProperties*/, const am_sinkID_t /*sinkID*/) { return E_OK; };
+ /**
* changes the mainsourcesoundproperty of a sink
* @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
* was not found
*/
virtual am_Error_e changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
/**
+ * changes the mainsourcesoundproperties of a source
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
+ * was not found
+ */
+ virtual am_Error_e changeMainSourceSoundPropertiesDB(const std::vector<am_MainSoundProperty_s>& /*listSoundProperties*/, const am_sourceID_t /*sourceID*/) { return E_OK; };
+ /**
* changes the availablility of a source
* @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
* was not found
@@ -726,11 +738,21 @@ public:
*/
virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
/**
+ * sets a user MainSinkSoundProperty list
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSinkSoundProperties(const am_sinkID_t /*sinkID*/, const std::vector<am_MainSoundProperty_s > &/*listSoundProperties*/) { return E_OK;};
+ /**
* sets a user MainSourceSoundProperty
* @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
*/
virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
/**
+ * sets a user MainSourceSoundProperty list
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSourceSoundProperties(const am_sourceID_t /*sourceID*/, const std::vector<am_MainSoundProperty_s > &/*listSoundProperties*/) { return E_OK; };
+ /**
* sets a user SystemProperty
* @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
*/