summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Herchet <frank.fh.herchet@bmw.de>2012-02-22 09:43:32 +0100
committerFrank Herchet <frank.fh.herchet@bmw.de>2012-02-22 09:43:32 +0100
commit065d7f02aef0dc9f7e4bbf2627dcf3dad7a3280c (patch)
tree37d24bc497b6b467e8c8066a6c44fea36a6d8081
parent9c209bd92d9400012765d86fc5bd51ddfe266071 (diff)
parent479a20f551b66406a4a6770fe09d17e23d38ed14 (diff)
downloadaudiomanager-065d7f02aef0dc9f7e4bbf2627dcf3dad7a3280c.tar.gz
Merge branch 'master' of qmuc300924:AudioManager
-rw-r--r--.gitignore4
-rw-r--r--AudioManagerDaemon/CMakeLists.txt32
-rw-r--r--AudioManagerDaemon/include/ControlReceiver.h2
-rw-r--r--AudioManagerDaemon/include/ControlSender.h2
-rw-r--r--AudioManagerDaemon/include/Router.h4
-rw-r--r--AudioManagerDaemon/src/ControlReceiver.cpp14
-rw-r--r--AudioManagerDaemon/src/ControlSender.cpp9
-rw-r--r--AudioManagerDaemon/src/DatabaseHandler.cpp42
-rw-r--r--AudioManagerDaemon/src/Router.cpp21
-rw-r--r--AudioManagerDaemon/src/main.cpp21
-rw-r--r--AudioManagerDaemon/test/CMakeLists.txt32
-rw-r--r--AudioManagerDaemon/test/CommonFunctions.cpp18
-rw-r--r--AudioManagerDaemon/test/controlInterface/MockInterfaces.h5
-rw-r--r--AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp34
-rw-r--r--AudioManagerDaemon/test/database/databaseTest.cpp66
-rw-r--r--AudioManagerDaemon/test/routing/MockInterfaces.h179
-rw-r--r--AudioManagerDaemon/test/routing/routingTest.cpp192
-rw-r--r--AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp28
-rw-r--r--AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp26
-rw-r--r--AudioManagerDaemon/test/sockethandler/sockethandlerTest.h26
-rw-r--r--CHANGELOG480
-rw-r--r--CMakeLists.txt43
-rw-r--r--PluginCommandInterfaceDbus/CMakeLists.txt4
-rw-r--r--PluginCommandInterfaceDbus/include/DBusCommandSender.h1
-rw-r--r--PluginCommandInterfaceDbus/src/DBusCommandSender.cpp187
-rw-r--r--PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp22
-rw-r--r--PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp18
-rw-r--r--PluginControlInterface/CMakeLists.txt4
-rw-r--r--PluginControlInterface/include/ControlSender.h2
-rw-r--r--PluginControlInterface/src/ControlSender.cpp11
-rw-r--r--PluginRoutingInterfaceAsync/CMakeLists.txt4
-rw-r--r--PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp14
-rw-r--r--PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp30
-rw-r--r--PluginRoutingInterfaceDbus/CMakeLists.txt4
-rw-r--r--cmake/DoxyFile.in4
-rwxr-xr-xcmake/add_package_dependencies.sh23
-rwxr-xr-xcmake/cmake_uninstall.cmake.in23
-rw-r--r--includes/audiomanagertypes.h460
-rw-r--r--includes/command/CommandReceiveInterface.h21
-rw-r--r--includes/command/CommandSendInterface.h21
-rw-r--r--includes/config.h25
-rw-r--r--includes/control/ControlReceiveInterface.h29
-rw-r--r--includes/control/ControlSendInterface.h24
-rw-r--r--includes/projecttypes.h183
-rw-r--r--includes/routing/RoutingReceiveInterface.h21
-rw-r--r--includes/routing/RoutingSendInterface.h21
-rw-r--r--lgpl-2.1.txt502
47 files changed, 1638 insertions, 1300 deletions
diff --git a/.gitignore b/.gitignore
index 9e40053..93de88d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
+CHANGELOG
+config.h
bin/
build/
doc/
packages/
.*
-CHANGELOG
-includes/config.h
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt
index 88b2b86..8e5297c 100644
--- a/AudioManagerDaemon/CMakeLists.txt
+++ b/AudioManagerDaemon/CMakeLists.txt
@@ -1,13 +1,25 @@
- #
- # Copyright (C) 2011, BMW AG
- #
- # AudioManagerDeamon
- #
- # @file CMakeLists.txt
- #
- # @date: 20.05.2011
- # @author: Christian Müller (christian.ei.mueller@bmw.de)
- #
+#GENIVI AUDIOMANAGER
+#
+#Copyright (C) 2011, BMW AG
+#
+#Datum 20.2.2012
+#author Christian Mueller (christian.ei.mueller@bmw.de)
+#
+#***********************************************************************************************************
+#LICENSE
+#***********************************************************************************************************
+#
+#GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+#Copyright (C) 2011, BMW AG – Christian Mueller Christian.ei.mueller@bmw.de
+#
+#This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+#You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+#Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+#Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+#As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+#Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/include/ControlReceiver.h b/AudioManagerDaemon/include/ControlReceiver.h
index 45788f5..9aec23f 100644
--- a/AudioManagerDaemon/include/ControlReceiver.h
+++ b/AudioManagerDaemon/include/ControlReceiver.h
@@ -112,6 +112,8 @@ public:
am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const;
void setRoutingReady();
void setCommandReady();
+ void setCommandRundown();
+ void setRoutingRundown();
am_Error_e getSocketHandler(SocketHandler*& socketHandler);
uint16_t getInterfaceVersion() const;
diff --git a/AudioManagerDaemon/include/ControlSender.h b/AudioManagerDaemon/include/ControlSender.h
index 3021c3c..66db61c 100644
--- a/AudioManagerDaemon/include/ControlSender.h
+++ b/AudioManagerDaemon/include/ControlSender.h
@@ -83,7 +83,7 @@ public:
void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error);
void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error);
void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error);
- am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats);
+ am_Error_e 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);
uint16_t getInterfaceVersion() const;
#ifdef UNIT_TEST
diff --git a/AudioManagerDaemon/include/Router.h b/AudioManagerDaemon/include/Router.h
index ab7efab..5af0cf7 100644
--- a/AudioManagerDaemon/include/Router.h
+++ b/AudioManagerDaemon/include/Router.h
@@ -36,12 +36,12 @@ class ControlSender;
class Router
{
public:
- Router(DatabaseHandler* iDatabaseHandler,ControlSender* iSender);
+ Router(DatabaseHandler* iDatabaseHandler, ControlSender* iSender);
am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList);
virtual ~Router();
private:
- am_Error_e findBestWay(std::vector<am_RoutingElement_s>& listRoute, std::vector<am_RoutingElement_s>::iterator routeIterator, std::vector<am_gatewayID_t>::iterator gatewayIterator);
+ am_Error_e 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);
void listPossibleConnectionFormats(const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_ConnectionFormat_e>& listFormats) const;
void listRestrictedOutputFormatsGateways(const am_gatewayID_t gatewayID, const am_ConnectionFormat_e sinkConnectionFormat, std::vector<am_ConnectionFormat_e>& listFormats) const;
DatabaseHandler* mDatabaseHandler;
diff --git a/AudioManagerDaemon/src/ControlReceiver.cpp b/AudioManagerDaemon/src/ControlReceiver.cpp
index b352d0d..5671fd0 100644
--- a/AudioManagerDaemon/src/ControlReceiver.cpp
+++ b/AudioManagerDaemon/src/ControlReceiver.cpp
@@ -207,7 +207,7 @@ am_Error_e ControlReceiver::setDomainState(const am_domainID_t domainID, const a
{
logInfo("ControlReceiver::setDomainState got called, domainID=", domainID, "domainState=", domainState);
- am_DomainState_e tempState = DS_MIN;
+ am_DomainState_e tempState = DS_UNKNOWN;
if (mDatabaseHandler->getDomainState(domainID, tempState) != E_OK)
return E_UNKNOWN;
if (tempState == domainState)
@@ -499,6 +499,18 @@ am_Error_e ControlReceiver::getSocketHandler(SocketHandler *& socketHandler)
#endif
}
+void am::ControlReceiver::setCommandRundown()
+{
+ logInfo("ControlReceiver::setCommandRundown got called");
+ mCommandSender->cbCommunicationRundown();
+}
+
+void am::ControlReceiver::setRoutingRundown()
+{
+ logInfo("ControlReceiver::setRoutingRundown got called");
+ mRoutingSender->routingInterfacesRundown();
+}
+
uint16_t ControlReceiver::getInterfaceVersion() const
{
return ControlReceiveVersion;
diff --git a/AudioManagerDaemon/src/ControlSender.cpp b/AudioManagerDaemon/src/ControlSender.cpp
index 816ed80..a334475 100644
--- a/AudioManagerDaemon/src/ControlSender.cpp
+++ b/AudioManagerDaemon/src/ControlSender.cpp
@@ -39,7 +39,7 @@ ControlSender::ControlSender(std::string controlPluginFile) :
std::ifstream isfile(controlPluginFile.c_str());
if (!isfile)
{
- logError("ControlSender::ControlSender: Controller plugin not found:",controlPluginFile);
+ logError("ControlSender::ControlSender: Controller plugin not found:", controlPluginFile);
}
else if (!controlPluginFile.empty())
{
@@ -59,7 +59,8 @@ ControlSender::ControlSender(std::string controlPluginFile) :
ControlSender::~ControlSender()
{
- if (mlibHandle) dlclose(mlibHandle);
+ if (mlibHandle)
+ dlclose(mlibHandle);
}
void ControlSender::hookAllPluginsLoaded()
@@ -267,9 +268,9 @@ void ControlSender::cbAckSetSourceSoundProperties(const am_Handle_s handle, cons
mController->cbAckSetSourceSoundProperties(handle, error);
}
-am_Error_e ControlSender::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e> & listPrioConnectionFormats)
+am_Error_e am::ControlSender::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)
{
- return mController->getConnectionFormatChoice(sourceID, sinkID, listPossibleConnectionFormats, listPrioConnectionFormats);
+ return mController->getConnectionFormatChoice(sourceID, sinkID, listRoute, listPossibleConnectionFormats, listPrioConnectionFormats);
}
uint16_t ControlSender::getInterfaceVersion() const
diff --git a/AudioManagerDaemon/src/DatabaseHandler.cpp b/AudioManagerDaemon/src/DatabaseHandler.cpp
index 5f7ee1d..2337142 100644
--- a/AudioManagerDaemon/src/DatabaseHandler.cpp
+++ b/AudioManagerDaemon/src/DatabaseHandler.cpp
@@ -113,7 +113,7 @@ am_Error_e DatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_dom
assert(domainData.domainID==0);
assert(!domainData.name.empty());
assert(!domainData.busname.empty());
- assert(domainData.state>=DS_MIN && domainData.state<=DS_MAX);
+ assert(domainData.state>=DS_UNKNOWN && domainData.state<=DS_MAX);
//first check for a reserved domain
sqlite3_stmt* query = NULL, *queryFinal;
@@ -177,7 +177,7 @@ am_Error_e DatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_dom
am_Error_e DatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & mainConnectionData, am_mainConnectionID_t & connectionID)
{
assert(mainConnectionData.mainConnectionID==0);
- assert(mainConnectionData.connectionState>=CS_MIN && mainConnectionData.connectionState<=CS_MAX);
+ assert(mainConnectionData.connectionState>=CS_UNKNOWN && mainConnectionData.connectionState<=CS_MAX);
assert(mainConnectionData.sinkID!=0);
assert(mainConnectionData.sourceID!=0);
@@ -280,7 +280,7 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t
assert(sinkData.sinkClassID!=0);
// \todo: need to check if class exists?
assert(!sinkData.listConnectionFormats.empty());
- assert(sinkData.muteState>=MS_MIN && sinkData.muteState<=MS_MAX);
+ assert(sinkData.muteState>=MS_UNKNOWN && sinkData.muteState<=MS_MAX);
sqlite3_stmt *query = NULL, *queryFinal = NULL;
int eCode = 0;
@@ -452,7 +452,7 @@ am_Error_e DatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t
am_Error_e DatabaseHandler::enterCrossfaderDB(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
{
assert(crossfaderData.crossfaderID<DYNAMIC_ID_BOUNDARY);
- assert(crossfaderData.hotSink>=HS_MIN && crossfaderData.hotSink<=HS_MAX);
+ assert(crossfaderData.hotSink>=HS_UNKNOWN && crossfaderData.hotSink<=HS_MAX);
assert(!crossfaderData.name.empty());
assert(existSink(crossfaderData.sinkID_A));
assert(existSink(crossfaderData.sinkID_B));
@@ -656,7 +656,7 @@ am_Error_e DatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sou
assert(sourceData.sourceClassID!=0);
// \todo: need to check if class exists?
assert(!sourceData.listConnectionFormats.empty());
- assert(sourceData.sourceState>=SS_MIN && sourceData.sourceState<=SS_MAX);
+ assert(sourceData.sourceState>=SS_UNKNNOWN && sourceData.sourceState<=SS_MAX);
sqlite3_stmt* query = NULL, *queryFinal = NULL;
;
@@ -902,7 +902,7 @@ am_Error_e DatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionI
am_Error_e DatabaseHandler::changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState)
{
assert(mainconnectionID!=0);
- assert(connectionState>=CS_MIN && connectionState<=CS_MAX);
+ assert(connectionState>=CS_UNKNOWN && connectionState<=CS_MAX);
sqlite3_stmt* query = NULL;
int eCode = 0;
@@ -969,8 +969,8 @@ am_Error_e DatabaseHandler::changeSinkMainVolumeDB(const am_mainVolume_t mainVol
am_Error_e DatabaseHandler::changeSinkAvailabilityDB(const am_Availability_s & availability, const am_sinkID_t sinkID)
{
assert(sinkID!=0);
- assert(availability.availability>=A_MIN && availability.availability<=A_MAX);
- assert(availability.availabilityReason>=AR_MIN && availability.availabilityReason<=AR_MAX);
+ 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;
@@ -1006,7 +1006,7 @@ am_Error_e DatabaseHandler::changeSinkAvailabilityDB(const am_Availability_s & a
am_Error_e DatabaseHandler::changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID)
{
assert(domainID!=0);
- assert(domainState>=DS_MIN && domainState<=DS_MAX);
+ assert(domainState>=DS_UNKNOWN && domainState<=DS_MAX);
sqlite3_stmt* query = NULL;
int eCode = 0;
@@ -1039,7 +1039,7 @@ am_Error_e DatabaseHandler::changDomainStateDB(const am_DomainState_e domainStat
am_Error_e DatabaseHandler::changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID)
{
assert(sinkID!=0);
- assert(muteState>=MS_MIN && muteState<=MS_MAX);
+ assert(muteState>=MS_UNKNOWN && muteState<=MS_MAX);
sqlite3_stmt* query = NULL;
int eCode = 0;
@@ -1074,7 +1074,7 @@ am_Error_e DatabaseHandler::changeSinkMuteStateDB(const am_MuteState_e muteState
am_Error_e DatabaseHandler::changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
- assert(soundProperty.type>=MSP_MIN && soundProperty.type<=MSP_MAX);
+ assert(soundProperty.type>=MSP_UNKNOWN && soundProperty.type<=MSP_MAX);
assert(sinkID!=0);
sqlite3_stmt* query = NULL;
@@ -1108,7 +1108,7 @@ am_Error_e DatabaseHandler::changeMainSinkSoundPropertyDB(const am_MainSoundProp
am_Error_e DatabaseHandler::changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
- assert(soundProperty.type>=MSP_MIN && soundProperty.type<=MSP_MAX);
+ assert(soundProperty.type>=MSP_UNKNOWN && soundProperty.type<=MSP_MAX);
assert(sourceID!=0);
sqlite3_stmt* query = NULL;
@@ -1144,8 +1144,8 @@ am_Error_e DatabaseHandler::changeMainSourceSoundPropertyDB(const am_MainSoundPr
am_Error_e DatabaseHandler::changeSourceAvailabilityDB(const am_Availability_s & availability, const am_sourceID_t sourceID)
{
assert(sourceID!=0);
- assert(availability.availability>=A_MIN && availability.availability<=A_MAX);
- assert(availability.availabilityReason>=AR_MIN && availability.availabilityReason<=AR_MAX);
+ 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;
@@ -1180,7 +1180,7 @@ am_Error_e DatabaseHandler::changeSourceAvailabilityDB(const am_Availability_s &
am_Error_e DatabaseHandler::changeSystemPropertyDB(const am_SystemProperty_s & property)
{
- assert(property.type>=SYP_MIN && property.type<=SYP_MAX);
+ 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=?";
@@ -3795,7 +3795,7 @@ am_Error_e DatabaseHandler::getSoureState(const am_sourceID_t sourceID, am_Sourc
{
assert(sourceID!=0);
sqlite3_stmt* query = NULL;
- sourceState = SS_MIN;
+ sourceState = SS_UNKNNOWN;
std::string command = "SELECT sourceState FROM " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + i2s(sourceID);
int eCode = 0;
sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
@@ -3814,7 +3814,7 @@ am_Error_e DatabaseHandler::getSoureState(const am_sourceID_t sourceID, am_Sourc
am_Error_e DatabaseHandler::changeSourceState(const am_sourceID_t sourceID, const am_SourceState_e sourceState)
{
assert(sourceID!=0);
- assert(sourceState>=SS_MIN && sourceState<=SS_MAX);
+ assert(sourceState>=SS_UNKNNOWN && sourceState<=SS_MAX);
sqlite3_stmt* query = NULL;
std::string command = "UPDATE " + std::string(SOURCE_TABLE) + " SET sourceState=? WHERE sourceID=" + i2s(sourceID);
int eCode = 0;
@@ -3946,7 +3946,7 @@ am_Error_e DatabaseHandler::getDomainState(const am_domainID_t domainID, am_Doma
{
assert(domainID!=0);
sqlite3_stmt* query = NULL;
- state = DS_MIN;
+ state = DS_UNKNOWN;
std::string command = "SELECT domainState FROM " + std::string(DOMAIN_TABLE) + " WHERE domainID=" + i2s(domainID);
int eCode = 0;
sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
@@ -4164,7 +4164,7 @@ am_Error_e DatabaseHandler::changeSourceVolume(const am_sourceID_t sourceID, con
am_Error_e DatabaseHandler::changeSourceSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
- assert(soundProperty.type>=SP_MIN && soundProperty.type<=SP_MAX);
+ assert(soundProperty.type>=SP_UNKNOWN && soundProperty.type<=SP_MAX);
assert(sourceID!=0);
sqlite3_stmt* query = NULL;
@@ -4199,7 +4199,7 @@ am_Error_e DatabaseHandler::changeSourceSoundPropertyDB(const am_SoundProperty_s
am_Error_e DatabaseHandler::changeSinkSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
- assert(soundProperty.type>=SP_MIN && soundProperty.type<=SP_MAX);
+ assert(soundProperty.type>=SP_UNKNOWN && soundProperty.type<=SP_MAX);
assert(sinkID!=0);
sqlite3_stmt* query = NULL;
@@ -4233,7 +4233,7 @@ am_Error_e DatabaseHandler::changeSinkSoundPropertyDB(const am_SoundProperty_s &
am_Error_e DatabaseHandler::changeCrossFaderHotSink(const am_crossfaderID_t crossfaderID, const am_HotSink_e hotsink)
{
assert(crossfaderID!=0);
- assert(hotsink>=HS_MIN && hotsink>=HS_MAX);
+ assert(hotsink>=HS_UNKNOWN && hotsink>=HS_MAX);
sqlite3_stmt* query = NULL;
int eCode = 0;
diff --git a/AudioManagerDaemon/src/Router.cpp b/AudioManagerDaemon/src/Router.cpp
index 9ed0f5b..c74989a 100644
--- a/AudioManagerDaemon/src/Router.cpp
+++ b/AudioManagerDaemon/src/Router.cpp
@@ -57,8 +57,14 @@ am_Error_e Router::getRoute(const bool onlyfree, const am_sourceID_t sourceID, c
std::vector<am_ConnectionFormat_e> listFormats, listPriorityConnectionFormats;
listPossibleConnectionFormats(sourceID, sinkID, listFormats);
+ //dummy route
+ am_Route_s route;
+ route.sinkID = sinkID;
+ route.sourceID = sourceID;
+ route.route.clear();
+
//get the prio of the Controller:
- mControlSender->getConnectionFormatChoice(sourceID, sinkID, listFormats, listPriorityConnectionFormats);
+ mControlSender->getConnectionFormatChoice(sourceID, sinkID, route, listFormats, listPriorityConnectionFormats);
//no possible connection, so no route ! But we report OK since there is no fault ...
if (listPriorityConnectionFormats.empty())
@@ -144,7 +150,7 @@ am_Error_e Router::getRoute(const bool onlyfree, const am_sourceID_t sourceID, c
//Step through the routes and try to use always the best connectionFormat
std::vector<am_RoutingElement_s>::iterator routingInterator = actualRoutingElement.begin();
gatewayIterator = listGatewayID.begin();
- if (findBestWay(actualRoutingElement, routingInterator, gatewayIterator) != E_OK)
+ if (findBestWay(sinkID, sourceID, actualRoutingElement, routingInterator, gatewayIterator) != E_OK)
{
continue;
}
@@ -170,7 +176,7 @@ void Router::listPossibleConnectionFormats(const am_sourceID_t sourceID, const a
set_intersection(listSourceFormats.begin(), listSourceFormats.end(), listSinkFormats.begin(), listSinkFormats.end(), inserter);
}
-am_Error_e Router::findBestWay(std::vector<am_RoutingElement_s> & listRoute, std::vector<am_RoutingElement_s>::iterator routeIterator, std::vector<am_gatewayID_t>::iterator gatewayIterator)
+am_Error_e Router::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;
@@ -198,8 +204,13 @@ am_Error_e Router::findBestWay(std::vector<am_RoutingElement_s> & listRoute, std
listMergeConnectionFormats = listConnectionFormats;
}
+ am_Route_s route;
+ route.sinkID = sinkID;
+ route.sourceID = sourceID;
+ route.route = listRoute;
+
//let the controller decide:
- mControlSender->getConnectionFormatChoice(routeIterator->sourceID, routeIterator->sinkID, listMergeConnectionFormats, listPriorityConnectionFormats);
+ mControlSender->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();
@@ -219,7 +230,7 @@ am_Error_e Router::findBestWay(std::vector<am_RoutingElement_s> & listRoute, std
for (; connectionFormatIterator != listPriorityConnectionFormats.end(); ++connectionFormatIterator)
{
routeIterator->connectionFormat = *connectionFormatIterator;
- if ((returnError = findBestWay(listRoute, nextIterator, gatewayIterator)) == E_OK)
+ if ((returnError = findBestWay(sinkID, sourceID, listRoute, nextIterator, gatewayIterator)) == E_OK)
{
break;
}
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index ad0e3b8..bc74580 100644
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -28,14 +28,18 @@
//todo: create systemd compatibility
//todo: all communication like all plugins loaded etc...
-//todo: seperate documentation of test from normal project
//todo: check the startup sequence. Dbus shall be activated last...
//todo: there is a bug in the visible flags of sinks and sources. fix it.
-//todo: make sure all configurations are tested
//todo: clean up startup sequences controller, command and routing interfaces----
+//todo: package generation only works if package directory exists...
#include <config.h>
+#ifdef WITH_TELNET
+#include "TelnetServer.h"
+#endif
+#ifdef WITH_SOCKETHANDLER_LOOP
#include <SocketHandler.h>
+#endif
#ifdef WITH_DBUS_WRAPPER
#include <dbus/DBusWrapper.h>
#endif
@@ -47,7 +51,6 @@
#include "CommandReceiver.h"
#include "ControlReceiver.h"
#include "DatabaseObserver.h"
-#include "TelnetServer.h"
#include "Router.h"
#include "DLTWrapper.h"
#include <sys/resource.h>
@@ -89,11 +92,11 @@ unsigned int telnetport = DEFAULT_TELNETPORT;
unsigned int maxConnections = MAX_TELNETCONNECTIONS;
int fd0, fd1, fd2;
-void OutOfMemoryHandler ()
+void OutOfMemoryHandler()
{
logError("No more memory - bye");
//todo: add gracefull dead here. Do what can be done persistence wise
- exit (1);
+ exit(1);
}
void daemonize()
@@ -225,9 +228,9 @@ static void signalHandler(int sig, siginfo_t *siginfo, void *context)
int main(int argc, char *argv[])
{
DLTWrapper::instance()->registerApp("AudioManagerDeamon", "AudioManagerDeamon");
- DLTWrapper::instance()->registerContext(AudioManager,"Main", "Main Context");
+ DLTWrapper::instance()->registerContext(AudioManager, "Main", "Main Context");
logInfo("The Audiomanager is started");
- log(&AudioManager,DLT_LOG_ERROR,"The version of the Audiomanager",DAEMONVERSION);
+ log(&AudioManager, DLT_LOG_ERROR, "The version of the Audiomanager", DAEMONVERSION);
listCommandPluginDirs.push_back(std::string(DEFAULT_PLUGIN_COMMAND_DIR));
listRoutingPluginDirs.push_back(std::string(DEFAULT_PLUGIN_ROUTING_DIR));
@@ -279,7 +282,7 @@ int main(int argc, char *argv[])
RoutingReceiver iRoutingReceiver(&iDatabaseHandler, &iRoutingSender, &iControlSender, &iSocketHandler, &iDBusWrapper);
ControlReceiver iControlReceiver(&iDatabaseHandler, &iRoutingSender, &iCommandSender, &iSocketHandler, &iRouter);
#ifdef WITH_TELNET
- TelnetServer iTelnetServer(&iSocketHandler,&iCommandSender,&iCommandReceiver,&iRoutingSender,&iRoutingReceiver,&iControlSender,&iControlReceiver,&iDatabaseHandler,&iRouter,telnetport,maxConnections);
+ TelnetServer iTelnetServer(&iSocketHandler, &iCommandSender, &iCommandReceiver, &iRoutingSender, &iRoutingReceiver, &iControlSender, &iControlReceiver, &iDatabaseHandler, &iRouter, telnetport, maxConnections);
#endif
#else /*WITH_SOCKETHANDLER_LOOP */
CommandReceiver iCommandReceiver(&iDatabaseHandler,&iControlSender,&iDBusWrapper);
@@ -296,7 +299,7 @@ int main(int argc, char *argv[])
#endif /*WITH_DBUS_WRAPPER*/
#ifdef WITH_TELNET
- DatabaseObserver iObserver(&iCommandSender, &iRoutingSender,&iTelnetServer);
+ DatabaseObserver iObserver(&iCommandSender, &iRoutingSender, &iTelnetServer);
#else
DatabaseObserver iObserver(&iCommandSender, &iRoutingSender);
#endif
diff --git a/AudioManagerDaemon/test/CMakeLists.txt b/AudioManagerDaemon/test/CMakeLists.txt
index 372423c..9401318 100644
--- a/AudioManagerDaemon/test/CMakeLists.txt
+++ b/AudioManagerDaemon/test/CMakeLists.txt
@@ -1,13 +1,25 @@
- #
- # Copyright (C) 2011, BMW AG
- #
- # AudioManagerDeamon Test
- #
- # @file CMakeLists.txt
- #
- # @date: 20.05.2011
- # @author: Christian Müller (christian.ei.mueller@bmw.de)
- #
+#GENIVI AUDIOMANAGER
+#
+#Copyright (C) 2011, BMW AG
+#
+#Datum 20.2.2012
+#author Christian Mueller (christian.ei.mueller@bmw.de)
+#
+#***********************************************************************************************************
+#LICENSE
+#***********************************************************************************************************
+#
+#GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+#Copyright (C) 2011, BMW AG – Christian Mueller Christian.ei.mueller@bmw.de
+#
+#This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+#You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+#Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+#Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+#As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+#Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/CommonFunctions.cpp b/AudioManagerDaemon/test/CommonFunctions.cpp
index 10245d7..101548c 100644
--- a/AudioManagerDaemon/test/CommonFunctions.cpp
+++ b/AudioManagerDaemon/test/CommonFunctions.cpp
@@ -199,8 +199,8 @@ bool CommonFunctions::compareRoute(am_Route_s a, am_Route_s b)
std::vector<am_ConnectionFormat_e> CommonFunctions::getStandardConnectionFormatList()
{
std::vector<am_ConnectionFormat_e> list;
- list.push_back(CF_ANALOG);
- list.push_back(CF_STEREO);
+ list.push_back(CF_GENIVI_ANALOG);
+ list.push_back(CF_GENIVI_STEREO);
return list;
}
@@ -208,10 +208,10 @@ std::vector<am_SoundProperty_s> CommonFunctions::getStandardSoundPropertyList()
{
std::vector<am_SoundProperty_s> soundPropertyList;
am_SoundProperty_s soundProperty;
- soundProperty.type = SP_BASS;
+ soundProperty.type = SP_EXAMPLE_BASS;
soundProperty.value = 23;
soundPropertyList.push_back(soundProperty);
- soundProperty.type = SP_MID;
+ soundProperty.type = SP_EXAMPLE_MID;
soundProperty.value = 2;
soundPropertyList.push_back(soundProperty);
return soundPropertyList;
@@ -221,10 +221,10 @@ std::vector<am_MainSoundProperty_s> CommonFunctions::getStandardMainSoundPropert
{
std::vector<am_MainSoundProperty_s> mainSoundPropertyList;
am_MainSoundProperty_s mainSoundProperty;
- mainSoundProperty.type = MSP_NAVIGATION_OFFSET;
+ mainSoundProperty.type = MSP_UNKNOWN;
mainSoundProperty.value = 23;
mainSoundPropertyList.push_back(mainSoundProperty);
- mainSoundProperty.type = MSP_TEST;
+ mainSoundProperty.type = MSP_UNKNOWN;
mainSoundProperty.value = 3;
mainSoundPropertyList.push_back(mainSoundProperty);
return mainSoundPropertyList;
@@ -235,7 +235,7 @@ void CommonFunctions::createSink(am_Sink_s& sink) const
sink.name = "AnySink";
sink.domainID = 4;
sink.available.availability = A_AVAILABLE;
- sink.available.availabilityReason = AR_NEWMEDIA;
+ sink.available.availabilityReason = AR_GENIVI_NEWMEDIA;
sink.sinkClassID = 1;
sink.listConnectionFormats = getStandardConnectionFormatList();
sink.listSoundProperties = getStandardSoundPropertyList();
@@ -252,7 +252,7 @@ void CommonFunctions::createSource(am_Source_s& source) const
source.name = "AnySource";
source.domainID = 4;
source.available.availability = A_AVAILABLE;
- source.available.availabilityReason = AR_NEWMEDIA;
+ source.available.availabilityReason = AR_GENIVI_NEWMEDIA;
source.sourceClassID = 1;
source.listConnectionFormats = getStandardConnectionFormatList();
source.listSoundProperties = getStandardSoundPropertyList();
@@ -297,7 +297,7 @@ void CommonFunctions::createConnection(am_Connection_s & connection) const
connection.sinkID = 1;
connection.sourceID = 2;
connection.delay = -1;
- connection.connectionFormat = CF_ANALOG;
+ connection.connectionFormat = CF_GENIVI_ANALOG;
}
std::vector<bool> CommonFunctions::getStandardConvertionMatrix()
diff --git a/AudioManagerDaemon/test/controlInterface/MockInterfaces.h b/AudioManagerDaemon/test/controlInterface/MockInterfaces.h
index 746d70e..b49cae6 100644
--- a/AudioManagerDaemon/test/controlInterface/MockInterfaces.h
+++ b/AudioManagerDaemon/test/controlInterface/MockInterfaces.h
@@ -156,14 +156,15 @@ class MockControlSendInterface : public ControlSendInterface {
void(const am_Handle_s handle, const am_Error_e error));
MOCK_METHOD2(cbAckSetSinkSoundProperty,
void(const am_Handle_s handle, const am_Error_e error));
- MOCK_METHOD4(getConnectionFormatChoice,
- am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats));
+ MOCK_METHOD5(getConnectionFormatChoice,
+ am_Error_e(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));
MOCK_CONST_METHOD0(getInterfaceVersion,
uint16_t());
};
+
} // namespace am
diff --git a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
index 599d15f..c479004 100644
--- a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
@@ -176,8 +176,8 @@ TEST_F(controlInterfaceTest,ackConnect)
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
//when asyncConnect is called, we expect a call on the routingInterface
- EXPECT_CALL(pMockRoutingInterface,asyncConnect(_,1,2,2,CF_STEREO)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_STEREO,2,2));
+ EXPECT_CALL(pMockRoutingInterface,asyncConnect(_,1,2,2,CF_GENIVI_STEREO)).WillOnce(Return(E_OK));
+ ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_GENIVI_STEREO,2,2));
//The handle should have the correct type
ASSERT_EQ(handle.handleType, H_CONNECT);
@@ -206,7 +206,7 @@ TEST_F(controlInterfaceTest,ackConnect)
ASSERT_TRUE(!connectionList.empty());
//no we try the same, but do expect a no_change answer directly and no call because connection already exists
- ASSERT_EQ(E_ALREADY_EXISTS, pControlReceiver.connect(handle,connectionID,CF_STEREO,2,2));
+ ASSERT_EQ(E_ALREADY_EXISTS, pControlReceiver.connect(handle,connectionID,CF_GENIVI_STEREO,2,2));
}
TEST_F(controlInterfaceTest,ackDisconnect)
@@ -231,8 +231,8 @@ TEST_F(controlInterfaceTest,ackDisconnect)
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
//now we first need to connect, we expect a call on the routing interface
- EXPECT_CALL(pMockRoutingInterface,asyncConnect(_,1,2,2,CF_STEREO)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_STEREO,2,2));
+ EXPECT_CALL(pMockRoutingInterface,asyncConnect(_,1,2,2,CF_GENIVI_STEREO)).WillOnce(Return(E_OK));
+ ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_GENIVI_STEREO,2,2));
//answer with an ack to insert the connection in the database
EXPECT_CALL(pMockControlInterface,cbAckConnect(_,E_OK)).Times(1);
@@ -334,8 +334,8 @@ TEST_F(controlInterfaceTest,SetSinkVolumeChange)
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
//set the volume and expect a call on the routing interface
- EXPECT_CALL(pMockRoutingInterface,asyncSetSinkVolume(_,2,11,RAMP_DIRECT,23)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.setSinkVolume(handle,sinkID,11,RAMP_DIRECT,23));
+ EXPECT_CALL(pMockRoutingInterface,asyncSetSinkVolume(_,2,11,RAMP_GENIVI_DIRECT,23)).WillOnce(Return(E_OK));
+ ASSERT_EQ(E_OK, pControlReceiver.setSinkVolume(handle,sinkID,11,RAMP_GENIVI_DIRECT,23));
//check the list of handles. The handle must be in there and have the right type
ASSERT_EQ(E_OK, pControlReceiver.getListHandles(handlesList));
@@ -359,7 +359,7 @@ TEST_F(controlInterfaceTest,SetSinkVolumeChange)
ASSERT_TRUE(handlesList.empty());
//Now we try again, but the value is unchanged
- ASSERT_EQ(E_NO_CHANGE, pControlReceiver.setSinkVolume(handle,sinkID,11,RAMP_DIRECT,23));
+ ASSERT_EQ(E_NO_CHANGE, pControlReceiver.setSinkVolume(handle,sinkID,11,RAMP_GENIVI_DIRECT,23));
}
TEST_F(controlInterfaceTest,ackSetSourceVolumeChange)
@@ -384,8 +384,8 @@ TEST_F(controlInterfaceTest,ackSetSourceVolumeChange)
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
//change the sinkVolume, expect a call on the routingInterface
- EXPECT_CALL(pMockRoutingInterface,asyncSetSourceVolume(_,2,11,RAMP_DIRECT,23)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.setSourceVolume(handle,source.sourceID,11,RAMP_DIRECT,23));
+ EXPECT_CALL(pMockRoutingInterface,asyncSetSourceVolume(_,2,11,RAMP_GENIVI_DIRECT,23)).WillOnce(Return(E_OK));
+ ASSERT_EQ(E_OK, pControlReceiver.setSourceVolume(handle,source.sourceID,11,RAMP_GENIVI_DIRECT,23));
//check the list of handles. The handle must be in there and have the right type
ASSERT_EQ(E_OK, pControlReceiver.getListHandles(handlesList));
@@ -409,7 +409,7 @@ TEST_F(controlInterfaceTest,ackSetSourceVolumeChange)
ASSERT_TRUE(handlesList.empty());
//Now we try again, but the value is unchanged
- ASSERT_EQ(E_NO_CHANGE, pControlReceiver.setSourceVolume(handle,source.sourceID,11,RAMP_DIRECT,23));
+ ASSERT_EQ(E_NO_CHANGE, pControlReceiver.setSourceVolume(handle,source.sourceID,11,RAMP_GENIVI_DIRECT,23));
}
TEST_F(controlInterfaceTest,ackSetSinkSoundProperty)
@@ -428,7 +428,7 @@ TEST_F(controlInterfaceTest,ackSetSinkSoundProperty)
domain.busname = "mock";
sink.sinkID = 2;
sink.domainID = 1;
- soundProperty.type = SP_BASS;
+ soundProperty.type = SP_EXAMPLE_BASS;
soundProperty.value = 244;
//setup environment, we need a domain and a sink
@@ -445,7 +445,7 @@ TEST_F(controlInterfaceTest,ackSetSinkSoundProperty)
ASSERT_EQ(handlesList[0].handleType, H_SETSINKSOUNDPROPERTY);
//read out this property. There is no change, because the ack did not arrive yet.
- ASSERT_EQ(E_OK, pDatabaseHandler.getSinkSoundPropertyValue(2,SP_BASS,oldvalue));
+ ASSERT_EQ(E_OK, pDatabaseHandler.getSinkSoundPropertyValue(2,SP_EXAMPLE_BASS,oldvalue));
ASSERT_EQ(sink.listSoundProperties[0].value, oldvalue);
//lets send the answer and expect a call on the controlInterface
@@ -453,7 +453,7 @@ TEST_F(controlInterfaceTest,ackSetSinkSoundProperty)
pRoutingReceiver.ackSetSinkSoundProperty(handle, E_OK);
//finally, the new value must be in the database
- ASSERT_EQ(E_OK, pDatabaseHandler.getSinkSoundPropertyValue(sinkID,SP_BASS,oldvalue));
+ ASSERT_EQ(E_OK, pDatabaseHandler.getSinkSoundPropertyValue(sinkID,SP_EXAMPLE_BASS,oldvalue));
ASSERT_EQ(soundProperty.value, oldvalue);
//and the handle must be destroyed
@@ -480,7 +480,7 @@ TEST_F(controlInterfaceTest,ackSetSourceSoundProperty)
domain.busname = "mock";
source.sourceID = 2;
source.domainID = 1;
- soundProperty.type = SP_BASS;
+ soundProperty.type = SP_EXAMPLE_BASS;
soundProperty.value = 244;
//prepare the scene
@@ -497,7 +497,7 @@ TEST_F(controlInterfaceTest,ackSetSourceSoundProperty)
ASSERT_EQ(handlesList[0].handleType, H_SETSOURCESOUNDPROPERTY);
//read out this property. There is no change, because the ack did not arrive yet.
- ASSERT_EQ(E_OK, pDatabaseHandler.getSourceSoundPropertyValue(2,SP_BASS,oldvalue));
+ ASSERT_EQ(E_OK, pDatabaseHandler.getSourceSoundPropertyValue(2,SP_EXAMPLE_BASS,oldvalue));
ASSERT_EQ(source.listSoundProperties[0].value, oldvalue);
//lets send the answer and expect a call on the controlInterface
@@ -505,7 +505,7 @@ TEST_F(controlInterfaceTest,ackSetSourceSoundProperty)
pRoutingReceiver.ackSetSourceSoundProperty(handle, E_OK);
//finally, the new value must be in the database
- ASSERT_EQ(E_OK, pDatabaseHandler.getSourceSoundPropertyValue(sourceID,SP_BASS,oldvalue));
+ ASSERT_EQ(E_OK, pDatabaseHandler.getSourceSoundPropertyValue(sourceID,SP_EXAMPLE_BASS,oldvalue));
ASSERT_EQ(soundProperty.value, oldvalue);
//and the handle must be destroyed
diff --git a/AudioManagerDaemon/test/database/databaseTest.cpp b/AudioManagerDaemon/test/database/databaseTest.cpp
index caaac76..b31fd48 100644
--- a/AudioManagerDaemon/test/database/databaseTest.cpp
+++ b/AudioManagerDaemon/test/database/databaseTest.cpp
@@ -96,7 +96,7 @@ void databasetest::createMainConnectionSetup()
connection.sinkID = i;
connection.sourceID = i;
connection.delay = -1;
- connection.connectionFormat = CF_ANALOG;
+ connection.connectionFormat = CF_GENIVI_ANALOG;
connection.connectionID = 0;
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,forgetSink));
@@ -176,7 +176,7 @@ TEST_F(databasetest,getMainConnectionInfo)
connection.sinkID = i;
connection.sourceID = i;
connection.delay = -1;
- connection.connectionFormat = CF_ANALOG;
+ connection.connectionFormat = CF_GENIVI_ANALOG;
connection.connectionID = 0;
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,forgetSink));
@@ -356,7 +356,7 @@ TEST_F(databasetest, peekSourceID)
am_sourceClass_t sourceClassID, peekID;
am_SourceClass_s sourceClass;
am_ClassProperty_s classProperty;
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 13;
sourceClass.name = sourceName;
sourceClass.sourceClassID = 0;
@@ -380,7 +380,7 @@ TEST_F(databasetest, peekSinkID)
am_sinkClass_t sinkClassID, peekID;
am_SinkClass_s sinkClass;
am_ClassProperty_s classProperty;
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 13;
sinkClass.name = sinkName;
sinkClass.sinkClassID = 0;
@@ -423,7 +423,7 @@ TEST_F(databasetest,crossfaders)
crossfader.sinkID_B = sinkBID;
crossfader.sourceID = sourceID;
crossfader.name = "Crossfader";
- crossfader.hotSink = HS_MIN;
+ crossfader.hotSink = HS_UNKNOWN;
std::vector<am_Crossfader_s> listCrossfaders;
@@ -470,7 +470,7 @@ TEST_F(databasetest,crossfadersGetFromDomain)
crossfader.sinkID_B = sinkBID;
crossfader.sourceID = sourceID;
crossfader.name = "Crossfader";
- crossfader.hotSink = HS_MIN;
+ crossfader.hotSink = HS_UNKNOWN;
std::vector<am_crossfaderID_t> listCrossfaders;
@@ -712,10 +712,10 @@ TEST_F(databasetest,getSinkClassOfSink)
am_sinkClass_t sinkClassID;
am_Sink_s sink;
am_sinkID_t sinkID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sinkClass.name = "test";
@@ -750,10 +750,10 @@ TEST_F(databasetest,getSourceClassOfSource)
am_sourceClass_t sourceClassID;
am_Source_s source;
am_sourceID_t sourceID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sourceClass.name = "test";
@@ -782,10 +782,10 @@ TEST_F(databasetest,removeSourceClass)
am_SourceClass_s sourceClass;
am_ClassProperty_s classProperty;
am_sourceClass_t sourceClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sourceClass.name = "test";
@@ -810,10 +810,10 @@ TEST_F(databasetest,updateSourceClass)
am_SourceClass_s sourceClass, changedClass;
am_ClassProperty_s classProperty;
am_sourceClass_t sourceClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sourceClass.name = "test";
@@ -843,10 +843,10 @@ TEST_F(databasetest,enterSourceClass)
am_SourceClass_s sourceClass;
am_ClassProperty_s classProperty;
am_sourceClass_t sourceClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sourceClass.name = "test";
@@ -868,10 +868,10 @@ TEST_F(databasetest,enterSourceClassStatic)
am_SourceClass_s sourceClass;
am_ClassProperty_s classProperty;
am_sourceClass_t sourceClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sourceClass.name = "test";
@@ -893,10 +893,10 @@ TEST_F(databasetest,removeSinkClass)
am_SinkClass_s sinkClass;
am_ClassProperty_s classProperty;
am_sinkClass_t sinkClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sinkClass.name = "test";
@@ -921,10 +921,10 @@ TEST_F(databasetest,updateSinkClass)
am_SinkClass_s sinkClass, changedClass;
am_ClassProperty_s classProperty;
am_sinkClass_t sinkClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sinkClass.name = "test";
@@ -954,10 +954,10 @@ TEST_F(databasetest,enterSinkClass)
am_SinkClass_s sinkClass;
am_ClassProperty_s classProperty;
am_sinkClass_t sinkClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sinkClass.name = "test";
@@ -979,10 +979,10 @@ TEST_F(databasetest,enterSinkClassStatic)
am_SinkClass_s sinkClass;
am_ClassProperty_s classProperty;
am_sinkClass_t sinkClassID;
- classProperty.classProperty = CP_SINK_TYPE;
+ classProperty.classProperty = CP_GENIVI_SINK_TYPE;
classProperty.value = 1;
classPropertyList.push_back(classProperty);
- classProperty.classProperty = CP_SOURCE_TYPE;
+ classProperty.classProperty = CP_GENIVI_SOURCE_TYPE;
classProperty.value = 4;
classPropertyList.push_back(classProperty);
sinkClass.name = "test";
@@ -1002,7 +1002,7 @@ TEST_F(databasetest, changeSystemProperty)
std::vector<am_SystemProperty_s> listSystemProperties, listReturn;
am_SystemProperty_s systemProperty;
- systemProperty.type = SYP_TEST;
+ systemProperty.type = SYP_UNKNOWN;
systemProperty.value = 33;
listSystemProperties.push_back(systemProperty);
EXPECT_CALL(pMockInterface,cbSystemPropertyChanged(_)).Times(1); //todo: check the exact value here
@@ -1019,7 +1019,7 @@ TEST_F(databasetest, systemProperties)
std::vector<am_SystemProperty_s> listSystemProperties, listReturn;
am_SystemProperty_s systemProperty;
- systemProperty.type = SYP_TEST;
+ systemProperty.type = SYP_UNKNOWN;
systemProperty.value = 33;
listSystemProperties.push_back(systemProperty);
@@ -1096,7 +1096,7 @@ TEST_F(databasetest, changeSourceMainSoundProperty)
am_sourceID_t sourceID;
pCF.createSource(source);
am_MainSoundProperty_s property;
- property.type = MSP_NAVIGATION_OFFSET;
+ property.type = MSP_UNKNOWN;
property.value = 33;
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(1);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
@@ -1137,7 +1137,7 @@ TEST_F(databasetest, changeSinkMainSoundProperty)
am_sinkID_t sinkID;
pCF.createSink(sink);
am_MainSoundProperty_s property;
- property.type = MSP_NAVIGATION_OFFSET;
+ property.type = MSP_UNKNOWN;
property.value = 33;
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(1);
@@ -1220,7 +1220,7 @@ TEST_F(databasetest, changeSinkAvailability)
pCF.createSink(sink);
am_Availability_s availability;
availability.availability = A_UNKNOWN;
- availability.availabilityReason = AR_TEMPERATURE;
+ availability.availabilityReason = AR_GENIVI_TEMPERATURE;
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(1);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
@@ -1238,7 +1238,7 @@ TEST_F(databasetest, changeSourceAvailability)
pCF.createSource(source);
am_Availability_s availability;
availability.availability = A_UNKNOWN;
- availability.availabilityReason = AR_TEMPERATURE;
+ availability.availabilityReason = AR_GENIVI_TEMPERATURE;
source.visible = true;
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(1);
@@ -1271,7 +1271,7 @@ TEST_F(databasetest,changeMainConnectionRoute)
connection.sinkID = i + 20;
connection.sourceID = i + 20;
connection.delay = -1;
- connection.connectionFormat = CF_ANALOG;
+ connection.connectionFormat = CF_GENIVI_ANALOG;
connection.connectionID = 0;
pCF.createSink(sink);
diff --git a/AudioManagerDaemon/test/routing/MockInterfaces.h b/AudioManagerDaemon/test/routing/MockInterfaces.h
index ac7b839..207fadd 100644
--- a/AudioManagerDaemon/test/routing/MockInterfaces.h
+++ b/AudioManagerDaemon/test/routing/MockInterfaces.h
@@ -77,98 +77,97 @@ class MockCommandSendInterface : public CommandSendInterface {
};
-class MockControlSendInterface: public ControlSendInterface
-{
-public:
- MOCK_METHOD1(startupController,
- am_Error_e(ControlReceiveInterface* controlreceiveinterface));
- MOCK_METHOD0(stopController,
- am_Error_e());
- MOCK_METHOD0(hookAllPluginsLoaded,
- void());
- MOCK_METHOD3(hookUserConnectionRequest,
- am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID));
- MOCK_METHOD1(hookUserDisconnectionRequest,
- am_Error_e(const am_mainConnectionID_t connectionID));
- MOCK_METHOD2(hookUserSetMainSinkSoundProperty,
- am_Error_e(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty));
- MOCK_METHOD2(hookUserSetMainSourceSoundProperty,
- am_Error_e(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty));
- MOCK_METHOD1(hookUserSetSystemProperty,
- am_Error_e(const am_SystemProperty_s& property));
- MOCK_METHOD2(hookUserVolumeChange,
- am_Error_e(const am_sinkID_t SinkID, const am_mainVolume_t newVolume));
- MOCK_METHOD2(hookUserVolumeStep,
- am_Error_e(const am_sinkID_t SinkID, const int16_t increment));
- MOCK_METHOD2(hookUserSetSinkMuteState,
- am_Error_e(const am_sinkID_t sinkID, const am_MuteState_e muteState));
- MOCK_METHOD2(hookSystemRegisterDomain,
- am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID));
- MOCK_METHOD1(hookSystemDeregisterDomain,
- am_Error_e(const am_domainID_t domainID));
- MOCK_METHOD1(hookSystemDomainRegistrationComplete,
- void(const am_domainID_t domainID));
- MOCK_METHOD2(hookSystemRegisterSink,
- am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID));
- MOCK_METHOD1(hookSystemDeregisterSink,
- am_Error_e(const am_sinkID_t sinkID));
- MOCK_METHOD2(hookSystemRegisterSource,
- am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID));
- MOCK_METHOD1(hookSystemDeregisterSource,
- am_Error_e(const am_sourceID_t sourceID));
- MOCK_METHOD2(hookSystemRegisterGateway,
- am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID));
- MOCK_METHOD1(hookSystemDeregisterGateway,
- am_Error_e(const am_gatewayID_t gatewayID));
- MOCK_METHOD2(hookSystemRegisterCrossfader,
- am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID));
- MOCK_METHOD1(hookSystemDeregisterCrossfader,
- am_Error_e(const am_crossfaderID_t crossfaderID));
- MOCK_METHOD3(hookSystemSinkVolumeTick,
- void(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume));
- MOCK_METHOD3(hookSystemSourceVolumeTick,
- void(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume));
- MOCK_METHOD2(hookSystemInterruptStateChange,
- void(const am_sourceID_t sourceID, const am_InterruptState_e interruptState));
- MOCK_METHOD2(hookSystemSinkAvailablityStateChange,
- void(const am_sinkID_t sinkID, const am_Availability_s& availability));
- MOCK_METHOD2(hookSystemSourceAvailablityStateChange,
- void(const am_sourceID_t sourceID, const am_Availability_s& availability));
- MOCK_METHOD2(hookSystemDomainStateChange,
- void(const am_domainID_t domainID, const am_DomainState_e state));
- MOCK_METHOD1(hookSystemReceiveEarlyData,
- void(const std::vector<am_EarlyData_s>& data));
- MOCK_METHOD1(hookSystemSpeedChange,
- void(const am_speed_t speed));
- MOCK_METHOD2(hookSystemTimingInformationChanged,
- void(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time));
- MOCK_METHOD2(cbAckConnect,
- void(const am_Handle_s handle, const am_Error_e errorID));
- MOCK_METHOD2(cbAckDisconnect,
- void(const am_Handle_s handle, const am_Error_e errorID));
- MOCK_METHOD3(cbAckCrossFade,
- void(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error));
- MOCK_METHOD3(cbAckSetSinkVolumeChange,
- void(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error));
- MOCK_METHOD3(cbAckSetSourceVolumeChange,
- void(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error));
- MOCK_METHOD2(cbAckSetSourceState,
- void(const am_Handle_s handle, const am_Error_e error));
- MOCK_METHOD2(cbAckSetSourceSoundProperties,
- void(const am_Handle_s handle, const am_Error_e error));
- MOCK_METHOD2(cbAckSetSourceSoundProperty,
- void(const am_Handle_s handle, const am_Error_e error));
- MOCK_METHOD2(cbAckSetSinkSoundProperties,
- void(const am_Handle_s handle, const am_Error_e error));
- MOCK_METHOD2(cbAckSetSinkSoundProperty,
- void(const am_Handle_s handle, const am_Error_e error));
- MOCK_METHOD4(getConnectionFormatChoice,
- am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats));
- MOCK_CONST_METHOD0(getInterfaceVersion,
- uint16_t());
-
+class MockControlSendInterface : public ControlSendInterface {
+ public:
+ MOCK_METHOD1(startupController,
+ am_Error_e(ControlReceiveInterface* controlreceiveinterface));
+ MOCK_METHOD0(stopController,
+ am_Error_e());
+ MOCK_METHOD0(hookAllPluginsLoaded,
+ void());
+ MOCK_METHOD3(hookUserConnectionRequest,
+ am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID));
+ MOCK_METHOD1(hookUserDisconnectionRequest,
+ am_Error_e(const am_mainConnectionID_t connectionID));
+ MOCK_METHOD2(hookUserSetMainSinkSoundProperty,
+ am_Error_e(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty));
+ MOCK_METHOD2(hookUserSetMainSourceSoundProperty,
+ am_Error_e(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty));
+ MOCK_METHOD1(hookUserSetSystemProperty,
+ am_Error_e(const am_SystemProperty_s& property));
+ MOCK_METHOD2(hookUserVolumeChange,
+ am_Error_e(const am_sinkID_t SinkID, const am_mainVolume_t newVolume));
+ MOCK_METHOD2(hookUserVolumeStep,
+ am_Error_e(const am_sinkID_t SinkID, const int16_t increment));
+ MOCK_METHOD2(hookUserSetSinkMuteState,
+ am_Error_e(const am_sinkID_t sinkID, const am_MuteState_e muteState));
+ MOCK_METHOD2(hookSystemRegisterDomain,
+ am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID));
+ MOCK_METHOD1(hookSystemDeregisterDomain,
+ am_Error_e(const am_domainID_t domainID));
+ MOCK_METHOD1(hookSystemDomainRegistrationComplete,
+ void(const am_domainID_t domainID));
+ MOCK_METHOD2(hookSystemRegisterSink,
+ am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID));
+ MOCK_METHOD1(hookSystemDeregisterSink,
+ am_Error_e(const am_sinkID_t sinkID));
+ MOCK_METHOD2(hookSystemRegisterSource,
+ am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID));
+ MOCK_METHOD1(hookSystemDeregisterSource,
+ am_Error_e(const am_sourceID_t sourceID));
+ MOCK_METHOD2(hookSystemRegisterGateway,
+ am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID));
+ MOCK_METHOD1(hookSystemDeregisterGateway,
+ am_Error_e(const am_gatewayID_t gatewayID));
+ MOCK_METHOD2(hookSystemRegisterCrossfader,
+ am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID));
+ MOCK_METHOD1(hookSystemDeregisterCrossfader,
+ am_Error_e(const am_crossfaderID_t crossfaderID));
+ MOCK_METHOD3(hookSystemSinkVolumeTick,
+ void(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume));
+ MOCK_METHOD3(hookSystemSourceVolumeTick,
+ void(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume));
+ MOCK_METHOD2(hookSystemInterruptStateChange,
+ void(const am_sourceID_t sourceID, const am_InterruptState_e interruptState));
+ MOCK_METHOD2(hookSystemSinkAvailablityStateChange,
+ void(const am_sinkID_t sinkID, const am_Availability_s& availability));
+ MOCK_METHOD2(hookSystemSourceAvailablityStateChange,
+ void(const am_sourceID_t sourceID, const am_Availability_s& availability));
+ MOCK_METHOD2(hookSystemDomainStateChange,
+ void(const am_domainID_t domainID, const am_DomainState_e state));
+ MOCK_METHOD1(hookSystemReceiveEarlyData,
+ void(const std::vector<am_EarlyData_s>& data));
+ MOCK_METHOD1(hookSystemSpeedChange,
+ void(const am_speed_t speed));
+ MOCK_METHOD2(hookSystemTimingInformationChanged,
+ void(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time));
+ MOCK_METHOD2(cbAckConnect,
+ void(const am_Handle_s handle, const am_Error_e errorID));
+ MOCK_METHOD2(cbAckDisconnect,
+ void(const am_Handle_s handle, const am_Error_e errorID));
+ MOCK_METHOD3(cbAckCrossFade,
+ void(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error));
+ MOCK_METHOD3(cbAckSetSinkVolumeChange,
+ void(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error));
+ MOCK_METHOD3(cbAckSetSourceVolumeChange,
+ void(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error));
+ MOCK_METHOD2(cbAckSetSourceState,
+ void(const am_Handle_s handle, const am_Error_e error));
+ MOCK_METHOD2(cbAckSetSourceSoundProperties,
+ void(const am_Handle_s handle, const am_Error_e error));
+ MOCK_METHOD2(cbAckSetSourceSoundProperty,
+ void(const am_Handle_s handle, const am_Error_e error));
+ MOCK_METHOD2(cbAckSetSinkSoundProperties,
+ void(const am_Handle_s handle, const am_Error_e error));
+ MOCK_METHOD2(cbAckSetSinkSoundProperty,
+ void(const am_Handle_s handle, const am_Error_e error));
+ MOCK_METHOD5(getConnectionFormatChoice,
+ am_Error_e(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));
+ MOCK_CONST_METHOD0(getInterfaceVersion,
+ uint16_t());
};
+
} // namespace am
#endif /* MOCKROUTINGINTERFACE_H_ */
diff --git a/AudioManagerDaemon/test/routing/routingTest.cpp b/AudioManagerDaemon/test/routing/routingTest.cpp
index 9158064..5b073d2 100644
--- a/AudioManagerDaemon/test/routing/routingTest.cpp
+++ b/AudioManagerDaemon/test/routing/routingTest.cpp
@@ -74,7 +74,7 @@ void routingTest::TearDown()
}
ACTION(returnConnectionFormat){
-arg3=arg2;
+arg4=arg3;
}
//test that checks just sinks and source in a domain but connectionformats do not match
@@ -82,7 +82,7 @@ TEST_F(routingTest,simpleRoute2withDomainNoMatchFormats)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(1);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(1);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1;
@@ -103,7 +103,7 @@ TEST_F(routingTest,simpleRoute2withDomainNoMatchFormats)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
@@ -115,7 +115,7 @@ TEST_F(routingTest,simpleRoute2withDomainNoMatchFormats)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_ANALOG);
+ sink.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
@@ -145,7 +145,7 @@ TEST_F(routingTest,simpleRoute2withDomain)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(1);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(1);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1;
@@ -166,7 +166,7 @@ TEST_F(routingTest,simpleRoute2withDomain)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_ANALOG);
+ source.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
@@ -178,7 +178,7 @@ TEST_F(routingTest,simpleRoute2withDomain)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_ANALOG);
+ sink.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
@@ -209,7 +209,7 @@ TEST_F(routingTest,simpleRoute2DomainsOnlyFree)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(2);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(2);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2;
@@ -235,14 +235,14 @@ TEST_F(routingTest,simpleRoute2DomainsOnlyFree)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_ANALOG);
+ source.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_MONO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -255,14 +255,14 @@ TEST_F(routingTest,simpleRoute2DomainsOnlyFree)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -317,7 +317,7 @@ TEST_F(routingTest,simpleRoute2DomainsOnlyFreeNotFree)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(2);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(2);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2;
@@ -343,14 +343,14 @@ TEST_F(routingTest,simpleRoute2DomainsOnlyFreeNotFree)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_ANALOG);
+ source.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_MONO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -363,14 +363,14 @@ TEST_F(routingTest,simpleRoute2DomainsOnlyFreeNotFree)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -418,11 +418,11 @@ TEST_F(routingTest,simpleRoute2DomainsOnlyFreeNotFree)
am_connectionID_t id1,id2;
connection.sourceID=sourceID;
connection.sinkID=gwSinkID;
- connection.connectionFormat=CF_ANALOG;
+ connection.connectionFormat=CF_GENIVI_ANALOG;
connection.connectionID=0;
connection1.sourceID=gwSourceID;
connection1.sinkID=sinkID;
- connection1.connectionFormat=CF_ANALOG;
+ connection1.connectionFormat=CF_GENIVI_ANALOG;
connection1.connectionID=0;
ASSERT_EQ(E_OK,pDatabaseHandler.enterConnectionDB(connection,id1));
@@ -441,7 +441,7 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats_2)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(3);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(3);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2, domain3;
@@ -472,25 +472,25 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats_2)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_STEREO);
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_MONO);
- gwSource.listConnectionFormats.push_back(CF_STEREO);
- gwSource.listConnectionFormats.push_back(CF_ANALOG);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_MONO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource1.domainID = domainID3;
gwSource1.name = "gwsource2";
gwSource1.sourceState = SS_ON;
gwSource1.sourceID = 0;
gwSource1.sourceClassID = 5;
- gwSource1.listConnectionFormats.push_back(CF_STEREO);
- gwSource1.listConnectionFormats.push_back(CF_MONO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -504,23 +504,23 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats_2)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_STEREO);
- gwSink.listConnectionFormats.push_back(CF_MONO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink1.domainID = domainID2;
gwSink1.name = "gwSink1";
gwSink1.sinkID = 0;
gwSink1.sinkClassID = 5;
gwSink1.muteState = MS_MUTED;
- gwSink1.listConnectionFormats.push_back(CF_ANALOG);
- gwSink1.listConnectionFormats.push_back(CF_STEREO);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_STEREO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -602,7 +602,7 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats_1)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(3);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(3);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2, domain3;
@@ -633,24 +633,24 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats_1)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_STEREO);
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_STEREO);
- gwSource.listConnectionFormats.push_back(CF_MONO);
- gwSource.listConnectionFormats.push_back(CF_ANALOG);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_MONO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource1.domainID = domainID3;
gwSource1.name = "gwsource2";
gwSource1.sourceState = SS_ON;
gwSource1.sourceID = 0;
gwSource1.sourceClassID = 5;
- gwSource1.listConnectionFormats.push_back(CF_MONO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -664,22 +664,22 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats_1)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_STEREO);
- gwSink.listConnectionFormats.push_back(CF_MONO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink1.domainID = domainID2;
gwSink1.name = "gwSink1";
gwSink1.sinkID = 0;
gwSink1.sinkClassID = 5;
gwSink1.muteState = MS_MUTED;
- gwSink1.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -759,7 +759,7 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(3);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(3);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2, domain3;
@@ -790,22 +790,22 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_STEREO);
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_ANALOG);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource1.domainID = domainID3;
gwSource1.name = "gwsource2";
gwSource1.sourceState = SS_ON;
gwSource1.sourceID = 0;
gwSource1.sourceClassID = 5;
- gwSource1.listConnectionFormats.push_back(CF_MONO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -819,22 +819,22 @@ TEST_F(routingTest,simpleRoute3DomainsListConnectionFormats)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_STEREO);
- gwSink.listConnectionFormats.push_back(CF_MONO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_STEREO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink1.domainID = domainID2;
gwSink1.name = "gwSink1";
gwSink1.sinkID = 0;
gwSink1.sinkClassID = 5;
gwSink1.muteState = MS_MUTED;
- gwSink1.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -910,7 +910,7 @@ TEST_F(routingTest,simpleRoute4Domains2Routes)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(5);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(5);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2, domain3, domain4;
@@ -946,35 +946,35 @@ TEST_F(routingTest,simpleRoute4Domains2Routes)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_ANALOG);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource1.domainID = domainID3;
gwSource1.name = "gwsource2";
gwSource1.sourceState = SS_ON;
gwSource1.sourceID = 0;
gwSource1.sourceClassID = 5;
- gwSource1.listConnectionFormats.push_back(CF_MONO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource2.domainID = domainID4;
gwSource2.name = "gwsource3";
gwSource2.sourceState = SS_OFF;
gwSource2.sourceID = 0;
gwSource2.sourceClassID = 5;
- gwSource2.listConnectionFormats.push_back(CF_STEREO);
+ gwSource2.listConnectionFormats.push_back(CF_GENIVI_STEREO);
gwSource3.domainID = domainID3;
gwSource3.name = "gwsource4";
gwSource3.sourceState = SS_OFF;
gwSource3.sourceID = 0;
gwSource3.sourceClassID = 5;
- gwSource3.listConnectionFormats.push_back(CF_MONO);
+ gwSource3.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -990,35 +990,35 @@ TEST_F(routingTest,simpleRoute4Domains2Routes)
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_MONO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink1.domainID = domainID2;
gwSink1.name = "gwSink1";
gwSink1.sinkID = 0;
gwSink1.sinkClassID = 5;
gwSink1.muteState = MS_MUTED;
- gwSink1.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSink2.domainID = domainID3;
gwSink2.name = "gwSink2";
gwSink2.sinkID = 0;
gwSink2.sinkClassID = 5;
gwSink2.muteState = MS_MUTED;
- gwSink2.listConnectionFormats.push_back(CF_MONO);
+ gwSink2.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink3.domainID = domainID2;
gwSink3.name = "gwSink3";
gwSink3.sinkID = 0;
gwSink3.sinkClassID = 5;
gwSink3.muteState = MS_MUTED;
- gwSink3.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink3.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
sink.domainID = domainID4;
sink.name = "sink1";
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_STEREO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_STEREO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -1146,7 +1146,7 @@ TEST_F(routingTest,simpleRoute3DomainsNoConnection)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(3);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(3);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2, domain3;
@@ -1177,21 +1177,21 @@ TEST_F(routingTest,simpleRoute3DomainsNoConnection)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_ANALOG);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource1.domainID = domainID3;
gwSource1.name = "gwsource2";
gwSource1.sourceState = SS_ON;
gwSource1.sourceID = 0;
gwSource1.sourceClassID = 5;
- gwSource1.listConnectionFormats.push_back(CF_MONO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -1205,21 +1205,21 @@ TEST_F(routingTest,simpleRoute3DomainsNoConnection)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_STEREO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_STEREO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_MONO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink1.domainID = domainID2;
gwSink1.name = "gwSink1";
gwSink1.sinkID = 0;
gwSink1.sinkClassID = 5;
gwSink1.muteState = MS_MUTED;
- gwSink1.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -1291,7 +1291,7 @@ TEST_F(routingTest,simpleRoute2Domains)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(2);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(2);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2;
@@ -1317,14 +1317,14 @@ TEST_F(routingTest,simpleRoute2Domains)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_ANALOG);
+ source.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_MONO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -1337,14 +1337,14 @@ TEST_F(routingTest,simpleRoute2Domains)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -1399,7 +1399,7 @@ TEST_F(routingTest,simpleRoute2DomainsNoMatchConnectionFormats)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(2);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(2);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2;
@@ -1425,14 +1425,14 @@ TEST_F(routingTest,simpleRoute2DomainsNoMatchConnectionFormats)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_STEREO);
+ source.listConnectionFormats.push_back(CF_GENIVI_STEREO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_MONO);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -1445,14 +1445,14 @@ TEST_F(routingTest,simpleRoute2DomainsNoMatchConnectionFormats)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -1505,7 +1505,7 @@ TEST_F(routingTest,simpleRoute3Domains)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(3);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(3);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2, domain3;
@@ -1536,21 +1536,21 @@ TEST_F(routingTest,simpleRoute3Domains)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_ANALOG);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource1.domainID = domainID3;
gwSource1.name = "gwsource2";
gwSource1.sourceState = SS_ON;
gwSource1.sourceID = 0;
gwSource1.sourceClassID = 5;
- gwSource1.listConnectionFormats.push_back(CF_MONO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_MONO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -1564,21 +1564,21 @@ TEST_F(routingTest,simpleRoute3Domains)
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_MONO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink.domainID = domainID1;
gwSink.name = "gwSink";
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_MONO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink1.domainID = domainID2;
gwSink1.name = "gwSink1";
gwSink1.sinkID = 0;
gwSink1.sinkClassID = 5;
gwSink1.muteState = MS_MUTED;
- gwSink1.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
@@ -1652,7 +1652,7 @@ TEST_F(routingTest,simpleRoute4Domains)
{
EXPECT_CALL(pMockInterface,cbNumberOfSourcesChanged()).Times(4);
EXPECT_CALL(pMockInterface,cbNumberOfSinksChanged()).Times(4);
- EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
+ EXPECT_CALL(pMockControlInterface,getConnectionFormatChoice(_,_,_,_,_)).WillRepeatedly(DoAll(returnConnectionFormat(), Return(E_OK)));
//initialize 2 domains
am_Domain_s domain1, domain2, domain3, domain4;
@@ -1688,28 +1688,28 @@ TEST_F(routingTest,simpleRoute4Domains)
source.sourceState = SS_ON;
source.sourceID = 0;
source.sourceClassID = 5;
- source.listConnectionFormats.push_back(CF_MONO);
+ source.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource.domainID = domainID2;
gwSource.name = "gwsource1";
gwSource.sourceState = SS_ON;
gwSource.sourceID = 0;
gwSource.sourceClassID = 5;
- gwSource.listConnectionFormats.push_back(CF_ANALOG);
+ gwSource.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSource1.domainID = domainID3;
gwSource1.name = "gwsource2";
gwSource1.sourceState = SS_ON;
gwSource1.sourceID = 0;
gwSource1.sourceClassID = 5;
- gwSource1.listConnectionFormats.push_back(CF_MONO);
+ gwSource1.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSource2.domainID = domainID4;
gwSource2.name = "gwsource3";
gwSource2.sourceState = SS_OFF;
gwSource2.sourceID = 0;
gwSource2.sourceClassID = 5;
- gwSource2.listConnectionFormats.push_back(CF_STEREO);
+ gwSource2.listConnectionFormats.push_back(CF_GENIVI_STEREO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(gwSource,gwSourceID));
@@ -1724,28 +1724,28 @@ TEST_F(routingTest,simpleRoute4Domains)
gwSink.sinkID = 0;
gwSink.sinkClassID = 5;
gwSink.muteState = MS_MUTED;
- gwSink.listConnectionFormats.push_back(CF_MONO);
+ gwSink.listConnectionFormats.push_back(CF_GENIVI_MONO);
gwSink1.domainID = domainID2;
gwSink1.name = "gwSink1";
gwSink1.sinkID = 0;
gwSink1.sinkClassID = 5;
gwSink1.muteState = MS_MUTED;
- gwSink1.listConnectionFormats.push_back(CF_ANALOG);
+ gwSink1.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
gwSink2.domainID = domainID3;
gwSink2.name = "gwSink2";
gwSink2.sinkID = 0;
gwSink2.sinkClassID = 5;
gwSink2.muteState = MS_MUTED;
- gwSink2.listConnectionFormats.push_back(CF_MONO);
+ gwSink2.listConnectionFormats.push_back(CF_GENIVI_MONO);
sink.domainID = domainID4;
sink.name = "sink1";
sink.sinkID = 0;
sink.sinkClassID = 5;
sink.muteState = MS_MUTED;
- sink.listConnectionFormats.push_back(CF_STEREO);
+ sink.listConnectionFormats.push_back(CF_GENIVI_STEREO);
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(gwSink,gwSinkID));
diff --git a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp
index 61ca296..33aa7f6 100644
--- a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp
@@ -84,8 +84,8 @@ TEST_F(routingInterfaceTest,abort)
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
//start a connect, expect a call on the routingInterface
- EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_ANALOG)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_ANALOG,1,2));
+ EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_GENIVI_ANALOG)).WillOnce(Return(E_OK));
+ ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_GENIVI_ANALOG,1,2));
//check the correctness of the handle
ASSERT_NE(handle.handle, 0);
@@ -128,12 +128,12 @@ TEST_F(routingInterfaceTest,alreadyConnected)
sink.domainID = 1;
ASSERT_EQ(E_OK, pDatabaseHandler.enterDomainDB(domain,domainID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
- EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_ANALOG)).WillOnce(Return(E_OK));
+ EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_GENIVI_ANALOG)).WillOnce(Return(E_OK));
am_Handle_s handle;
am_connectionID_t connectionID;
- ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_ANALOG,1,2));
+ ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_GENIVI_ANALOG,1,2));
ASSERT_EQ(E_OK, pDatabaseHandler.changeConnectionFinal(connectionID));
- ASSERT_EQ(E_ALREADY_EXISTS, pControlReceiver.connect(handle,connectionID,CF_ANALOG,1,2));
+ ASSERT_EQ(E_ALREADY_EXISTS, pControlReceiver.connect(handle,connectionID,CF_GENIVI_ANALOG,1,2));
ASSERT_NE(handle.handle, 0);
ASSERT_EQ(handle.handleType, H_CONNECT);
}
@@ -146,7 +146,7 @@ TEST_F(routingInterfaceTest,setSinkSoundPropertyNoChange)
am_domainID_t domainID;
am_Handle_s handle;
am_SoundProperty_s soundProperty;
- soundProperty.type = SP_TREBLE;
+ soundProperty.type = SP_EXAMPLE_TREBLE;
soundProperty.value = 23;
std::vector<am_Handle_s> listHandles;
pCF.createSink(sink);
@@ -244,7 +244,7 @@ TEST_F(routingInterfaceTest,setSourceVolumeNoChange)
am_domainID_t domainID;
am_Handle_s handle;
am_volume_t volume = 34;
- am_RampType_e rampType = RAMP_DIRECT;
+ am_RampType_e rampType = RAMP_GENIVI_DIRECT;
am_time_t rampTime = 300;
std::vector<am_Handle_s> listHandles;
pCF.createSource(source);
@@ -270,7 +270,7 @@ TEST_F(routingInterfaceTest,setSourceVolume)
am_domainID_t domainID;
am_Handle_s handle;
am_volume_t volume = 34;
- am_RampType_e rampType = RAMP_DIRECT;
+ am_RampType_e rampType = RAMP_GENIVI_DIRECT;
am_time_t rampTime = 300;
std::vector<am_Handle_s> listHandles;
pCF.createSource(source);
@@ -298,7 +298,7 @@ TEST_F(routingInterfaceTest,setSinkVolumeNoChange)
am_domainID_t domainID;
am_Handle_s handle;
am_volume_t volume = 34;
- am_RampType_e rampType = RAMP_DIRECT;
+ am_RampType_e rampType = RAMP_GENIVI_DIRECT;
am_time_t rampTime = 300;
std::vector<am_Handle_s> listHandles;
pCF.createSink(sink);
@@ -324,7 +324,7 @@ TEST_F(routingInterfaceTest,setSinkVolume)
am_domainID_t domainID;
am_Handle_s handle;
am_volume_t volume = 34;
- am_RampType_e rampType = RAMP_DIRECT;
+ am_RampType_e rampType = RAMP_GENIVI_DIRECT;
am_time_t rampTime = 300;
std::vector<am_Handle_s> listHandles;
pCF.createSink(sink);
@@ -361,8 +361,8 @@ TEST_F(routingInterfaceTest,connect)
sink.domainID = 1;
ASSERT_EQ(E_OK, pDatabaseHandler.enterDomainDB(domain,domainID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
- EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_ANALOG)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_ANALOG,1,2));
+ EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_GENIVI_ANALOG)).WillOnce(Return(E_OK));
+ ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_GENIVI_ANALOG,1,2));
ASSERT_NE(handle.handle, 0);
ASSERT_EQ(handle.handleType, H_CONNECT);
ASSERT_EQ(E_OK, pControlReceiver.getListHandles(listHandles));
@@ -387,8 +387,8 @@ TEST_F(routingInterfaceTest,disconnect)
sink.domainID = 1;
ASSERT_EQ(E_OK, pDatabaseHandler.enterDomainDB(domain,domainID));
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
- EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_ANALOG)).WillOnce(Return(E_OK));
- ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_ANALOG,1,2));
+ EXPECT_CALL(pMockInterface,asyncConnect(_,_,1,sinkID,CF_GENIVI_ANALOG)).WillOnce(Return(E_OK));
+ ASSERT_EQ(E_OK, pControlReceiver.connect(handle,connectionID,CF_GENIVI_ANALOG,1,2));
ASSERT_EQ(E_OK, pDatabaseHandler.changeConnectionFinal(connectionID));
EXPECT_CALL(pMockInterface,asyncDisconnect(_,connectionID)).WillOnce(Return(E_OK));
ASSERT_EQ(E_OK, pControlReceiver.disconnect(handle,connectionID));
diff --git a/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp b/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp
index 1f1abea..91eee2c 100644
--- a/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp
+++ b/AudioManagerDaemon/test/sockethandler/sockethandlerTest.cpp
@@ -1,8 +1,26 @@
-/*
- * sockethandlerTest.cpp
+/**
+ * Copyright (C) 2011, BMW AG
*
- * Created on: Dec 19, 2011
- * Author: christian
+ * GeniviAudioMananger AudioManagerDaemon
+ *
+ * \file sockethandlerTest.cpp
+ *
+ * \date 20-Oct-2011 3:42:04 PM
+ * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ *
+ * \section License
+ * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+ * Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+ * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+ * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+ * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+ * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+ * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#include "sockethandlerTest.h"
diff --git a/AudioManagerDaemon/test/sockethandler/sockethandlerTest.h b/AudioManagerDaemon/test/sockethandler/sockethandlerTest.h
index faf604b..d2d1bc6 100644
--- a/AudioManagerDaemon/test/sockethandler/sockethandlerTest.h
+++ b/AudioManagerDaemon/test/sockethandler/sockethandlerTest.h
@@ -1,8 +1,26 @@
-/*
- * sockethandlerTest.h
+/**
+ * Copyright (C) 2011, BMW AG
*
- * Created on: Dec 19, 2011
- * Author: christian
+ * GeniviAudioMananger AudioManagerDaemon
+ *
+ * \file sockethandlerTest.h
+ *
+ * \date 20-Oct-2011 3:42:04 PM
+ * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ *
+ * \section License
+ * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+ * Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+ * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+ * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+ * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+ * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+ * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef SOCKETHANDLERTEST_H_
diff --git a/CHANGELOG b/CHANGELOG
deleted file mode 100644
index 154a849..0000000
--- a/CHANGELOG
+++ /dev/null
@@ -1,480 +0,0 @@
-commit e124310a45e6e7798a077fa44ef3ee518193b2cf
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * modify RoutingSender Async to match with TestHMI
- * modify ControlSenderPlugin to have dummy behaviour
-
-commit 2ddacca29eccd4192add2b17ad6af357b52ea29b
-Author: Frank Herchet <frank.fh.herchet@bmw.de>
-
- * fix some methods in CAmTelnetMenuHelper
-
-commit a0042153abf05408409d06c5183efe0905b18055
-Author: Frank Herchet <frank.fh.herchet@bmw.de>
-
- * merge local changes with updated master
-
-commit 66ce11e941986259e4c403364e3ee7c8b09864f4
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fix list domains in telnetserver
-
-commit d4627908f2f405b7b184bd47b2216adf5d4df486
-Merge: 84b9046 40ade5d
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- Merge branch 'telnetserver'
-
-commit 84b90467e8e9dcaafaf75738f4bf9840365424b9
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * adoption of RoutinInterfaceAsync to testHMI
- * adoption of projekttypes.h to HMI
- * comment out wrapper dlt messages because too much pollution
-
-commit 40ade5d852e6d4c781f33a20d8e4340d59ec07a8
-Author: Frank Herchet <frank.fh.herchet@bmw.de>
-
- * remove duplicate current command prompt
- * remove debug output of TelnetServer.h
- * fix compile error in main.cpp
- * remove unused methods in TelnetServer.h
-
-commit 8d3ad577f57e0a45ef9c0e2f1ce99957445f0eb8
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * more changes regarding test controller. Now a very basic connect is supported
-
-commit e924eb3ec4717647d61e9ec4d5cc74f81ea749b9
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * changed main to register observer (thanks TGO)
- * changed command DBUSplugin to register Connection at 2nd DBUSMessageHandler Instance (thanks TGO)
- * Expanded dummyController functionality
-
-commit 9f9f6fc7d283c60166431c5175b6bbaa53a23c9c
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * change doc path
-
-commit d461527cb74c2fa42202a4466a6eeb07c0848a3a
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * renaming of databasetest - copy paste fault
-
-commit 3a11cd051607c19d91a0eb8118fac87e937de929
-Author: Grape R5 <demo@ubuntu.(none)>
-
- * TelnetServer Implementation.
- * TelnetServerTest Implementation
-
-commit 8a2db276ede7516038eb5d2bf13b89cc3ff185a7
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * add another routing test
- * change answer in case routing can not be done on only one domain
-
-commit f00468f45b72e2693b79af30665f683967deb5a7
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * restructered document generation. Now only the functions of the daemon are generated
- * sockethandler: take [0] instead of .front. added todo to make sockethandler faster
- * added test for local routing
-
-commit e6b739cc7e901ca8637bf3f5a72f5956cd764249
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * added function to routing algorithm that takes care of the route in case source and sink are in the same domain...
-
-commit ba9e8ff6cfc7de6fadce914b356b6e4b398d5ab3
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * worked in feedback from Thomas Goering towards integration tests
- * corrected startup sequence and modified the testplugin so that the startup sequences match
-
-commit 74cf9b985164be8c28a3cd1b11076900792594f8
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * add an out of memory handler
-
-commit 9f4c15a8e89d798077ca3edf7f786dbc740aa176
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * implemented peeksinkclassIDs and peeksourceclassIDs
- * changed interface of both from const to non-const
- * corrected include headers to c++ style, eg. <cassert>
- * corrected sendChangedData return type to void
- * implemented tests for sinkclass and sourceclass peeking
- * fixed bug in sockethandler (FD could not be removed) thanks to Frank
-
-commit 52a769615e476860f3e4c0196fdf7e5159a7a7c1
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * still the weired error but now really ok.
-
-commit 0538d699f441beb81ab64b7f59cb87329667287a
-Merge: 1b65963 bef6b6f
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- Merge branch 'master' of https://git.genivi.org/srv/git/AudioManager
-
-commit 1b659632bc7fa0c1daa021a2d52da390cedec9a7
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * weired git error .. anyway should be ok now
-
-commit ad0c452e9890a35a1b7a6c2e2421e092c5cf2c2d
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * wrapping DLT calls in a new Class because of performance, codesize and lazyness reasons
- * the whole project now compiles without a warning with -pedantic
-
-commit bef6b6f38de4f6b201a1b6ce24855c8894031602
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fixed non reference in routing interface peeksourceclassID and peeksinkclassID
- * fixed bug in complexer usage of routing algorithm
- * added more router tests
-
-commit 58d62c4af578c10375bf9baa946e33f340c42a1f
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * regenerated EA code based on Conti Feedback.
- * changed paths of audiomanagertypes include in generated files
- * changed order of parameters in asyncSetSinkSoundProperty / asyncSetSourceSoundProperty / cbTimingInformationChanged to have common style over all interfaces.
- * changed default include paths for Controller etc...
- * cleanup of warnings
-
-commit 93c6b1973d59ce225e9cb5d2bcaea7d01c5fda52
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * routing algorithm improvements
- * routing algorithms first tests
-
-commit af0ba5b505b361679c07899187b7043d867742c3
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * finalized Router implementation
- * added new generated ControlSendInterface with router support
-
-commit 4fe50302a695c625d5161b538da771b2c36bd33e
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * formatting all the source code with eclipse source code style
- * added used xml to the project
-
-commit 80213f17291e5b58c733de09f06439d71640d2e2
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fixed wrong memset in main.cpp (thanks to frank)
- * fixed compiler warnings in signalhandler
- * added Router Class: this class does now the autorouting job. First commit, no tests yet
-
-commit adf0d48f869007e4527b00e1a346ed37ee82cc1a
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fix for package building with lower cmake versions
- * fix DBus interface to be GLIB tolerant 32bit types
-
-commit 8a99f39f0a5b84230bb6e764950dc674258870e8
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fix build without git
-
-commit 3d458653de2ec50f524b38d33645fd773bcb207f
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fixed compilation without git
- * fixed compilation without tests
-
-commit 23c90675c09d4e2947b5a827a5ebcd5516c0270e
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * added package creation based on cpack
- * updated .gitignore
-
-commit a4a4c50ff375d94fa90c13d293b145176f214bf4
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * added install and uninstall routines to make
-
-commit 915ae08fa586cfa67559cc94a72ac5787df909ea
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * just update changelog
-
-commit 5f02509296864bc5b4b438139a246fb3119802ed
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fixed commandline option p is now recognized
- * fixed bug: loading of routing plugins with version control now works
-
-commit 472d0762b68ce0f2a755b4215515a3e031831495
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * recreated the header files out of the model. Added versioning support in the headerfiles generated
- * ensured compatibility with 64 bit systems while compiling dbus [ changed FindDBUS.cmake]
- * updated the README to better support building
- * updated typo in introspectable string of DBusWrapper
- * reworked including strategie
- * added getInterfafeVersion method on all interfaces
- * added Interface Versioning support
- * added version as part of .so ending
- * it is no possible to set a vector of source and sink sound properties at a time
- * added interface to ask for all loaded plugins on RoutingSender
- * added first version of telnet server (not yet productive) - set to not active in CMakeLists.txt
- * added changelog (created out of git commit log)
- * added default values for all enum types to be save even on other if communication is on other domain
-
-commit 6ebae8c4d3a340c135ed2f5f611a0e1c31994164
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fixed sockethandler timespec issues
-
-commit d2033f10762c1b39b7755f067cb614228336aec8
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- changed README, added correct header in files
-
-commit 93d7610b460c6212a3098a3eccb127fd45ada345
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- *added versioning support automatically out of git
- *added commandline parser
- *changed DLT_CONTEXT for AudioManager to AudioManager
- *added signalhandler
- *TODO: make signalhandler not only call but correctly rundown the daemon
-
-commit b7e748007bbe0b16fa8a8a089c6cc8fe43bc7aac
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * assert on empty busname (routinginterface)
- * added busname for DbusroutingSender
- * rework of sockethandlertests
- * small changes on compilerflags
- * new default error messages on dummy controller plugin
- * new plugin Asynchronous including tests
-
-commit 6b583365d1f0f5c7ff613ecfc323c4d1eba1699d
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * finally, first socket test work
-
-commit cd23bf5e1d2e1d134df91f23ebfd761d770a99db
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fixed no compile bug
- * fixed sockethandler loop
-
-commit 4f74d6e303c58326fe75ee75e1c92cf9263f800d
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * rework of buildsystem
- * now everything depends on a toplevel CMakefile
- * cleanup of makefiles and compiler options
-
-commit 4618280b6d777ac7bf3bb5cf5b0ea3f0d9e4b2b7
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * new run of code generation by EA
- * removed audiomanagertypes.cpp it's creadted by EA, but empty
- * get rid of dbusincludes, dbus files are now in the includes folder
-
-commit b9b9e9ace5c6c7c493438ecf9a4b33b47543e8e3
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * first version of SocketHandler working with DBus
- * currently Sockethandler test not working
-
-commit f8a41c140abbd1d193ed19f6c2be598adc01292a
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * fixed bug in database handler connected to delay calculation
-
-commit 18d1c7ee814993ae3fbee5635650e55472dac587
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- * first version of the sockethandler with test
-
-commit 1c992fd131eab06ee4f5a7090377031975092aba
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- - changed header comment - entered correct licence
-
-commit 2cefc51e7bb2b3810f57e7c340c0c8857de1a05a
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- - adds dbus test for command plugin
-
-commit 18b59afe6cda90607ad0b193088000d4f9749a97
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- - added comments in XML description
- - fixed bug in Dbus signal sending
- - corrected namespace usage
-
-commit 392d090c63dcb03df8a044abbc6cc84807e341e5
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- changes to make controlSender compile & loadable
-
-commit 281cb0d875832bb56c82bad3516fc4021f8be4b0
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- added README
-
-commit cad108114630deebde684267d67a5b648479679e
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- first release !
-
-commit 68678bed2dc3d4a5849d283bec84a01e2836603f
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- update in headers, small things
-
-commit 92c8b837306ff1dcd889f9c075435aec50e9aea3
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- .
-
-commit 205595e3d3e6a1d55be3c462ef02c9f828a77feb
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- some updates, new tests
-
-commit d85e69bbf6d8ec6e087c7af579686923c76079cd
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- Some changes, renaming...
-
-commit 5773404eb801e27179b7c3c7803a990145d6e94a
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- total rework
-
-commit 9826492b0066d47cfa9ba68d6efe737cc3c317a3
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- update on dbus
-
-commit 2d849dd0b5b1558e92cd0f2cd6dbc556950d631d
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- Dbus restructured
-
-commit df88fefdd7df890aaf2a3206483678851cffc5c5
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- - first time synchronisation with EA
- - remodelled some interfaces
- - new plugin structure for CommandInterfaces
-
-commit 2feaef3bb5f91af43573155106c73143597bdf3e
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- - daily commit
- - dbus working smooth now, implemented signal handling
- - changed worker thread for dbus to wait for dbus events not to wakeup every 50 ms
-
-commit a34ffa9cf03c0685ee4751efb16eca8267e533c3
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- - next part of getting rid of QT
- - plugin handling for routing plugins work
- - dbus communication works but nof finalized
-
-commit 4bcad418c039cad5690e62ed63e2b4260c12a517
-Author: Christian Mueller <christian@lmuc329619u.(none)>
-
- make it compile on 10.04
-
-commit 4a67d4c668148dd8b0cd9c818ab45c7c6ac9841a
-Author: blacky <blacky@kiwi.(none)>
-
- added layermanager plugin mechanism
-
-commit 6d7c17a9ab1bccbf0bc656c87818338de28f408d
-Author: blacky <blacky@kiwi.(none)>
-
- - first attempt to remove QT
- - this compiles but does not provide the same functionality
- - hookplugin compiles
- - other plugins do not
-
-commit 8da33c909cfce7370ef8e53acb2e3a00464edf37
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- - track StructuralPlugins via list
- - use this list to deinit the plugins upon destructor call of the hookhandler
-
-commit 8329c1baf99ece0e93feda1331e089bc0aced52e
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- adding feature in the compile script:
- by adding document to the cmaker call , the documentation will be created. By default the documentation will not be created
-
-commit 958ff9a0907602f359028261de5d822ac995aede
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- - just typos in AudioManagerCore
- - fixed a bug only updating and showing the first connection
- - change in gitignore
-
-commit 9eb2402884c520a4d7eaa8ce041618bfaa6930b3
-Merge: 0108869 5394c6f
-Author: blacky <blacky@kiwi.(none)>
-
- Merge branch 'master' of https://git.genivi.org/srv/git/AudioManager
-
-commit 0108869db26775b5e30028b0956adb2007020a10
-Author: blacky <blacky@kiwi.(none)>
-
- merge due to non empty Repo on genivi git server. Resolving conflics in the READMEFILE
-
-commit 4a32aebe3776323c176e0fe57298c1220ecc6d2c
-Author: blacky <blacky@kiwi.(none)>
-
- small change on CMakelist in player gui
-
-commit 9d723d9b3918d8c9227b806aa9f016699e234a15
-Merge: d61f9cb e6ad5d8
-Author: Simon Brandner <simon.brandner@partner.bmw.de>
-
- Merge branch 'master' of 10.250.89.137:audiomangenivi
-
-commit e6ad5d883663688d0e36e9d506aa9a1f1190c47f
-Author: christian mueller <christian.ei.mueller@bmw.de>
-
- changed daemon directory name
- changed absolute path for doxygen to relative path
-
-commit d61f9cbeeb25c02d73fc99170b1bdf0cc802002f
-Author: Simon Brandner <simon.brandner@partner.bmw.de>
-
- listInterrruptedSources -> listInterruptedSources
-
-commit fa4da60f971f55bafe157da87ae9d3bce07389b0
-Author: Simon Brandner <simon.brandner@partner.bmw.de>
-
- corrected speeling of sourceID
-
-commit 246e009c14ccec699d9fbb92fde61bba5ebb8221
-Author: Simon Brandner <simon.brandner@partner.bmw.de>
-
- corrected spelling error in README file
-
-commit 02acf3cebd9ec61193f63415590929ef40c504c1
-Author: blacky <blacky@kiwi.(none)>
-
- update & cleanup
-
-commit 4a33862456def70049364761b2035a536b3c5881
-Author: blacky <blacky@kiwi.(none)>
-
- Initial submission
-
-commit 5394c6fa5bf40d9bc8619026cbc4c306211a8499
-Author: Jeremiah C. Foster <jeremiah.foster@pelagicore.com>
-
- Initial import of TEMPLATE.git dir.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 464ba4f..d33ca05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,26 +1,46 @@
- #
- # Copyright (C) 2011, BMW AG
- #
- # AudioManagerDeamon
- #
- # @file CMakeLists.txt
- #
- # @date: 20.05.2011
- # @author: Christian Müller (christian.ei.mueller@bmw.de)
- #
+#GENIVI AUDIOMANAGER
+#
+#Copyright (C) 2011, BMW AG
+#
+#Datum 20.2.2012
+#author Christian Mueller (christian.ei.mueller@bmw.de)
+#
+#***********************************************************************************************************
+#LICENSE
+#***********************************************************************************************************
+#
+#GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+#Copyright (C) 2011, BMW AG – Christian Mueller Christian.ei.mueller@bmw.de
+#
+#This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+#You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+#Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+#Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+#As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+#Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+#
+
cmake_minimum_required(VERSION 2.6)
execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE DAEMONVERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
IF (DAEMON_ERROR)
SET( DAEMONVERSION "homebrew-${CMAKE_SOURCE_DIR}" )
+ELSE (DAEMON_ERROR)
+ STRING(REGEX REPLACE "(-)[^-]+$" "" DAEMONVERSION ${DAEMONVERSION})
+ STRING(REGEX REPLACE "-" "." DAEMONVERSION ${DAEMONVERSION})
ENDIF(DAEMON_ERROR)
message(STATUS "Build Version ${DAEMONVERSION}")
+FILE(READ "cmake/DoxyFile.in" DOXYFILE)
+STRING(REGEX REPLACE "(PROJECT_NUMBER = [0-9].[0-9].[0-9].[0-9])" "PROJECT_NUMBER = ${DAEMONVERSION}" DOXYFILE ${DOXYFILE})
+FILE(WRITE "cmake/DoxyFile.in" ${DOXYFILE} )
+
execute_process(COMMAND git log --pretty=short WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG)
@@ -85,7 +105,6 @@ IF(NOT DEFINED MAX_TELNETCONNECTIONS)
SET( MAX_TELNETCONNECTIONS 3 )
ENDIF(NOT DEFINED MAX_TELNETCONNECTIONS)
-SET(DLT_CONTEXT AudioManager)
SET(PLUGINS_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin/plugins)
SET(LIB_INSTALL_SUFFIX "audioManager")
diff --git a/PluginCommandInterfaceDbus/CMakeLists.txt b/PluginCommandInterfaceDbus/CMakeLists.txt
index 841a740..0c26e12 100644
--- a/PluginCommandInterfaceDbus/CMakeLists.txt
+++ b/PluginCommandInterfaceDbus/CMakeLists.txt
@@ -7,8 +7,8 @@ set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/CommandDBusPlugin)
set(INCLUDES_FOLDER "include")
FILE(READ "${AUDIO_INCLUDES_FOLDER}/command/CommandSendInterface.h" VERSION_BUFFER LIMIT 6000)
-STRING(REGEX MATCH "CommandSendVersion*.[^0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
-STRING(REGEX REPLACE "[^0-9]" "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
+STRING(REGEX MATCH "CommandSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
+STRING(REGEX REPLACE "CommandSendVersion*." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
MESSAGE(STATUS "Building against command interface version ${LIB_INTERFACE_VERSION}")
FIND_PACKAGE(DBUS REQUIRED)
diff --git a/PluginCommandInterfaceDbus/include/DBusCommandSender.h b/PluginCommandInterfaceDbus/include/DBusCommandSender.h
index 05952f5..dbf6b04 100644
--- a/PluginCommandInterfaceDbus/include/DBusCommandSender.h
+++ b/PluginCommandInterfaceDbus/include/DBusCommandSender.h
@@ -78,6 +78,7 @@ private:
CommandReceiverShadow mCommandReceiverShadow;
DBusWrapper* mDBusWrapper;
CommandReceiveInterface* mCommandReceiveInterface;
+ bool mReady; ///< ! if false, calls shall be ignored.
/**
diff --git a/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp b/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp
index ec53a82..57dc56f 100644
--- a/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp
+++ b/PluginCommandInterfaceDbus/src/DBusCommandSender.cpp
@@ -58,7 +58,8 @@ DbusCommandSender::DbusCommandSender() :
mDBUSMessageHandler(), //
mCommandReceiverShadow(), //
mDBusWrapper(NULL), //
- mCommandReceiveInterface(NULL)
+ mCommandReceiveInterface(NULL), //
+ mReady(false)
{
DLTWrapper::instance()->registerContext(commandDbus, "DBP", "DBus Plugin");
log(&commandDbus, DLT_LOG_INFO, "DbusCommandSender constructor called");
@@ -88,6 +89,7 @@ am_Error_e DbusCommandSender::startupInterface(CommandReceiveInterface* commandr
am_Error_e DbusCommandSender::stopInterface()
{
log(&commandDbus, DLT_LOG_INFO, "stopInterface called");
+ mReady = false;
/**
* todo: finish DbusCommandSender::stopInterface(), what needs to be done?
*/
@@ -97,6 +99,7 @@ am_Error_e DbusCommandSender::stopInterface()
am_Error_e DbusCommandSender::cbCommunicationReady()
{
log(&commandDbus, DLT_LOG_INFO, "cbCommunicationReady called");
+ mReady = true;
/**
* todo: implement DbusCommandSender::cbCommunicationReady()
*/
@@ -106,6 +109,7 @@ am_Error_e DbusCommandSender::cbCommunicationReady()
am_Error_e DbusCommandSender::cbCommunicationRundown()
{
log(&commandDbus, DLT_LOG_INFO, "cbCommunicationRundown called");
+ mReady = false;
/**
* todo: implement DbusCommandSender::cbCommunicationRundown()
*/
@@ -116,8 +120,11 @@ void DbusCommandSender::cbNumberOfMainConnectionsChanged()
{
log(&commandDbus, DLT_LOG_INFO, "cbNumberOfMainConnectionsChanged called");
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfMainConnectionsChanged"));
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfMainConnectionsChanged"));
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbNumberOfSinksChanged()
@@ -130,23 +137,27 @@ void DbusCommandSender::cbNumberOfSinksChanged()
std::sort(newListSinks.begin(), newListSinks.end(), sortBySinkID());
std::set_symmetric_difference(newListSinks.begin(), newListSinks.end(), mlistSinks.begin(), mlistSinks.end(), std::back_inserter(diffList), sortBySinkID());
assert(diffList.size()==1);
- if (newListSinks.size() > mlistSinks.size())
+ if (mReady)
{
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SinkAdded");
- mDBUSMessageHandler.append(diffList[0]);
-
- log(&commandDbus, DLT_LOG_INFO, "send signal SinkAdded");
+ if (newListSinks.size() > mlistSinks.size())
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SinkAdded");
+ mDBUSMessageHandler.append(diffList[0]);
+
+ log(&commandDbus, DLT_LOG_INFO, "send signal SinkAdded");
+
+ }
+ else
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SinkRemoved");
+ mDBUSMessageHandler.append(diffList.begin()->sinkID);
+
+ log(&commandDbus, DLT_LOG_INFO, "send signal SinkRemoved");
+ }
+ mDBUSMessageHandler.sendMessage();
}
- else
- {
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SinkRemoved");
- mDBUSMessageHandler.append(diffList.begin()->sinkID);
-
- log(&commandDbus, DLT_LOG_INFO, "send signal SinkRemoved");
- }
-
- mDBUSMessageHandler.sendMessage();
mlistSinks = newListSinks;
+
}
void DbusCommandSender::cbNumberOfSourcesChanged()
@@ -159,22 +170,25 @@ void DbusCommandSender::cbNumberOfSourcesChanged()
std::sort(newlistSources.begin(), newlistSources.end(), sortBySourceID());
std::set_symmetric_difference(newlistSources.begin(), newlistSources.end(), mlistSources.begin(), mlistSources.end(), std::back_inserter(diffList), sortBySourceID());
assert(diffList.size()==1);
- if (newlistSources.size() > mlistSources.size())
- {
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SourceAdded");
- mDBUSMessageHandler.append(diffList[0]);
-
- log(&commandDbus, DLT_LOG_INFO, "send signal SourceAdded");
- }
- else
+ if (mReady)
{
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SourceRemoved");
- mDBUSMessageHandler.append((dbus_uint16_t) diffList.begin()->sourceID);
-
- log(&commandDbus, DLT_LOG_INFO, "send signal SourceRemoved");
+ if (newlistSources.size() > mlistSources.size())
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SourceAdded");
+ mDBUSMessageHandler.append(diffList[0]);
+
+ log(&commandDbus, DLT_LOG_INFO, "send signal SourceAdded");
+ }
+ else
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), "SourceRemoved");
+ mDBUSMessageHandler.append((dbus_uint16_t) diffList.begin()->sourceID);
+
+ log(&commandDbus, DLT_LOG_INFO, "send signal SourceRemoved");
+ }
+
+ mDBUSMessageHandler.sendMessage();
}
-
- mDBUSMessageHandler.sendMessage();
mlistSources = newlistSources;
}
@@ -182,105 +196,138 @@ void DbusCommandSender::cbNumberOfSinkClassesChanged()
{
log(&commandDbus, DLT_LOG_INFO, "cbNumberOfSinkClassesChanged called");
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfSinkClassesChanged"));
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfSinkClassesChanged"));
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbNumberOfSourceClassesChanged()
{
log(&commandDbus, DLT_LOG_INFO, "cbNumberOfSourceClassesChanged called");
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfSourceClassesChanged"));
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("NumberOfSourceClassesChanged"));
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState)
{
log(&commandDbus, DLT_LOG_INFO, "cbMainConnectionStateChanged called, connectionID=", connectionID, "connectionState=", connectionState);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainConnectionStateChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) connectionID);
- mDBUSMessageHandler.append((dbus_int16_t) connectionState);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainConnectionStateChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) connectionID);
+ mDBUSMessageHandler.append((dbus_int16_t) connectionState);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s SoundProperty)
{
log(&commandDbus, DLT_LOG_INFO, "cbMainSinkSoundPropertyChanged called, sinkID", sinkID, "SoundProperty.type", SoundProperty.type, "SoundProperty.value", SoundProperty.value);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainSinkSoundPropertyChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
- mDBUSMessageHandler.append(SoundProperty);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainSinkSoundPropertyChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
+ mDBUSMessageHandler.append(SoundProperty);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s & SoundProperty)
{
log(&commandDbus, DLT_LOG_INFO, "cbMainSourceSoundPropertyChanged called, sourceID", sourceID, "SoundProperty.type", SoundProperty.type, "SoundProperty.value", SoundProperty.value);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainSourceSoundPropertyChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) sourceID);
- mDBUSMessageHandler.append(SoundProperty);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("MainSourceSoundPropertyChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) sourceID);
+ mDBUSMessageHandler.append(SoundProperty);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s & availability)
{
log(&commandDbus, DLT_LOG_INFO, "cbSinkAvailabilityChanged called, sinkID", sinkID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SinkAvailabilityChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
- mDBUSMessageHandler.append(availability);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SinkAvailabilityChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
+ mDBUSMessageHandler.append(availability);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s & availability)
{
log(&commandDbus, DLT_LOG_INFO, "cbSourceAvailabilityChanged called, sourceID", sourceID, "availability.availability", availability.availability, "SoundProperty.reason", availability.availabilityReason);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SourceAvailabilityChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) sourceID);
- mDBUSMessageHandler.append(availability);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SourceAvailabilityChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) sourceID);
+ mDBUSMessageHandler.append(availability);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume)
{
log(&commandDbus, DLT_LOG_INFO, "cbVolumeChanged called, sinkID", sinkID, "volume", volume);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("VolumeChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
- mDBUSMessageHandler.append((dbus_int16_t) volume);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("VolumeChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
+ mDBUSMessageHandler.append((dbus_int16_t) volume);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState)
{
log(&commandDbus, DLT_LOG_INFO, "cbSinkMuteStateChanged called, sinkID", sinkID, "muteState", muteState);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SinkMuteStateChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
- mDBUSMessageHandler.append((dbus_int16_t) muteState);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SinkMuteStateChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) sinkID);
+ mDBUSMessageHandler.append((dbus_int16_t) muteState);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void DbusCommandSender::cbSystemPropertyChanged(const am_SystemProperty_s & SystemProperty)
{
log(&commandDbus, DLT_LOG_INFO, "cbSystemPropertyChanged called, SystemProperty.type", SystemProperty.type, "SystemProperty.value", SystemProperty.value);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SystemPropertyChanged"));
- mDBUSMessageHandler.append(SystemProperty);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("SystemPropertyChanged"));
+ mDBUSMessageHandler.append(SystemProperty);
+ mDBUSMessageHandler.sendMessage();
+ }
}
void am::DbusCommandSender::cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
{
log(&commandDbus, DLT_LOG_INFO, "cbTimingInformationChanged called, mainConnectionID=", mainConnectionID, "time=", time);
- mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("TimingInformationChanged"));
- mDBUSMessageHandler.append((dbus_uint16_t) mainConnectionID);
- mDBUSMessageHandler.append((dbus_int16_t) time);
- mDBUSMessageHandler.sendMessage();
+ if (mReady)
+ {
+ mDBUSMessageHandler.initSignal(std::string(MY_NODE), std::string("TimingInformationChanged"));
+ mDBUSMessageHandler.append((dbus_uint16_t) mainConnectionID);
+ mDBUSMessageHandler.append((dbus_int16_t) time);
+ mDBUSMessageHandler.sendMessage();
+ }
}
uint16_t DbusCommandSender::getInterfaceVersion() const
diff --git a/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp b/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp
index 8f7c23f..c190135 100644
--- a/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp
+++ b/PluginCommandInterfaceDbus/test/dbuscommandpluginInterfaceTest.cpp
@@ -77,7 +77,7 @@ ACTION(returnListConnections)
listItem.mainConnectionID=15;
listItem.sinkID=4;
listItem.sourceID=3;
- listItem.connectionState=CS_MIN;
+ listItem.connectionState=CS_UNKNOWN;
listItem.delay=34;
list.push_back(listItem);
arg0=list;
@@ -87,8 +87,8 @@ ACTION(returnListSinks)
{
std::vector<am::am_SinkType_s> list;
am::am_SinkType_s listItem;
- listItem.availability.availability=A_MIN;
- listItem.availability.availabilityReason=AR_NOMEDIA;
+ listItem.availability.availability=A_UNAVAILABLE;
+ listItem.availability.availabilityReason=AR_GENIVI_NOMEDIA;
listItem.muteState=MS_UNMUTED;
listItem.name="mySink";
listItem.sinkClassID=34;
@@ -103,7 +103,7 @@ ACTION(returnListSources)
std::vector<am::am_SourceType_s> list;
am::am_SourceType_s listItem;
listItem.availability.availability=A_MAX;
- listItem.availability.availabilityReason=AR_SAMEMEDIA;
+ listItem.availability.availabilityReason=AR_GENIVI_SAMEMEDIA;
listItem.name="MySource";
listItem.sourceClassID=12;
listItem.sourceID=224;
@@ -121,7 +121,7 @@ ACTION(returnListMainSinkSoundProperties)
listItem.type=MSP_MAX;
listItem.value=223;
list.push_back(listItem);
- listItem.type=MSP_MIN;
+ listItem.type=MSP_UNKNOWN;
listItem.value=2;
list.push_back(listItem);
arg1=list;
@@ -132,7 +132,7 @@ ACTION(returnListSourceClasses)
std::vector<am::am_SourceClass_s> list;
am::am_SourceClass_s listItem;
am::am_ClassProperty_s property;
- property.classProperty=CP_SINK_TYPE;
+ property.classProperty=CP_GENIVI_SINK_TYPE;
property.value=12;
listItem.name="FirstCLass";
listItem.sourceClassID=23;
@@ -150,7 +150,7 @@ ACTION(returnListSinkClasses)
std::vector<am::am_SinkClass_s> list;
am::am_SinkClass_s listItem;
am::am_ClassProperty_s property;
- property.classProperty=CP_SOURCE_TYPE;
+ property.classProperty=CP_GENIVI_SOURCE_TYPE;
property.value=122;
listItem.name="FirstCLass";
listItem.sinkClassID=2123;
@@ -167,7 +167,7 @@ ACTION(returnListSystemProperties)
{
std::vector<am::am_SystemProperty_s> list;
am::am_SystemProperty_s listItem;
- listItem.type=SYP_TEST;
+ listItem.type=SYP_UNKNOWN;
listItem.value=-2245;
list.push_back(listItem);
arg0=list;
@@ -284,7 +284,7 @@ TEST_F(dbuscommandpluginInterfaceTest,Connect)
std::cout<<"[volumeStep]"<<std::endl;
- EXPECT_CALL(pReceiveInterface,setSinkMuteState(1,MS_MIN)).WillOnce(Return(E_OK));
+ EXPECT_CALL(pReceiveInterface,setSinkMuteState(1,MS_UNKNOWN)).WillOnce(Return(E_OK));
system((DBUSCOMMAND + std::string("SetSinkMuteState uint16:1 int16:0 > /tmp/result.txt ")).c_str());
//check the results
@@ -305,7 +305,7 @@ TEST_F(dbuscommandpluginInterfaceTest,Connect)
std::cout<<"[sinkmutest]"<<std::endl;
EXPECT_CALL(pReceiveInterface,setMainSinkSoundProperty(AllOf(Field(&am_MainSoundProperty_s::value, 3), \
- Field(&am_MainSoundProperty_s::type,MSP_MIN)),1)).WillOnce(Return(E_ABORTED));
+ Field(&am_MainSoundProperty_s::type,MSP_UNKNOWN)),1)).WillOnce(Return(E_ABORTED));
PyRun_SimpleStringFlags("import dbus\n"
@@ -332,7 +332,7 @@ TEST_F(dbuscommandpluginInterfaceTest,Connect)
std::cout<<"[sinksound ]"<<std::endl;
EXPECT_CALL(pReceiveInterface,setMainSourceSoundProperty(AllOf(Field(&am_MainSoundProperty_s::value, 3), \
- Field(&am_MainSoundProperty_s::type,MSP_MIN)),1)).WillOnce(Return(E_ABORTED));
+ Field(&am_MainSoundProperty_s::type,MSP_UNKNOWN)),1)).WillOnce(Return(E_ABORTED));
PyRun_SimpleStringFlags("import dbus\n"
"f = open('/tmp/result.txt','w')\n"
diff --git a/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp b/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp
index 9b5adb9..2b60d7c 100644
--- a/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp
+++ b/PluginCommandInterfaceDbus/test/dbuscommaninterfacesignalsTest.cpp
@@ -70,8 +70,8 @@ void* cbSinkAdded(void*)
mysink.name = "MySink";
mysink.sinkID = 23;
mysink.availability.availability = A_MAX;
- mysink.availability.availabilityReason = AR_MIN;
- mysink.muteState = MS_MIN;
+ mysink.availability.availabilityReason = AR_UNKNOWN;
+ mysink.muteState = MS_UNKNOWN;
mysink.sinkClassID = 3;
mysink.volume = 234;
list.push_back(mysink);
@@ -96,7 +96,7 @@ void* cbSourceAdded(void*)
myource.name = "MySink";
myource.sourceID = 42;
myource.availability.availability = A_MAX;
- myource.availability.availabilityReason = AR_MIN;
+ myource.availability.availabilityReason = AR_UNKNOWN;
myource.sourceClassID = 15;
list.push_back(myource);
DbusCommandSender sender;
@@ -120,7 +120,7 @@ void* cbSourceRemoved(void*)
myource.name = "MySink";
myource.sourceID = 42;
myource.availability.availability = A_MAX;
- myource.availability.availabilityReason = AR_MIN;
+ myource.availability.availabilityReason = AR_UNKNOWN;
myource.sourceClassID = 15;
list.push_back(myource);
DbusCommandSender sender;
@@ -146,8 +146,8 @@ void* cbSinkRemoved(void*)
mysink.name = "MySink";
mysink.sinkID = 23;
mysink.availability.availability = A_MAX;
- mysink.availability.availabilityReason = AR_MIN;
- mysink.muteState = MS_MIN;
+ mysink.availability.availabilityReason = AR_UNKNOWN;
+ mysink.muteState = MS_UNKNOWN;
mysink.sinkClassID = 3;
mysink.volume = 234;
list.push_back(mysink);
@@ -226,7 +226,7 @@ void* MainSinkSoundPropertyChanged(void*)
backdoor.setDbusConnection(&sender, co);
am_sinkID_t sinkID = 3;
am_MainSoundProperty_s soundProperty;
- soundProperty.type = MSP_TEST;
+ soundProperty.type = MSP_UNKNOWN;
soundProperty.value = 23;
sender.cbMainSinkSoundPropertyChanged(sinkID, soundProperty);
return (NULL);
@@ -245,7 +245,7 @@ void* MainSourceSoundPropertyChanged(void*)
backdoor.setDbusConnection(&sender, co);
am_sourceID_t sourceID = 35;
am_MainSoundProperty_s soundProperty;
- soundProperty.type = MSP_TEST;
+ soundProperty.type = MSP_UNKNOWN;
soundProperty.value = 233;
sender.cbMainSourceSoundPropertyChanged(sourceID, soundProperty);
return (NULL);
@@ -330,7 +330,7 @@ void* SystemPropertyChanged(void*)
DBusConnection* co = dbus_bus_get(DBUS_BUS_SESSION, &error);
backdoor.setDbusConnection(&sender, co);
am_SystemProperty_s property;
- property.type = SYP_TEST;
+ property.type = SYP_UNKNOWN;
property.value = 355;
sender.cbSystemPropertyChanged(property);
return (NULL);
diff --git a/PluginControlInterface/CMakeLists.txt b/PluginControlInterface/CMakeLists.txt
index 21612c5..7bd3bb1 100644
--- a/PluginControlInterface/CMakeLists.txt
+++ b/PluginControlInterface/CMakeLists.txt
@@ -7,8 +7,8 @@ set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/ControlPlugin)
set(INCLUDES_FOLDER "include")
FILE(READ "${AUDIO_INCLUDES_FOLDER}/control/ControlSendInterface.h" VERSION_BUFFER LIMIT 6000)
-STRING(REGEX MATCH "ControlSendVersion*.[^0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
-STRING(REGEX REPLACE "[^0-9]" "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
+STRING(REGEX MATCH "ControlSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
+STRING(REGEX REPLACE "ControlSendVersion*." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
MESSAGE(STATUS "Building against control interface version ${LIB_INTERFACE_VERSION}")
INCLUDE_DIRECTORIES(
diff --git a/PluginControlInterface/include/ControlSender.h b/PluginControlInterface/include/ControlSender.h
index ace61a6..0e98768 100644
--- a/PluginControlInterface/include/ControlSender.h
+++ b/PluginControlInterface/include/ControlSender.h
@@ -77,7 +77,7 @@ public:
void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error);
void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error);
void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error);
- am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats);
+ am_Error_e 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);
uint16_t getInterfaceVersion() const;
private:
diff --git a/PluginControlInterface/src/ControlSender.cpp b/PluginControlInterface/src/ControlSender.cpp
index 9df8232..60ae417 100644
--- a/PluginControlInterface/src/ControlSender.cpp
+++ b/PluginControlInterface/src/ControlSender.cpp
@@ -57,6 +57,7 @@ am_Error_e ControlSenderPlugin::startupController(ControlReceiveInterface *contr
assert(controlreceiveinterface);
mControlReceiveInterface = controlreceiveinterface;
//here is a good place to insert SystemProperties into the database...
+ //and might be a good place to insert the Source and Sink CLasses as well
return E_NOT_USED;
}
@@ -134,7 +135,8 @@ am_Error_e ControlSenderPlugin::hookUserDisconnectionRequest(const am_mainConnec
am_Error_e ControlSenderPlugin::hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
{
- if (sinkID==0) return E_NON_EXISTENT;
+ if (sinkID == 0)
+ return E_NON_EXISTENT;
mainSinkSoundPropertySet set;
set.sinkID = sinkID;
@@ -172,7 +174,7 @@ am_Error_e ControlSenderPlugin::hookUserVolumeChange(const am_sinkID_t SinkID, c
set.sinkID = SinkID;
set.mainVolume = newVolume;
am_Error_e error;
- if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, newVolume, RAMP_DIRECT, 20)) != E_OK)
+ if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, newVolume, RAMP_GENIVI_DIRECT, 20)) != E_OK)
{
return error;
}
@@ -189,7 +191,7 @@ am_Error_e ControlSenderPlugin::hookUserVolumeStep(const am_sinkID_t SinkID, con
am_Sink_s sink;
mControlReceiveInterface->getSinkInfoDB(SinkID, sink);
set.mainVolume = sink.volume + increment;
- if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, set.mainVolume, RAMP_DIRECT, 20)) != E_OK)
+ if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, set.mainVolume, RAMP_GENIVI_DIRECT, 20)) != E_OK)
{
return error;
}
@@ -438,10 +440,11 @@ void ControlSenderPlugin::cbAckSetSinkSoundProperties(const am_Handle_s handle,
(void) handle;
}
-am_Error_e ControlSenderPlugin::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats)
+am_Error_e ControlSenderPlugin::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)
{
(void) sourceID;
(void) sinkID;
+ (void) listRoute;
//ok, this is cheap. In a real product you have your preferences, right?
listPrioConnectionFormats = listPossibleConnectionFormats;
return (E_OK);
diff --git a/PluginRoutingInterfaceAsync/CMakeLists.txt b/PluginRoutingInterfaceAsync/CMakeLists.txt
index ac4f336..2ccb6da 100644
--- a/PluginRoutingInterfaceAsync/CMakeLists.txt
+++ b/PluginRoutingInterfaceAsync/CMakeLists.txt
@@ -29,8 +29,8 @@ set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/RoutingAsync)
set(INCLUDES_FOLDER "include")
FILE(READ "${AUDIO_INCLUDES_FOLDER}/routing/RoutingSendInterface.h" VERSION_BUFFER LIMIT 6000)
-STRING(REGEX MATCH "RoutingSendVersion*.[^0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
-STRING(REGEX REPLACE "[^0-9]" "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
+STRING(REGEX MATCH "RoutingSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
+STRING(REGEX REPLACE "RoutingSendVersion*." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
MESSAGE(STATUS "Building against routing interface version ${LIB_INTERFACE_VERSION}")
find_package( Threads )
diff --git a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
index 5027452..4993f76 100644
--- a/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
+++ b/PluginRoutingInterfaceAsync/src/RoutingSenderAsync.cpp
@@ -118,7 +118,7 @@ void* AsyncRoutingSender::InterruptEvents(void *data)
{
am_sourceID_t sourceID;
- am_InterruptState_e state=IS_MIN;
+ am_InterruptState_e state=IS_UNKNOWN;
dbus_message_iter_init(msg, &args);
dbus_message_iter_get_basic(&args,(void*) &sourceID);
reply = dbus_message_new_method_return(msg);
@@ -763,17 +763,17 @@ std::vector<am_Sink_s> AsyncRoutingSender::createSinkTable()
std::vector<am_Sink_s> table;
am_Sink_s item;
am_SoundProperty_s sp;
- sp.type = SP_BASS;
+ sp.type = SP_EXAMPLE_BASS;
sp.value = 0;
std::vector<am_MainSoundProperty_s> listMainSoundProperties;
am_MainSoundProperty_s msp;
- msp.type = MSP_BASS;
+ msp.type = MSP_EXAMPLE_BASS;
msp.value = 5;
listMainSoundProperties.push_back(msp);
- msp.type = MSP_MID;
+ msp.type = MSP_EXAMPLE_MID;
listMainSoundProperties.push_back(msp);
- msp.type = MSP_TREBLE;
+ msp.type = MSP_EXAMPLE_TREBLE;
listMainSoundProperties.push_back(msp);
for (int16_t i = 0; i <= 10; i++)
{
@@ -789,7 +789,7 @@ std::vector<am_Sink_s> AsyncRoutingSender::createSinkTable()
item.listSoundProperties.push_back(sp);
item.listMainSoundProperties = listMainSoundProperties;
item.visible = true;
- item.listConnectionFormats.push_back(CF_ANALOG);
+ item.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
item.muteState = MS_MUTED;
item.mainVolume = 0;
table.push_back(item);
@@ -815,7 +815,7 @@ std::vector<am_Source_s> AsyncRoutingSender::createSourceTable()
item.visible = true;
item.available.availability = A_AVAILABLE;
item.available.availabilityReason = AR_UNKNOWN;
- item.listConnectionFormats.push_back(CF_ANALOG);
+ item.listConnectionFormats.push_back(CF_GENIVI_ANALOG);
table.push_back(item);
}
return (table);
diff --git a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp
index c252e07..3149e7e 100644
--- a/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp
+++ b/PluginRoutingInterfaceAsync/test/testRoutingInterfaceAsync.cpp
@@ -132,7 +132,7 @@ TEST_F(testRoutingInterfaceAsync,setSourceSoundProperty)
am_sourceID_t sourceID = 3;
am_SoundProperty_s property;
- property.type = SP_MID;
+ property.type = SP_EXAMPLE_MID;
property.value = 24;
EXPECT_CALL(pReceiveInterface,ackSetSourceSoundProperty(_,E_OK)).Times(1);
@@ -150,7 +150,7 @@ TEST_F(testRoutingInterfaceAsync,setSinkSoundProperty)
am_sinkID_t sinkID = 1;
am_SoundProperty_s property;
- property.type = SP_MID;
+ property.type = SP_EXAMPLE_MID;
property.value = 24;
EXPECT_CALL(pReceiveInterface,ackSetSinkSoundProperty(_,E_OK)).Times(1);
@@ -184,7 +184,7 @@ TEST_F(testRoutingInterfaceAsync,setSourceVolume)
am_sourceID_t sourceID = 3;
am_volume_t volume = 3;
- am_RampType_e ramp = RAMP_DIRECT;
+ am_RampType_e ramp = RAMP_GENIVI_DIRECT;
am_time_t myTime = 25;
EXPECT_CALL(pReceiveInterface,ackSourceVolumeTick(_,sourceID,_)).Times(3);
@@ -203,7 +203,7 @@ TEST_F(testRoutingInterfaceAsync,setSinkVolume)
am_sinkID_t sinkID = 1;
am_volume_t volume = 9;
- am_RampType_e ramp = RAMP_DIRECT;
+ am_RampType_e ramp = RAMP_GENIVI_DIRECT;
am_time_t myTime = 25;
EXPECT_CALL(pReceiveInterface,ackSinkVolumeTick(_,sinkID,_)).Times(9);
@@ -222,7 +222,7 @@ TEST_F(testRoutingInterfaceAsync,setSinkVolumeAbort)
am_sinkID_t sinkID = 2;
am_volume_t volume = 25;
- am_RampType_e ramp = RAMP_DIRECT;
+ am_RampType_e ramp = RAMP_GENIVI_DIRECT;
am_time_t myTime = 25;
EXPECT_CALL(pReceiveInterface, ackSinkVolumeTick(_,sinkID,_));
@@ -244,7 +244,7 @@ TEST_F(testRoutingInterfaceAsync,disconnectTooEarly)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface, ackConnect(_,connectionID,E_OK));
EXPECT_CALL(pReceiveInterface,ackDisconnect(_,connectionID,E_OK)).Times(0);
@@ -263,7 +263,7 @@ TEST_F(testRoutingInterfaceAsync,disconnectAbort)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface, ackConnect(_,connectionID,E_OK));
EXPECT_CALL(pReceiveInterface, ackDisconnect(_,connectionID,E_ABORTED));
@@ -299,7 +299,7 @@ TEST_F(testRoutingInterfaceAsync,disconnect)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface, ackConnect(_,connectionID,E_OK));
EXPECT_CALL(pReceiveInterface, ackDisconnect(_,connectionID,E_OK));
@@ -319,7 +319,7 @@ TEST_F(testRoutingInterfaceAsync,connectNoMoreThreads)
am_connectionID_t connectionID = 1;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface,ackConnect(_,_,E_OK)).Times(10);
for (int i = 0; i < 10; i++)
@@ -341,7 +341,7 @@ TEST_F(testRoutingInterfaceAsync,connectAbortTooLate)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface,ackConnect(_,connectionID,E_OK)).Times(1);
ASSERT_EQ(E_OK, pRoutingSender.asyncConnect(handle,connectionID,sourceID,sinkID,format));
@@ -360,7 +360,7 @@ TEST_F(testRoutingInterfaceAsync,connectAbort)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface,ackConnect(_,connectionID,E_ABORTED)).Times(1);
ASSERT_EQ(E_OK, pRoutingSender.asyncConnect(handle,connectionID,sourceID,sinkID,format));
@@ -379,7 +379,7 @@ TEST_F(testRoutingInterfaceAsync,connectWrongFormat)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_MONO;
+ am_ConnectionFormat_e format = CF_GENIVI_MONO;
EXPECT_CALL(pReceiveInterface,ackConnect(_,connectionID,E_OK)).Times(0);
ASSERT_EQ(E_WRONG_FORMAT, pRoutingSender.asyncConnect(handle,connectionID,sourceID,sinkID,format));
@@ -396,7 +396,7 @@ TEST_F(testRoutingInterfaceAsync,connectWrongSink)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 122;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface,ackConnect(_,connectionID,E_OK)).Times(0);
ASSERT_EQ(E_NON_EXISTENT, pRoutingSender.asyncConnect(handle,connectionID,sourceID,sinkID,format));
@@ -412,7 +412,7 @@ TEST_F(testRoutingInterfaceAsync,connectWrongSource)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 25;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface,ackConnect(_,connectionID,E_OK)).Times(0);
ASSERT_EQ(E_NON_EXISTENT, pRoutingSender.asyncConnect(handle,connectionID,sourceID,sinkID,format));
@@ -429,7 +429,7 @@ TEST_F(testRoutingInterfaceAsync,connect)
am_connectionID_t connectionID = 4;
am_sourceID_t sourceID = 2;
am_sinkID_t sinkID = 1;
- am_ConnectionFormat_e format = CF_ANALOG;
+ am_ConnectionFormat_e format = CF_GENIVI_ANALOG;
EXPECT_CALL(pReceiveInterface, ackConnect(_,connectionID,E_OK));
ASSERT_EQ(E_OK, pRoutingSender.asyncConnect(handle,connectionID,sourceID,sinkID,format));
diff --git a/PluginRoutingInterfaceDbus/CMakeLists.txt b/PluginRoutingInterfaceDbus/CMakeLists.txt
index 4269e21..5bf20aa 100644
--- a/PluginRoutingInterfaceDbus/CMakeLists.txt
+++ b/PluginRoutingInterfaceDbus/CMakeLists.txt
@@ -7,8 +7,8 @@ set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/RoutingPlugin)
set(INCLUDES_FOLDER "include")
FILE(READ "${AUDIO_INCLUDES_FOLDER}/routing/RoutingSendInterface.h" VERSION_BUFFER LIMIT 6000)
-STRING(REGEX MATCH "RoutingSendVersion*.[^0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
-STRING(REGEX REPLACE "[^0-9]" "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
+STRING(REGEX MATCH "RoutingSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER})
+STRING(REGEX REPLACE "RoutingSendVersion*." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING})
MESSAGE(STATUS "Building against routing interface version ${LIB_INTERFACE_VERSION}")
FIND_PACKAGE(DBUS REQUIRED)
diff --git a/cmake/DoxyFile.in b/cmake/DoxyFile.in
index a885866..8c0df15 100644
--- a/cmake/DoxyFile.in
+++ b/cmake/DoxyFile.in
@@ -31,7 +31,7 @@ PROJECT_NAME = AudioManager
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 0.1
+PROJECT_NUMBER = 0.9.30
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -232,7 +232,7 @@ EXTENSION_MAPPING =
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
# to include (a tag file for) the STL sources as input, then you should
# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# definitions whose arguments contain STL classes (e.g. func(std::string) v.s.
# func(std::string) {}). This also make the inheritance and collaboration
# diagrams that involve STL classes more complete and accurate.
diff --git a/cmake/add_package_dependencies.sh b/cmake/add_package_dependencies.sh
index a0c71e5..453a0a2 100755
--- a/cmake/add_package_dependencies.sh
+++ b/cmake/add_package_dependencies.sh
@@ -1,4 +1,27 @@
#!/bin/bash
+#GENIVI AUDIOMANAGER
+#
+#Copyright (C) 2011, BMW AG
+#
+#Datum 20.2.2012
+#author Christian Mueller (christian.ei.mueller@bmw.de)
+#
+#***********************************************************************************************************
+#LICENSE
+#***********************************************************************************************************
+#
+#GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+#Copyright (C) 2011, BMW AG – Christian Mueller Christian.ei.mueller@bmw.de
+#
+#This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+#You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+#Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+#Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+#As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+#Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+#
+#
PACKAGE_NAME=$1
PACKAGE_NAME_PATH=$2/$PACKAGE_NAME
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
index 1b17154..3e41575 100755
--- a/cmake/cmake_uninstall.cmake.in
+++ b/cmake/cmake_uninstall.cmake.in
@@ -1,3 +1,26 @@
+#GENIVI AUDIOMANAGER
+#
+#Copyright (C) 2011, BMW AG
+#
+#Datum 20.2.2012
+#author Christian Mueller (christian.ei.mueller@bmw.de)
+#
+#***********************************************************************************************************
+#LICENSE
+#***********************************************************************************************************
+#
+#GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
+#Copyright (C) 2011, BMW AG – Christian Mueller Christian.ei.mueller@bmw.de
+#
+#This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
+#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
+#You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
+#Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
+#Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
+#As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
+#Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
+#
+
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
diff --git a/includes/audiomanagertypes.h b/includes/audiomanagertypes.h
index e0a6c21..f1bd542 100644
--- a/includes/audiomanagertypes.h
+++ b/includes/audiomanagertypes.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,8 +22,8 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_2D7F1C82_8717_47ce_B755_51DDED15BC18__INCLUDED_)
-#define EA_2D7F1C82_8717_47ce_B755_51DDED15BC18__INCLUDED_
+#if !defined(EA_6D2D8AED_B7CC_424e_8C3F_EB10C5EBDC21__INCLUDED_)
+#define EA_6D2D8AED_B7CC_424e_8C3F_EB10C5EBDC21__INCLUDED_
#include <stdint.h>
#include "projecttypes.h"
@@ -37,10 +37,9 @@ namespace am {
* This is the domain type. Each domain has a unique identifier.
*
* \mainpage
- * \image html "Bild1.png"
- * Copyright Copyright (C) 2011, BMW AG
+ * Copyright Copyright (C) 2011,2012 BMW AG
*
- * \date 22.06.2011
+ * \date 21.2.2012
*
* \author Christian Mueller (christian.ei.mueller@bmw.de)
*
@@ -95,6 +94,14 @@ namespace am {
*
* This interface is used by the AudioManager to control the RoutingAdapters and communicate with them. The communication is based on two interfaces, one is provided by the AudioManager for communication from the adapters towards the AudioManager and one for the opposite direction. The design of the AudioManager shall be done in such a way that several Interfaces are supported at the same time via a plug-in mechanism. The plug-ins are (either statically - due to performance reasons or dynamically) loaded at start-up. Due to this architecture, the number of buses and routing adapters that are supported are as low as possible for each system and as high as needed without the need of changing the AudioManager itself. The AudioManager expects a bus-like structure behind each plug-in, so that a plug-in can implement a bus interface and proxy the messages to the routing adapters - the AudioManager will be capable of addressing more than one adapter one each plug-in. The interface shall is asynchronous for all timely critical commands.
*
+ * \section interfaces Interfaces
+ * the calls to the interfaces of the AudioManagerDaemon are generally not threadsafe !
+ * Nevertheless if such calls from a different thread-context are needed, you may use the defered-call pattern that utilizes the mainloop (Sockethandler) to get self called in the next loop of the mainloop. For more infomation please check the audiomanger wiki page.
+ *
+ * \section deferred The deferred call pattern
+ * Create a unix pipe or socket and add the file descriptor to the Sockethandler. Whenever a call needs to be deferred you can store the necessary information protected by a mutex in a queue and write to the socket or pipe. This will lead to a callback in the next loop of the mainloop - when getting called by the callback that was registered at the Sockethandler execute your call with the information stored away.
+ *
+ *
* \section sources_sinks Sources & Sinks
* \subsection Visibility
* Sources and sinks can either be visible or not. If they are visible, the HMI is informed about their existence and can use them. \n
@@ -122,303 +129,372 @@ namespace am {
* It is the job of the AudioManager to retrieve all latency timing information from each connection, to aggregate this information and provide a latency information on a per MainConnection Basis. It is not the task of the AudioManager to actually delay or speed up video or audio signals to achieve a lipsync. The actual correction shall be done in the videoplayer with the information provided by the AudioManager.
* The time information is always reported by the routingadaptors for each connection. Delays that are introduced in a sink or a gateway are counting for the connection that connects to this sink or gateway.\n
* After the buildup of a connection the first timing information needs to be sent within 5 seconds, the timing information from the routing adaptors need to be sent via 4 seconds. If the latency for a connection is variable and changes over lifetime of the connection, the routing adaptors shall resend the value and the audiomanger will correct the over all latency.\n
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:00 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_domainID_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:00 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_sourceID_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:00 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_sinkID_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:00 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_gatewayID_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:00 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_crossfaderID_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:00 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_connectionID_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:00 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_mainConnectionID_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_speed_t;
/**
* The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and maximum can be limited by actual project.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef int16_t am_volume_t;
/**
* This is the volume presented on the command interface. It is in the duty of the Controller to change the volumes given here into meaningful values on the routing interface.
* The range of this type is customer specific.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef int16_t am_mainVolume_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_sourceClass_t;
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_sinkClass_t;
/**
* time in ms!
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef uint16_t am_time_t;
/**
* offset time that is introduced in milli seconds.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
typedef int16_t am_timeSync_t;
/**
* with the help of this enum, sinks and sources can report their availability state
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_Availablility_e
{
- A_AVAILABLE = 0,
- A_UNAVAILABLE = 1,
- A_UNKNOWN = 2,
- A_MAX = 3,
- A_MIN = A_AVAILABLE
+ /**
+ * default
+ */
+ A_UNKNOWN = 0,
+ /**
+ * The source / sink is available
+ */
+ A_AVAILABLE = 1,
+ /**
+ * the source / sink is not available
+ */
+ A_UNAVAILABLE = 2,
+ A_MAX
};
/**
* represents the connection state
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_ConnectionState_e
{
+ CS_UNKNOWN = 0,
/**
* This means the connection is just building up
*/
- CS_CONNECTING = 0,
+ CS_CONNECTING = 1,
/**
* the connection is ready to be used
*/
- CS_CONNECTED = 1,
+ CS_CONNECTED = 2,
/**
* the connection is in the course to be knocked down
*/
- CS_DISCONNECTING = 2,
+ CS_DISCONNECTING = 3,
/**
* only relevant for connectionStatechanged. Is send after the connection was removed
*/
- CS_DISCONNECTED = 3,
+ CS_DISCONNECTED = 4,
/**
* this means the connection is still build up but unused at the moment
*/
- CS_SUSPENDED = 4,
- CS_MAX = 5,
- CS_MIN = CS_CONNECTING
+ CS_SUSPENDED = 5,
+ CS_MAX
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_DomainState_e
{
- DS_CONTROLLED = 0,
+ /**
+ * default
+ */
+ DS_UNKNOWN = 0,
+ /**
+ * the domain is controlled by the daemon
+ */
+ DS_CONTROLLED = 1,
+ /**
+ * the domain is independent starting up
+ */
DS_INDEPENDENT_STARTUP = 1,
+ /**
+ * the domain is independent running down
+ */
DS_INDEPENDENT_RUNDOWN = 2,
- DS_MAX = 3,
- DS_MIN = DS_CONTROLLED
+ DS_MAX
};
/**
* This enum characterizes the data of the EarlyData_t
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_EarlyDataType_e
{
- ED_SOURCE_VOLUME = 0,
- ED_SINK_VOLUME = 1,
- ED_SOURCE_PROPERTY = 2,
- ED_SINK_PROPERTY = 3,
- ED_MAX = 4,
- ES_MIN = ED_SOURCE_VOLUME
+ /**
+ * default
+ */
+ ES_UNKNOWN = 0,
+ /**
+ * the source volume
+ */
+ ED_SOURCE_VOLUME = 1,
+ /**
+ * the sink volume
+ */
+ ED_SINK_VOLUME = 2,
+ /**
+ * a source property
+ */
+ ED_SOURCE_PROPERTY = 3,
+ /**
+ * a sink property
+ */
+ ED_SINK_PROPERTY = 4,
+ ED_MAX
};
/**
* the errors of the audiomanager. All possible errors are in here. This enum is used widely as return parameter.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_Error_e
{
- E_OK = 0,
- E_UNKNOWN = 1,
+ /**
+ * default
+ */
+ E_UNKNOWN = 0,
+ /**
+ * no error - positive reply
+ */
+ E_OK = 1,
+ /**
+ * value out of range
+ */
E_OUT_OF_RANGE = 2,
+ /**
+ * not used
+ */
E_NOT_USED = 3,
+ /**
+ * a database error occurred
+ */
E_DATABASE_ERROR = 4,
+ /**
+ * the desired object already exists
+ */
E_ALREADY_EXISTS = 5,
+ /**
+ * there is no change
+ */
E_NO_CHANGE = 6,
+ /**
+ * the desired action is not possible
+ */
E_NOT_POSSIBLE = 7,
+ /**
+ * the desired object is non existent
+ */
E_NON_EXISTENT = 8,
+ /**
+ * the asynchronous action was aborted
+ */
E_ABORTED = 9,
/**
* This error is returned in case a connect is issued with a connectionFormat that cannot be selected for the connection. This could be either due to the capabilities of a source or a sink or gateway compatibilities for example
*/
E_WRONG_FORMAT = 10,
- E_MAX = 11,
- E_MIN = E_OK
+ E_MAX
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_MuteState_e
{
- MS_MUTED = 0,
- MS_UNMUTED = 1,
- MS_MAX = 2,
- MS_MIN = MS_MUTED
+ /**
+ * default
+ */
+ MS_UNKNOWN = 0,
+ /**
+ * the source / sink is muted
+ */
+ MS_MUTED = 1,
+ /**
+ * the source / sink is unmuted
+ */
+ MS_UNMUTED = 2,
+ MS_MAX
};
/**
* The source state reflects the state of the source
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_SourceState_e
{
+ SS_UNKNNOWN = 0,
/**
* The source can be activly heared
*/
- SS_ON = 0,
+ SS_ON = 1,
/**
* The source cannot be heared
*/
- SS_OFF = 1,
+ SS_OFF = 2,
/**
* The source is paused. Meaning it cannot be heared but should be prepared to play again soon.
*/
- SS_PAUSED = 2,
- SS_MAX = 3,
- SS_MIN = SS_ON
+ SS_PAUSED = 3,
+ SS_MAX
};
/**
* This enumeration is used to define the type of the action that is correlated to a handle.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_Handle_e
{
- H_CONNECT = 0,
- H_DISCONNECT = 1,
- H_SETSOURCESTATE = 2,
- H_SETSINKVOLUME = 3,
- H_SETSOURCEVOLUME = 4,
- H_SETSINKSOUNDPROPERTY = 5,
- H_SETSOURCESOUNDPROPERTY = 6,
- H_SETSINKSOUNDPROPERTIES = 7,
- H_SETSOURCESOUNDPROPERTIES = 8,
- H_CROSSFADE = 9,
- H_MAX = 10,
- H_MIN = H_CONNECT
+ H_UNKNOWN = 0,
+ H_CONNECT = 1,
+ H_DISCONNECT = 2,
+ H_SETSOURCESTATE = 3,
+ H_SETSINKVOLUME = 4,
+ H_SETSOURCEVOLUME = 5,
+ H_SETSINKSOUNDPROPERTY = 6,
+ H_SETSOURCESOUNDPROPERTY = 7,
+ H_SETSINKSOUNDPROPERTIES = 8,
+ H_SETSOURCESOUNDPROPERTIES = 9,
+ H_CROSSFADE = 10,
+ H_MAX
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:31 PM
*/
enum am_InterruptState_e
{
- IS_OFF = 0,
- IS_INTERRUPTED = 1,
- IS_MAX = 2,
- IS_MIN = IS_OFF
+ /**
+ * default
+ */
+ IS_UNKNOWN = 0,
+ /**
+ * the interrupt state is off - no interrupt
+ */
+ IS_OFF = 1,
+ /**
+ * the interrupt state is interrupted - the interrupt is active
+ */
+ IS_INTERRUPTED = 2,
+ IS_MAX
};
/**
* describes the active sink of a crossfader.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
enum am_HotSink_e
{
- HS_SINKA = 0,
- HS_SINKB = 1,
- HS_INTERMEDIATE = 2,
- HS_MAX = 3,
- HS_MIN = HS_SINKA
+ /**
+ * default
+ */
+ HS_UNKNOWN = 0,
+ /**
+ * sinkA is active
+ */
+ HS_SINKA = 1,
+ /**
+ * sinkB is active
+ */
+ HS_SINKB = 2,
+ /**
+ * the crossfader is in the transition state
+ */
+ HS_INTERMEDIATE = 3,
+ HS_MAX
};
/**
* this describes the availability of a sink or a source together with the latest change
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
struct am_Availability_s
{
@@ -436,9 +512,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
struct am_ClassProperty_s
{
@@ -450,9 +525,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
struct am_Crossfader_s
{
@@ -468,9 +542,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
struct am_Gateway_s
{
@@ -509,9 +582,8 @@ namespace am {
/**
* This represents one "hopp" in a route
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:01 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
struct am_RoutingElement_s
{
@@ -525,9 +597,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:02 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
struct am_Route_s
{
@@ -540,9 +611,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:02 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:32 PM
*/
struct am_SoundProperty_s
{
@@ -554,9 +624,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:02 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:33 PM
*/
struct am_SystemProperty_s
{
@@ -574,9 +643,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:02 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:33 PM
*/
struct am_SinkClass_s
{
@@ -589,9 +657,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:02 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:33 PM
*/
struct am_SourceClass_s
{
@@ -608,9 +675,8 @@ namespace am {
/**
* this type holds all information of sources relevant to the HMI
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:02 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:33 PM
*/
struct am_SourceType_s
{
@@ -625,9 +691,8 @@ namespace am {
/**
* this type holds all information of sinks relevant to the HMI
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:02 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:33 PM
*/
struct am_SinkType_s
{
@@ -643,9 +708,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:03 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:33 PM
*/
struct am_Handle_s
{
@@ -657,9 +721,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:03 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:34 PM
*/
struct am_MainSoundProperty_s
{
@@ -672,9 +735,8 @@ namespace am {
/**
* this type holds all information of connections relevant to the HMI
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:03 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:34 PM
*/
struct am_MainConnectionType_s
{
@@ -689,9 +751,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:03 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:34 PM
*/
struct am_MainConnection_s
{
@@ -713,9 +774,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:03 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:34 PM
*/
struct am_Sink_s
{
@@ -737,9 +797,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:03 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:34 PM
*/
struct am_Source_s
{
@@ -770,9 +829,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:03 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:34 PM
*/
struct am_Domain_s
{
@@ -789,9 +847,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:04 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:34 PM
*/
struct am_Connection_s
{
@@ -809,9 +866,8 @@ namespace am {
* data type depends of am_EarlyDataType_e:
* volume_t in case of ED_SOURCE_VOLUME, ED_SINK_VOLUME
* soundProperty_t in case of ED_SOURCE_PROPERTY, ED_SINK_PROPERTY
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:04 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
union am_EarlyData_u
{
@@ -826,9 +882,8 @@ namespace am {
* data type depends of am_EarlyDataType_e:
* sourceID in case of ED_SOURCE_VOLUME, ED_SOURCE_PROPERTY
* sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:04 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
union am_DataType_u
{
@@ -840,9 +895,8 @@ namespace am {
};
/**
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:04 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
struct am_EarlyData_s
{
@@ -854,4 +908,4 @@ namespace am {
};
}
-#endif // !defined(EA_2D7F1C82_8717_47ce_B755_51DDED15BC18__INCLUDED_)
+#endif // !defined(EA_6D2D8AED_B7CC_424e_8C3F_EB10C5EBDC21__INCLUDED_)
diff --git a/includes/command/CommandReceiveInterface.h b/includes/command/CommandReceiveInterface.h
index 257d5d9..b07ef2e 100644
--- a/includes/command/CommandReceiveInterface.h
+++ b/includes/command/CommandReceiveInterface.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,8 +22,8 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_C6A85AF3_95A7_4c37_90ED_CA847BA7F31D__INCLUDED_)
-#define EA_C6A85AF3_95A7_4c37_90ED_CA847BA7F31D__INCLUDED_
+#if !defined(EA_241FAB0A_6108_4f68_8AAD_F2218B1C41D9__INCLUDED_)
+#define EA_241FAB0A_6108_4f68_8AAD_F2218B1C41D9__INCLUDED_
#include <vector>
#include <string>
@@ -34,13 +34,16 @@ class SocketHandler;
}
-#define CommandReceiveVersion 1
+#define CommandReceiveVersion 1.0
namespace am {
/**
- * The interface towards the Controlling Instance (e.g HMI). It handles the communication towards the HMI and other system components who need to interact with the audiomanagement.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:04 PM
+ * The interface towards the Controlling Instance (e.g HMI). It handles the communication towards the HMI and other system components who need to interact with the audiomanagement.
+ * There are two rules that have to be kept in mind when implementing against this interface:
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!!
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
class CommandReceiveInterface
{
@@ -204,4 +207,4 @@ namespace am {
};
}
-#endif // !defined(EA_C6A85AF3_95A7_4c37_90ED_CA847BA7F31D__INCLUDED_)
+#endif // !defined(EA_241FAB0A_6108_4f68_8AAD_F2218B1C41D9__INCLUDED_)
diff --git a/includes/command/CommandSendInterface.h b/includes/command/CommandSendInterface.h
index bd970d0..f8c47be 100644
--- a/includes/command/CommandSendInterface.h
+++ b/includes/command/CommandSendInterface.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,8 +22,8 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_1EBB5273_A222_43b8_B7C9_435405DF9AA2__INCLUDED_)
-#define EA_1EBB5273_A222_43b8_B7C9_435405DF9AA2__INCLUDED_
+#if !defined(EA_A230EB7E_1719_4470_BCC6_12B0606A80E6__INCLUDED_)
+#define EA_A230EB7E_1719_4470_BCC6_12B0606A80E6__INCLUDED_
#include <vector>
#include <string>
@@ -35,13 +35,16 @@ class CommandReceiveInterface;
#include "CommandReceiveInterface.h"
-#define CommandSendVersion 1
+#define CommandSendVersion 1.0
namespace am {
/**
- * This interface handles all communication from the AudioManagerDaemon towards the system. It is designed in such a way that only callbacks with no return types are implemented. So when the CommandInterfacePlugins are designed in such a way that they broadcast signals to any node who is interested in the particular information (like signals on Dbus for example), more information can be retrieved via the CommandReceiveInterface.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:05 PM
+ * This interface handles all communication from the AudioManagerDaemon towards the system. It is designed in such a way that only callbacks with no return types are implemented. So when the CommandInterfacePlugins are designed in such a way that they broadcast signals to any node who is interested in the particular information (like signals on Dbus for example), more information can be retrieved via the CommandReceiveInterface.
+ * There are two rules that have to be kept in mind when implementing against this interface:
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!!
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:36 PM
*/
class CommandSendInterface
{
@@ -165,4 +168,4 @@ namespace am {
};
}
-#endif // !defined(EA_1EBB5273_A222_43b8_B7C9_435405DF9AA2__INCLUDED_)
+#endif // !defined(EA_A230EB7E_1719_4470_BCC6_12B0606A80E6__INCLUDED_)
diff --git a/includes/config.h b/includes/config.h
deleted file mode 100644
index a055ddd..0000000
--- a/includes/config.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _CONFIG_H
-#define _CONFIG_H
-
-#define DAEMONVERSION "ver-0.0.9-14-g2ddacca"
-
-#define WITH_DBUS_WRAPPER
-#define WITH_SOCKETHANDLER_LOOP
-/* #undef WITH_SIMPLEDBUS_LOOP */
-#define WITH_PPOLL
-#define WITH_TELNET
-#define GLIB_DBUS_TYPES_TOLERANT
-
-#define DEFAULT_PLUGIN_COMMAND_DIR "/home/christian/workspace/AudioManager/bin/plugins/command"
-#define DEFAULT_PLUGIN_ROUTING_DIR "/home/christian/workspace/AudioManager/bin/plugins/routing"
-#define CONTROLLER_PLUGIN "/home/christian/workspace/AudioManager/bin/plugins/control/libPluginControlInterface.so"
-
-#define DEFAULT_TELNETPORT 6060
-#define MAX_TELNETCONNECTIONS 3
-
-#define DBUS_SERVICE_PREFIX "org.genivi.audiomanager"
-#define DBUS_SERVICE_OBJECT_PATH "/org/genivi/audiomanager"
-
-#define INTROSPECTION_COMMAND_XML_FILE "/home/christian/workspace/AudioManager/includes/dbus/CommandInterface.xml"
-
-#endif /* _CONFIG_H */
diff --git a/includes/control/ControlReceiveInterface.h b/includes/control/ControlReceiveInterface.h
index d01327b..a3ec949 100644
--- a/includes/control/ControlReceiveInterface.h
+++ b/includes/control/ControlReceiveInterface.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,8 +22,8 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_C0D10ABE_48CA_4a18_9932_CB970D9C3723__INCLUDED_)
-#define EA_C0D10ABE_48CA_4a18_9932_CB970D9C3723__INCLUDED_
+#if !defined(EA_E6BEDBFE_083F_4174_8B46_FDDAEE627EB3__INCLUDED_)
+#define EA_E6BEDBFE_083F_4174_8B46_FDDAEE627EB3__INCLUDED_
#include <vector>
#include <string>
@@ -33,13 +33,16 @@ class SocketHandler;
}
-#define ControlReceiveVersion 1
+#define ControlReceiveVersion 1.0
namespace am {
/**
- * This interface gives access to all important functions of the audiomanager that are used by the AudioManagerController to control the system.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:05 PM
+ * This interface gives access to all important functions of the audiomanager that are used by the AudioManagerController to control the system.
+ * There are two rules that have to be kept in mind when implementing against this interface:
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!!
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:36 PM
*/
class ControlReceiveInterface
{
@@ -577,10 +580,18 @@ namespace am {
*/
virtual void setCommandReady() =0;
/**
+ * sets the command interface into the rundown state
+ */
+ virtual void setCommandRundown() =0;
+ /**
* sets the routinginterface to ready.
*/
virtual void setRoutingReady() =0;
/**
+ * sets the routinginterface to the rundown state
+ */
+ virtual void setRoutingRundown() =0;
+ /**
* This function returns the pointer to the socketHandler. This can be used to integrate socket-based activites like communication with the mainloop of the AudioManager.
* returns E_OK if pointer is valid, E_UNKNOWN in case AudioManager was compiled without socketHandler support,
*
@@ -594,4 +605,4 @@ namespace am {
};
}
-#endif // !defined(EA_C0D10ABE_48CA_4a18_9932_CB970D9C3723__INCLUDED_)
+#endif // !defined(EA_E6BEDBFE_083F_4174_8B46_FDDAEE627EB3__INCLUDED_)
diff --git a/includes/control/ControlSendInterface.h b/includes/control/ControlSendInterface.h
index 2d49593..79aeb71 100644
--- a/includes/control/ControlSendInterface.h
+++ b/includes/control/ControlSendInterface.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,8 +22,8 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_F931365D_53A0_4830_8B3E_29C95C767ADC__INCLUDED_)
-#define EA_F931365D_53A0_4830_8B3E_29C95C767ADC__INCLUDED_
+#if !defined(EA_71CB967F_6C92_467f_99BE_B9F5210165C2__INCLUDED_)
+#define EA_71CB967F_6C92_467f_99BE_B9F5210165C2__INCLUDED_
#include <vector>
#include <string>
@@ -33,14 +33,17 @@ namespace am {
class ControlReceiveInterface;
}
-#define ControlSendVersion 1
+#define ControlSendVersion 1.0
namespace am {
/**
* This interface is presented by the AudioManager controller.
- * All the hooks represent system events that need to be handled. The callback functions are used to handle for example answers to function calls on the AudioManagerCoreInterface.
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:06 PM
+ * All the hooks represent system events that need to be handled. The callback functions are used to handle for example answers to function calls on the AudioManagerCoreInterface.
+ * There are two rules that have to be kept in mind when implementing against this interface:
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!!
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:37 PM
*/
class ControlSendInterface
{
@@ -355,10 +358,11 @@ namespace am {
*
* @param sourceID sourceID of source that shall be connected
* @param sinkID sinkID of sink that shall be connected
+ * @param listRoute This route is the one the priorized connectionFormats is for.
* @param listPossibleConnectionFormats list of possible connectionformats
* @param listPrioConnectionFormats the list return with prioos from the controller. Best choice on first position.
*/
- virtual am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats) =0;
+ virtual am_Error_e 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) =0;
/**
* This function returns the version of the interface
* returns E_OK, E_UNKOWN if version is unknown.
@@ -367,4 +371,4 @@ namespace am {
};
}
-#endif // !defined(EA_F931365D_53A0_4830_8B3E_29C95C767ADC__INCLUDED_)
+#endif // !defined(EA_71CB967F_6C92_467f_99BE_B9F5210165C2__INCLUDED_)
diff --git a/includes/projecttypes.h b/includes/projecttypes.h
index 2f84f4c..dd55451 100644
--- a/includes/projecttypes.h
+++ b/includes/projecttypes.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,132 +22,187 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_9A582C38_7B95_4ebf_B316_F765C90F29C5__INCLUDED_)
-#define EA_9A582C38_7B95_4ebf_B316_F765C90F29C5__INCLUDED_
+#if !defined(EA_8A329625_1F6F_478f_A704_D5359425FB4E__INCLUDED_)
+#define EA_8A329625_1F6F_478f_A704_D5359425FB4E__INCLUDED_
namespace am {
/**
* This enum classifies the format in which data is exchanged within a connection. The enum itself is project specific although there are some Genivi standard formats defined.
- * @author christian
- * @version 1.0
- * @created 26-Jan-2012 6:00:52 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
enum am_ConnectionFormat_e
{
- CF_STEREO = 0,
- CF_MONO = 1,
- CF_ANALOG = 2,
- CF_MAX = 3,
- CF_MIN = CF_STEREO
+ /**
+ * default
+ */
+ CF_UNKNOWN = 0,
+ /**
+ * plain mono
+ */
+ CF_GENIVI_MONO = 1,
+ /**
+ * stereo connection
+ */
+ CF_GENIVI_STEREO = 2,
+ /**
+ * analog connection
+ */
+ CF_GENIVI_ANALOG = 3,
+ /**
+ * automatic connection.
+ */
+ CF_GENIVI_AUTO = 4,
+ CF_MAX
};
/**
* This enum gives the information about reason for reason for Source/Sink change
- * @author christian
- * @version 1.0
- * @created 26-Jan-2012 6:00:52 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
enum am_AvailabilityReason_e
{
- AR_NEWMEDIA = 0,
- AR_SAMEMEDIA = 1,
- AR_NOMEDIA = 2,
- AR_UNKNOWN = 3,
- AR_TEMPERATURE = 4,
- AR_VOLTAGE = 5,
- AR_MAX = 6,
- AR_MIN = AR_NEWMEDIA
+ /**
+ * default
+ */
+ AR_UNKNOWN = 0,
+ /**
+ * the availability changed because an new media was entered
+ */
+ AR_GENIVI_NEWMEDIA = 1,
+ /**
+ * the availability changed because the same media was entered
+ */
+ AR_GENIVI_SAMEMEDIA = 2,
+ /**
+ * the availability changed because there is no media
+ */
+ AR_GENIVI_NOMEDIA = 3,
+ /**
+ * the availability changed because of a temperature event
+ */
+ AR_GENIVI_TEMPERATURE = 4,
+ /**
+ * the availability changed because of a voltage event
+ */
+ AR_GENIVI_VOLTAGE = 5,
+ /**
+ * the availability changed because of fatal errors reading or accessing media
+ */
+ AR_GENIVI_ERRORMEDIA = 6,
+ AR_MAX
};
/**
* product specific identifier of property
- * @author christian
- * @version 1.0
- * @created 26-Jan-2012 6:00:52 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
enum am_ClassProperty_e
{
/**
+ * default
+ */
+ CP_UNKNOWN = 0,
+ /**
* defines the source type of a source. Project specific, could be for example differentiation between interrupt source and main source.
*/
- CP_SOURCE_TYPE = 0,
+ CP_GENIVI_SOURCE_TYPE = 1,
/**
* defines the SINK_TYPE. Project specific
*/
- CP_SINK_TYPE = 1,
- CP_MAX = 2,
- CP_MIN = CP_SOURCE_TYPE
+ CP_GENIVI_SINK_TYPE = 2,
+ CP_MAX
};
/**
* The given ramp types here are just a possiblity. for products, different ramp types can be defined here.
* It is in the responsibility of the product to make sure that the routing plugins are aware of the ramp types used.
- * @author christian
- * @version 1.0
- * @created 26-Jan-2012 6:00:52 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
enum am_RampType_e
{
+ RAMP_UNKNOWN = 0,
/**
* this ramp type triggers a direct setting of the value without a ramp
*/
- RAMP_DIRECT = 0,
+ RAMP_GENIVI_DIRECT = 1,
/**
* This ramp type will set the volume as fast as possible.
*/
- RAMP_NO_BLOB = 1,
- RAMP_LOG = 2,
- RAMP_STRAIGHT = 3,
- RAMP_MAX = 4,
- RAMP_MIN = RAMP_DIRECT
+ RAMP_GENIVI_NO_PLOB = 2,
+ RAMP_GENIVI_EXP_INV = 3,
+ RAMP_GENIVI_LINEAR = 4,
+ RAMP_GENIVI_EXP = 5,
+ RAMP_MAX
};
/**
* sound properties. Within genivi only the standard properties are defined, for products these need to be extended.
- * @author christian
- * @version 1.0
- * @created 26-Jan-2012 6:00:52 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
enum am_SoundPropertyType_e
{
- SP_TREBLE = 0,
- SP_MID = 1,
- SP_BASS = 2,
- SP_MAX = 3,
- SP_MIN = SP_TREBLE
+ /**
+ * default
+ */
+ SP_UNKNOWN = 0,
+ /**
+ * example treble value min =-10 max =10
+ */
+ SP_EXAMPLE_TREBLE = 1,
+ /**
+ * example mid value min =-10 max =10
+ */
+ SP_EXAMPLE_MID = 2,
+ /**
+ * example bass value min =-10 max =10
+ */
+ SP_EXAMPLE_BASS = 3,
+ SP_MAX
};
/**
* Here are all SoundProperties that can be set via the CommandInterface. Product specific
- * @author christian
- * @version 1.0
- * @created 26-Jan-2012 6:00:52 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
enum am_MainSoundPropertyType_e
{
/**
- * gives the navigation offset in percent
+ * default
+ */
+ MSP_UNKNOWN = 0,
+ /**
+ * example value between -10 and +10
+ */
+ MSP_EXAMPLE_TREBLE = 1,
+ /**
+ * example value between -10 and +10
+ */
+ MSP_EXAMPLE_MID = 2,
+ /**
+ * example value between -10 and +10
*/
- MSP_NAVIGATION_OFFSET = 0,
- MSP_TEST = 1,
- MSP_BASS = 2,
- MSP_TREBLE = 3,
- MSP_MID = 4,
- MSP_MAX = 5,
- MSP_MIN = MSP_NAVIGATION_OFFSET
+ MSP_EXAMPLE_BASS = 3,
+ MSP_MAX
};
/**
* describes the different system properties. Project specific
- * @author christian
- * @version 1.0
- * @created 26-Jan-2012 6:00:52 PM
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:35 PM
*/
enum am_SystemPropertyType_e
{
- SYP_TEST = 0,
- SYP_MAX = 1,
- SYP_MIN = SYP_TEST
+ /**
+ * default
+ */
+ SYP_UNKNOWN = 0,
+ SYP_MAX
};
}
-#endif // !defined(EA_9A582C38_7B95_4ebf_B316_F765C90F29C5__INCLUDED_)
+#endif // !defined(EA_8A329625_1F6F_478f_A704_D5359425FB4E__INCLUDED_)
diff --git a/includes/routing/RoutingReceiveInterface.h b/includes/routing/RoutingReceiveInterface.h
index 00e4666..f9df264 100644
--- a/includes/routing/RoutingReceiveInterface.h
+++ b/includes/routing/RoutingReceiveInterface.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,8 +22,8 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_C1FDE688_5CB0_42b2_B2CC_C407D50C2D87__INCLUDED_)
-#define EA_C1FDE688_5CB0_42b2_B2CC_C407D50C2D87__INCLUDED_
+#if !defined(EA_3F1137F5_C65B_42b9_A805_A65B61A04AA1__INCLUDED_)
+#define EA_3F1137F5_C65B_42b9_A805_A65B61A04AA1__INCLUDED_
#include <vector>
#include <string>
@@ -35,13 +35,16 @@ class SocketHandler;
}
-#define RoutingReceiveVersion 1
+#define RoutingReceiveVersion 1.0
namespace am {
/**
- * Routing Receive sendInterface description. This class implements everything from RoutingAdapter -> Audiomanager
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:06 PM
+ * Routing Receive sendInterface description. This class implements everything from RoutingAdapter -> Audiomanager
+ * There are two rules that have to be kept in mind when implementing against this interface:
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!!
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:37 PM
*/
class RoutingReceiveInterface
{
@@ -332,4 +335,4 @@ namespace am {
};
}
-#endif // !defined(EA_C1FDE688_5CB0_42b2_B2CC_C407D50C2D87__INCLUDED_)
+#endif // !defined(EA_3F1137F5_C65B_42b9_A805_A65B61A04AA1__INCLUDED_)
diff --git a/includes/routing/RoutingSendInterface.h b/includes/routing/RoutingSendInterface.h
index 35c07cd..b126c56 100644
--- a/includes/routing/RoutingSendInterface.h
+++ b/includes/routing/RoutingSendInterface.h
@@ -10,7 +10,7 @@
*
* \section License
* GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-* Copyright (C) 2011, BMW AG Christian M?ller Christian.ei.mueller@bmw.de
+* Copyright (C) 2011, BMW AG Christian Mueller Christian.ei.mueller@bmw.de
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
@@ -22,8 +22,8 @@
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_E1ED14D4_6A57_4661_8587_FA302E2A9951__INCLUDED_)
-#define EA_E1ED14D4_6A57_4661_8587_FA302E2A9951__INCLUDED_
+#if !defined(EA_E6EBF9D0_B241_44f2_AABB_8DAE02D74E88__INCLUDED_)
+#define EA_E6EBF9D0_B241_44f2_AABB_8DAE02D74E88__INCLUDED_
#include <vector>
#include <string>
@@ -35,13 +35,16 @@ class RoutingReceiveInterface;
#include "RoutingReceiveInterface.h"
-#define RoutingSendVersion 1
+#define RoutingSendVersion 1.0
namespace am {
/**
- * This class implements everything from Audiomanager -> RoutingAdapter
- * @author christian
- * @version 1.0
- * @created 10-Feb-2012 1:31:06 PM
+ * This class implements everything from Audiomanager -> RoutingAdapter
+ * There are two rules that have to be kept in mind when implementing against this interface:
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!!
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can implement thread safe by using the deferred-call pattern described on the wiki which also helps to implement calls that are forbidden.
+ * @author Christian Mueller
+ * @created 21-Feb-2012 4:58:37 PM
*/
class RoutingSendInterface
{
@@ -196,4 +199,4 @@ namespace am {
};
}
-#endif // !defined(EA_E1ED14D4_6A57_4661_8587_FA302E2A9951__INCLUDED_)
+#endif // !defined(EA_E6EBF9D0_B241_44f2_AABB_8DAE02D74E88__INCLUDED_)
diff --git a/lgpl-2.1.txt b/lgpl-2.1.txt
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/lgpl-2.1.txt
@@ -0,0 +1,502 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!