summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src
diff options
context:
space:
mode:
authorJens Lorenz <jlorenz@de.adit-jv.com>2014-06-11 18:14:58 +0200
committerChristian Linke <christian.linke@bmw.de>2014-06-23 14:05:37 +0200
commit20491c0f31d70e254c56f171c69b95f3d4ad2813 (patch)
tree5409ce980ecf4285a21cf0f1b38ba19dafe3129a /AudioManagerDaemon/src
parentb0bc6ede2d23dde9a177483aa9470871422fe9aa (diff)
downloadaudiomanager-20491c0f31d70e254c56f171c69b95f3d4ad2813.tar.gz
* Bug #100 - removed projecttypes.h which causes compiling conflicts5.1
Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
Diffstat (limited to 'AudioManagerDaemon/src')
-rw-r--r--AudioManagerDaemon/src/CAmControlReceiver.cpp14
-rw-r--r--AudioManagerDaemon/src/CAmControlSender.cpp8
-rw-r--r--AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp32
-rw-r--r--AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp135
-rw-r--r--AudioManagerDaemon/src/CAmRouter.cpp26
-rw-r--r--AudioManagerDaemon/src/CAmRoutingReceiver.cpp6
-rw-r--r--AudioManagerDaemon/src/CAmRoutingSender.cpp8
-rw-r--r--AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp15
8 files changed, 110 insertions, 134 deletions
diff --git a/AudioManagerDaemon/src/CAmControlReceiver.cpp b/AudioManagerDaemon/src/CAmControlReceiver.cpp
index 54346f1..ae017e2 100644
--- a/AudioManagerDaemon/src/CAmControlReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmControlReceiver.cpp
@@ -78,7 +78,7 @@ am_Error_e CAmControlReceiver::getRoute(const bool onlyfree, const am_sourceID_t
return (mRouter->getRoute(onlyfree, sourceID, sinkID, returnList));
}
-am_Error_e CAmControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID)
+am_Error_e CAmControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & connectionID, const am_CustomConnectionFormat_t format, const am_sourceID_t sourceID, const am_sinkID_t sinkID)
{
logInfo("CAmControlReceiver::connect got called, connectionFormat=", format, "sourceID=", sourceID, "sinkID=", sinkID);
@@ -99,7 +99,7 @@ am_Error_e CAmControlReceiver::disconnect(am_Handle_s & handle, const am_connect
return (mRoutingSender->asyncDisconnect(handle, connectionID));
}
-am_Error_e CAmControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime)
+am_Error_e CAmControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_CustomRampType_t rampType, const am_time_t rampTime)
{
logInfo("CAmControlReceiver::crossfade got called, hotSource=", hotSource, "crossfaderID=", crossfaderID, "rampType=", rampType, "rampTime=", rampTime);
return (mRoutingSender->asyncCrossFade(handle, crossfaderID, hotSource, rampType, rampTime));
@@ -111,13 +111,13 @@ am_Error_e CAmControlReceiver::setSourceState(am_Handle_s & handle, const am_sou
return (mRoutingSender->asyncSetSourceState(handle, sourceID, state));
}
-am_Error_e CAmControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+am_Error_e CAmControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time)
{
logInfo("CAmControlReceiver::setSinkVolume got called, sinkID=", sinkID, "volume=", volume, "ramp=", ramp, "time=", time);
return (mRoutingSender->asyncSetSinkVolume(handle, sinkID, volume, ramp, time));
}
-am_Error_e CAmControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time)
+am_Error_e CAmControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t rampType, const am_time_t time)
{
logInfo("CAmControlReceiver::setSourceVolume got called, sourceID=", sourceID, "volume=", volume, "ramp=", rampType, "time=", time);
return (mRoutingSender->asyncSetSourceVolume(handle, sourceID, volume, rampType, time));
@@ -471,19 +471,19 @@ void CAmControlReceiver::getInterfaceVersion(std::string & version) const
version = ControlReceiveVersion;
}
-am_Error_e CAmControlReceiver::changeSourceDB(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmControlReceiver::changeSourceDB(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
logInfo("CAmControlReceiver::changeSourceDB was called, sourceID", sourceID);
return (mDatabaseHandler->changeSourceDB(sourceID,sourceClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
}
-am_Error_e CAmControlReceiver::changeSinkDB(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmControlReceiver::changeSinkDB(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
logInfo("CAmControlReceiver::changeSinkDB was called with sinkID", sinkID);
return (mDatabaseHandler->changeSinkDB(sinkID,sinkClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
}
-am_Error_e CAmControlReceiver::changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e>& listSourceConnectionFormats, const std::vector<am_ConnectionFormat_e>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
+am_Error_e CAmControlReceiver::changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
{
logInfo("CAmControlReceiver::changeGatewayDB was called with gatewayID", gatewayID);
return (mDatabaseHandler->changeGatewayDB(gatewayID,listSourceConnectionFormats,listSinkConnectionFormats,convertionMatrix));
diff --git a/AudioManagerDaemon/src/CAmControlSender.cpp b/AudioManagerDaemon/src/CAmControlSender.cpp
index dbbc539..229a28b 100644
--- a/AudioManagerDaemon/src/CAmControlSender.cpp
+++ b/AudioManagerDaemon/src/CAmControlSender.cpp
@@ -349,7 +349,7 @@ void CAmControlSender::setControllerRundown(const int16_t signal)
mController->setControllerRundown(signal);
}
-am_Error_e am::CAmControlSender::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e> & listPrioConnectionFormats)
+am_Error_e am::CAmControlSender::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t> & listPrioConnectionFormats)
{
assert(mController);
return (mController->getConnectionFormatChoice(sourceID, sinkID, listRoute, listPossibleConnectionFormats, listPrioConnectionFormats));
@@ -396,19 +396,19 @@ void CAmControlSender::hookSystemNodeApplicationModeChanged(const NsmApplication
mController->hookSystemNodeApplicationModeChanged(ApplicationModeId);
}
-am_Error_e CAmControlSender::hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmControlSender::hookSystemUpdateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
assert(mController);
return (mController->hookSystemUpdateSink(sinkID,sinkClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
}
-am_Error_e CAmControlSender::hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmControlSender::hookSystemUpdateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
assert(mController);
return (mController->hookSystemUpdateSource(sourceID,sourceClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
}
-am_Error_e CAmControlSender::hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e>& listSourceConnectionFormats, const std::vector<am_ConnectionFormat_e>& listSinkConnectionFromats, const std::vector<bool>& convertionMatrix)
+am_Error_e CAmControlSender::hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFromats, const std::vector<bool>& convertionMatrix)
{
assert(mController);
return (mController->hookSystemUpdateGateway(gatewayID,listSourceConnectionFormats,listSinkConnectionFromats,convertionMatrix));
diff --git a/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp b/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
index ee2f35c..0aec9f2 100644
--- a/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
+++ b/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
@@ -179,7 +179,7 @@ void CAmDatabaseHandlerMap::CAmSource::getDescription (std::string & outString)
fmt << "[type:" << ref.type << " value:" << ref.value <<"]";
});
fmt << ") listConnectionFormats (";
- std::for_each(listConnectionFormats.begin(), listConnectionFormats.end(), [&](const am_ConnectionFormat_e & ref) {
+ std::for_each(listConnectionFormats.begin(), listConnectionFormats.end(), [&](const am_CustomConnectionFormat_t & ref) {
fmt << "[" << ref << "]";
});
fmt << ") listMainSoundProperties (";
@@ -217,7 +217,7 @@ void CAmDatabaseHandlerMap::CAmSink::getDescription (std::string & outString) co
fmt << "[type:" << ref.type << " value:" << ref.value <<"]";
});
fmt << ") listConnectionFormats (";
- std::for_each(listConnectionFormats.begin(), listConnectionFormats.end(), [&](const am_ConnectionFormat_e & ref) {
+ std::for_each(listConnectionFormats.begin(), listConnectionFormats.end(), [&](const am_CustomConnectionFormat_t & ref) {
fmt << "[" << ref << "]";
});
fmt << ") listMainSoundProperties (";
@@ -328,11 +328,11 @@ void CAmDatabaseHandlerMap::CAmGateway::getDescription (std::string & outString)
") domainSourceID(" << domainSourceID <<
") controlDomainID(" << controlDomainID <<
") listSourceFormats (";
- std::for_each(listSourceFormats.begin(), listSourceFormats.end(), [&](const am_ConnectionFormat_e & ref) {
+ std::for_each(listSourceFormats.begin(), listSourceFormats.end(), [&](const am_CustomConnectionFormat_t & ref) {
fmt << "[" << ref << "]";
});
fmt << ") listSinkFormats (";
- std::for_each(listSinkFormats.begin(), listSinkFormats.end(), [&](const am_ConnectionFormat_e & ref) {
+ std::for_each(listSinkFormats.begin(), listSinkFormats.end(), [&](const am_CustomConnectionFormat_t & ref) {
fmt << "[" << ref << "]";
});
fmt << ") convertionMatrix (";
@@ -1056,7 +1056,6 @@ am_Error_e CAmDatabaseHandlerMap::changeSinkAvailabilityDB(const am_Availability
{
assert(sinkID!=0);
assert(availability.availability>=A_UNKNOWN && availability.availability<=A_MAX);
- assert(availability.availabilityReason>=AR_UNKNOWN && availability.availabilityReason<=AR_MAX);
if (!existSink(sinkID))
{
@@ -1110,7 +1109,6 @@ am_Error_e CAmDatabaseHandlerMap::changeSinkMuteStateDB(const am_MuteState_e mut
am_Error_e CAmDatabaseHandlerMap::changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
- assert(soundProperty.type>=MSP_UNKNOWN && soundProperty.type<=MSP_MAX);
assert(sinkID!=0);
if (!existSink(sinkID))
@@ -1133,7 +1131,6 @@ am_Error_e CAmDatabaseHandlerMap::changeMainSinkSoundPropertyDB(const am_MainSou
am_Error_e CAmDatabaseHandlerMap::changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
- assert(soundProperty.type>=MSP_UNKNOWN && soundProperty.type<=MSP_MAX);
assert(sourceID!=0);
if (!existSource(sourceID))
@@ -1159,7 +1156,6 @@ am_Error_e CAmDatabaseHandlerMap::changeSourceAvailabilityDB(const am_Availabili
{
assert(sourceID!=0);
assert(availability.availability>=A_UNKNOWN && availability.availability<=A_MAX);
- assert(availability.availabilityReason>=AR_UNKNOWN && availability.availabilityReason<=AR_MAX);
if (!existSource(sourceID))
{
@@ -1177,8 +1173,6 @@ am_Error_e CAmDatabaseHandlerMap::changeSourceAvailabilityDB(const am_Availabili
am_Error_e CAmDatabaseHandlerMap::changeSystemPropertyDB(const am_SystemProperty_s & property)
{
- assert(property.type>=SYP_UNKNOWN && property.type<=SYP_MAX);
-
std::vector<am_SystemProperty_s>::iterator elementIterator = mMappedData.mSystemProperties.begin();
for (;elementIterator != mMappedData.mSystemProperties.end(); ++elementIterator)
{
@@ -1757,7 +1751,7 @@ am_Error_e CAmDatabaseHandlerMap::getListSystemProperties(std::vector<am_SystemP
return (E_OK);
}
-am_Error_e am::CAmDatabaseHandlerMap::getListSinkConnectionFormats(const am_sinkID_t sinkID, std::vector<am_ConnectionFormat_e> & listConnectionFormats) const
+am_Error_e am::CAmDatabaseHandlerMap::getListSinkConnectionFormats(const am_sinkID_t sinkID, std::vector<am_CustomConnectionFormat_t> & listConnectionFormats) const
{
if (!existSink(sinkID))
return E_NON_EXISTENT;
@@ -1767,7 +1761,7 @@ am_Error_e am::CAmDatabaseHandlerMap::getListSinkConnectionFormats(const am_sink
return (E_OK);
}
-am_Error_e am::CAmDatabaseHandlerMap::getListSourceConnectionFormats(const am_sourceID_t sourceID, std::vector<am_ConnectionFormat_e> & listConnectionFormats) const
+am_Error_e am::CAmDatabaseHandlerMap::getListSourceConnectionFormats(const am_sourceID_t sourceID, std::vector<am_CustomConnectionFormat_t> & listConnectionFormats) const
{
if (!existSource(sourceID))
return E_NON_EXISTENT;
@@ -2201,7 +2195,7 @@ am_Error_e CAmDatabaseHandlerMap::getSourceVolume(const am_sourceID_t sourceID,
return (E_NON_EXISTENT);
}
-am_Error_e CAmDatabaseHandlerMap::getSinkSoundPropertyValue(const am_sinkID_t sinkID, const am_SoundPropertyType_e propertyType, int16_t & value) const
+am_Error_e CAmDatabaseHandlerMap::getSinkSoundPropertyValue(const am_sinkID_t sinkID, const am_CustomSoundPropertyType_t propertyType, int16_t & value) const
{
assert(sinkID!=0);
@@ -2222,7 +2216,7 @@ am_Error_e CAmDatabaseHandlerMap::getSinkSoundPropertyValue(const am_sinkID_t si
return (E_NON_EXISTENT);
}
-am_Error_e CAmDatabaseHandlerMap::getSourceSoundPropertyValue(const am_sourceID_t sourceID, const am_SoundPropertyType_e propertyType, int16_t & value) const
+am_Error_e CAmDatabaseHandlerMap::getSourceSoundPropertyValue(const am_sourceID_t sourceID, const am_CustomSoundPropertyType_t propertyType, int16_t & value) const
{
assert(sourceID!=0);
@@ -2377,7 +2371,6 @@ am_Error_e CAmDatabaseHandlerMap::changeSourceVolume(const am_sourceID_t sourceI
am_Error_e CAmDatabaseHandlerMap::changeSourceSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
- assert(soundProperty.type>=SP_UNKNOWN && soundProperty.type<=SP_MAX);
assert(sourceID!=0);
if (!existSource(sourceID))
@@ -2399,7 +2392,6 @@ am_Error_e CAmDatabaseHandlerMap::changeSourceSoundPropertyDB(const am_SoundProp
am_Error_e CAmDatabaseHandlerMap::changeSinkSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
- assert(soundProperty.type>=SP_UNKNOWN && soundProperty.type<=SP_MAX);
assert(sinkID!=0);
if (!existSink(sinkID))
@@ -2422,7 +2414,7 @@ am_Error_e CAmDatabaseHandlerMap::changeSinkSoundPropertyDB(const am_SoundProper
am_Error_e CAmDatabaseHandlerMap::changeCrossFaderHotSink(const am_crossfaderID_t crossfaderID, const am_HotSink_e hotsink)
{
assert(crossfaderID!=0);
- assert(hotsink>=HS_UNKNOWN && hotsink>=HS_MAX);
+ assert(hotsink!=HS_UNKNOWN);
if (!existcrossFader(crossfaderID))
{
@@ -2512,7 +2504,7 @@ am_Error_e am::CAmDatabaseHandlerMap::peekSourceClassID(const std::string & name
}
-am_Error_e CAmDatabaseHandlerMap::changeSourceDB(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmDatabaseHandlerMap::changeSourceDB(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
assert(sourceID!=0);
@@ -2570,7 +2562,7 @@ am_Error_e CAmDatabaseHandlerMap::changeSourceDB(const am_sourceID_t sourceID, c
}
-am_Error_e CAmDatabaseHandlerMap::changeSinkDB(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmDatabaseHandlerMap::changeSinkDB(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
assert(sinkID!=0);
@@ -2703,7 +2695,7 @@ am_Error_e CAmDatabaseHandlerMap::changeMainSourceNotificationConfigurationDB(co
return (E_OK);
}
-am_Error_e CAmDatabaseHandlerMap::changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e>& listSourceConnectionFormats, const std::vector<am_ConnectionFormat_e>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
+am_Error_e CAmDatabaseHandlerMap::changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
{
assert(gatewayID!=0);
diff --git a/AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp b/AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp
index df0fbcb..1390fc4 100644
--- a/AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp
+++ b/AudioManagerDaemon/src/CAmDatabaseHandlerSQLite.cpp
@@ -457,7 +457,7 @@ am_Error_e CAmDatabaseHandlerSQLite::enterSinkDB(const am_Sink_s & sinkData, am_
//fill ConnectionFormats
command = "INSERT INTO SinkConnectionFormat" + i2s(sinkID) + std::string("(soundFormat) VALUES (?)");
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
- std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = sinkData.listConnectionFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator connectionFormatIterator = sinkData.listConnectionFormats.begin();
for (; connectionFormatIterator < sinkData.listConnectionFormats.end(); ++connectionFormatIterator)
{
MY_SQLITE_BIND_INT(query, 1, *connectionFormatIterator)
@@ -722,7 +722,7 @@ am_Error_e CAmDatabaseHandlerSQLite::enterGatewayDB(const am_Gateway_s & gateway
//fill ConnectionFormats
command = "INSERT INTO GatewaySourceFormat" + i2s(gatewayID) + std::string("(soundFormat) VALUES (?)");
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
- std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = gatewayData.listSourceFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator connectionFormatIterator = gatewayData.listSourceFormats.begin();
for (; connectionFormatIterator < gatewayData.listSourceFormats.end(); ++connectionFormatIterator)
{
MY_SQLITE_BIND_INT(query, 1, *connectionFormatIterator)
@@ -874,7 +874,7 @@ am_Error_e CAmDatabaseHandlerSQLite::enterSourceDB(const am_Source_s & sourceDat
//fill ConnectionFormats
command = "INSERT INTO SourceConnectionFormat" + i2s(sourceID) + std::string("(soundFormat) VALUES (?)");
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
- std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = sourceData.listConnectionFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator connectionFormatIterator = sourceData.listConnectionFormats.begin();
for (; connectionFormatIterator != sourceData.listConnectionFormats.end(); ++connectionFormatIterator)
{
MY_SQLITE_BIND_INT(query, 1, *connectionFormatIterator)
@@ -1111,7 +1111,6 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSinkAvailabilityDB(const am_Availabil
{
assert(sinkID!=0);
assert(availability.availability>=A_UNKNOWN && availability.availability<=A_MAX);
- assert(availability.availabilityReason>=AR_UNKNOWN && availability.availabilityReason<=AR_MAX);
sqlite3_stmt* query = NULL;
int eCode = 0;
@@ -1203,7 +1202,6 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSinkMuteStateDB(const am_MuteState_e
am_Error_e CAmDatabaseHandlerSQLite::changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
- assert(soundProperty.type>=MSP_UNKNOWN && soundProperty.type<=MSP_MAX);
assert(sinkID!=0);
sqlite3_stmt* query = NULL;
@@ -1233,7 +1231,6 @@ am_Error_e CAmDatabaseHandlerSQLite::changeMainSinkSoundPropertyDB(const am_Main
am_Error_e CAmDatabaseHandlerSQLite::changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
- assert(soundProperty.type>=MSP_UNKNOWN && soundProperty.type<=MSP_MAX);
assert(sourceID!=0);
sqlite3_stmt* query = NULL;
@@ -1266,7 +1263,6 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSourceAvailabilityDB(const am_Availab
{
assert(sourceID!=0);
assert(availability.availability>=A_UNKNOWN && availability.availability<=A_MAX);
- assert(availability.availabilityReason>=AR_UNKNOWN && availability.availabilityReason<=AR_MAX);
sqlite3_stmt* query = NULL;
int eCode = 0;
@@ -1298,7 +1294,6 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSourceAvailabilityDB(const am_Availab
am_Error_e CAmDatabaseHandlerSQLite::changeSystemPropertyDB(const am_SystemProperty_s & property)
{
- assert(property.type>=SYP_UNKNOWN && property.type<=SYP_MAX);
sqlite3_stmt* query = NULL;
int eCode = 0;
std::string command = "UPDATE " + std::string(SYSTEM_TABLE) + " set value=? WHERE type=?";
@@ -1580,7 +1575,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceClassInfoDB(const am_sourceID_t so
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
- propertyTemp.classProperty = (am_ClassProperty_e) sqlite3_column_int(query, 0);
+ propertyTemp.classProperty = (am_CustomClassProperty_t) sqlite3_column_int(query, 0);
propertyTemp.value = sqlite3_column_int(query, 1);
classInfo.listClassProperties.push_back(propertyTemp);
}
@@ -1608,7 +1603,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkInfoDB(const am_sinkID_t sinkID, am_
sqlite3_stmt* query = NULL, *qConnectionFormat = NULL, *qSoundProperty = NULL, *qMAinSoundProperty = NULL, *qMainNotification = NULL, *qNotification = NULL;
int eCode = 0;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
am_NotificationConfiguration_s tempNotificationConfiguration,tempMainNotification;
@@ -1623,7 +1618,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkInfoDB(const am_sinkID_t sinkID, am_
sinkData.volume = sqlite3_column_int(query, 3);
sinkData.visible = sqlite3_column_int(query, 4);
sinkData.available.availability = (am_Availability_e) sqlite3_column_int(query, 5);
- sinkData.available.availabilityReason = (am_AvailabilityReason_e) sqlite3_column_int(query, 6);
+ sinkData.available.availabilityReason = (am_CustomAvailabilityReason_t) sqlite3_column_int(query, 6);
sinkData.muteState = (am_MuteState_e) sqlite3_column_int(query, 7);
sinkData.mainVolume = sqlite3_column_int(query, 8);
sinkData.sinkID = sqlite3_column_int(query, 9);
@@ -1633,7 +1628,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkInfoDB(const am_sinkID_t sinkID, am_
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL)
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qConnectionFormat, 0);
sinkData.listConnectionFormats.push_back(tempConnectionFormat);
}
@@ -1644,7 +1639,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkInfoDB(const am_sinkID_t sinkID, am_
MY_SQLITE_PREPARE_V2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL)
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
- tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
+ tempSoundProperty.type = (am_CustomSoundPropertyType_t) sqlite3_column_int(qSoundProperty, 0);
tempSoundProperty.value = sqlite3_column_int(qSoundProperty, 1);
sinkData.listSoundProperties.push_back(tempSoundProperty);
}
@@ -1656,7 +1651,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkInfoDB(const am_sinkID_t sinkID, am_
while ((eCode = sqlite3_step(qNotification)) == SQLITE_ROW)
{
- tempNotificationConfiguration.type = static_cast<am_NotificationType_e>(sqlite3_column_int(qNotification, 0));
+ tempNotificationConfiguration.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(qNotification, 0));
tempNotificationConfiguration.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(qNotification, 1));
tempNotificationConfiguration.parameter= static_cast<int16_t>(sqlite3_column_int(qNotification, 2));
sinkData.listNotificationConfigurations.push_back(tempNotificationConfiguration);
@@ -1671,7 +1666,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkInfoDB(const am_sinkID_t sinkID, am_
MY_SQLITE_PREPARE_V2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL)
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
- tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
+ tempMainSoundProperty.type = (am_CustomMainSoundPropertyType_t) sqlite3_column_int(qMAinSoundProperty, 0);
tempMainSoundProperty.value = sqlite3_column_int(qMAinSoundProperty, 1);
sinkData.listMainSoundProperties.push_back(tempMainSoundProperty);
}
@@ -1683,7 +1678,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkInfoDB(const am_sinkID_t sinkID, am_
while ((eCode = sqlite3_step(qMainNotification)) == SQLITE_ROW)
{
- tempMainNotification.type = static_cast<am_NotificationType_e>(sqlite3_column_int(qMainNotification, 0));
+ tempMainNotification.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(qMainNotification, 0));
tempMainNotification.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(qMainNotification, 1));
tempMainNotification.parameter= static_cast<int16_t>(sqlite3_column_int(qMainNotification, 2));
sinkData.listMainNotificationConfigurations.push_back(tempMainNotification);
@@ -1715,7 +1710,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceInfoDB(const am_sourceID_t sourceI
sqlite3_stmt* query = NULL, *qConnectionFormat = NULL, *qSoundProperty = NULL, *qMAinSoundProperty = NULL, *qMainNotification = NULL, *qNotification = NULL;
int eCode = 0;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
am_NotificationConfiguration_s tempNotificationConfiguration,tempMainNotification;
@@ -1731,7 +1726,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceInfoDB(const am_sourceID_t sourceI
sourceData.volume = sqlite3_column_int(query, 4);
sourceData.visible = sqlite3_column_int(query, 5);
sourceData.available.availability = (am_Availability_e) sqlite3_column_int(query, 6);
- sourceData.available.availabilityReason = (am_AvailabilityReason_e) sqlite3_column_int(query, 7);
+ sourceData.available.availabilityReason = (am_CustomAvailabilityReason_t) sqlite3_column_int(query, 7);
sourceData.interruptState = (am_InterruptState_e) sqlite3_column_int(query, 8);
sourceData.sourceID = sqlite3_column_int(query, 9);
@@ -1740,7 +1735,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceInfoDB(const am_sourceID_t sourceI
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL)
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qConnectionFormat, 0);
sourceData.listConnectionFormats.push_back(tempConnectionFormat);
}
@@ -1751,7 +1746,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceInfoDB(const am_sourceID_t sourceI
MY_SQLITE_PREPARE_V2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
- tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
+ tempSoundProperty.type = (am_CustomSoundPropertyType_t) sqlite3_column_int(qSoundProperty, 0);
tempSoundProperty.value = sqlite3_column_int(qSoundProperty, 1);
sourceData.listSoundProperties.push_back(tempSoundProperty);
}
@@ -1763,7 +1758,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceInfoDB(const am_sourceID_t sourceI
while ((eCode = sqlite3_step(qNotification)) == SQLITE_ROW)
{
- tempNotificationConfiguration.type = static_cast<am_NotificationType_e>(sqlite3_column_int(qNotification, 0));
+ tempNotificationConfiguration.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(qNotification, 0));
tempNotificationConfiguration.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(qNotification, 1));
tempNotificationConfiguration.parameter= static_cast<int16_t>(sqlite3_column_int(qNotification, 2));
sourceData.listNotificationConfigurations.push_back(tempNotificationConfiguration);
@@ -1778,7 +1773,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceInfoDB(const am_sourceID_t sourceI
MY_SQLITE_PREPARE_V2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL)
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
- tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
+ tempMainSoundProperty.type = (am_CustomMainSoundPropertyType_t) sqlite3_column_int(qMAinSoundProperty, 0);
tempMainSoundProperty.value = sqlite3_column_int(qMAinSoundProperty, 1);
sourceData.listMainSoundProperties.push_back(tempMainSoundProperty);
}
@@ -1790,7 +1785,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceInfoDB(const am_sourceID_t sourceI
while ((eCode = sqlite3_step(qMainNotification)) == SQLITE_ROW)
{
- tempMainNotification.type = static_cast<am_NotificationType_e>(sqlite3_column_int(qMainNotification, 0));
+ tempMainNotification.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(qMainNotification, 0));
tempMainNotification.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(qMainNotification, 1));
tempMainNotification.parameter= static_cast<int16_t>(sqlite3_column_int(qMainNotification, 2));
sourceData.listMainNotificationConfigurations.push_back(tempMainNotification);
@@ -1979,7 +1974,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkClassInfoDB(const am_sinkID_t sinkID
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
- propertyTemp.classProperty = (am_ClassProperty_e) sqlite3_column_int(query, 0);
+ propertyTemp.classProperty = (am_CustomClassProperty_t) sqlite3_column_int(query, 0);
propertyTemp.value = sqlite3_column_int(query, 1);
sinkClass.listClassProperties.push_back(propertyTemp);
}
@@ -2004,7 +1999,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getGatewayInfoDB(const am_gatewayID_t gatew
}
sqlite3_stmt* query = NULL, *qSinkConnectionFormat = NULL, *qSourceConnectionFormat = NULL;
int eCode = 0;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
std::string command = "SELECT name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID FROM " + std::string(GATEWAY_TABLE) + " WHERE gatewayID=" + i2s(gatewayID);
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
@@ -2034,7 +2029,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getGatewayInfoDB(const am_gatewayID_t gatew
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSourceConnectionFormat, NULL)
while ((eCode = sqlite3_step(qSourceConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSourceConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qSourceConnectionFormat, 0);
gatewayData.listSourceFormats.push_back(tempConnectionFormat);
}
@@ -2045,7 +2040,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getGatewayInfoDB(const am_gatewayID_t gatew
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSinkConnectionFormat, NULL)
while ((eCode = sqlite3_step(qSinkConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSinkConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qSinkConnectionFormat, 0);
gatewayData.listSinkFormats.push_back(tempConnectionFormat);
}
@@ -2318,7 +2313,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListConnections(std::vector<am_Connectio
temp.sourceID = sqlite3_column_int(query, 1);
temp.sinkID = sqlite3_column_int(query, 2);
temp.delay = sqlite3_column_int(query, 3);
- temp.connectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(query, 4);
+ temp.connectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(query, 4);
listConnections.push_back(temp);
}
@@ -2340,7 +2335,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinks(std::vector<am_Sink_s> & listS
sqlite3_stmt* query = NULL, *qConnectionFormat = NULL, *qSoundProperty = NULL, *qNotificationConfiguration= NULL, *qMAinSoundProperty = NULL, *qMainNotificationConfiguration= NULL;
int eCode = 0;
am_Sink_s temp;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
am_NotificationConfiguration_s tempNotificationConfiguration;
@@ -2356,7 +2351,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinks(std::vector<am_Sink_s> & listS
temp.volume = sqlite3_column_int(query, 3);
temp.visible = sqlite3_column_int(query, 4);
temp.available.availability = (am_Availability_e) sqlite3_column_int(query, 5);
- temp.available.availabilityReason = (am_AvailabilityReason_e) sqlite3_column_int(query, 6);
+ temp.available.availabilityReason = (am_CustomAvailabilityReason_t) sqlite3_column_int(query, 6);
temp.muteState = (am_MuteState_e) sqlite3_column_int(query, 7);
temp.mainVolume = sqlite3_column_int(query, 8);
temp.sinkID = sqlite3_column_int(query, 9);
@@ -2366,7 +2361,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinks(std::vector<am_Sink_s> & listS
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL)
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qConnectionFormat, 0);
temp.listConnectionFormats.push_back(tempConnectionFormat);
}
@@ -2377,7 +2372,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinks(std::vector<am_Sink_s> & listS
MY_SQLITE_PREPARE_V2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL)
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
- tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
+ tempSoundProperty.type = (am_CustomSoundPropertyType_t) sqlite3_column_int(qSoundProperty, 0);
tempSoundProperty.value = sqlite3_column_int(qSoundProperty, 1);
temp.listSoundProperties.push_back(tempSoundProperty);
}
@@ -2389,7 +2384,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinks(std::vector<am_Sink_s> & listS
MY_SQLITE_PREPARE_V2(mpDatabase, commandNotificationConfiguration.c_str(), -1, &qNotificationConfiguration, NULL)
while ((eCode = sqlite3_step(qNotificationConfiguration)) == SQLITE_ROW)
{
- tempNotificationConfiguration.type = static_cast<am_NotificationType_e> (sqlite3_column_int(qNotificationConfiguration, 0));
+ tempNotificationConfiguration.type = static_cast<am_CustomNotificationType_t> (sqlite3_column_int(qNotificationConfiguration, 0));
tempNotificationConfiguration.status = static_cast<am_NotificationStatus_e> (sqlite3_column_int(qNotificationConfiguration, 1));
tempNotificationConfiguration.parameter = static_cast<int16_t> (sqlite3_column_int(qNotificationConfiguration, 2));
temp.listNotificationConfigurations.push_back(tempNotificationConfiguration);
@@ -2404,7 +2399,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinks(std::vector<am_Sink_s> & listS
MY_SQLITE_PREPARE_V2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL)
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
- tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
+ tempMainSoundProperty.type = (am_CustomMainSoundPropertyType_t) sqlite3_column_int(qMAinSoundProperty, 0);
tempMainSoundProperty.value = sqlite3_column_int(qMAinSoundProperty, 1);
temp.listMainSoundProperties.push_back(tempMainSoundProperty);
}
@@ -2416,7 +2411,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinks(std::vector<am_Sink_s> & listS
MY_SQLITE_PREPARE_V2(mpDatabase, commandMainNotificationConfiguration.c_str(), -1, &qMainNotificationConfiguration, NULL)
while ((eCode = sqlite3_step(qMainNotificationConfiguration)) == SQLITE_ROW)
{
- tempMainNotificationConfiguration.type = static_cast <am_NotificationType_e> (sqlite3_column_int(qMainNotificationConfiguration, 0));
+ tempMainNotificationConfiguration.type = static_cast <am_CustomNotificationType_t> (sqlite3_column_int(qMainNotificationConfiguration, 0));
tempMainNotificationConfiguration.status = static_cast <am_NotificationStatus_e> (sqlite3_column_int(qMainNotificationConfiguration, 1));
tempMainNotificationConfiguration.parameter = static_cast <uint16_t>(sqlite3_column_int(qMainNotificationConfiguration, 2));
temp.listMainNotificationConfigurations.push_back(tempMainNotificationConfiguration);
@@ -2449,7 +2444,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSources(std::vector<am_Source_s> & l
sqlite3_stmt* query = NULL, *qConnectionFormat = NULL, *qSoundProperty = NULL, *qMAinSoundProperty = NULL, *qNotification(NULL), *qMainNotification(NULL);
int eCode = 0;
am_Source_s temp;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
am_NotificationConfiguration_s tempNotificationConfiguration;
@@ -2465,7 +2460,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSources(std::vector<am_Source_s> & l
temp.volume = sqlite3_column_int(query, 4);
temp.visible = sqlite3_column_int(query, 5);
temp.available.availability = (am_Availability_e) sqlite3_column_int(query, 6);
- temp.available.availabilityReason = (am_AvailabilityReason_e) sqlite3_column_int(query, 7);
+ temp.available.availabilityReason = (am_CustomAvailabilityReason_t) sqlite3_column_int(query, 7);
temp.interruptState = (am_InterruptState_e) sqlite3_column_int(query, 8);
temp.sourceID = sqlite3_column_int(query, 9);
@@ -2474,7 +2469,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSources(std::vector<am_Source_s> & l
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL)
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qConnectionFormat, 0);
temp.listConnectionFormats.push_back(tempConnectionFormat);
}
@@ -2485,7 +2480,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSources(std::vector<am_Source_s> & l
MY_SQLITE_PREPARE_V2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL)
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
- tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
+ tempSoundProperty.type = (am_CustomSoundPropertyType_t) sqlite3_column_int(qSoundProperty, 0);
tempSoundProperty.value = sqlite3_column_int(qSoundProperty, 1);
temp.listSoundProperties.push_back(tempSoundProperty);
}
@@ -2497,7 +2492,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSources(std::vector<am_Source_s> & l
while ((eCode = sqlite3_step(qNotification)) == SQLITE_ROW)
{
- tempNotificationConfiguration.type = static_cast<am_NotificationType_e>(sqlite3_column_int(qNotification, 0));
+ tempNotificationConfiguration.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(qNotification, 0));
tempNotificationConfiguration.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(qNotification, 1));
tempNotificationConfiguration.parameter= static_cast<int16_t>(sqlite3_column_int(qNotification, 2));
temp.listNotificationConfigurations.push_back(tempNotificationConfiguration);
@@ -2511,7 +2506,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSources(std::vector<am_Source_s> & l
MY_SQLITE_PREPARE_V2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL)
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
- tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
+ tempMainSoundProperty.type = (am_CustomMainSoundPropertyType_t) sqlite3_column_int(qMAinSoundProperty, 0);
tempMainSoundProperty.value = sqlite3_column_int(qMAinSoundProperty, 1);
temp.listMainSoundProperties.push_back(tempMainSoundProperty);
}
@@ -2523,7 +2518,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSources(std::vector<am_Source_s> & l
while ((eCode = sqlite3_step(qMainNotification)) == SQLITE_ROW)
{
- tempNotificationConfiguration.type = static_cast<am_NotificationType_e>(sqlite3_column_int(qMainNotification, 0));
+ tempNotificationConfiguration.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(qMainNotification, 0));
tempNotificationConfiguration.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(qMainNotification, 1));
tempNotificationConfiguration.parameter= static_cast<int16_t>(sqlite3_column_int(qMainNotification, 2));
temp.listMainNotificationConfigurations.push_back(tempNotificationConfiguration);
@@ -2574,7 +2569,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSourceClasses(std::vector<am_SourceC
while ((eCode1 = sqlite3_step(subQuery)) == SQLITE_ROW)
{
- propertyTemp.classProperty = (am_ClassProperty_e) sqlite3_column_int(subQuery, 0);
+ propertyTemp.classProperty = (am_CustomClassProperty_t) sqlite3_column_int(subQuery, 0);
propertyTemp.value = sqlite3_column_int(subQuery, 1);
classTemp.listClassProperties.push_back(propertyTemp);
}
@@ -2642,7 +2637,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListGateways(std::vector<am_Gateway_s> &
sqlite3_stmt* query = NULL, *qSinkConnectionFormat = NULL, *qSourceConnectionFormat = NULL;
int eCode = 0;
am_Gateway_s temp;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
std::string command = "SELECT name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID FROM " + std::string(GATEWAY_TABLE);
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
@@ -2673,7 +2668,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListGateways(std::vector<am_Gateway_s> &
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSourceConnectionFormat, NULL)
while ((eCode = sqlite3_step(qSourceConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSourceConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qSourceConnectionFormat, 0);
temp.listSourceFormats.push_back(tempConnectionFormat);
}
@@ -2684,7 +2679,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListGateways(std::vector<am_Gateway_s> &
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSinkConnectionFormat, NULL)
while ((eCode = sqlite3_step(qSinkConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSinkConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qSinkConnectionFormat, 0);
temp.listSinkFormats.push_back(tempConnectionFormat);
}
@@ -2731,7 +2726,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSinkClasses(std::vector<am_SinkClass
while ((eCode = sqlite3_step(subQuery)) == SQLITE_ROW)
{
- propertyTemp.classProperty = (am_ClassProperty_e) sqlite3_column_int(subQuery, 0);
+ propertyTemp.classProperty = (am_CustomClassProperty_t) sqlite3_column_int(subQuery, 0);
propertyTemp.value = sqlite3_column_int(subQuery, 1);
classTemp.listClassProperties.push_back(propertyTemp);
}
@@ -2807,7 +2802,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListMainSinks(std::vector<am_SinkType_s>
temp.name = std::string((const char*) sqlite3_column_text(query, 0));
temp.sinkID = sqlite3_column_int(query, 1);
temp.availability.availability = (am_Availability_e) sqlite3_column_int(query, 2);
- temp.availability.availabilityReason = (am_AvailabilityReason_e) sqlite3_column_int(query, 3);
+ temp.availability.availabilityReason = (am_CustomAvailabilityReason_t) sqlite3_column_int(query, 3);
temp.muteState = (am_MuteState_e) sqlite3_column_int(query, 4);
temp.volume = sqlite3_column_int(query, 5);
temp.sinkClassID = sqlite3_column_int(query, 6);
@@ -2840,7 +2835,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListMainSources(std::vector<am_SourceTyp
temp.name = std::string((const char*) sqlite3_column_text(query, 0));
temp.sourceClassID = sqlite3_column_int(query, 1);
temp.availability.availability = (am_Availability_e) sqlite3_column_int(query, 2);
- temp.availability.availabilityReason = (am_AvailabilityReason_e) sqlite3_column_int(query, 3);
+ temp.availability.availabilityReason = (am_CustomAvailabilityReason_t) sqlite3_column_int(query, 3);
temp.sourceID = sqlite3_column_int(query, 4);
listMainSources.push_back(temp);
@@ -2873,7 +2868,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListMainSinkSoundProperties(const am_sin
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
- temp.type = (am_MainSoundPropertyType_e) sqlite3_column_int(query, 0);
+ temp.type = (am_CustomMainSoundPropertyType_t) sqlite3_column_int(query, 0);
temp.value = sqlite3_column_int(query, 1);
listSoundProperties.push_back(temp);
}
@@ -2905,7 +2900,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListMainSourceSoundProperties(const am_s
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
- temp.type = (am_MainSoundPropertyType_e) sqlite3_column_int(query, 0);
+ temp.type = (am_CustomMainSoundPropertyType_t) sqlite3_column_int(query, 0);
temp.value = sqlite3_column_int(query, 1);
listSourceProperties.push_back(temp);
}
@@ -2934,7 +2929,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSystemProperties(std::vector<am_Syst
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
- temp.type = (am_SystemPropertyType_e) sqlite3_column_int(query, 0);
+ temp.type = (am_CustomSystemPropertyType_t) sqlite3_column_int(query, 0);
temp.value = sqlite3_column_int(query, 1);
listSystemProperties.push_back(temp);
}
@@ -2951,17 +2946,17 @@ am_Error_e CAmDatabaseHandlerSQLite::getListSystemProperties(std::vector<am_Syst
return (E_OK);
}
-am_Error_e am::CAmDatabaseHandlerSQLite::getListSinkConnectionFormats(const am_sinkID_t sinkID, std::vector<am_ConnectionFormat_e> & listConnectionFormats) const
+am_Error_e am::CAmDatabaseHandlerSQLite::getListSinkConnectionFormats(const am_sinkID_t sinkID, std::vector<am_CustomConnectionFormat_t> & listConnectionFormats) const
{
listConnectionFormats.clear();
sqlite3_stmt *qConnectionFormat = NULL;
int eCode = 0;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
std::string commandConnectionFormat = "SELECT soundFormat FROM SinkConnectionFormat" + i2s(sinkID);
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL)
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qConnectionFormat, 0);
listConnectionFormats.push_back(tempConnectionFormat);
}
@@ -2970,19 +2965,19 @@ am_Error_e am::CAmDatabaseHandlerSQLite::getListSinkConnectionFormats(const am_s
return (E_OK);
}
-am_Error_e am::CAmDatabaseHandlerSQLite::getListSourceConnectionFormats(const am_sourceID_t sourceID, std::vector<am_ConnectionFormat_e> & listConnectionFormats) const
+am_Error_e am::CAmDatabaseHandlerSQLite::getListSourceConnectionFormats(const am_sourceID_t sourceID, std::vector<am_CustomConnectionFormat_t> & listConnectionFormats) const
{
listConnectionFormats.clear();
sqlite3_stmt* qConnectionFormat = NULL;
int eCode = 0;
- am_ConnectionFormat_e tempConnectionFormat;
+ am_CustomConnectionFormat_t tempConnectionFormat;
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM SourceConnectionFormat" + i2s(sourceID);
MY_SQLITE_PREPARE_V2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL)
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
- tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
+ tempConnectionFormat = (am_CustomConnectionFormat_t) sqlite3_column_int(qConnectionFormat, 0);
listConnectionFormats.push_back(tempConnectionFormat);
}
@@ -4039,7 +4034,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSourceVolume(const am_sourceID_t sourceI
return (E_OK);
}
-am_Error_e CAmDatabaseHandlerSQLite::getSinkSoundPropertyValue(const am_sinkID_t sinkID, const am_SoundPropertyType_e propertyType, int16_t & value) const
+am_Error_e CAmDatabaseHandlerSQLite::getSinkSoundPropertyValue(const am_sinkID_t sinkID, const am_CustomSoundPropertyType_t propertyType, int16_t & value) const
{
assert(sinkID!=0);
if (!existSink(sinkID))
@@ -4066,7 +4061,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getSinkSoundPropertyValue(const am_sinkID_t
return (E_OK);
}
-am_Error_e CAmDatabaseHandlerSQLite::getSourceSoundPropertyValue(const am_sourceID_t sourceID, const am_SoundPropertyType_e propertyType, int16_t & value) const
+am_Error_e CAmDatabaseHandlerSQLite::getSourceSoundPropertyValue(const am_sourceID_t sourceID, const am_CustomSoundPropertyType_t propertyType, int16_t & value) const
{
assert(sourceID!=0);
if (!existSource(sourceID))
@@ -4310,7 +4305,6 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSourceVolume(const am_sourceID_t sour
am_Error_e CAmDatabaseHandlerSQLite::changeSourceSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
- assert(soundProperty.type>=SP_UNKNOWN && soundProperty.type<=SP_MAX);
assert(sourceID!=0);
sqlite3_stmt* query = NULL;
@@ -4338,7 +4332,6 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSourceSoundPropertyDB(const am_SoundP
am_Error_e CAmDatabaseHandlerSQLite::changeSinkSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
- assert(soundProperty.type>=SP_UNKNOWN && soundProperty.type<=SP_MAX);
assert(sinkID!=0);
sqlite3_stmt* query = NULL;
@@ -4510,7 +4503,7 @@ am_Error_e am::CAmDatabaseHandlerSQLite::peekSourceClassID(const std::string & n
}
-am_Error_e CAmDatabaseHandlerSQLite::changeSourceDB(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmDatabaseHandlerSQLite::changeSourceDB(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
assert(sourceID!=0);
@@ -4591,7 +4584,7 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSourceDB(const am_sourceID_t sourceID
//fill ConnectionFormats
command = "INSERT INTO SourceConnectionFormat" + i2s(sourceID) + std::string("(soundFormat) VALUES (?)");
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
- std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = listConnectionFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator connectionFormatIterator = listConnectionFormats.begin();
for (; connectionFormatIterator < listConnectionFormats.end(); ++connectionFormatIterator)
{
MY_SQLITE_BIND_INT(query, 1, *connectionFormatIterator)
@@ -4647,7 +4640,7 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSourceDB(const am_sourceID_t sourceID
}
-am_Error_e CAmDatabaseHandlerSQLite::changeSinkDB(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmDatabaseHandlerSQLite::changeSinkDB(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
assert(sinkID!=0);
@@ -4728,7 +4721,7 @@ am_Error_e CAmDatabaseHandlerSQLite::changeSinkDB(const am_sinkID_t sinkID, cons
//fill ConnectionFormats
command = "INSERT INTO SinkConnectionFormat" + i2s(sinkID) + std::string("(soundFormat) VALUES (?)");
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
- std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = listConnectionFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator connectionFormatIterator = listConnectionFormats.begin();
for (; connectionFormatIterator < listConnectionFormats.end(); ++connectionFormatIterator)
{
MY_SQLITE_BIND_INT(query, 1, *connectionFormatIterator)
@@ -4798,7 +4791,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListMainSinkNotificationConfigurations(c
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
- temp.type = static_cast<am_NotificationType_e>(sqlite3_column_int(query, 0));
+ temp.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(query, 0));
temp.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(query, 1));
temp.parameter= static_cast<int16_t>(sqlite3_column_int(query, 2));
listMainNotificationConfigurations.push_back(temp);
@@ -4832,7 +4825,7 @@ am_Error_e CAmDatabaseHandlerSQLite::getListMainSourceNotificationConfigurations
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
- temp.type = static_cast<am_NotificationType_e>(sqlite3_column_int(query, 0));
+ temp.type = static_cast<am_CustomNotificationType_t>(sqlite3_column_int(query, 0));
temp.status = static_cast<am_NotificationStatus_e>(sqlite3_column_int(query, 1));
temp.parameter= static_cast<int16_t>(sqlite3_column_int(query, 2));
listMainNotificationConfigurations.push_back(temp);
@@ -4912,7 +4905,7 @@ am_Error_e CAmDatabaseHandlerSQLite::changeMainSourceNotificationConfigurationDB
return (E_OK);
}
-am_Error_e CAmDatabaseHandlerSQLite::changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e>& listSourceConnectionFormats, const std::vector<am_ConnectionFormat_e>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
+am_Error_e CAmDatabaseHandlerSQLite::changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix)
{
assert(gatewayID!=0);
@@ -4935,7 +4928,7 @@ am_Error_e CAmDatabaseHandlerSQLite::changeGatewayDB(const am_gatewayID_t gatewa
//fill ConnectionFormats
command = "INSERT INTO GatewaySourceFormat" + i2s(gatewayID) + std::string("(soundFormat) VALUES (?)");
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
- std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = listSourceConnectionFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator connectionFormatIterator = listSourceConnectionFormats.begin();
for (; connectionFormatIterator < listSourceConnectionFormats.end(); ++connectionFormatIterator)
{
MY_SQLITE_BIND_INT(query, 1, *connectionFormatIterator)
@@ -4959,7 +4952,7 @@ am_Error_e CAmDatabaseHandlerSQLite::changeGatewayDB(const am_gatewayID_t gatewa
command = "INSERT INTO GatewaySinkFormat" + i2s(gatewayID) + std::string("(soundFormat) VALUES (?)");
MY_SQLITE_PREPARE_V2(mpDatabase, command.c_str(), -1, &query, NULL)
- std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = listSinkConnectionFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator connectionFormatIterator = listSinkConnectionFormats.begin();
for (; connectionFormatIterator < listSinkConnectionFormats.end(); ++connectionFormatIterator)
{
MY_SQLITE_BIND_INT(query, 1, *connectionFormatIterator)
diff --git a/AudioManagerDaemon/src/CAmRouter.cpp b/AudioManagerDaemon/src/CAmRouter.cpp
index c471ea3..d574e45 100644
--- a/AudioManagerDaemon/src/CAmRouter.cpp
+++ b/AudioManagerDaemon/src/CAmRouter.cpp
@@ -59,7 +59,7 @@ am_Error_e CAmRouter::getRoute(const bool onlyfree, const am_sourceID_t sourceID
if (sourceDomainID == sinkDomainID) //shortcut if the domains are the same...
{
//first get the list of possible connection formats
- std::vector<am_ConnectionFormat_e> listFormats, listPriorityConnectionFormats;
+ std::vector<am_CustomConnectionFormat_t> listFormats, listPriorityConnectionFormats;
listPossibleConnectionFormats(sourceID, sinkID, listFormats);
//dummy route
@@ -169,24 +169,24 @@ am_Error_e CAmRouter::getRoute(const bool onlyfree, const am_sourceID_t sourceID
return (E_OK);
}
-void CAmRouter::listPossibleConnectionFormats(const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_ConnectionFormat_e>& listFormats) const
+void CAmRouter::listPossibleConnectionFormats(const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_CustomConnectionFormat_t>& listFormats) const
{
- std::vector<am_ConnectionFormat_e> listSourceFormats;
- std::vector<am_ConnectionFormat_e> listSinkFormats;
+ std::vector<am_CustomConnectionFormat_t> listSourceFormats;
+ std::vector<am_CustomConnectionFormat_t> listSinkFormats;
mpDatabaseHandler->getListSinkConnectionFormats(sinkID, listSinkFormats);
mpDatabaseHandler->getListSourceConnectionFormats(sourceID, listSourceFormats);
std::sort(listSinkFormats.begin(), listSinkFormats.end()); //todo: this might be not needed if we use strictly sorted input
std::sort(listSourceFormats.begin(), listSourceFormats.end()); //todo: this might be not needed if we use strictly sorted input
- std::insert_iterator<std::vector<am_ConnectionFormat_e> > inserter(listFormats, listFormats.begin());
+ std::insert_iterator<std::vector<am_CustomConnectionFormat_t> > inserter(listFormats, listFormats.begin());
set_intersection(listSourceFormats.begin(), listSourceFormats.end(), listSinkFormats.begin(), listSinkFormats.end(), inserter);
}
am_Error_e CAmRouter::findBestWay(am_sinkID_t sinkID, am_sourceID_t sourceID, std::vector<am_RoutingElement_s> & listRoute, std::vector<am_RoutingElement_s>::iterator routeIterator, std::vector<am_gatewayID_t>::iterator gatewayIterator)
{
am_Error_e returnError = E_NOT_POSSIBLE;
- std::vector<am_ConnectionFormat_e> listConnectionFormats;
- std::vector<am_ConnectionFormat_e> listMergeConnectionFormats;
- std::vector<am_ConnectionFormat_e> listPriorityConnectionFormats;
+ std::vector<am_CustomConnectionFormat_t> listConnectionFormats;
+ std::vector<am_CustomConnectionFormat_t> listMergeConnectionFormats;
+ std::vector<am_CustomConnectionFormat_t> listPriorityConnectionFormats;
std::vector<am_RoutingElement_s>::iterator nextIterator = routeIterator + 1;
//get best connection format
listPossibleConnectionFormats(routeIterator->sourceID, routeIterator->sinkID, listConnectionFormats);
@@ -195,8 +195,8 @@ am_Error_e CAmRouter::findBestWay(am_sinkID_t sinkID, am_sourceID_t sourceID, st
if (routeIterator != listRoute.begin())
{
//since we have to deal with Gateways, there are restrictions what connectionFormat we can take. So we need to take the subset of connections that are restricted:
- std::vector<am_ConnectionFormat_e> listRestrictedConnectionFormats;
- std::insert_iterator<std::vector<am_ConnectionFormat_e> > inserter(listMergeConnectionFormats, listMergeConnectionFormats.begin());
+ std::vector<am_CustomConnectionFormat_t> listRestrictedConnectionFormats;
+ std::insert_iterator<std::vector<am_CustomConnectionFormat_t> > inserter(listMergeConnectionFormats, listMergeConnectionFormats.begin());
std::vector<am_RoutingElement_s>::iterator tempIterator(routeIterator);
tempIterator--;
listRestrictedOutputFormatsGateways(*gatewayIterator, (tempIterator)->connectionFormat, listRestrictedConnectionFormats);
@@ -218,7 +218,7 @@ am_Error_e CAmRouter::findBestWay(am_sinkID_t sinkID, am_sourceID_t sourceID, st
mpControlSender->getConnectionFormatChoice(routeIterator->sourceID, routeIterator->sinkID, route, listMergeConnectionFormats, listPriorityConnectionFormats);
//we have the list sorted after prios - now we try one after the other with the next part of the route
- std::vector<am_ConnectionFormat_e>::iterator connectionFormatIterator = listPriorityConnectionFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::iterator connectionFormatIterator = listPriorityConnectionFormats.begin();
//here we need to check if we are at the end and stop
if (nextIterator == listRoute.end())
@@ -244,12 +244,12 @@ am_Error_e CAmRouter::findBestWay(am_sinkID_t sinkID, am_sourceID_t sourceID, st
return (returnError);
}
-void CAmRouter::listRestrictedOutputFormatsGateways(const am_gatewayID_t gatewayID, const am_ConnectionFormat_e sinkConnectionFormat, std::vector<am_ConnectionFormat_e> & listFormats) const
+void CAmRouter::listRestrictedOutputFormatsGateways(const am_gatewayID_t gatewayID, const am_CustomConnectionFormat_t sinkConnectionFormat, std::vector<am_CustomConnectionFormat_t> & listFormats) const
{
listFormats.clear();
am_Gateway_s gatewayData;
mpDatabaseHandler->getGatewayInfoDB(gatewayID, gatewayData);
- std::vector<am_ConnectionFormat_e>::const_iterator rowSinkIterator = gatewayData.listSinkFormats.begin();
+ std::vector<am_CustomConnectionFormat_t>::const_iterator rowSinkIterator = gatewayData.listSinkFormats.begin();
std::vector<bool>::const_iterator matrixIterator = gatewayData.convertionMatrix.begin();
//find the row number of the sink
diff --git a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
index a6c769f..eaa38e1 100644
--- a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
@@ -413,17 +413,17 @@ void CAmRoutingReceiver::ackSourceNotificationConfiguration(const am_Handle_s ha
mpControlSender->cbAckSetSourceNotificationConfiguration(handle,error);
}
-am_Error_e CAmRoutingReceiver::updateGateway(const am_gatewayID_t gatewayID, const std::vector<am_ConnectionFormat_e>& listSourceFormats, const std::vector<am_ConnectionFormat_e>& listSinkFormats, const std::vector<bool>& convertionMatrix)
+am_Error_e CAmRoutingReceiver::updateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkFormats, const std::vector<bool>& convertionMatrix)
{
return (mpControlSender->hookSystemUpdateGateway(gatewayID,listSourceFormats,listSinkFormats,convertionMatrix));
}
-am_Error_e CAmRoutingReceiver::updateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmRoutingReceiver::updateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
return (mpControlSender->hookSystemUpdateSink(sinkID,sinkClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
}
-am_Error_e CAmRoutingReceiver::updateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_ConnectionFormat_e>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
+am_Error_e CAmRoutingReceiver::updateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties)
{
return (mpControlSender->hookSystemUpdateSource(sourceID,sourceClassID,listSoundProperties,listConnectionFormats,listMainSoundProperties));
}
diff --git a/AudioManagerDaemon/src/CAmRoutingSender.cpp b/AudioManagerDaemon/src/CAmRoutingSender.cpp
index 5f7f03a..1606761 100644
--- a/AudioManagerDaemon/src/CAmRoutingSender.cpp
+++ b/AudioManagerDaemon/src/CAmRoutingSender.cpp
@@ -202,7 +202,7 @@ am_Error_e CAmRoutingSender::asyncAbort(const am_Handle_s& handle)
return (E_NON_EXISTENT);
}
-am_Error_e CAmRoutingSender::asyncConnect(am_Handle_s& handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat)
+am_Error_e CAmRoutingSender::asyncConnect(am_Handle_s& handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_CustomConnectionFormat_t connectionFormat)
{
am_handleData_c handleData;
SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
@@ -236,7 +236,7 @@ am_Error_e CAmRoutingSender::asyncDisconnect(am_Handle_s& handle, const am_conne
return (E_NON_EXISTENT);
}
-am_Error_e CAmRoutingSender::asyncSetSinkVolume(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+am_Error_e CAmRoutingSender::asyncSetSinkVolume(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time)
{
am_handleData_c handleData;
SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
@@ -252,7 +252,7 @@ am_Error_e CAmRoutingSender::asyncSetSinkVolume(am_Handle_s& handle, const am_si
return (E_NON_EXISTENT);
}
-am_Error_e CAmRoutingSender::asyncSetSourceVolume(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
+am_Error_e CAmRoutingSender::asyncSetSourceVolume(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time)
{
am_handleData_c handleData;
SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
@@ -349,7 +349,7 @@ am_Error_e CAmRoutingSender::asyncSetSinkSoundProperties(am_Handle_s& handle, co
}
-am_Error_e CAmRoutingSender::asyncCrossFade(am_Handle_s& handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time)
+am_Error_e CAmRoutingSender::asyncCrossFade(am_Handle_s& handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_CustomRampType_t rampType, const am_time_t time)
{
am_handleData_c handleData;
CrossfaderInterfaceMap::iterator iter = mMapCrossfaderInterface.begin();
diff --git a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp
index 9067339..1fb3ddf 100644
--- a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp
+++ b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp
@@ -883,10 +883,7 @@ void CAmTelnetMenuHelper::setSourceSoundPropertyExec(std::queue<std::string>& Cm
error = true;
am_MainSoundProperty_s soundProperty;
- if (tmpType < MSP_MAX)
- soundProperty.type = static_cast<am_MainSoundPropertyType_e>(tmpType);
- else
- error = true;
+ soundProperty.type = static_cast<am_CustomMainSoundPropertyType_t>(tmpType);
if (!(istream_value >> soundProperty.value))
error = true;
@@ -1147,10 +1144,7 @@ void CAmTelnetMenuHelper::setSourceSoundPropertiesExec(std::queue<std::string>&
error = true;
am_MainSoundProperty_s soundProperty;
- if (tmpType < MSP_MAX)
- soundProperty.type = static_cast<am_MainSoundPropertyType_e>(tmpType);
- else
- error = true;
+ soundProperty.type = static_cast<am_CustomMainSoundPropertyType_t>(tmpType);
if (!(istream_value >> soundProperty.value))
error = true;
@@ -1207,10 +1201,7 @@ void CAmTelnetMenuHelper::setSinkSoundPropertyExec(std::queue<std::string>& CmdQ
error = true;
am_MainSoundProperty_s soundProperty;
- if (tmpType < MSP_MAX)
- soundProperty.type = static_cast<am_MainSoundPropertyType_e>(tmpType);
- else
- error = true;
+ soundProperty.type = static_cast<am_CustomMainSoundPropertyType_t>(tmpType);
if (!(istream_value >> soundProperty.value))
error = true;