summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src/CAmControlSender.cpp
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-03-05 22:49:12 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2012-03-05 22:49:12 +0100
commit8ced1dced5ae1fbc7356ec65c03e6e8201216155 (patch)
treeb4b19aac085948040d775e284455a0041b17e022 /AudioManagerDaemon/src/CAmControlSender.cpp
parent1b85f2410d1d644ff00284e78b1eeff6cfad2fc4 (diff)
downloadaudiomanager-8ced1dced5ae1fbc7356ec65c03e6e8201216155.tar.gz
* updated license headers
* updated documentation
Diffstat (limited to 'AudioManagerDaemon/src/CAmControlSender.cpp')
-rw-r--r--AudioManagerDaemon/src/CAmControlSender.cpp81
1 files changed, 40 insertions, 41 deletions
diff --git a/AudioManagerDaemon/src/CAmControlSender.cpp b/AudioManagerDaemon/src/CAmControlSender.cpp
index cc26c90..39c29a7 100644
--- a/AudioManagerDaemon/src/CAmControlSender.cpp
+++ b/AudioManagerDaemon/src/CAmControlSender.cpp
@@ -1,40 +1,39 @@
/**
- * Copyright (C) 2011, BMW AG
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
+ * Copyright (C) 2012, BMW AG
*
- * GeniviAudioMananger AudioManagerDaemon
+ * This file is part of GENIVI Project AudioManager.
*
- * \file CAmControlSender.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * \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
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * 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.
+ * \file CAmControlSender.cpp
+ * For further information see http://www.genivi.org/.
*
*/
#include "CAmControlSender.h"
-#include "TAmPluginTemplate.h"
-#include "shared/CAmDltWrapper.h"
#include <cassert>
#include <fstream>
#include <iostream>
#include <sstream>
#include <stdexcept>
+#include "TAmPluginTemplate.h"
+#include "shared/CAmDltWrapper.h"
-namespace am {
+namespace am
+{
-#define REQUIRED_INTERFACE_VERSION_MAJOR 1
-#define REQUIRED_INTERFACE_VERSION_MINOR 0
+#define REQUIRED_INTERFACE_VERSION_MAJOR 1 //!< major interface version. All versions smaller than this will be rejected
+#define REQUIRED_INTERFACE_VERSION_MINOR 0 //!< minor interface version. All versions smaller than this will be rejected
CAmControlSender::CAmControlSender(std::string controlPluginFile) :
mlibHandle(NULL), //
@@ -79,97 +78,97 @@ CAmControlSender::~CAmControlSender()
am_Error_e CAmControlSender::hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
{
- return mController->hookUserConnectionRequest(sourceID, sinkID, mainConnectionID);
+ return (mController->hookUserConnectionRequest(sourceID, sinkID, mainConnectionID));
}
am_Error_e CAmControlSender::hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID)
{
- return mController->hookUserDisconnectionRequest(connectionID);
+ return (mController->hookUserDisconnectionRequest(connectionID));
}
am_Error_e CAmControlSender::hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
{
- return mController->hookUserSetMainSinkSoundProperty(sinkID, soundProperty);
+ return (mController->hookUserSetMainSinkSoundProperty(sinkID, soundProperty));
}
am_Error_e CAmControlSender::hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s & soundProperty)
{
- return mController->hookUserSetMainSourceSoundProperty(sourceID, soundProperty);
+ return (mController->hookUserSetMainSourceSoundProperty(sourceID, soundProperty));
}
am_Error_e CAmControlSender::hookUserSetSystemProperty(const am_SystemProperty_s & property)
{
- return mController->hookUserSetSystemProperty(property);
+ return (mController->hookUserSetSystemProperty(property));
}
am_Error_e CAmControlSender::hookUserVolumeChange(const am_sinkID_t sinkID, const am_mainVolume_t newVolume)
{
- return mController->hookUserVolumeChange(sinkID, newVolume);
+ return (mController->hookUserVolumeChange(sinkID, newVolume));
}
am_Error_e CAmControlSender::hookUserVolumeStep(const am_sinkID_t sinkID, const int16_t increment)
{
- return mController->hookUserVolumeStep(sinkID, increment);
+ return (mController->hookUserVolumeStep(sinkID, increment));
}
am_Error_e CAmControlSender::hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
{
- return mController->hookUserSetSinkMuteState(sinkID, muteState);
+ return (mController->hookUserSetSinkMuteState(sinkID, muteState));
}
am_Error_e CAmControlSender::hookSystemRegisterDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
{
- return mController->hookSystemRegisterDomain(domainData, domainID);
+ return (mController->hookSystemRegisterDomain(domainData, domainID));
}
am_Error_e CAmControlSender::hookSystemDeregisterDomain(const am_domainID_t domainID)
{
- return mController->hookSystemDeregisterDomain(domainID);
+ return (mController->hookSystemDeregisterDomain(domainID));
}
void CAmControlSender::hookSystemDomainRegistrationComplete(const am_domainID_t domainID)
{
- return mController->hookSystemDomainRegistrationComplete(domainID);
+ return (mController->hookSystemDomainRegistrationComplete(domainID));
}
am_Error_e CAmControlSender::hookSystemRegisterSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
{
- return mController->hookSystemRegisterSink(sinkData, sinkID);
+ return (mController->hookSystemRegisterSink(sinkData, sinkID));
}
am_Error_e CAmControlSender::hookSystemDeregisterSink(const am_sinkID_t sinkID)
{
- return mController->hookSystemDeregisterSink(sinkID);
+ return (mController->hookSystemDeregisterSink(sinkID));
}
am_Error_e CAmControlSender::hookSystemRegisterSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
{
- return mController->hookSystemRegisterSource(sourceData, sourceID);
+ return (mController->hookSystemRegisterSource(sourceData, sourceID));
}
am_Error_e CAmControlSender::hookSystemDeregisterSource(const am_sourceID_t sourceID)
{
- return mController->hookSystemDeregisterSource(sourceID);
+ return (mController->hookSystemDeregisterSource(sourceID));
}
am_Error_e CAmControlSender::hookSystemRegisterGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
{
- return mController->hookSystemRegisterGateway(gatewayData, gatewayID);
+ return (mController->hookSystemRegisterGateway(gatewayData, gatewayID));
}
am_Error_e CAmControlSender::hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)
{
- return mController->hookSystemDeregisterGateway(gatewayID);
+ return (mController->hookSystemDeregisterGateway(gatewayID));
}
am_Error_e CAmControlSender::hookSystemRegisterCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
{
- return mController->hookSystemRegisterCrossfader(crossfaderData, crossfaderID);
+ return (mController->hookSystemRegisterCrossfader(crossfaderData, crossfaderID));
}
am_Error_e CAmControlSender::hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)
{
- return mController->hookSystemDeregisterCrossfader(crossfaderID);
+ return (mController->hookSystemDeregisterCrossfader(crossfaderID));
}
void CAmControlSender::hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
@@ -254,7 +253,7 @@ void CAmControlSender::cbAckSetSourceSoundProperty(const am_Handle_s handle, con
am_Error_e CAmControlSender::startupController(IAmControlReceive *controlreceiveinterface)
{
- return mController->startupController(controlreceiveinterface);
+ return (mController->startupController(controlreceiveinterface));
}
void CAmControlSender::cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
@@ -284,7 +283,7 @@ void CAmControlSender::setControllerRundown()
am_Error_e am::CAmControlSender::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e> & listPrioConnectionFormats)
{
- return mController->getConnectionFormatChoice(sourceID, sinkID, listRoute, listPossibleConnectionFormats, listPrioConnectionFormats);
+ return (mController->getConnectionFormatChoice(sourceID, sinkID, listRoute, listPossibleConnectionFormats, listPrioConnectionFormats));
}
void CAmControlSender::getInterfaceVersion(std::string & version) const