summaryrefslogtreecommitdiff
path: root/AudioManagerCore/src
diff options
context:
space:
mode:
Diffstat (limited to 'AudioManagerCore/src')
-rw-r--r--AudioManagerCore/src/CAmCommandReceiver.cpp5
-rw-r--r--AudioManagerCore/src/CAmCommandSender.cpp8
-rw-r--r--AudioManagerCore/src/CAmControlReceiver.cpp5
-rw-r--r--AudioManagerCore/src/CAmControlSender.cpp6
-rw-r--r--AudioManagerCore/src/CAmDatabaseHandlerMap.cpp26
5 files changed, 50 insertions, 0 deletions
diff --git a/AudioManagerCore/src/CAmCommandReceiver.cpp b/AudioManagerCore/src/CAmCommandReceiver.cpp
index 1937f32..028b6ef 100644
--- a/AudioManagerCore/src/CAmCommandReceiver.cpp
+++ b/AudioManagerCore/src/CAmCommandReceiver.cpp
@@ -135,6 +135,11 @@ am_Error_e CAmCommandReceiver::setSystemProperty(const am_SystemProperty_s &prop
return (mControlSender->hookUserSetSystemProperty(property));
}
+am_Error_e CAmCommandReceiver::setSystemProperties(const std::vector<am_SystemProperty_s> &listSystemProperties)
+{
+ return (mControlSender->hookUserSetSystemProperties(listSystemProperties));
+}
+
am_Error_e CAmCommandReceiver::getVolume(const am_sinkID_t sinkID, am_mainVolume_t &mainVolume) const
{
return (mDatabaseHandler->getSinkMainVolume(sinkID, mainVolume));
diff --git a/AudioManagerCore/src/CAmCommandSender.cpp b/AudioManagerCore/src/CAmCommandSender.cpp
index 622e5fd..fd1be69 100644
--- a/AudioManagerCore/src/CAmCommandSender.cpp
+++ b/AudioManagerCore/src/CAmCommandSender.cpp
@@ -142,6 +142,9 @@ CAmCommandSender::CAmCommandSender(const std::vector<std::string> &listOfPluginD
dboSystemPropertyChanged = [&](const am_SystemProperty_s &SystemProperty) {
mSerializer.asyncCall(this, &CAmCommandSender::cbSystemPropertyChanged, SystemProperty);
};
+ dboSystemPropertiesChanged = [&](const std::vector<am_SystemProperty_s> &SystemProperties) {
+ mSerializer.asyncCall(this, &CAmCommandSender::cbSystemPropertiesChanged, SystemProperties);
+ };
dboTimingInformationChanged = [&](const am_mainConnectionID_t mainConnection, const am_timeSync_t time) {
mSerializer.asyncCall(this, &CAmCommandSender::cbTimingInformationChanged, mainConnection, time);
};
@@ -356,6 +359,11 @@ void CAmCommandSender::cbSystemPropertyChanged(const am_SystemProperty_s &System
CALL_ALL_INTERFACES(cbSystemPropertyChanged(SystemProperty))
}
+void CAmCommandSender::cbSystemPropertiesChanged(const std::vector<am_SystemProperty_s> &listSystemProperties)
+{
+ CALL_ALL_INTERFACES(cbSystemPropertiesChanged(listSystemProperties))
+}
+
void CAmCommandSender::cbTimingInformationChanged(const am_mainConnectionID_t mainConnection, const am_timeSync_t time)
{
CALL_ALL_INTERFACES(cbTimingInformationChanged(mainConnection, time))
diff --git a/AudioManagerCore/src/CAmControlReceiver.cpp b/AudioManagerCore/src/CAmControlReceiver.cpp
index 0fe9b03..c72d733 100644
--- a/AudioManagerCore/src/CAmControlReceiver.cpp
+++ b/AudioManagerCore/src/CAmControlReceiver.cpp
@@ -231,6 +231,11 @@ am_Error_e CAmControlReceiver::changeSystemPropertyDB(const am_SystemProperty_s
return (mDatabaseHandler->changeSystemPropertyDB(property));
}
+am_Error_e CAmControlReceiver::changeSystemPropertiesDB(const std::vector<am_SystemProperty_s> &listSystemProperties)
+{
+ return (mDatabaseHandler->changeSystemPropertiesDB(listSystemProperties));
+}
+
am_Error_e CAmControlReceiver::removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID)
{
return (mDatabaseHandler->removeMainConnectionDB(mainConnectionID));
diff --git a/AudioManagerCore/src/CAmControlSender.cpp b/AudioManagerCore/src/CAmControlSender.cpp
index e8f2285..a683a42 100644
--- a/AudioManagerCore/src/CAmControlSender.cpp
+++ b/AudioManagerCore/src/CAmControlSender.cpp
@@ -217,6 +217,12 @@ am_Error_e CAmControlSender::hookUserSetSystemProperty(const am_SystemProperty_s
return (mController->hookUserSetSystemProperty(property));
}
+am_Error_e CAmControlSender::hookUserSetSystemProperties(const std::vector<am_SystemProperty_s> &listSystemProperties)
+{
+ assert(mController);
+ return (mController->hookUserSetSystemProperties(listSystemProperties));
+}
+
am_Error_e CAmControlSender::hookUserVolumeChange(const am_sinkID_t sinkID, const am_mainVolume_t newVolume)
{
assert(mController);
diff --git a/AudioManagerCore/src/CAmDatabaseHandlerMap.cpp b/AudioManagerCore/src/CAmDatabaseHandlerMap.cpp
index eabcb18..928ce8f 100644
--- a/AudioManagerCore/src/CAmDatabaseHandlerMap.cpp
+++ b/AudioManagerCore/src/CAmDatabaseHandlerMap.cpp
@@ -1689,6 +1689,32 @@ am_Error_e CAmDatabaseHandlerMap::changeSystemPropertyDB(const am_SystemProperty
}
}
+am_Error_e CAmDatabaseHandlerMap::changeSystemPropertiesDB(const std::vector<am_SystemProperty_s> &listSystemProperties)
+{
+ std::vector<am_SystemProperty_s>::iterator elementIterator;
+
+ for (auto &itlistSystemProperties : listSystemProperties)
+ {
+ for (elementIterator = mMappedData.mSystemProperties.begin(); elementIterator != mMappedData.mSystemProperties.end();
+ ++elementIterator)
+ {
+ if (elementIterator->type == itlistSystemProperties.type)
+ {
+ DB_COND_UPDATE_RIE(elementIterator->value, itlistSystemProperties.value);
+ }
+ else
+ logVerbose("DatabaseHandler::changeSystemPropertiesDB system property does not match the internal list");
+ }
+
+ }
+
+ logVerbose("DatabaseHandler::changeSystemPropertiesDB changed system property");
+
+ NOTIFY_OBSERVERS1(dboSystemPropertiesChanged, listSystemProperties)
+
+ return (E_OK);
+}
+
am_Error_e CAmDatabaseHandlerMap::removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID)
{