summaryrefslogtreecommitdiff
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
parent1b85f2410d1d644ff00284e78b1eeff6cfad2fc4 (diff)
downloadaudiomanager-8ced1dced5ae1fbc7356ec65c03e6e8201216155.tar.gz
* updated license headers
* updated documentation
-rw-r--r--AudioManagerDaemon/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/include/CAmCommandReceiver.h31
-rw-r--r--AudioManagerDaemon/include/CAmCommandSender.h28
-rw-r--r--AudioManagerDaemon/include/CAmControlReceiver.h31
-rw-r--r--AudioManagerDaemon/include/CAmControlSender.h28
-rw-r--r--AudioManagerDaemon/include/CAmDatabaseHandler.h155
-rw-r--r--AudioManagerDaemon/include/CAmDatabaseObserver.h33
-rw-r--r--AudioManagerDaemon/include/CAmRouter.h61
-rw-r--r--AudioManagerDaemon/include/CAmRoutingReceiver.h41
-rw-r--r--AudioManagerDaemon/include/CAmRoutingSender.h105
-rw-r--r--AudioManagerDaemon/include/CAmTelnetMenuHelper.h35
-rw-r--r--AudioManagerDaemon/include/CAmTelnetServer.h104
-rw-r--r--AudioManagerDaemon/include/DAmDoxygenMainPage.h436
-rw-r--r--AudioManagerDaemon/include/TAmPluginTemplate.h35
-rw-r--r--AudioManagerDaemon/src/CAmCommandReceiver.cpp78
-rw-r--r--AudioManagerDaemon/src/CAmCommandSender.cpp44
-rw-r--r--AudioManagerDaemon/src/CAmControlReceiver.cpp190
-rw-r--r--AudioManagerDaemon/src/CAmControlSender.cpp81
-rw-r--r--AudioManagerDaemon/src/CAmDatabaseHandler.cpp1302
-rw-r--r--AudioManagerDaemon/src/CAmDatabaseObserver.cpp28
-rw-r--r--AudioManagerDaemon/src/CAmDbusWrapper.cpp90
-rw-r--r--AudioManagerDaemon/src/CAmDltWrapper.cpp32
-rw-r--r--AudioManagerDaemon/src/CAmRouter.cpp76
-rw-r--r--AudioManagerDaemon/src/CAmRoutingReceiver.cpp207
-rw-r--r--AudioManagerDaemon/src/CAmRoutingSender.cpp189
-rw-r--r--AudioManagerDaemon/src/CAmSocketHandler.cpp99
-rw-r--r--AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp27
-rw-r--r--AudioManagerDaemon/src/CAmTelnetServer.cpp288
-rw-r--r--AudioManagerDaemon/src/main.cpp87
-rw-r--r--AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp28
-rw-r--r--AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h27
-rw-r--r--AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.cpp28
-rw-r--r--AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.h28
-rw-r--r--AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp28
-rw-r--r--AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h28
-rw-r--r--AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp28
-rw-r--r--AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h28
-rw-r--r--AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp40
-rw-r--r--AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.h28
-rw-r--r--AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp31
-rw-r--r--AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.h23
-rw-r--r--AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/test/CAmCommonFunctions.cpp28
-rw-r--r--AudioManagerDaemon/test/CAmCommonFunctions.h28
-rw-r--r--AudioManagerDaemon/test/CMakeLists.txt33
-rw-r--r--AudioManagerDaemon/test/IAmCommandBackdoor.h28
-rw-r--r--AudioManagerDaemon/test/IAmControlBackdoor.h28
-rw-r--r--AudioManagerDaemon/test/IAmRoutingBackdoor.h28
-rw-r--r--AudioManagerDaemon/test/MockIAmCommandSend.h42
-rw-r--r--AudioManagerDaemon/test/MockIAmControlSend.h42
-rw-r--r--AudioManagerDaemon/test/MockIAmRoutingSend.h42
-rw-r--r--CMakeLists.txt34
-rw-r--r--LICENCE383
-rw-r--r--PluginCommandInterfaceDbus/CMakeLists.txt17
-rw-r--r--PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h32
-rw-r--r--PluginCommandInterfaceDbus/include/CAmDbusMessageHandler.h32
-rw-r--r--PluginCommandInterfaceDbus/include/IAmCommandReceiverShadow.h32
-rw-r--r--PluginCommandInterfaceDbus/src/CAmCommandSenderDbus.cpp32
-rw-r--r--PluginCommandInterfaceDbus/src/CAmDbusMessageHandler.cpp32
-rw-r--r--PluginCommandInterfaceDbus/src/IAmCommandReceiverShadow.cpp32
-rw-r--r--PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.cpp40
-rw-r--r--PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.h40
-rw-r--r--PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp32
-rw-r--r--PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.h40
-rw-r--r--PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp32
-rw-r--r--PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.h40
-rw-r--r--PluginCommandInterfaceDbus/test/CMakeLists.txt30
-rw-r--r--PluginCommandInterfaceDbus/test/MockIAmCommandReceive.h17
-rw-r--r--PluginControlInterface/CMakeLists.txt17
-rw-r--r--PluginControlInterface/include/CAmControlSenderBase.h32
-rw-r--r--PluginControlInterface/include/IAmControlReceiverShadow.h18
-rw-r--r--PluginControlInterface/src/CAmControlSenderBase.cpp32
-rw-r--r--PluginControlInterface/src/IAmControlReceiverShadow.cpp18
-rw-r--r--PluginControlInterface/test/CAmControlReceiverShadowTest.cpp22
-rw-r--r--PluginControlInterface/test/CAmControlReceiverShadowTest.h18
-rw-r--r--PluginControlInterface/test/CMakeLists.txt16
-rw-r--r--PluginControlInterface/test/MockIAmControlReceive.h17
-rw-r--r--PluginRoutingInterfaceAsync/CMakeLists.txt30
-rw-r--r--PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h32
-rw-r--r--PluginRoutingInterfaceAsync/include/IAmRoutingReceiverShadow.h31
-rw-r--r--PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp31
-rw-r--r--PluginRoutingInterfaceAsync/src/IAmRoutingReceiverShadow.cpp31
-rw-r--r--PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp33
-rw-r--r--PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.h31
-rw-r--r--PluginRoutingInterfaceAsync/test/CMakeLists.txt30
-rw-r--r--PluginRoutingInterfaceAsync/test/MockIAmRoutingReceive.h17
-rw-r--r--PluginRoutingInterfaceDbus/CMakeLists.txt16
-rw-r--r--PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h32
-rw-r--r--PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp32
-rw-r--r--README102
-rw-r--r--cmake/AudioDomains.gifbin0 -> 18948 bytes
-rw-r--r--cmake/AudioManagement.pngbin0 -> 21217 bytes
-rw-r--r--cmake/Gateway.gifbin0 -> 14829 bytes
-rw-r--r--cmake/GatewayMatrix.pngbin0 -> 12269 bytes
-rw-r--r--cmake/Levels.pngbin0 -> 52975 bytes
-rwxr-xr-xcmake/add_package_dependencies.sh35
-rwxr-xr-xcmake/cmake_uninstall.cmake.in33
-rw-r--r--cmake/delay.jpgbin0 -> 17066 bytes
-rw-r--r--cmake/early.pngbin0 -> 18557 bytes
-rw-r--r--cmake/late.pngbin0 -> 15928 bytes
-rw-r--r--cmake/views.pngbin0 -> 65262 bytes
-rw-r--r--include/audiomanagertypes.h407
-rw-r--r--include/command/IAmCommandReceive.h22
-rw-r--r--include/command/IAmCommandSend.h22
-rw-r--r--include/control/IAmControlReceive.h22
-rw-r--r--include/control/IAmControlSend.h24
-rw-r--r--include/projecttypes.h28
-rw-r--r--include/routing/IAmRoutingReceive.h22
-rw-r--r--include/routing/IAmRoutingSend.h22
-rw-r--r--include/shared/CAmDbusWrapper.h39
-rw-r--r--include/shared/CAmDltWrapper.h98
-rw-r--r--include/shared/CAmSerializer.h60
-rw-r--r--include/shared/CAmSocketHandler.h135
-rw-r--r--lgpl-2.1.txt502
119 files changed, 4093 insertions, 3729 deletions
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt
index c0a31b0..e90afee 100644
--- a/AudioManagerDaemon/CMakeLists.txt
+++ b/AudioManagerDaemon/CMakeLists.txt
@@ -1,24 +1,19 @@
-#GENIVI AUDIOMANAGER
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-#Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-#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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/include/CAmCommandReceiver.h b/AudioManagerDaemon/include/CAmCommandReceiver.h
index 72f72f2..ee1134f 100644
--- a/AudioManagerDaemon/include/CAmCommandReceiver.h
+++ b/AudioManagerDaemon/include/CAmCommandReceiver.h
@@ -1,32 +1,29 @@
/**
- * 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 CommandReveiver.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \file CAmCommandReceiver.h
+ * For further information see http://www.genivi.org/.
*
*/
#ifndef COMMANDRECEIVER_H_
#define COMMANDRECEIVER_H_
-#include <command/IAmCommandReceive.h>
-#include <config.h>
+#include "command/IAmCommandReceive.h"
namespace am
{
diff --git a/AudioManagerDaemon/include/CAmCommandSender.h b/AudioManagerDaemon/include/CAmCommandSender.h
index d902e96..6c4e013 100644
--- a/AudioManagerDaemon/include/CAmCommandSender.h
+++ b/AudioManagerDaemon/include/CAmCommandSender.h
@@ -1,24 +1,22 @@
/**
- * 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 CommandSender.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \file CAmCommandSender.h
+ * For further information see http://www.genivi.org/.
*
*/
diff --git a/AudioManagerDaemon/include/CAmControlReceiver.h b/AudioManagerDaemon/include/CAmControlReceiver.h
index af5a0e4..bcc642e 100644
--- a/AudioManagerDaemon/include/CAmControlReceiver.h
+++ b/AudioManagerDaemon/include/CAmControlReceiver.h
@@ -1,32 +1,29 @@
/**
- * 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 CAmControlReceiver.h
+ * 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 CAmControlReceiver.h
+ * For further information see http://www.genivi.org/.
*
*/
#ifndef CONTRONLRECEIVER_H_
#define CONTRONLRECEIVER_H_
-#include <control/IAmControlReceive.h>
-#include <config.h>
+#include "control/IAmControlReceive.h"
namespace am
{
diff --git a/AudioManagerDaemon/include/CAmControlSender.h b/AudioManagerDaemon/include/CAmControlSender.h
index ddc8cf3..5d7a169 100644
--- a/AudioManagerDaemon/include/CAmControlSender.h
+++ b/AudioManagerDaemon/include/CAmControlSender.h
@@ -1,24 +1,22 @@
/**
- * 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.h
+ * 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.h
+ * For further information see http://www.genivi.org/.
*
*/
diff --git a/AudioManagerDaemon/include/CAmDatabaseHandler.h b/AudioManagerDaemon/include/CAmDatabaseHandler.h
index ceaff88..7b1e48e 100644
--- a/AudioManagerDaemon/include/CAmDatabaseHandler.h
+++ b/AudioManagerDaemon/include/CAmDatabaseHandler.h
@@ -1,24 +1,22 @@
/**
- * 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 CAmDatabaseHandler.h
+ * 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 CAmDatabaseHandler.h
+ * For further information see http://www.genivi.org/.
*
*/
@@ -26,9 +24,10 @@
#define DATABASEHANDLER_H_
#include "audiomanagertypes.h"
-#include <sqlite3.h>
#include <map>
-#include <list>
+#include <vector>
+#include <string>
+#include <sqlite3.h>
namespace am
{
@@ -138,139 +137,39 @@ public:
am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID);
am_Error_e peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID);
am_Error_e peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID);
- /**
- * checks for a certain mainConnection
- * @param mainConnectionID to be checked for
- * @return true if it exists
- */
- bool existMainConnection(const am_mainConnectionID_t mainConnectionID) const;
- /**
- * checks if a CrossFader exists
- * @param crossfaderID the ID of the crossfader to be checked
- * @return true if exists
- */
+ bool existMainConnection(const am_mainConnectionID_t mainConnectionID) const;
bool existcrossFader(const am_crossfaderID_t crossfaderID) const;
-
- /**
- * checks if a connection already exists.
- * Only takes sink, source and format information for search!
- * @param connection the connection to be checked
- * @return true if connections exists
- */
bool existConnection(const am_Connection_s connection);
-
- /**
- * checks if a connection with the given ID exists
- * @param connectionID
- * @return true if connection exits
- */
bool existConnectionID(const am_connectionID_t connectionID);
- /**
- * checks for a certain Source
- * @param sourceID to be checked for
- * @return true if it exists
- */
bool existSource(const am_sourceID_t sourceID) const;
-
- /**
- * checks if a source name or ID exists
- * @param sourceID the sourceID
- * @param name the name
- * @return true if it exits
- */
bool existSourceNameOrID(const am_sourceID_t sourceID, const std::string& name) const;
-
- /**
- * checks if a name exits
- * @param name the name
- * @return true if it exits
- */
bool existSourceName(const std::string& name) const;
- /**
- * checks for a certain Sink
- * @param sinkID to be checked for
- * @return true if it exists
- */
bool existSink(const am_sinkID_t sinkID) const;
-
- /**
- * checks if a sink with the ID or the name exists
- * @param sinkID the ID
- * @param name the name
- * @return true if it exists.
- */
bool existSinkNameOrID(const am_sinkID_t sinkID, const std::string& name) const;
-
- /**
- * checks if a sink with the name exists
- * @param name the name
- * @return true if it exists
- */
bool existSinkName(const std::string& name) const;
-
- /**
- * checks for a certain domain
- * @param domainID to be checked for
- * @return true if it exists
- */
bool existDomain(const am_domainID_t domainID) const;
-
- /**
- * checks for certain gateway
- * @param gatewayID to be checked for
- * @return true if it exists
- */
bool existGateway(const am_gatewayID_t gatewayID) const;
-
- /**
- * checks for certain SinkClass
- * @param sinkClassID
- * @return true if it exists
- */
bool existSinkClass(const am_sinkClass_t sinkClassID) const;
-
- /**
- * checks for certain sourceClass
- * @param sourceClassID
- * @return true if it exists
- */
bool existSourceClass(const am_sourceClass_t sourceClassID) const;
-
- /**
- * registers the Observer at the Database
- * @param iObserver pointer to the observer
- */
void registerObserver(CAmDatabaseObserver *iObserver);
-
- /**
- * gives information about the visibility of a source
- * @param sourceID the sourceID
- * @return true if source is visible
- */
bool sourceVisible(const am_sourceID_t sourceID) const;
-
- /**
- * gives information about the visibility of a sink
- * @param sinkID the sinkID
- * @return true if source is visible
- */
bool sinkVisible(const am_sinkID_t sinkID) const;
private:
- am_timeSync_t calculateMainConnectionDelay(const am_mainConnectionID_t mainConnectionID) const;
- bool sqQuery(const std::string& query);
+ am_timeSync_t calculateMainConnectionDelay(const am_mainConnectionID_t mainConnectionID) const; //!< calculates a new main connection delay
+ bool sqQuery(const std::string& query); //!< queries the database
bool openDatabase(); //!< opens the database
void createTables(); //!< creates all tables from the static table
- sqlite3 *mDatabase; //!< pointer to the database
+ sqlite3 *mpDatabase; //!< pointer to the database
std::string mPath; //!< path to the database
- CAmDatabaseObserver *mDatabaseObserver; //!< pointer to the Observer
- bool mFirstStaticSink;
- bool mFirstStaticSource;
- bool mFirstStaticGateway;
- bool mFirstStaticSinkClass;
- bool mFirstStaticSourceClass;
- bool mFirstStaticCrossfader;
+ CAmDatabaseObserver *mpDatabaseObserver; //!< pointer to the Observer
+ bool mFirstStaticSink; //!< bool for dynamic range handling
+ bool mFirstStaticSource; //!< bool for dynamic range handling
+ bool mFirstStaticGateway; //!< bool for dynamic range handling
+ bool mFirstStaticSinkClass; //!< bool for dynamic range handling
+ bool mFirstStaticSourceClass; //!< bool for dynamic range handling
+ bool mFirstStaticCrossfader; //!< bool for dynamic range handling
typedef std::map<am_gatewayID_t, std::vector<bool> > ListConnectionFormat; //!< type for list of connection formats
ListConnectionFormat mListConnectionFormat; //!< list of connection formats
};
diff --git a/AudioManagerDaemon/include/CAmDatabaseObserver.h b/AudioManagerDaemon/include/CAmDatabaseObserver.h
index 430f061..78c60a6 100644
--- a/AudioManagerDaemon/include/CAmDatabaseObserver.h
+++ b/AudioManagerDaemon/include/CAmDatabaseObserver.h
@@ -1,31 +1,29 @@
/**
- * 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 CAmDatabaseObserver.h
+ * 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 CAmDatabaseObserver.h
+ * For further information see http://www.genivi.org/.
*
*/
#ifndef DATABASEOBSERVER_H_
#define DATABASEOBSERVER_H_
-#include <audiomanagertypes.h>
+#include "audiomanagertypes.h"
#include <queue>
#include "shared/CAmSerializer.h"
@@ -40,7 +38,6 @@ class CAmSocketHandler;
/**
* This class observes the Database and notifies other classes about important events, mainly the CommandSender.
*/
-
class CAmDatabaseObserver
{
public:
@@ -75,7 +72,7 @@ private:
CAmCommandSender *mCommandSender; //!< pointer to the comandSender
CAmRoutingSender* mRoutingSender; //!< pointer to the routingSender
CAmTelnetServer* mTelnetServer; //!< pointer to the telnetserver
- CAmSerializer mSerializer;
+ CAmSerializer mSerializer; //!< serializer to handle the CommandInterface via the mainloop
};
}
diff --git a/AudioManagerDaemon/include/CAmRouter.h b/AudioManagerDaemon/include/CAmRouter.h
index ba13bf1..9b2b4d2 100644
--- a/AudioManagerDaemon/include/CAmRouter.h
+++ b/AudioManagerDaemon/include/CAmRouter.h
@@ -1,31 +1,29 @@
/**
- * 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 CAmRouter.h
+ * 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 CAmRouter.h
+ * For further information see http://www.genivi.org/.
*
*/
#ifndef ROUTER_H_
#define ROUTER_H_
-#include <audiomanagertypes.h>
+#include "audiomanagertypes.h"
namespace am
{
@@ -33,47 +31,56 @@ namespace am
class CAmDatabaseHandler;
class CAmControlSender;
+/**
+ * Implements an autorouting algorithm for connecting sinks and sources via different audio domains.
+ */
class CAmRouter
{
public:
CAmRouter(CAmDatabaseHandler* iDatabaseHandler, CAmControlSender* iSender);
- am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList);
~CAmRouter();
+ am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList);
private:
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;
- CAmDatabaseHandler* mDatabaseHandler;
- CAmControlSender* mControlSender;
+ CAmDatabaseHandler* mpDatabaseHandler; //!< pointer to database handler
+ CAmControlSender* mpControlSender; //!< pointer the controlsender - is used to retrieve information for the optimal route
};
+/**
+ * an item in the routing tree
+ */
class CAmRoutingTreeItem
{
public:
CAmRoutingTreeItem(const am_domainID_t domainID, const am_gatewayID_t gatewayID = 0, CAmRoutingTreeItem *parent = 0);
- void appendChild(CAmRoutingTreeItem *newChild);
- void returnChildItems(std::vector<CAmRoutingTreeItem*> listChildItems);
- am_domainID_t returnDomainID() const;
- am_gatewayID_t returnGatewayID() const;
- virtual ~CAmRoutingTreeItem();
- CAmRoutingTreeItem* returnParent() const;
+ ~CAmRoutingTreeItem();
+ void appendChild(CAmRoutingTreeItem *newChild); //!< appends a new child
+ void returnChildItems(std::vector<CAmRoutingTreeItem*> listChildItems); //!< returns the list of childs
+ am_domainID_t returnDomainID() const; //!< returns the domainID of the tree
+ am_gatewayID_t returnGatewayID() const; //!< returns the gatewayID of the tree
+ CAmRoutingTreeItem* returnParent() const; //!< returns the parent item of the tree
private:
std::vector<CAmRoutingTreeItem*> mListChildItems; //!< List of all child items
am_domainID_t mDomainID; //!< the domain ID of the item
am_gatewayID_t mGatewayID; //!< the gateway Id
- CAmRoutingTreeItem *mParentItem; //!< pointer to the parent item
+ CAmRoutingTreeItem *mpParentItem; //!< pointer to the parent item
};
+/**
+ * a routing tree
+ */
class CAmRoutingTree
{
public:
CAmRoutingTree(const am_domainID_t rootDomainID);
+ ~CAmRoutingTree();
CAmRoutingTreeItem* insertItem(const am_domainID_t domainID, const am_gatewayID_t gatewayID, CAmRoutingTreeItem *parent);
void getRoute(CAmRoutingTreeItem* targetItem, std::vector<am_gatewayID_t>& listGateways);
am_domainID_t returnRootDomainID() const;
CAmRoutingTreeItem* returnRootItem();
- virtual ~CAmRoutingTree();
private:
CAmRoutingTreeItem mRootItem; //!< pointer to root item
std::vector<CAmRoutingTreeItem*> mListChild; //!< list of all childs
diff --git a/AudioManagerDaemon/include/CAmRoutingReceiver.h b/AudioManagerDaemon/include/CAmRoutingReceiver.h
index dfacc3b..73bad28 100644
--- a/AudioManagerDaemon/include/CAmRoutingReceiver.h
+++ b/AudioManagerDaemon/include/CAmRoutingReceiver.h
@@ -1,32 +1,29 @@
/**
- * 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 CAmRoutingReceiver.h
+ * 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 CAmRoutingReceiver.h
+ * For further information see http://www.genivi.org/.
*
*/
#ifndef ROUTINGRECEIVER_H_
#define ROUTINGRECEIVER_H_
-#include <routing/IAmRoutingReceive.h>
-#include <config.h>
+#include "routing/IAmRoutingReceive.h"
namespace am
{
@@ -93,11 +90,11 @@ public:
void waitOnRundown(bool rundown); //!< tells the RoutingReceiver to start waiting for all handles to be confirmed
private:
- CAmDatabaseHandler *mDatabaseHandler; //!< pointer to the databaseHandler
- CAmRoutingSender *mRoutingSender; //!< pointer to the routingSender
- CAmControlSender *mControlSender; //!< pointer to the controlSender
- CAmSocketHandler *mSocketHandler; //!< pointer to sockethandler
- CAmDbusWrapper *mDBusWrapper; //!< pointer to dbuswrapper
+ CAmDatabaseHandler *mpDatabaseHandler; //!< pointer to the databaseHandler
+ CAmRoutingSender *mpRoutingSender; //!< pointer to the routingSender
+ CAmControlSender *mpControlSender; //!< pointer to the controlSender
+ CAmSocketHandler *mpSocketHandler; //!< pointer to sockethandler
+ CAmDbusWrapper *mpDBusWrapper; //!< pointer to dbuswrapper
uint16_t handleCount; //!< counts all handles
std::vector<uint16_t> mListStartupHandles; //!< list of handles that wait for a confirm
diff --git a/AudioManagerDaemon/include/CAmRoutingSender.h b/AudioManagerDaemon/include/CAmRoutingSender.h
index c6a7677..41d48de 100644
--- a/AudioManagerDaemon/include/CAmRoutingSender.h
+++ b/AudioManagerDaemon/include/CAmRoutingSender.h
@@ -1,24 +1,22 @@
/**
- * 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 CAmRoutingSender.h
+ * 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 CAmRoutingSender.h
+ * For further information see http://www.genivi.org/.
*
*/
@@ -46,57 +44,16 @@ public:
CAmRoutingSender(const std::vector<std::string>& listOfPluginDirectories);
~CAmRoutingSender();
- /**
- * removes a handle from the list
- * @param handle to be removed
- * @return E_OK in case of success
- */
am_Error_e removeHandle(const am_Handle_s& handle);
-
- /**
- * @author Christian
- * this adds the domain to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
- * This must be done whenever a domain is registered.
- */
am_Error_e addDomainLookup(const am_Domain_s& domainData);
- /**
- * @author Christian
- * this adds the Source to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
- * This must be done whenever a Source is registered.
- */
am_Error_e addSourceLookup(const am_Source_s& sourceData);
- /**
- * @author Christian
- * this adds the Sink to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
- * This must be done whenever a Sink is registered.
- */
am_Error_e addSinkLookup(const am_Sink_s& sinkData);
- /**
- * @author Christian
- * this adds the Crossfader to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
- * This must be done whenever a Crossfader is registered.
- */
am_Error_e addCrossfaderLookup(const am_Crossfader_s& crossfaderData);
- /**
- * @author Christian
- * this removes the Domain to the lookup table of the Router. This must be done everytime a domain is deregistered.
- */
am_Error_e removeDomainLookup(const am_domainID_t domainID);
- /**
- * @author Christian
- * this removes the Source to the lookup table of the Router. This must be done everytime a source is deregistered.
- */
am_Error_e removeSourceLookup(const am_sourceID_t sourceID);
- /**
- * @author Christian
- * this removes the Sink to the lookup table of the Router. This must be done everytime a sink is deregistered.
- */
am_Error_e removeSinkLookup(const am_sinkID_t sinkID);
- /**
- * @author Christian
- * this removes the Crossfader to the lookup table of the Router. This must be done everytime a crossfader is deregistered.
- */
am_Error_e removeCrossfaderLookup(const am_crossfaderID_t crossfaderID);
+
am_Error_e startupInterfaces(CAmRoutingReceiver* iRoutingReceiver);
void setRoutingReady();
void setRoutingRundown();
@@ -116,15 +73,13 @@ public:
am_Error_e getListPlugins(std::vector<std::string>& interfaces) const;
void getInterfaceVersion(std::string& version) const;
- //!< is used to pair interfaces with busnames
- struct InterfaceNamePairs
+ struct InterfaceNamePairs //!< is used to pair interfaces with busnames
{
- IAmRoutingSend* routingInterface;
- std::string busName;
+ IAmRoutingSend* routingInterface; //!< pointer to the routingInterface
+ std::string busName; //!< the busname
};
- //!< is used to store data related to handles
- class am_handleData_c
+ class am_handleData_c //!< is used to store data related to handles
{
public:
union
@@ -134,6 +89,7 @@ public:
am_crossfaderID_t crossfaderID;
am_connectionID_t connectionID;
};
+
union
{
am_SoundProperty_s soundPropery;
@@ -145,21 +101,14 @@ public:
};
+ am_handleData_c returnHandleData(const am_Handle_s handle) const; //!< returns the handle data associated with a handle
+
#ifdef UNIT_TEST //this is needed to test RoutingSender
friend class IAmRoutingBackdoor;
#endif
- /**
- * returns the data that belong to handles
- * @param handle the handle
- * @return a class holding the handle data
- */
- am_handleData_c returnHandleData(const am_Handle_s handle) const;
-
private:
-
- //!< is needed to sort the handles in the map
- struct comparator
+ struct comparator //!< is needed to sort the handles in the map
{
bool operator()(const am_Handle_s& a, const am_Handle_s& b) const
{
@@ -167,13 +116,7 @@ private:
}
};
- /**
- * creates a handle and adds it to the list of handles
- * @param handleData the data that should be saves together with the handle
- * @param type the type of handle to be created
- * @return the handle
- */
- am_Handle_s createHandle(const am_handleData_c& handleData, const am_Handle_e type);
+ am_Handle_s createHandle(const am_handleData_c& handleData, const am_Handle_e type); //!< creates a handle
void unloadLibraries(void); //!< unloads all loaded plugins
typedef std::map<am_domainID_t, IAmRoutingSend*> DomainInterfaceMap; //!< maps domains to interfaces
@@ -194,7 +137,7 @@ private:
SinkInterfaceMap mMapSinkInterface; //!< map of sinks to interfaces
SourceInterfaceMap mMapSourceInterface; //!< map of sources to interfaces
HandleInterfaceMap mMapHandleInterface; //!< map of handles to interfaces
- CAmRoutingReceiver *mRoutingReceiver;
+ CAmRoutingReceiver *mpRoutingReceiver; //!< pointer to routing receiver
};
}
diff --git a/AudioManagerDaemon/include/CAmTelnetMenuHelper.h b/AudioManagerDaemon/include/CAmTelnetMenuHelper.h
index 54a0ee5..8607edf 100644
--- a/AudioManagerDaemon/include/CAmTelnetMenuHelper.h
+++ b/AudioManagerDaemon/include/CAmTelnetMenuHelper.h
@@ -1,24 +1,23 @@
/**
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
* Copyright (C) 2012, BMW AG
*
- * GeniviAudioMananger AudioManagerDaemon
+ * This file is part of GENIVI Project AudioManager.
*
- * \file CAmTelnetMenuHelper.h
+ * 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 23-Jan-2012
- * \author Frank Herchet (frank.fh.herchet@bmw.de)
*
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2012, BMW AG Frank Herchet frank.fh.herchet@bmw.de
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Frank Herchet, frank.fh.herchet@bmw.de BMW 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 CAmTelnetMenuHelper.h
+ * For further information see http://www.genivi.org/.
*
*/
@@ -33,10 +32,8 @@
#include <string>
#include <sstream>
#include <vector>
-
-// for sockets
#include <sys/socket.h>
-#include <audiomanagertypes.h>
+#include "audiomanagertypes.h"
namespace am
{
@@ -166,9 +163,7 @@ private:
};
typedef std::map<std::string, sCommandPrototypeInfo> tCommandMap;
-
- // int filedescriptor of socket connection; EMainState state of current telnet session
- std::map<int, EMainState> mCurrentMainStateMap;
+ std::map<int, EMainState> mCurrentMainStateMap; //!< int filedescriptor of socket connection; EMainState state of current telnet session
static CAmTelnetMenuHelper* instance;
CAmTelnetServer *mpTelenetServer;
diff --git a/AudioManagerDaemon/include/CAmTelnetServer.h b/AudioManagerDaemon/include/CAmTelnetServer.h
index f7bf274..32701a2 100644
--- a/AudioManagerDaemon/include/CAmTelnetServer.h
+++ b/AudioManagerDaemon/include/CAmTelnetServer.h
@@ -1,34 +1,33 @@
/**
- * 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 CAmTelnetServer.h
+ * 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
+ * \author Frank Herchet, frank.fh.herchet@bmw.de BMW 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 CAmTelnetServer.h
+ * For further information see http://www.genivi.org/.
*
*/
#ifndef TELNETSERVER_H_
#define TELNETSERVER_H_
-#include "shared/CAmSocketHandler.h"
-#include "CAmTelnetMenuHelper.h"
#include <queue>
#include <map>
+#include "shared/CAmSocketHandler.h"
+#include "CAmTelnetMenuHelper.h"
namespace am
{
@@ -43,21 +42,16 @@ class CAmControlReceiver;
class CAmRouter;
class CAmTelnetMenuHelper;
+/**
+ * Implements a telnetserver that can be used to connect to the audiomanager, retrieve some information and use it. For debugginp purposes.
+ * For example, launch a telnet session on port 6060:
+ * \code telnet localhost 6060 \endcode
+ * more details can be found at the README
+ */
class CAmTelnetServer
{
public:
- CAmTelnetServer(CAmSocketHandler *iSocketHandler,
- CAmCommandSender *iCommandSender,
- CAmCommandReceiver *iCommandReceiver,
- CAmRoutingSender *iRoutingSender,
- CAmRoutingReceiver *iRoutingReceiver,
- CAmControlSender *iControlSender,
- CAmControlReceiver *iControlReceiver,
- CAmDatabaseHandler *iDatabasehandler,
- CAmRouter *iRouter,
- unsigned int servPort,
- unsigned int maxConnections);
-
+ CAmTelnetServer(CAmSocketHandler *iSocketHandler, CAmCommandSender *iCommandSender, CAmCommandReceiver *iCommandReceiver, CAmRoutingSender *iRoutingSender, CAmRoutingReceiver *iRoutingReceiver, CAmControlSender *iControlSender, CAmControlReceiver *iControlReceiver, CAmDatabaseHandler *iDatabasehandler, CAmRouter *iRouter, unsigned int servPort, unsigned int maxConnections);
~CAmTelnetServer();
void connectSocket(const pollfd pfd, const sh_pollHandle_t handle, void* userData);
void disconnectClient(int filedescriptor);
@@ -70,34 +64,34 @@ public:
TAmShPollCheck<CAmTelnetServer> telnetCheckCB;
private:
- typedef void (*CommandPrototype)(std::vector<std::string>& msg,int filedescriptor);
- typedef std::map<std::string,CommandPrototype> mMapCommand_t;
+ typedef void (*CommandPrototype)(std::vector<std::string>& msg, int filedescriptor);
+ typedef std::map<std::string, CommandPrototype> mMapCommand_t;
- void sliceCommand(const std::string& string,std::string& command,std::queue<std::string>& msg);
- mMapCommand_t createCommandMap();
- struct connection_s
- {
- int filedescriptor;
- sh_pollHandle_t handle;
- };
+ void sliceCommand(const std::string& string, std::string& command, std::queue<std::string>& msg);
+ mMapCommand_t createCommandMap();
+ struct connection_s
+ {
+ int filedescriptor;
+ sh_pollHandle_t handle;
+ };
- static CAmTelnetServer* instance;
- CAmSocketHandler *mSocketHandler;
- CAmCommandSender *mCommandSender;
- CAmCommandReceiver *mCommandReceiver;
- CAmRoutingSender *mRoutingSender;
- CAmRoutingReceiver *mRoutingReceiver;
- CAmControlSender *mControlSender;
- CAmControlReceiver *mControlReceiver;
- CAmDatabaseHandler *mDatabasehandler;
- CAmRouter *mRouter;
- sh_pollHandle_t mConnecthandle;
- std::queue<std::string> mMsgList;
- std::vector<connection_s> mListConnections;
- int mConnectFD;
- unsigned int mServerPort;
- unsigned int mMaxConnections;
- CAmTelnetMenuHelper mTelnetMenuHelper;
+ static CAmTelnetServer* mpInstance;
+ CAmSocketHandler *mpSocketHandler;
+ CAmCommandSender *mpCommandSender;
+ CAmCommandReceiver *mpCommandReceiver;
+ CAmRoutingSender *mpRoutingSender;
+ CAmRoutingReceiver *mpRoutingReceiver;
+ CAmControlSender *mpControlSender;
+ CAmControlReceiver *mpControlReceiver;
+ CAmDatabaseHandler *mpDatabasehandler;
+ CAmRouter *mpRouter;
+ sh_pollHandle_t mConnecthandle;
+ std::queue<std::string> mListMessages;
+ std::vector<connection_s> mListConnections;
+ int mConnectFD;
+ unsigned int mServerPort;
+ unsigned int mMaxConnections;
+ CAmTelnetMenuHelper mTelnetMenuHelper;
};
diff --git a/AudioManagerDaemon/include/DAmDoxygenMainPage.h b/AudioManagerDaemon/include/DAmDoxygenMainPage.h
index e27b233..662182d 100644
--- a/AudioManagerDaemon/include/DAmDoxygenMainPage.h
+++ b/AudioManagerDaemon/include/DAmDoxygenMainPage.h
@@ -1,21 +1,22 @@
/**
* \mainpage
*
- *
* \image html genivilogo.png
*
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \par Copyright
- * Copyright Copyright (C) 2011,2012 GENIVI Alliance\n
- * Copyright Copyright (C) 2011,2012 BMW AG
+ * \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/.
*
- * \par License
- * Contributions are licensed to the GENIVI Alliance under one or more Contribution License Agreements.
- * This file is licensed under the terms of the Mozilla Public License 2.0.\n
- * A copy of the license text has been included in the “LICENSE” file in the root directory of the source distribution.
- * You can also obtain a copy of the license text at\n
- * http://mozilla.org/MPL/2.0/.
+ * \author Christian Mueller (christian.ei.mueller@bmw.de)
*
* \par More information
* can be found at https://collab.genivi.org/wiki/display/genivi/GENIVI+Home \n
@@ -23,90 +24,377 @@
* \par About AudioManager
* The AudioManager is a Deamon that manages all Audio Connections in a GENIVI headunit.
* It is a managing instance that uses so called RoutingAdaptors to control AudioDomains that then do the "real" connections.
- * \n\n\n
- *
*
- * \section architecture Architecture Overview
+ */
+
+/**
+ * \page lic License
+ * \section contr Code Contribution License
+ * The contribution is done under GENIVI CLA, please see here:
+ * https://collab.genivi.org/wiki/display/genivi/Code+Contribution+Team
+ * \section split License Split
+ * The licenses of this project are split into two parts:\n
+ * 1. the AudioManagerDaemon, licensed under MPL 2.0\n
+ * 2. all other parts that serve as example code that can be taken to build up an own project with it these parts are licensed
+ * \section mpl Mozilla Public License, v. 2.0
+ * http://mozilla.org/MPL/2.0/
+ * \section mit MIT license
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \page architecturepage Architecture Overview
*
- * The architecture concept bases on the partition of management (logic) and routing (action). Sinks and sources are clustered into independent parts which are capable of exchanging audio with each other (AudioDomains). Between these AudioDomains, Audio can be interchanged via Gateways. \n
- * Since the routing and the management shall be independent from the actual used system, it is realized as an OwnedComponent, the AudioManager. Each AudioDomain has a Routing Adapter which implements some necessary logic and is the interface between the AudioManager and the AudioDomains.
+ * The architecture concept bases on the partition of management (logic) and routing (action). Sinks and sources are clustered
+ * into independent parts which are capable of exchanging audio with each other (AudioDomains). Between these AudioDomains,
+ * Audio can be interchanged via Gateways. \n
+ * Since the routing and the management shall be independent from the actual used system, it is realized as an OwnedComponent,
+ * the AudioManager. Each AudioDomain has a Routing Adapter which implements some necessary logic and is the interface between
+ * the AudioManager and the AudioDomains.
*
* \section domains Audio Domains
*
- * An Audio Domain consists of sinks and sources that can exchange audio with each other. To make the most out of the concept, AudioDomains shall be chosen in such a way that they are implemented by already existing audio routing engines.
+ * \image html AudioDomains.gif
+ * An Audio Domain consists of sinks and sources that can exchange audio with each other. To make the most out of the concept,
+ * AudioDomains shall be chosen in such a way that they are implemented by already existing audio routing engines.
*
- * The AudioManager assumes that there are no restrictions in interconnection of sinks and sources. One or more sources can be connected to one sink and one or more sinks can be connected to one source. Since real hardware or software might end up in having restrictions, the knowledge of this must exist in the AudioManager and handled by him accordingly. This shall be accomplished via a plug-in mechanism. An AudioDomain is not tied to a hardware or software implementation. It can be software or hardware or even a combination of both. \n
+ * The AudioManager assumes that there are no restrictions in interconnection of sinks and sources. One or more sources can be
+ * connected to one sink and one or more sinks can be connected to one source. Since real hardware or software might end up in
+ * having restrictions, the knowledge of this must exist in the AudioManager and handled by him accordingly. This shall be
+ * accomplished via a plug-in mechanism. An AudioDomain is not tied to a hardware or software implementation. It can be software
+ * or hardware or even a combination of both. \n
*
* Examples for possible audio domains:\n
* PulseAudio, Alsa, Jack, DSP, FPGA, MOST, In-chip switching matrix\n
*
- * The clustering and usage of the AudioDomains will vary from each product. Care must be taken while choosing the right AudioDomains in regards to system load (due to resampling), latency and of course flexibility.\n
- * In special implementations of the AudioDomain, it is capable of operation a certain time without interaction to the AudioManager. This is needed to fulfill the requirements for Early & Late Audio, more information can be found below.
+ * The clustering and usage of the AudioDomains will vary from each product. Care must be taken while choosing the right AudioDomains
+ * in regards to system load (due to resampling), latency and of course flexibility.\n
+ * In special implementations of the AudioDomain, it is capable of operation a certain time without interaction to the AudioManager.
+ * This is needed to fulfill the requirements for Early & Late Audio, more information can be found below.
+ * am::am_Domain_s describe the attribiutes of a domain.
*
* \section routing_adaptor Routing Adapter
*
- * Via this adapter, the interconnection from the AudioManager to the AudioDomains is accomplished. An AudioDomain shall have exactly one RoutingAdapter. In the terms of GENIVI, a RoutingAdapter is an AbstractComponent, this means that we define an API and a certain behavior in UML models but do not maintain components itself. Existing implementations from Proof of Concepts are shipped as example Adapters "as is" but cannot be seen as maintained components.\n
- * The implementation of a routing adapter can and will vary from each project to another since the combination of sinks and sources, the used hardware etc has influence on the adapters. Besides interchanging and abstracting information between the AudioManager and the sinks and sources, the Adapters also need to implement some business logic in order to interact with the AudioManager. This include for example the registering of components, managing the current state, error handling etc.\n
- * In the special case of an EarlyDomain, the routing adapter also has to manage start-up and rundown including persistence for his domain while the AudioManager is not started or already stopped. During this periods of time, these special adapters have to be able to fulfill basic tasks like changing volumes, for example (this implies that the Adapter is implemented on a different piece of hardware, e.g. vehicle processor).
- *
- * \section Gateway
- *
- * Gateways are used to let audio flow between two domains. They always have a direction and can only transport one stream at a time. Several gateways connecting the same domains together can exist in parallel so that more than one source can be connected to more than one sink from the same domains at the same time.\n
- * The representation of a Gateway in the domain which originates the audio is a sink. In the receiving domain, the gateway appears as a source. The AudioManager knows about the Gateways, in terms of connection, it handles it as simple sources and sinks.
- *
- * \section AudioManagerDaemon
- *
- * The AudioManager is the central managing instance of the Audio architecture. It is designed as an OwnedComponent, this means that the software is maintained within GENIVI as open source component. The AudioManager consists of 4 central components.\n
- *
- * GOwnedComponent: AudioManager Daemon\n
- *
- * This component is owned and maintained by Genivi. It is the central audio framework component. There can be only one daemon in a system (singleton).
- *
- * \subsection controlinterface Control Interface Plugin
- *
- * This describes the interface towards the Controlling Instances of the AudioManagerDaemon. This is the HMI and interrupt sources that use this interface to start their interrupt and stop it again. The interface shall be asynchronous. Via this interface all user interactions are handled.
- *
- * \subsection routinginterface Routing Interface Plugin
- *
- * 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
- * Invisible Sources and Sinks either are system only relevant (e.g. an audio processing that has a source and a sink) or belong to a gateway.
+ * Via this adapter, the interconnection from the AudioManager to the AudioDomains is accomplished. An AudioDomain shall have exactly
+ * one RoutingAdapter. In the terms of GENIVI, a RoutingAdapter is an AbstractComponent, this means that we define an API and a certain
+ * behavior in UML models but do not maintain components itself. Existing implementations from Proof of Concepts are shipped as example
+ * Adapters "as is" but cannot be seen as maintained components.\n
+ * The implementation of a routing adapter can and will vary from each project to another since the combination of sinks and sources,
+ * the used hardware etc has influence on the adapters. Besides interchanging and abstracting information between the AudioManager and
+ * the sinks and sources, the Adapters also need to implement some business logic in order to interact with the AudioManager.
+ * This include for example the registering of components, managing the current state, error handling etc.\n
+ * In the special case of an EarlyDomain, the routing adapter also has to manage start-up and rundown including persistence for his
+ * domain while the AudioManager is not started or already stopped. During this periods of time, these special adapters have to be able
+ * to fulfill basic tasks like changing volumes, for example (this implies that the Adapter is implemented on a different piece of
+ * hardware, e.g. vehicle processor).
+ *
+ * \section gateway Gateway
+ *
+ * \image html Gateway.gif
+ *
+ * Gateways are used to let audio flow between two domains. They always have a direction and can only transport one stream at a time.
+ * Several gateways connecting the same domains together can exist in parallel so that more than one source can be connected to more
+ * than one sink from the same domains at the same time.\n
+ * In principle, gateways have the ability to convert the connectionFormat of an audiostream, for example the sink could receive audio
+ * in a digital form and output it as analog (sound card). In order to express the conversion capabilities of a gateway, a matrix of
+ * all source/sink connectionFormats is given (details below). The sources and sinks of a gateway are registered like ordinary sources
+ * and sinks where the domains have the responsibility to register "their" sinks and sources.\n
+ * For every gateway, a controlDomain is defined, this is the domain that registered the gateway. At the time of registering, the ID of
+ * the "other end" of the gateway might be unknown. To handle this situation, a domain can "peek" Domains, Sources and Sinks. When
+ * something is peeked, it means that an ID is reserved for a unique name without registering it.\n
+ * If a gateway is deregistered, the source or sink of the controlling domain is deregistered as well - not the one in the "other" domain.
+ */
+
+/**
+ * \page audiomanagercomponentspage AudioManager Components
+ * \image html AudioManagement.png
+ *
+ * The AudioManager is the central managing instance of the Audio architecture. It is designed as an OwnedComponent, this means that the
+ * software is maintained within GENIVI as open source component. The AudioManager consists of 4 central components.\n
+ *
+ *
+ * \section audiomanagercomponents AudioManagerDaemon
+ *
+ * This component is owned and maintained by Genivi. It is the central audio framework component. There can be only one daemon in a system (singleton).\n
+ * The AudioManagerDaemon is subject to this documentation
+ *
+ * \section commander AudioManagerCommandPlugin
+ *
+ * This describes the interface towards the Commanding Instances of the AudioManagerDaemon. This is the HMI and interrupt sources that use this
+ * interface to start their interrupt and stop it again. The interface shall be asynchronous. Via this interface all user interactions are handled.
+ * This component is designed to be a dynamic linked library that will be loaded on the startup of the AudioManager. There can be more than one
+ * CommandPlugin at a time.
+ * Since the implementation of this component is project specific, only examples are included.\n
+ * An example Dbus Implementation can be found in the folder PluginCommandInterfaceDbus.
+ * \n
+ * All commands that must be fulfilled by an AudioManagerCommandPlugin are described in am::IAmCommandSend.\n
+ * All commands that are presented to AudioManagerCommandPlugin by the AudioManagerDaemon are described in am::IAmCommandReceive.\n
+ *
+ * \section controller AudioManagerController
+ * The controller is the intelligent "heart" of the AudioManager and it is project specific. In principle, the controller gets commands from the command
+ * interface or events from outside and reacts to them. For this purpose, some basic commands are in the "toolbox" of the Controller that he can use
+ * to interact with the rest of the system.\n
+ * Among this there are commands to read/write the database and to perform actions on the Audiodomains like connect or disconnect. There must be only one
+ * Controller in the system at a time, like the AudioManagerCommandPlugins, the Controller is loaded at startup by the daemon\n
+ * A simple example Implementation can be found in the folder PluginControlInterface.
+ * \n
+ * All commands that must be fulfilled by an AudioManagerController are described in am::IAmControlSend.\n
+ * All commands that are presented to AudioManagerController by the AudioManagerDaemon are described in am::IAmControlReceive.\n
+ *
+ * \section router Routing AudioManagerRoutingPlugin
+ *
+ * The AudioManagerRoutingPlugins are used to abstract the actual Hard- and Software that does the routing. There can be more than one plugins at a
+ * time, they are loaded at startup time like the commandplugins. \n
+ * 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 is capable of addressing more than one adapter one each plug-in. The AudioManagerController does not have to
+ * know anything about the real system plugins - he sends his commands to sources and sinks. The daemon does the dispatching of these commands.
+ * The interface is mainly asynchronous.\
+ * Sample plugins can be found in the directory, for example PluginRoutingInterfaceAsync.\n
+ * \n
+ * All commands that must be fulfilled by an AudioManagerRoutingPlugin are described in am::IAmRoutingSend.\n
+ * All commands that are presented to AudioManagerRoutingPlugins by the AudioManagerDaemon are described in am::IAmRoutingReceive.\n
+ *
+ * \page elementspage Elements of the AudioManagement
+ *
+ * The audiomanagement in principle consists of the following elements:
+ *
+ * \section source Sources
+ * This is where audio comes from, for examples tuner, mediaplayer. But sources can also be part of a building block that processes audio, examples
+ * are here crossfaders or gateways. Several Sinks can be connected to one source.\n
+ * \subsection sourceattributes Attributes
+ * - am::am_SourceType_s describes the attributes that are accessible from the AudioManagerCommandPlugins.\n
+ * - am::am_Source_s describes the general attributes.\n
+ *
+ * \section sinks Sinks
+ * This is where audio flows to, for examples amplifier, headphones. But sources can also be part of a building block that processes audio,
+ * examples are here crossfaders or gateways. Several Sources can be connected to one sink.\n
+ * \subsection sinkattributes Attributes
+ * - am::am_SinkType_s describes the attribiutes that are accessible form the AudioManagerCommandPlugins.\n
+ * - am::am_Sink_s describes the general attributes.\n
+ *
+ * \section gw Gateways
+ * Gateways are described here: \ref gateway
+ * A specialitry of a gateways is the convertionmatrix. It indicates which sinksoundformats can be transferred in which sourcesoundformats. A convertion
+ * matrix looks like this:
+ * \image html GatewayMatrix.png
+ * \subsection gwattributes Attributes
+ * - am::am_Gateway_s describe the attribiutes of a gateway\n
+ *
+ * \section crossfaders Crossfaders
+ * Cross-faders are special elements that can perform cross-fading between two sources connected to the sinks of the crossfader. The audio of either source
+ * or both (mixed, during the fade) is put out at the source of the fader. Cross-fading within a source (for example from one song to another) is out of
+ * scope audio management and must be performed in the source.\n
+ * A crossfader has two sinks and one source, where one sink is the "hot" one. It is in the duty of the AudioManagerController to connect the correct
+ * sources to the sinks in order to perform a cross-fade. When fading is started, the hotSink changes from either HS_SINKA or HS_SINKB to HS_INTERMEDIATE,
+ * when the fading is finished, it changes to HS_SINKA or HS_SINKB (the sink that was "cold" before).Fading itself is done in the RoutingAdapters, the
+ * implementation has to ensure the smooth and synchronous change of volumes. With different rampTypes, different kinds of cross-fade ramps can be supported.
+ * The actual status of the "hot" sink is reported by the routingAdapter. Care has to be taken that the correct "hot" end of the crossfader is given
+ * at registration time.\n
+ * \subsection cfattributes Attributes
+ * - am::am_Crossfader_s describes the attribiutes of a Crossfader
*
- * \subsection Availability
- * It can be the case, that sources and sinks are present in the system but cannot be used at the moment. This is indicated via the availability. A sample use-case for this feature is CD drive that shall only be available if a CD is inserted.
+ */
+
+/**
+ * \page uniquepage About unique IDs : Static vs Dynamic IDs
+ *
+ * \section why Why having two different kinds of ids?\n
+ * The complexity of up-to-date IVI-systems demand to support sources and sinks dynamically added and removed in order to support the variety of CE products,
+ * but parts of the system are never going to change - to start a dynamic registration here is a waste of system capacity.\n
+ * \section setup The setup
+ * The AudioManagement is capable of handling static, dynamic or mixed setups. In case of a dynamic setup, all elements of the system like domains, sinks,
+ * sources, gateways etc are registered at system start-up. In a static setup, the IDs of the elements are known and fixed - no further registration is needed.
+ * The start-up for static elements works as follows:\n
+ * when a domain known as static (this is knowledge of the AudioManagerController, recognized by the unique name of the domain) registers, the
+ * AudioManagerController enters all elements of this domain in the database. Still, this domain can register additional elements during runtime.
+ * In case of static setups, the RoutingAdapter needs to ensure that all static elements are ready to be used when the domain registers.\n
+ * In order to ensure the uniqueness of IDs, there exist two separate ID areas (for each of sources, sinks, gateways and crossfaders):\n\n
+ * Fixed area (from 1..100)\n
+ * Variable area (starting from 101)\n\n
+ * In case of dynamic added elements, the audiomanagerdaemon ensures the uniqueness of the ID's, in case of the static setup, the project has to ensure the
+ * uniqueness by assigning the IDs wisely. The knowledge of the static IDs need to be in the AudioManagerController, the RoutingAdapters and in the HMI
+ * (optional because IDs will be reported anyway).\n
+ * Domains cannot be static because registering them is the trigger for the AudioManagerController to enter the static values into the database.
*
- * \section Interrupts
- * \subsection llinterrupts Low level interrupts
- * \todo write low level Interrupts description
+ */
+
+/**
+ * \page classficationpage Classification of Sinks and Sources
+ * \section classification Classification
+ * The AudioManagement offers classification for sources and sinks. It can be used to group sources and sinks together and link certain behaviors to these groups.
+ * An example for such a use is to group all interrupt sources in a class together and let the AudioManagerController react different for this class.\n
+ * Elements can only have one class at a time. The AudioManagerDaemon will take care of registration of sourceClasses, sinkClasses and will assign unique IDs,
+ * but the parameters of the Classes itself are product specific and have to be interpreted by the AudioManagerController. This concept allows for very individual
+ * implementations of system behaviors.\n
+ * Since Classes are held in the database, Classes can be registered and deregistered during runtime, it is recommended that the AudioManagerController enters
+ * all source & sink classes at start-up into the database.A ClassProperty exists out of an enumeration (am_ClassProperty_e, project specific) and a corresponding
+ * value (integer) that is interpreted by the AudioManagerController according to am_ClassProperty_e.\n
+ * There is no restriction to the number of properties a class can have and how many classes can exist in a system.\n
+ * \section attributes Attributes
+ * - am::am_SourceClass_s describes the attributes of a source class\n
+ * - am::am_SinkClass_s describes the attributes of a sink class\n
*
- * \subsection Interrupts
- * \todo write Interrupts description
+ */
+
+/**
+ * \page interrupts Interrups & Low Level Interrupts
+ * \section diff Differences
+ * The only difference between a "normal" interrupt and a source for the audioManagement may lie in it's classification, so playing a "normal" interrupt is not
+ * different to changing a source. An exception here are the so called "low level interrupts".\n
+ * \section crit Criterias
+ * These are special sources that fulfill the following criteria:
+ * - direct connection to a sink that is "always on", so no extra actions and communications need to be done in order to play audio
+ * - no dependencies to the current system state need to be checked before playing. This means that the source knows if it is allowed to play at the moment it
+ * wants to play
+ * - all information for the source that is needed to judge if it is allowed to play or not is either directly retrieved by the source or set static via a property.
+ *
+ * This becomes very handy for implementing such things like park distance control. When the source is informed that it needs to output signals
+ * (due to an emerging wall for example) it outputs the beeps directly to the amplifier that then overlays the sound to the current active source.\n
+ * Settings that influence the behavior of low level interrupts like for example volume offset for park distance control or sound on/off for it need to be done via
+ * sourceProperties on the source level, so that the judgment and the adoptions that need to be taken can be taken by the source without system interaction.
+ * In order to give the AudioManagerController the chance to react on a low level interrupt (by lowering the main volume for example), a feedback path is provided
+ * and the AudioManagerController is informed about the current state of the low level interrupt (via hooklInterruptStatusChange).\n
*
- * \section Persistency
- * It is the job of the AudioManagerController to handle the persistency. It is planned to expose an interface via the ControlInterface to accomplish this but the GENIVI persistance is not ready yet. \n
+ */
+
+/**
+ * \page connpage Connections & MainConnections
+ * \section con Connections
+ * A connection connects a source to a sink to let audio data flow. The direction of the flow is always source to sink. For each connection the connectionFormat
+ * must be defined when the connection is demanded, if source or sink is not capable of supporting this format, the connection cannot be established.
+ * ConnectionFormats are product specific, also are some standard formats defined within GENIVI that can be enhanced in the product area. Examples of formats:
+ * analog, autodefined, stereo 48khz 16bit PCM, ....
+ *
+ * \section maincon Mainconnections
+ * is visible to the HMI and consists out of one or more connections. A MainConnection shall always connect a Source and a Sink visible to the HMI.
+ * In contradiction to connections, the MainConnection does not know about connectionFormat. MainConnections are demanded by the commandInterface.
+ * This picture demonstrates the relation between MainConnections and connections:
+ * \image html Levels.png
+ *
+ * \section att Attributes
+ * - am::am_Connection_s describes the attributes of a conenction
+ * - am::am_MainConnection_s describes the attributes of a MainConnection
+ */
+
+ /** \page lip Lipsync
+ * \section t The Task of the Audiomanager
+ * 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 with the information provided by the AudioManager.
+ * The time information is always reported by the routingadapters 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.
+ * \section ex Example
+ * \image html delay.jpg
+ *
+ * This graph shows how the delay is calculated:
+ * - Connection 1 has a delay 2ms + 60ms that is added due to the gateway
+ * - Connection 2 has a delay 0ms + 10ms due to sink
+ * So the routing adapters report 62ms and 10ms, the audiomanager will add this to 72ms and report this value for the main connection from sink to source.
+ * The videoplayer getting this information can now delay his video against the audio for 72ms and be in perfect lipsync.\n
+ * After the buildup of a connection the first timing information needs to be sent within 5 seconds, the timing information from the routing adapters need to
+ * be sent via 4 seconds. If the latency for a connection is variable and changes over lifetime of the connection, the routing adapters shall resend the value
+ * and the audiomanager will correct the over all latency.
+ */
+
+/**
+ * \page early Early Audio
+ * \section req The Requirement
+ * The requirement reviews showed that one very important aspect of managing audio within GENIVI is the early/late phase where the Linux part of the system is
+ * not available. This feature is addressed via special domains: EarlyDomains. These domains are acting "unmanaged" - meaning without the interaction with the
+ * AudioManager - providing a simpler set of features until the AudioManager is up and running. When the Linux system is then fully operable a handover is done
+ * from the EarlyDomains towards the AudioManager. In order to be able to operate without the Linux up and running, the EarlyDomains must be implemented on a
+ * second fast-boot or always-on controller, e.g. the so called vehicle processor.\n
+ * \section earlys Early Startup
+ * This picture shows the principle of the early startup:
+ * \image html early.png
+ * \section late Late Rundown
+ * This picture shows the principle of the late rundown:
+ * \image html late.png
*
+ */
+
+/**
+ * \page views The two views of the AudioManager
+ * In general, there are two views of the system:\n
+ * \section command The CommandInterface View View
+ * This is an abstracted view that the HMI and other controlling Instances have of the system. Every Information (with some little exceptions) here is maintained
+ * by the AudioManagerController, so that he can "fake" situations for the HMI.
+ * So why is that? Depending on the actual project it might be - for example - that not the volume at the sink must be changed, but instead of the source.
+ * The HMI does not know about sourceVolumes (and does not need to!) so the HMI would change the sink volume and the AudioManagerController can translate it to a
+ * sourceVolumeChange. The metrics of the volumes are different as well.
+ * It is the duty of the AudioManagementController to keep the commandInterface information consistent with the "real" situation.
+ * \section route RoutingInterface View
+ * Here are the "real" system states. All changes that are done on this interface are maintained by the AudioMangerDaemon and here is the actual situation always
+ * consistent with the reality. All actions on this interface are either triggered by the AudioManagerController or by the domains itself, like registration for
+ * example.
+ * \section over Overview
+ * \image html views.png
+ */
+
+/**
+ * \page vol Volumes & MainVolumes
+ * \section mainVol MainVolumes
+ * This is the volume at the CommanInterface level. The exact definition is project specific and can be adopted for each project since the AudioManagerController
+ * and the HMI are the only ones who need to interfere with this volume. The actual value is an integer.
+ * - am::am_mainVolume_t defines the mainvolume
+ *
+ * \section volv Volumes
+ * These are the actual volumes that are set for sources and sinks. The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and maximum can be
+ * limited by actual project.
+ * - am::am_volume_t describes the volume
+ */
+
+/**
+ * \page prop Properties
+ * \section soundprop SoundProperties & MainSoundProperties
+ * SoundProperties are properties that are related to either a source or a sink. They are product specific and are used to set source or sink specific properties.
+ * This could be for example: equalizer settings, relative volume offsets but also bool information "surround sound on/off".
+ * A soundProperty is defined by its type (am_SoundProperty_e, a product specific enum) and a value (integer) that is interpreted according to the type.
+ * There are not limits how many properties a sink or a source can have. SoundProperties in contradiction to MainSoundProperties are not visible to the
+ * CommandInterface.\n
+ * - am::am_SoundProperty_s describe the of the SoundProperties
+ * - am::am_MainSoundProperty_s describe the attributes of MainSoundProperties
+ *
+ * \section sys SystemProperties
+ * are properties that apply to the whole system or parts of it but cannot be tight to a specific sink or source. They are product specific and could be used
+ * for example to set general behavior like all interrupts on/off for example. The information is only exchanged between the commandInterface and the
+ * AudioManagerController. The AudioManagerController has to interpret the value and react accordingly.
+ * - am::am_SystemProperty_s describes the attributes of Systemproperties
+ */
+
+/**
+ * \page misc Miscellaneous
+ *
+ * \section connfor Connection Formats
+ * Every flow of audio is using a format to exchange data. The format that the source and the sink uses must match together in order to have an undisturbed
+ * experience. It is common that sources and sinks are capable of supporting more than one audioformat.\n
+ * So all sources and sinks register with a list of connectionFormats that they support and for each connection a format must be chosen that is then used
+ * to transport the audio data. Gateways (and Soundconverters) have the information which connectionFormat can be transformed into another one.
+ * - am::am_ConnectionFormat_e has all formats listed.
+ *
+ * \section pers Persistence & Lifecycle
+ * Details of persistence can be done when the si-team have defined the components and interfaces in the Enterprise Architect model.
+ * So much is clear: the persistence will be based on POSIX interfaces that can be used to read and write data.\n
+ * Persistence is a very system specific topic: what needs to be remembered over lifecycles, what will be reset to default? So this needs to be done via the
+ * AudioMangerController. The Controller will then enter the values read from the persistence and write them to the daemon.
+ * The lifecycle itself will be handles by the daemon which will then fire hooks in the controller to make sure appropriate actions are taken.
*
* \section speed Speed dependent volume
- * The adjustments for the speed are done product specific in the controller. The speed information itself is retrieved by the AudioManagerDaemon, sampled and quantified and forwarded to the controller.\n
+ * The adjustments for the speed are done product specific in the controller. The speed information itself is retrieved by the AudioManagerDaemon, sampled and
+ * quantified and forwarded to the controller. The interface in not yet defined !\n
* Turning speed controlled volume on/off and possible settings are achieved via SinkSoundProperty settings.
- *
- * \section Lipsync
- * 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 Mueller
- * @created 25-Feb-2012 3:54:06 PM
+ */
+
+/**
+ * \page comp Compiling & Co
+ * \todo add README
+ * \include ../README
*/
#ifndef MAINPAGE_H_
diff --git a/AudioManagerDaemon/include/TAmPluginTemplate.h b/AudioManagerDaemon/include/TAmPluginTemplate.h
index e525ce3..68fe786 100644
--- a/AudioManagerDaemon/include/TAmPluginTemplate.h
+++ b/AudioManagerDaemon/include/TAmPluginTemplate.h
@@ -1,24 +1,22 @@
/**
- * 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 TAmPluginTemplate.h
+ * 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 TAmPluginTemplate.h
+ * For further information see http://www.genivi.org/.
*
*/
@@ -33,8 +31,9 @@ namespace am
{
/**
- * This template tries to load a library and cast ot to a class
+ * * This template tries to load a library and cast to a class
* @param libname the full path to the library to be loaded
+ * @param libraryHandle the handle to the library that gets returned
* @return returns the pointer to the class to be loaded
*/
template<class T> T* getCreateFunction(const std::string& libname, void*& libraryHandle)
@@ -56,7 +55,7 @@ template<class T> T* getCreateFunction(const std::string& libname, void*& librar
if (!libraryHandle || dlopen_error)
{
logError("getCreateFunction : dlopen failed",dlopen_error);
- return 0;
+ return (0);
}
// get entry point from shared lib
@@ -84,7 +83,7 @@ template<class T> T* getCreateFunction(const std::string& libname, void*& librar
{
logInfo("getCreateFunction : loaded successfully plugin", createFunctionName);
}
- return createFunction;
+ return (createFunction);
}
}
diff --git a/AudioManagerDaemon/src/CAmCommandReceiver.cpp b/AudioManagerDaemon/src/CAmCommandReceiver.cpp
index c6f760c..95554bd 100644
--- a/AudioManagerDaemon/src/CAmCommandReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmCommandReceiver.cpp
@@ -1,34 +1,32 @@
/**
- * 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 CommandReveiver.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \file CAmCommandReceiver.cpp
+ * For further information see http://www.genivi.org/.
*
*/
#include "CAmCommandReceiver.h"
+#include <cassert>
+#include <algorithm>
#include "CAmDatabaseHandler.h"
#include "CAmControlSender.h"
#include "shared/CAmDltWrapper.h"
-#include <shared/CAmSocketHandler.h>
-#include <cassert>
-#include <algorithm>
+#include "shared/CAmSocketHandler.h"
namespace am
{
@@ -71,111 +69,111 @@ CAmCommandReceiver::~CAmCommandReceiver()
am_Error_e CAmCommandReceiver::connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
{
logInfo("CommandReceiver::connect got called, sourceID=", sourceID, "sinkID=", sinkID);
- return mControlSender->hookUserConnectionRequest(sourceID, sinkID, mainConnectionID);
+ return (mControlSender->hookUserConnectionRequest(sourceID, sinkID, mainConnectionID));
}
am_Error_e CAmCommandReceiver::disconnect(const am_mainConnectionID_t mainConnectionID)
{
logInfo("CommandReceiver::disconnect got called, mainConnectionID=", mainConnectionID);
- return mControlSender->hookUserDisconnectionRequest(mainConnectionID);
+ return (mControlSender->hookUserDisconnectionRequest(mainConnectionID));
}
am_Error_e CAmCommandReceiver::setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume)
{
logInfo("CommandReceiver::setVolume got called, sinkID=", sinkID, "volume=", volume);
- return mControlSender->hookUserVolumeChange(sinkID, volume);
+ return (mControlSender->hookUserVolumeChange(sinkID, volume));
}
am_Error_e CAmCommandReceiver::volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep)
{
logInfo("CommandReceiver::volumeStep got called, sinkID=", sinkID, "volumeStep=", volumeStep);
- return mControlSender->hookUserVolumeStep(sinkID, volumeStep);
+ return (mControlSender->hookUserVolumeStep(sinkID, volumeStep));
}
am_Error_e CAmCommandReceiver::setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
{
logInfo("CommandReceiver::setSinkMuteState got called, sinkID=", sinkID, "muteState=", muteState);
- return mControlSender->hookUserSetSinkMuteState(sinkID, muteState);
+ return (mControlSender->hookUserSetSinkMuteState(sinkID, muteState));
}
am_Error_e CAmCommandReceiver::setMainSinkSoundProperty(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
logInfo("CommandReceiver::setMainSinkSoundProperty got called, sinkID=", sinkID, "soundPropertyType=", soundProperty.type, "soundPropertyValue=", soundProperty.value);
- return mControlSender->hookUserSetMainSinkSoundProperty(sinkID, soundProperty);
+ return (mControlSender->hookUserSetMainSinkSoundProperty(sinkID, soundProperty));
}
am_Error_e CAmCommandReceiver::setMainSourceSoundProperty(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
logInfo("CommandReceiver::setMainSourceSoundProperty got called, sourceID=", sourceID, "soundPropertyType=", soundProperty.type, "soundPropertyValue=", soundProperty.value);
- return mControlSender->hookUserSetMainSourceSoundProperty(sourceID, soundProperty);
+ return (mControlSender->hookUserSetMainSourceSoundProperty(sourceID, soundProperty));
}
am_Error_e CAmCommandReceiver::setSystemProperty(const am_SystemProperty_s & property)
{
logInfo("CommandReceiver::setSystemProperty got called", "type=", property.type, "soundPropertyValue=", property.value);
- return mControlSender->hookUserSetSystemProperty(property);
+ return (mControlSender->hookUserSetSystemProperty(property));
}
am_Error_e CAmCommandReceiver::getListMainConnections(std::vector<am_MainConnectionType_s> & listConnections) const
{
- return mDatabaseHandler->getListVisibleMainConnections(listConnections);
+ return (mDatabaseHandler->getListVisibleMainConnections(listConnections));
}
am_Error_e CAmCommandReceiver::getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const
{
- return mDatabaseHandler->getListMainSinks(listMainSinks);
+ return (mDatabaseHandler->getListMainSinks(listMainSinks));
}
am_Error_e CAmCommandReceiver::getListMainSources(std::vector<am_SourceType_s>& listMainSources) const
{
- return mDatabaseHandler->getListMainSources(listMainSources);
+ return (mDatabaseHandler->getListMainSources(listMainSources));
}
am_Error_e CAmCommandReceiver::getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s> & listSoundProperties) const
{
- return mDatabaseHandler->getListMainSinkSoundProperties(sinkID, listSoundProperties);
+ return (mDatabaseHandler->getListMainSinkSoundProperties(sinkID, listSoundProperties));
}
am_Error_e CAmCommandReceiver::getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s> & listSourceProperties) const
{
- return mDatabaseHandler->getListMainSourceSoundProperties(sourceID, listSourceProperties);
+ return (mDatabaseHandler->getListMainSourceSoundProperties(sourceID, listSourceProperties));
}
am_Error_e CAmCommandReceiver::getListSourceClasses(std::vector<am_SourceClass_s> & listSourceClasses) const
{
- return mDatabaseHandler->getListSourceClasses(listSourceClasses);
+ return (mDatabaseHandler->getListSourceClasses(listSourceClasses));
}
am_Error_e CAmCommandReceiver::getListSinkClasses(std::vector<am_SinkClass_s> & listSinkClasses) const
{
- return mDatabaseHandler->getListSinkClasses(listSinkClasses);
+ return (mDatabaseHandler->getListSinkClasses(listSinkClasses));
}
am_Error_e CAmCommandReceiver::getListSystemProperties(std::vector<am_SystemProperty_s> & listSystemProperties) const
{
- return mDatabaseHandler->getListSystemProperties(listSystemProperties);
+ return (mDatabaseHandler->getListSystemProperties(listSystemProperties));
}
am_Error_e CAmCommandReceiver::getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t & delay) const
{
- return mDatabaseHandler->getTimingInformation(mainConnectionID, delay);
+ return (mDatabaseHandler->getTimingInformation(mainConnectionID, delay));
}
am_Error_e CAmCommandReceiver::getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const
{
#ifdef WITH_DBUS_WRAPPER
dbusConnectionWrapper = mDBusWrapper;
- return E_OK;
+ return (E_OK);
#else
- return E_UNKNOWN;
+ return (E_UNKNOWN);
#endif /*WITH_DBUS_WRAPPER*/
}
am_Error_e CAmCommandReceiver::getSocketHandler(CAmSocketHandler *& socketHandler) const
{
socketHandler = mSocketHandler;
- return E_OK;
+ return (E_OK);
}
void CAmCommandReceiver::getInterfaceVersion(std::string & version) const
@@ -201,14 +199,14 @@ uint16_t CAmCommandReceiver::getStartupHandle()
{
uint16_t handle = ++handleCount; //todo: handle overflow
mListStartupHandles.push_back(handle);
- return handle;
+ return (handle);
}
uint16_t CAmCommandReceiver::getRundownHandle()
{
uint16_t handle = ++handleCount; //todo: handle overflow
mListRundownHandles.push_back(handle);
- return handle;
+ return (handle);
}
void CAmCommandReceiver::waitOnStartup(bool startup)
diff --git a/AudioManagerDaemon/src/CAmCommandSender.cpp b/AudioManagerDaemon/src/CAmCommandSender.cpp
index 0ada15c..d16485f 100644
--- a/AudioManagerDaemon/src/CAmCommandSender.cpp
+++ b/AudioManagerDaemon/src/CAmCommandSender.cpp
@@ -1,24 +1,22 @@
/**
- * 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 CAmCommandSender.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 CAmCommandSender.cpp
+ * For further information see http://www.genivi.org/.
*
*/
@@ -33,13 +31,15 @@
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
-//!< macro to call all interfaces
+/**
+ * macro to call all interfaces
+ */
#define CALL_ALL_INTERFACES(...) \
- std::vector<IAmCommandSend*>::iterator iter = mListInterfaces.begin(); \
- std::vector<IAmCommandSend*>::iterator iterEnd = mListInterfaces.end(); \
+ std::vector<IAmCommandSend*>::iterator iter = mListInterfaces.begin(); \
+ std::vector<IAmCommandSend*>::iterator iterEnd = mListInterfaces.end(); \
for (; iter<iterEnd;++iter) \
{ \
(*iter)->__VA_ARGS__; \
@@ -151,7 +151,7 @@ am_Error_e CAmCommandSender::startupInterfaces(CAmCommandReceiver *iCommandRecei
returnError = error;
}
}
- return returnError;
+ return (returnError);
}
void CAmCommandSender::cbNumberOfSinkClassesChanged()
@@ -271,7 +271,7 @@ void CAmCommandSender::getInterfaceVersion(std::string & version) const
am_Error_e am::CAmCommandSender::getListPlugins(std::vector<std::string> & interfaces) const
{
interfaces = mListLibraryNames;
- return E_OK;
+ return (E_OK);
}
void CAmCommandSender::unloadLibraries(void)
diff --git a/AudioManagerDaemon/src/CAmControlReceiver.cpp b/AudioManagerDaemon/src/CAmControlReceiver.cpp
index 6d68089..3d64226 100644
--- a/AudioManagerDaemon/src/CAmControlReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmControlReceiver.cpp
@@ -1,36 +1,34 @@
/**
- * 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 CAmControlReceiver.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 CAmControlReceiver.cpp
+ * For further information see http://www.genivi.org/.
*
*/
-#include <config.h>
-#include <shared/CAmSocketHandler.h>
#include "CAmControlReceiver.h"
+#include <cassert>
+#include "config.h"
#include "CAmDatabaseHandler.h"
#include "CAmRoutingSender.h"
#include "CAmCommandSender.h"
#include "CAmRouter.h"
#include "shared/CAmDltWrapper.h"
-#include <cassert>
+#include "shared/CAmSocketHandler.h"
namespace am {
@@ -54,7 +52,7 @@ CAmControlReceiver::~CAmControlReceiver()
am_Error_e CAmControlReceiver::getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s> & returnList)
{
- return mRouter->getRoute(onlyfree, sourceID, sinkID, returnList);
+ return (mRouter->getRoute(onlyfree, sourceID, sinkID, returnList));
}
am_Error_e CAmControlReceiver::connect(am_Handle_s & handle, am_connectionID_t & connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID)
@@ -69,10 +67,10 @@ am_Error_e CAmControlReceiver::connect(am_Handle_s & handle, am_connectionID_t &
//todo: enter function to find out what happends if the same connection is in the course of being build up.
if (mDatabaseHandler->existConnection(tempConnection))
- return E_ALREADY_EXISTS; //todo:enter the correct connectionID here?
+ return (E_ALREADY_EXISTS); //todo:enter the correct connectionID here?
mDatabaseHandler->enterConnectionDB(tempConnection, connectionID);
- return mRoutingSender->asyncConnect(handle, connectionID, sourceID, sinkID, format);
+ return (mRoutingSender->asyncConnect(handle, connectionID, sourceID, sinkID, format));
}
am_Error_e CAmControlReceiver::disconnect(am_Handle_s & handle, const am_connectionID_t connectionID)
@@ -80,8 +78,8 @@ am_Error_e CAmControlReceiver::disconnect(am_Handle_s & handle, const am_connect
logInfo("CAmControlReceiver::disconnect got called, connectionID=", connectionID);
if (!mDatabaseHandler->existConnectionID(connectionID))
- return E_NON_EXISTENT; //todo: check with EA model and correct
- return mRoutingSender->asyncDisconnect(handle, connectionID);
+ return (E_NON_EXISTENT); //todo: check with EA model and correct
+ return (mRoutingSender->asyncDisconnect(handle, connectionID));
}
am_Error_e CAmControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime)
@@ -89,8 +87,8 @@ am_Error_e CAmControlReceiver::crossfade(am_Handle_s & handle, const am_HotSink_
logInfo("CAmControlReceiver::crossfade got called, hotSource=", hotSource, "crossfaderID=", crossfaderID, "rampType=", rampType, "rampTime=", rampTime);
if (!mDatabaseHandler->existcrossFader(crossfaderID))
- return E_NON_EXISTENT;
- return mRoutingSender->asyncCrossFade(handle, crossfaderID, hotSource, rampType, rampTime);
+ return (E_NON_EXISTENT);
+ return (mRoutingSender->asyncCrossFade(handle, crossfaderID, hotSource, rampType, rampTime));
}
am_Error_e CAmControlReceiver::setSourceState(am_Handle_s & handle, const am_sourceID_t sourceID, const am_SourceState_e state)
@@ -99,10 +97,10 @@ am_Error_e CAmControlReceiver::setSourceState(am_Handle_s & handle, const am_sou
am_SourceState_e sourceState;
if (mDatabaseHandler->getSoureState(sourceID, sourceState) != E_OK)
- return E_UNKNOWN;
+ return (E_UNKNOWN);
if (sourceState == state)
- return E_NO_CHANGE;
- return mRoutingSender->asyncSetSourceState(handle, sourceID, state);
+ return (E_NO_CHANGE);
+ return (mRoutingSender->asyncSetSourceState(handle, sourceID, state));
}
am_Error_e CAmControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
@@ -111,10 +109,10 @@ am_Error_e CAmControlReceiver::setSinkVolume(am_Handle_s & handle, const am_sink
am_volume_t tempVolume;
if (mDatabaseHandler->getSinkVolume(sinkID, tempVolume) != E_OK)
- return E_UNKNOWN;
+ return (E_UNKNOWN);
if (tempVolume == volume)
- return E_NO_CHANGE;
- return mRoutingSender->asyncSetSinkVolume(handle, sinkID, volume, ramp, time);
+ return (E_NO_CHANGE);
+ return (mRoutingSender->asyncSetSinkVolume(handle, sinkID, volume, ramp, time));
}
am_Error_e CAmControlReceiver::setSourceVolume(am_Handle_s & handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time)
@@ -123,10 +121,10 @@ am_Error_e CAmControlReceiver::setSourceVolume(am_Handle_s & handle, const am_so
am_volume_t tempVolume;
if (mDatabaseHandler->getSourceVolume(sourceID, tempVolume) != E_OK)
- return E_UNKNOWN;
+ return (E_UNKNOWN);
if (tempVolume == volume)
- return E_NO_CHANGE;
- return mRoutingSender->asyncSetSourceVolume(handle, sourceID, volume, rampType, time);
+ return (E_NO_CHANGE);
+ return (mRoutingSender->asyncSetSourceVolume(handle, sourceID, volume, rampType, time));
}
am_Error_e CAmControlReceiver::setSinkSoundProperty(am_Handle_s & handle, const am_sinkID_t sinkID, const am_SoundProperty_s & soundProperty)
@@ -135,10 +133,10 @@ am_Error_e CAmControlReceiver::setSinkSoundProperty(am_Handle_s & handle, const
uint16_t value;
if (mDatabaseHandler->getSinkSoundPropertyValue(sinkID, soundProperty.type, value) != E_OK)
- return E_UNKNOWN;
+ return (E_UNKNOWN);
if (value == soundProperty.value)
- return E_NO_CHANGE;
- return mRoutingSender->asyncSetSinkSoundProperty(handle, sinkID, soundProperty);
+ return (E_NO_CHANGE);
+ return (mRoutingSender->asyncSetSinkSoundProperty(handle, sinkID, soundProperty));
}
am_Error_e CAmControlReceiver::setSinkSoundProperties(am_Handle_s & handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s> & listSoundProperties)
@@ -166,10 +164,10 @@ am_Error_e CAmControlReceiver::setSourceSoundProperty(am_Handle_s & handle, cons
uint16_t value;
if (mDatabaseHandler->getSourceSoundPropertyValue(sourceID, soundProperty.type, value) != E_OK)
- return E_UNKNOWN;
+ return (E_UNKNOWN);
if (value == soundProperty.value)
- return E_NO_CHANGE;
- return mRoutingSender->asyncSetSourceSoundProperty(handle, sourceID, soundProperty);
+ return (E_NO_CHANGE);
+ return (mRoutingSender->asyncSetSourceSoundProperty(handle, sourceID, soundProperty));
}
am_Error_e CAmControlReceiver::setSourceSoundProperties(am_Handle_s & handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s> & listSoundProperties)
@@ -197,272 +195,272 @@ am_Error_e CAmControlReceiver::setDomainState(const am_domainID_t domainID, cons
am_DomainState_e tempState = DS_UNKNOWN;
if (mDatabaseHandler->getDomainState(domainID, tempState) != E_OK)
- return E_UNKNOWN;
+ return (E_UNKNOWN);
if (tempState == domainState)
- return E_NO_CHANGE;
- return mRoutingSender->setDomainState(domainID, domainState);
+ return (E_NO_CHANGE);
+ return (mRoutingSender->setDomainState(domainID, domainState));
}
am_Error_e CAmControlReceiver::abortAction(const am_Handle_s handle)
{
logInfo("CAmControlReceiver::abortAction got called, handle.type=", handle.handle, "handle.handleType=", handle.handleType);
- return mRoutingSender->asyncAbort(handle);
+ return (mRoutingSender->asyncAbort(handle));
}
am_Error_e CAmControlReceiver::enterDomainDB(const am_Domain_s & domainData, am_domainID_t & domainID)
{
- return mDatabaseHandler->enterDomainDB(domainData, domainID);
+ return (mDatabaseHandler->enterDomainDB(domainData, domainID));
}
am_Error_e CAmControlReceiver::enterMainConnectionDB(const am_MainConnection_s & mainConnectionData, am_mainConnectionID_t & connectionID)
{
- return mDatabaseHandler->enterMainConnectionDB(mainConnectionData, connectionID);
+ return (mDatabaseHandler->enterMainConnectionDB(mainConnectionData, connectionID));
}
am_Error_e CAmControlReceiver::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
{
- return mDatabaseHandler->enterSinkDB(sinkData, sinkID);
+ return (mDatabaseHandler->enterSinkDB(sinkData, sinkID));
}
am_Error_e CAmControlReceiver::enterCrossfaderDB(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
{
- return mDatabaseHandler->enterCrossfaderDB(crossfaderData, crossfaderID);
+ return (mDatabaseHandler->enterCrossfaderDB(crossfaderData, crossfaderID));
}
am_Error_e CAmControlReceiver::enterGatewayDB(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
{
- return mDatabaseHandler->enterGatewayDB(gatewayData, gatewayID);
+ return (mDatabaseHandler->enterGatewayDB(gatewayData, gatewayID));
}
am_Error_e CAmControlReceiver::enterSourceDB(const am_Source_s & sourceData, am_sourceID_t & sourceID)
{
- return mDatabaseHandler->enterSourceDB(sourceData, sourceID);
+ return (mDatabaseHandler->enterSourceDB(sourceData, sourceID));
}
am_Error_e CAmControlReceiver::enterSinkClassDB(const am_SinkClass_s & sinkClass, am_sinkClass_t & sinkClassID)
{
- return mDatabaseHandler->enterSinkClassDB(sinkClass, sinkClassID);
+ return (mDatabaseHandler->enterSinkClassDB(sinkClass, sinkClassID));
}
am_Error_e CAmControlReceiver::enterSourceClassDB(am_sourceClass_t & sourceClassID, const am_SourceClass_s & sourceClass)
{
- return mDatabaseHandler->enterSourceClassDB(sourceClassID, sourceClass);
+ return (mDatabaseHandler->enterSourceClassDB(sourceClassID, sourceClass));
}
am_Error_e CAmControlReceiver::enterSystemPropertiesListDB(const std::vector<am_SystemProperty_s> & listSystemProperties)
{
- return mDatabaseHandler->enterSystemProperties(listSystemProperties);
+ return (mDatabaseHandler->enterSystemProperties(listSystemProperties));
}
am_Error_e CAmControlReceiver::changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const std::vector<am_connectionID_t>& listConnectionID)
{
- return mDatabaseHandler->changeMainConnectionRouteDB(mainconnectionID, listConnectionID);
+ return (mDatabaseHandler->changeMainConnectionRouteDB(mainconnectionID, listConnectionID));
}
am_Error_e CAmControlReceiver::changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState)
{
- return mDatabaseHandler->changeMainConnectionStateDB(mainconnectionID, connectionState);
+ return (mDatabaseHandler->changeMainConnectionStateDB(mainconnectionID, connectionState));
}
am_Error_e CAmControlReceiver::changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID)
{
- return mDatabaseHandler->changeSinkMainVolumeDB(mainVolume, sinkID);
+ return (mDatabaseHandler->changeSinkMainVolumeDB(mainVolume, sinkID));
}
am_Error_e CAmControlReceiver::changeSinkAvailabilityDB(const am_Availability_s & availability, const am_sinkID_t sinkID)
{
- return mDatabaseHandler->changeSinkAvailabilityDB(availability, sinkID);
+ return (mDatabaseHandler->changeSinkAvailabilityDB(availability, sinkID));
}
am_Error_e CAmControlReceiver::changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID)
{
- return mDatabaseHandler->changDomainStateDB(domainState, domainID);
+ return (mDatabaseHandler->changDomainStateDB(domainState, domainID));
}
am_Error_e CAmControlReceiver::changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID)
{
- return mDatabaseHandler->changeSinkMuteStateDB(muteState, sinkID);
+ return (mDatabaseHandler->changeSinkMuteStateDB(muteState, sinkID));
}
am_Error_e CAmControlReceiver::changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
{
- return mDatabaseHandler->changeMainSinkSoundPropertyDB(soundProperty, sinkID);
+ return (mDatabaseHandler->changeMainSinkSoundPropertyDB(soundProperty, sinkID));
}
am_Error_e CAmControlReceiver::changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
{
- return mDatabaseHandler->changeMainSinkSoundPropertyDB(soundProperty, sourceID);
+ return (mDatabaseHandler->changeMainSinkSoundPropertyDB(soundProperty, sourceID));
}
am_Error_e CAmControlReceiver::changeSourceAvailabilityDB(const am_Availability_s & availability, const am_sourceID_t sourceID)
{
- return mDatabaseHandler->changeSourceAvailabilityDB(availability, sourceID);
+ return (mDatabaseHandler->changeSourceAvailabilityDB(availability, sourceID));
}
am_Error_e CAmControlReceiver::changeSystemPropertyDB(const am_SystemProperty_s & property)
{
- return mDatabaseHandler->changeSystemPropertyDB(property);
+ return (mDatabaseHandler->changeSystemPropertyDB(property));
}
am_Error_e CAmControlReceiver::removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID)
{
- return mDatabaseHandler->removeMainConnectionDB(mainConnectionID);
+ return (mDatabaseHandler->removeMainConnectionDB(mainConnectionID));
}
am_Error_e CAmControlReceiver::removeSinkDB(const am_sinkID_t sinkID)
{
- return mDatabaseHandler->removeSinkDB(sinkID);
+ return (mDatabaseHandler->removeSinkDB(sinkID));
}
am_Error_e CAmControlReceiver::removeSourceDB(const am_sourceID_t sourceID)
{
- return mDatabaseHandler->removeSourceDB(sourceID);
+ return (mDatabaseHandler->removeSourceDB(sourceID));
}
am_Error_e CAmControlReceiver::removeGatewayDB(const am_gatewayID_t gatewayID)
{
- return mDatabaseHandler->removeGatewayDB(gatewayID);
+ return (mDatabaseHandler->removeGatewayDB(gatewayID));
}
am_Error_e CAmControlReceiver::removeCrossfaderDB(const am_crossfaderID_t crossfaderID)
{
- return mDatabaseHandler->removeCrossfaderDB(crossfaderID);
+ return (mDatabaseHandler->removeCrossfaderDB(crossfaderID));
}
am_Error_e CAmControlReceiver::removeDomainDB(const am_domainID_t domainID)
{
- return mDatabaseHandler->removeDomainDB(domainID);
+ return (mDatabaseHandler->removeDomainDB(domainID));
}
am_Error_e CAmControlReceiver::getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s & classInfo) const
{
- return mDatabaseHandler->getSourceClassInfoDB(sourceID, classInfo);
+ return (mDatabaseHandler->getSourceClassInfoDB(sourceID, classInfo));
}
am_Error_e CAmControlReceiver::getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s & sinkClass) const
{
- return mDatabaseHandler->getSinkClassInfoDB(sinkID, sinkClass);
+ return (mDatabaseHandler->getSinkClassInfoDB(sinkID, sinkClass));
}
am_Error_e CAmControlReceiver::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s & sinkData) const
{
- return mDatabaseHandler->getSinkInfoDB(sinkID, sinkData);
+ return (mDatabaseHandler->getSinkInfoDB(sinkID, sinkData));
}
am_Error_e CAmControlReceiver::getSourceInfoDB(const am_sourceID_t sourceID, am_Source_s & sourceData) const
{
- return mDatabaseHandler->getSourceInfoDB(sourceID, sourceData);
+ return (mDatabaseHandler->getSourceInfoDB(sourceID, sourceData));
}
am_Error_e CAmControlReceiver::getMainConnectionInfoDB(const am_mainConnectionID_t mainConnectionID, am_MainConnection_s & mainConnectionData) const
{
- return mDatabaseHandler->getMainConnectionInfoDB(mainConnectionID, mainConnectionData);
+ return (mDatabaseHandler->getMainConnectionInfoDB(mainConnectionID, mainConnectionData));
}
am_Error_e CAmControlReceiver::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s & gatewayData) const
{
- return mDatabaseHandler->getGatewayInfoDB(gatewayID, gatewayData);
+ return (mDatabaseHandler->getGatewayInfoDB(gatewayID, gatewayData));
}
am_Error_e CAmControlReceiver::getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s & crossfaderData) const
{
- return mDatabaseHandler->getCrossfaderInfoDB(crossfaderID, crossfaderData);
+ return (mDatabaseHandler->getCrossfaderInfoDB(crossfaderID, crossfaderData));
}
am_Error_e CAmControlReceiver::getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t> & listSinkID) const
{
- return mDatabaseHandler->getListSinksOfDomain(domainID, listSinkID);
+ return (mDatabaseHandler->getListSinksOfDomain(domainID, listSinkID));
}
am_Error_e CAmControlReceiver::getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t> & listSourceID) const
{
- return mDatabaseHandler->getListSourcesOfDomain(domainID, listSourceID);
+ return (mDatabaseHandler->getListSourcesOfDomain(domainID, listSourceID));
}
am_Error_e CAmControlReceiver::getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t> & listGatewaysID) const
{
- return mDatabaseHandler->getListCrossfadersOfDomain(domainID, listGatewaysID);
+ return (mDatabaseHandler->getListCrossfadersOfDomain(domainID, listGatewaysID));
}
am_Error_e CAmControlReceiver::getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t> & listGatewaysID) const
{
- return mDatabaseHandler->getListGatewaysOfDomain(domainID, listGatewaysID);
+ return (mDatabaseHandler->getListGatewaysOfDomain(domainID, listGatewaysID));
}
am_Error_e CAmControlReceiver::getListMainConnections(std::vector<am_MainConnection_s> & listMainConnections) const
{
- return mDatabaseHandler->getListMainConnections(listMainConnections);
+ return (mDatabaseHandler->getListMainConnections(listMainConnections));
}
am_Error_e CAmControlReceiver::getListDomains(std::vector<am_Domain_s> & listDomains) const
{
- return mDatabaseHandler->getListDomains(listDomains);
+ return (mDatabaseHandler->getListDomains(listDomains));
}
am_Error_e CAmControlReceiver::getListConnections(std::vector<am_Connection_s> & listConnections) const
{
- return mDatabaseHandler->getListConnections(listConnections);
+ return (mDatabaseHandler->getListConnections(listConnections));
}
am_Error_e CAmControlReceiver::getListSinks(std::vector<am_Sink_s> & listSinks) const
{
- return mDatabaseHandler->getListSinks(listSinks);
+ return (mDatabaseHandler->getListSinks(listSinks));
}
am_Error_e CAmControlReceiver::getListSources(std::vector<am_Source_s> & listSources) const
{
- return mDatabaseHandler->getListSources(listSources);
+ return (mDatabaseHandler->getListSources(listSources));
}
am_Error_e CAmControlReceiver::getListSourceClasses(std::vector<am_SourceClass_s> & listSourceClasses) const
{
- return mDatabaseHandler->getListSourceClasses(listSourceClasses);
+ return (mDatabaseHandler->getListSourceClasses(listSourceClasses));
}
am_Error_e CAmControlReceiver::getListHandles(std::vector<am_Handle_s> & listHandles) const
{
- return mRoutingSender->getListHandles(listHandles);
+ return (mRoutingSender->getListHandles(listHandles));
}
am_Error_e CAmControlReceiver::getListCrossfaders(std::vector<am_Crossfader_s> & listCrossfaders) const
{
- return mDatabaseHandler->getListCrossfaders(listCrossfaders);
+ return (mDatabaseHandler->getListCrossfaders(listCrossfaders));
}
am_Error_e CAmControlReceiver::getListGateways(std::vector<am_Gateway_s> & listGateways) const
{
- return mDatabaseHandler->getListGateways(listGateways);
+ return (mDatabaseHandler->getListGateways(listGateways));
}
am_Error_e CAmControlReceiver::getListSinkClasses(std::vector<am_SinkClass_s> & listSinkClasses) const
{
- return mDatabaseHandler->getListSinkClasses(listSinkClasses);
+ return (mDatabaseHandler->getListSinkClasses(listSinkClasses));
}
am_Error_e CAmControlReceiver::getListSystemProperties(std::vector<am_SystemProperty_s> & listSystemProperties) const
{
- return mDatabaseHandler->getListSystemProperties(listSystemProperties);
+ return (mDatabaseHandler->getListSystemProperties(listSystemProperties));
}
am_Error_e CAmControlReceiver::changeSinkClassInfoDB(const am_SinkClass_s & classInfo)
{
- return mDatabaseHandler->changeSinkClassInfoDB(classInfo);
+ return (mDatabaseHandler->changeSinkClassInfoDB(classInfo));
}
am_Error_e CAmControlReceiver::changeSourceClassInfoDB(const am_SourceClass_s & classInfo)
{
- return mDatabaseHandler->changeSourceClassInfoDB(classInfo);
+ return(mDatabaseHandler->changeSourceClassInfoDB(classInfo));
}
am_Error_e CAmControlReceiver::removeSinkClassDB(const am_sinkClass_t sinkClassID)
{
- return mDatabaseHandler->removeSinkClassDB(sinkClassID);
+ return (mDatabaseHandler->removeSinkClassDB(sinkClassID));
}
am_Error_e CAmControlReceiver::removeSourceClassDB(const am_sourceClass_t sourceClassID)
{
- return mDatabaseHandler->removeSourceClassDB(sourceClassID);
+ return (mDatabaseHandler->removeSourceClassDB(sourceClassID));
}
void CAmControlReceiver::setCommandReady()
@@ -490,7 +488,7 @@ void CAmControlReceiver::confirmControllerRundown()
am_Error_e CAmControlReceiver::getSocketHandler(CAmSocketHandler *& socketHandler)
{
socketHandler = mSocketHandler;
- return E_OK;
+ return (E_OK);
}
void CAmControlReceiver::setCommandRundown()
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
diff --git a/AudioManagerDaemon/src/CAmDatabaseHandler.cpp b/AudioManagerDaemon/src/CAmDatabaseHandler.cpp
index b9da10e..a13b38c 100644
--- a/AudioManagerDaemon/src/CAmDatabaseHandler.cpp
+++ b/AudioManagerDaemon/src/CAmDatabaseHandler.cpp
@@ -1,53 +1,52 @@
/**
- * 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 CAmDatabaseHandler.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 CAmDatabaseHandler.cpp
+ * For further information see http://www.genivi.org/.
*
*/
#include "CAmDatabaseHandler.h"
-#include "CAmDatabaseObserver.h"
#include <cassert>
#include <vector>
#include <fstream>
#include <sstream>
#include <string>
-#include "shared/CAmDltWrapper.h"
+#include "CAmDatabaseObserver.h"
#include "CAmRouter.h"
-
-#define DOMAIN_TABLE "Domains"
-#define SOURCE_CLASS_TABLE "SourceClasses"
-#define SINK_CLASS_TABLE "SinkClasses"
-#define SOURCE_TABLE "Sources"
-#define SINK_TABLE "Sinks"
-#define GATEWAY_TABLE "Gateways"
-#define CROSSFADER_TABLE "Crossfaders"
-#define CONNECTION_TABLE "Connections"
-#define MAINCONNECTION_TABLE "MainConnections"
-#define INTERRUPT_TABLE "Interrupts"
-#define MAIN_TABLE "MainTable"
-#define SYSTEM_TABLE "SystemProperties"
+#include "shared/CAmDltWrapper.h"
namespace am
{
+#define DOMAIN_TABLE "Domains" //!< domain table
+#define SOURCE_CLASS_TABLE "SourceClasses" //!< source class table
+#define SINK_CLASS_TABLE "SinkClasses" //!< sink class table
+#define SOURCE_TABLE "Sources" //!< source table
+#define SINK_TABLE "Sinks" //!< sink table
+#define GATEWAY_TABLE "Gateways" //!< gateway table
+#define CROSSFADER_TABLE "Crossfaders" //!< crossfader table
+#define CONNECTION_TABLE "Connections" //!< connection table
+#define MAINCONNECTION_TABLE "MainConnections" //!< main connection table
+#define SYSTEM_TABLE "SystemProperties" //!< system properties table
+
+/**
+ * table that holds table informations
+ */
const std::string databaseTables[] =
{ " Domains (domainID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50), busname VARCHAR(50), nodename VARCHAR(50), early BOOL, complete BOOL, state INTEGER, reserved BOOL);", //
" SourceClasses (sourceClassID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(50));", //
@@ -62,21 +61,21 @@ const std::string databaseTables[] =
/**
* template to converts T to std::string
- * @param i the value to be converted
- * @return the string
+ * @param x T
+ * @return string
*/
template<typename T>
inline std::string i2s(T const& x)
{
std::ostringstream o;
o << x;
- return o.str();
+ return (o.str());
}
CAmDatabaseHandler::CAmDatabaseHandler(std::string databasePath) :
- mDatabase(NULL), //
+ mpDatabase(NULL), //
mPath(databasePath), //
- mDatabaseObserver(NULL), //
+ mpDatabaseObserver(NULL), //
mFirstStaticSink(true), //
mFirstStaticSource(true), //
mFirstStaticGateway(true), //
@@ -106,7 +105,7 @@ CAmDatabaseHandler::CAmDatabaseHandler(std::string databasePath) :
CAmDatabaseHandler::~CAmDatabaseHandler()
{
logInfo("Closed Database");
- sqlite3_close(mDatabase);
+ sqlite3_close(mpDatabase);
}
am_Error_e CAmDatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_domainID_t & domainID)
@@ -120,7 +119,7 @@ am_Error_e CAmDatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_
sqlite3_stmt* query = NULL, *queryFinal;
int eCode = 0;
std::string command = "SELECT domainID FROM " + std::string(DOMAIN_TABLE) + " WHERE name=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, domainData.name.c_str(), domainData.name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -134,16 +133,16 @@ am_Error_e CAmDatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_
else
{
logError("DatabaseHandler::enterDomainDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterDomainDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &queryFinal, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &queryFinal, NULL);
sqlite3_bind_text(queryFinal, 1, domainData.name.c_str(), domainData.name.size(), SQLITE_STATIC);
sqlite3_bind_text(queryFinal, 2, domainData.busname.c_str(), domainData.busname.size(), SQLITE_STATIC);
sqlite3_bind_text(queryFinal, 3, domainData.nodename.c_str(), domainData.nodename.size(), SQLITE_STATIC);
@@ -155,24 +154,24 @@ am_Error_e CAmDatabaseHandler::enterDomainDB(const am_Domain_s & domainData, am_
if ((eCode = sqlite3_step(queryFinal)) != SQLITE_DONE)
{
logError("DatabaseHandler::enterDomainDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(queryFinal)) != SQLITE_OK)
{
logError("DatabaseHandler::enterDomainDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- domainID = sqlite3_last_insert_rowid(mDatabase);
+ domainID = sqlite3_last_insert_rowid(mpDatabase);
logInfo("DatabaseHandler::enterDomainDB entered new domain with name=", domainData.name, "busname=", domainData.busname, "nodename=", domainData.nodename, "assigned ID:", domainID);
am_Domain_s domain = domainData;
domain.domainID = domainID;
- if (mDatabaseObserver)
- mDatabaseObserver->newDomain(domain);
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->newDomain(domain);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s & mainConnectionData, am_mainConnectionID_t & connectionID)
@@ -186,7 +185,7 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
int eCode = 0;
int16_t delay = 0;
std::string command = "INSERT INTO " + std::string(MAINCONNECTION_TABLE) + "(sourceID, sinkID, connectionState, delay) VALUES (?,?,?,-1)";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, mainConnectionData.sourceID);
sqlite3_bind_int(query, 2, mainConnectionData.sinkID);
sqlite3_bind_int(query, 3, mainConnectionData.connectionState);
@@ -194,20 +193,20 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- connectionID = sqlite3_last_insert_rowid(mDatabase);
+ connectionID = sqlite3_last_insert_rowid(mpDatabase);
//now check the connectionTable for all connections in the route. IF connectionID exist
command = "SELECT delay FROM " + std::string(CONNECTION_TABLE) + (" WHERE connectionID=?");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_connectionID_t>::const_iterator elementIterator = mainConnectionData.listConnectionID.begin();
for (; elementIterator < mainConnectionData.listConnectionID.end(); ++elementIterator)
{
@@ -224,7 +223,7 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
else
{
logError("DatabaseHandler::enterMainConnectionDB did not find route for MainConnection:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -232,7 +231,7 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//now we create a table with references to the connections;
@@ -240,7 +239,7 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
assert(this->sqQuery(command));
command = "INSERT INTO MainConnectionRoute" + i2s(connectionID) + "(connectionID) VALUES (?)";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_connectionID_t>::const_iterator listConnectionIterator(mainConnectionData.listConnectionID.begin());
for (; listConnectionIterator < mainConnectionData.listConnectionID.end(); ++listConnectionIterator)
{
@@ -248,7 +247,7 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::enterMainConnectionDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -256,12 +255,12 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterMainConnectionDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::enterMainConnectionDB entered new mainConnection with sourceID", mainConnectionData.sourceID, "sinkID:", mainConnectionData.sinkID, "delay:", delay, "assigned ID:", connectionID);
- if (mDatabaseObserver)
+ if (mpDatabaseObserver)
{
am_MainConnectionType_s mainConnection;
mainConnection.mainConnectionID = connectionID;
@@ -269,14 +268,14 @@ am_Error_e CAmDatabaseHandler::enterMainConnectionDB(const am_MainConnection_s &
mainConnection.delay = delay;
mainConnection.sinkID = mainConnectionData.sinkID;
mainConnection.sourceID = mainConnectionData.sourceID;
- mDatabaseObserver->newMainConnection(mainConnection);
- mDatabaseObserver->mainConnectionStateChanged(connectionID, mainConnectionData.connectionState);
+ mpDatabaseObserver->newMainConnection(mainConnection);
+ mpDatabaseObserver->mainConnectionStateChanged(connectionID, mainConnectionData.connectionState);
}
//finally, we update the delay value for the maintable
if (delay == 0)
delay = -1;
- return changeDelayMainConnection(delay, connectionID);
+ return (changeDelayMainConnection(delay, connectionID));
}
am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
@@ -285,7 +284,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
assert(sinkData.domainID!=0);
assert(!sinkData.name.empty());
assert(sinkData.sinkClassID!=0);
- // \todo: need to check if class exists?
+ //todo: need to check if class exists?
assert(!sinkData.listConnectionFormats.empty());
assert(sinkData.muteState>=MS_UNKNOWN && sinkData.muteState<=MS_MAX);
@@ -293,7 +292,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
int eCode = 0;
std::string command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE name=? AND reserved=1";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, sinkData.name.c_str(), sinkData.name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
@@ -313,7 +312,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
if (existSinkNameOrID(sinkData.sinkID, sinkData.name))
{
sqlite3_finalize(query);
- return E_ALREADY_EXISTS;
+ return (E_ALREADY_EXISTS);
}
command = "INSERT INTO " + std::string(SINK_TABLE) + "(name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume, reserved, sinkID) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
}
@@ -322,16 +321,16 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
{
logError("DatabaseHandler::enterSinkDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterSinkDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &queryFinal, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &queryFinal, NULL);
sqlite3_bind_text(queryFinal, 1, sinkData.name.c_str(), sinkData.name.size(), SQLITE_STATIC);
sqlite3_bind_int(queryFinal, 2, sinkData.domainID);
sqlite3_bind_int(queryFinal, 3, sinkData.sinkClassID);
@@ -360,18 +359,18 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
{
logError("DatabaseHandler::enterSinkDB SQLITE Step error code:", eCode);
sqlite3_finalize(queryFinal);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(queryFinal)) != SQLITE_OK)
{
logError("DatabaseHandler::enterSinkDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//now read back the sinkID
command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE name=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, sinkData.name.c_str(), sinkData.name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -382,7 +381,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
sinkID = 0;
logError("DatabaseHandler::existSink database error!:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_finalize(query);
@@ -394,7 +393,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
//fill ConnectionFormats
command = "INSERT INTO SinkConnectionFormat" + i2s(sinkID) + std::string("(soundFormat) VALUES (?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = sinkData.listConnectionFormats.begin();
for (; connectionFormatIterator < sinkData.listConnectionFormats.end(); ++connectionFormatIterator)
{
@@ -403,14 +402,14 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
{
logError("DatabaseHandler::enterSinkDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
//Fill SinkSoundProperties
command = "INSERT INTO SinkSoundProperty" + i2s(sinkID) + std::string("(soundPropertyType,value) VALUES (?,?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_SoundProperty_s>::const_iterator SoundPropertyIterator = sinkData.listSoundProperties.begin();
for (; SoundPropertyIterator < sinkData.listSoundProperties.end(); ++SoundPropertyIterator)
{
@@ -420,7 +419,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
{
logError("DatabaseHandler::enterSinkDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -432,7 +431,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
//Fill MainSinkSoundProperties
command = "INSERT INTO SinkMainSoundProperty" + i2s(sinkID) + std::string("(soundPropertyType,value) VALUES (?,?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_MainSoundProperty_s>::const_iterator mainSoundPropertyIterator = sinkData.listMainSoundProperties.begin();
for (; mainSoundPropertyIterator < sinkData.listMainSoundProperties.end(); ++mainSoundPropertyIterator)
{
@@ -442,7 +441,7 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
{
logError("DatabaseHandler::enterSinkDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -451,9 +450,9 @@ am_Error_e CAmDatabaseHandler::enterSinkDB(const am_Sink_s & sinkData, am_sinkID
logInfo("DatabaseHandler::enterSinkDB entered new sink with name", sinkData.name, "domainID:", sinkData.domainID, "classID:", sinkData.sinkClassID, "volume:", sinkData.volume, "assigned ID:", sinkID);
am_Sink_s sink = sinkData;
sink.sinkID = sinkID;
- if (mDatabaseObserver != NULL)
- mDatabaseObserver->newSink(sink);
- return E_OK;
+ if (mpDatabaseObserver != NULL)
+ mpDatabaseObserver->newSink(sink);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterCrossfaderDB(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
@@ -478,11 +477,11 @@ am_Error_e CAmDatabaseHandler::enterCrossfaderDB(const am_Crossfader_s & crossfa
{
//check if the ID already exists
if (existcrossFader(crossfaderData.crossfaderID))
- return E_ALREADY_EXISTS;
+ return (E_ALREADY_EXISTS);
command = "INSERT INTO " + std::string(CROSSFADER_TABLE) + "(name, sinkID_A, sinkID_B, sourceID, hotSink, crossfaderID) VALUES (?,?,?,?,?,?)";
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, crossfaderData.name.c_str(), crossfaderData.name.size(), SQLITE_STATIC);
sqlite3_bind_int(query, 2, crossfaderData.sinkID_A);
@@ -507,19 +506,19 @@ am_Error_e CAmDatabaseHandler::enterCrossfaderDB(const am_Crossfader_s & crossfa
{
logError("DatabaseHandler::enterCrossfaderDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterCrossfaderDB SQLITE Finalize error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//now read back the crossfaderID
command = "SELECT crossfaderID FROM " + std::string(CROSSFADER_TABLE) + " WHERE name=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, crossfaderData.name.c_str(), crossfaderData.name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -530,7 +529,7 @@ am_Error_e CAmDatabaseHandler::enterCrossfaderDB(const am_Crossfader_s & crossfa
crossfaderID = 0;
logError("DatabaseHandler::enterCrossfaderDB database error!:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_finalize(query);
@@ -538,9 +537,9 @@ am_Error_e CAmDatabaseHandler::enterCrossfaderDB(const am_Crossfader_s & crossfa
am_Crossfader_s crossfader(crossfaderData);
crossfader.crossfaderID = crossfaderID;
- if (mDatabaseObserver)
- mDatabaseObserver->newCrossfader(crossfader);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->newCrossfader(crossfader);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
@@ -571,11 +570,11 @@ am_Error_e CAmDatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData,
{
//check if the ID already exists
if (existGateway(gatewayData.gatewayID))
- return E_ALREADY_EXISTS;
+ return (E_ALREADY_EXISTS);
command = "INSERT INTO " + std::string(GATEWAY_TABLE) + "(name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID) VALUES (?,?,?,?,?,?,?)";
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, gatewayData.name.c_str(), gatewayData.name.size(), SQLITE_STATIC);
sqlite3_bind_int(query, 2, gatewayData.sinkID);
sqlite3_bind_int(query, 3, gatewayData.sourceID);
@@ -599,16 +598,16 @@ am_Error_e CAmDatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData,
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::enterGatewayDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterGatewayDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- gatewayID = sqlite3_last_insert_rowid(mDatabase);
+ gatewayID = sqlite3_last_insert_rowid(mpDatabase);
//now the convertion matrix todo: change the map implementation sometimes to blob in sqlite
mListConnectionFormat.insert(std::make_pair(gatewayID, gatewayData.convertionMatrix));
@@ -620,7 +619,7 @@ am_Error_e CAmDatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData,
//fill ConnectionFormats
command = "INSERT INTO GatewaySourceFormat" + i2s(gatewayID) + std::string("(soundFormat) VALUES (?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = gatewayData.listSourceFormats.begin();
for (; connectionFormatIterator < gatewayData.listSourceFormats.end(); ++connectionFormatIterator)
{
@@ -628,13 +627,13 @@ am_Error_e CAmDatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData,
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::enterGatewayDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
command = "INSERT INTO GatewaySinkFormat" + i2s(gatewayID) + std::string("(soundFormat) VALUES (?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
connectionFormatIterator = gatewayData.listSinkFormats.begin();
for (; connectionFormatIterator < gatewayData.listSinkFormats.end(); ++connectionFormatIterator)
{
@@ -642,7 +641,7 @@ am_Error_e CAmDatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData,
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::enterGatewayDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -650,9 +649,9 @@ am_Error_e CAmDatabaseHandler::enterGatewayDB(const am_Gateway_s & gatewayData,
logInfo("DatabaseHandler::enterGatewayDB entered new gateway with name", gatewayData.name, "sourceID:", gatewayData.sourceID, "sinkID:", gatewayData.sinkID, "assigned ID:", gatewayID);
am_Gateway_s gateway = gatewayData;
gateway.gatewayID = gatewayID;
- if (mDatabaseObserver)
- mDatabaseObserver->newGateway(gateway);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->newGateway(gateway);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_sourceID_t & sourceID)
@@ -670,7 +669,7 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
int eCode = 0;
std::string command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE name=? AND reserved=1";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, sourceData.name.c_str(), sourceData.name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
@@ -690,7 +689,7 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
if (existSourceNameOrID(sourceData.sourceID, sourceData.name))
{
sqlite3_finalize(query);
- return E_ALREADY_EXISTS;
+ return (E_ALREADY_EXISTS);
}
command = "INSERT INTO " + std::string(SOURCE_TABLE) + "(name, domainID, sourceClassID, sourceState, volume, visible, availability, availabilityReason, interruptState, reserved, sourceID) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
}
@@ -699,15 +698,15 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
{
logError("DatabaseHandler::enterSourceDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterSourceDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &queryFinal, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &queryFinal, NULL);
sqlite3_bind_text(queryFinal, 1, sourceData.name.c_str(), sourceData.name.size(), SQLITE_STATIC);
sqlite3_bind_int(queryFinal, 2, sourceData.domainID);
sqlite3_bind_int(queryFinal, 3, sourceData.sourceClassID);
@@ -736,19 +735,19 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
{
logError("DatabaseHandler::enterSourceDB SQLITE Step error code:", eCode);
sqlite3_finalize(queryFinal);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(queryFinal)) != SQLITE_OK)
{
logError("DatabaseHandler::enterSourceDB SQLITE Finalize error code:", eCode);
sqlite3_finalize(queryFinal);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//now read back the sinkID
command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE name=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, sourceData.name.c_str(), sourceData.name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -759,7 +758,7 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
sourceID = 0;
logError("DatabaseHandler::existSink database error!:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_finalize(query);
@@ -771,7 +770,7 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
//fill ConnectionFormats
command = "INSERT INTO SourceConnectionFormat" + i2s(sourceID) + std::string("(soundFormat) VALUES (?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_ConnectionFormat_e>::const_iterator connectionFormatIterator = sourceData.listConnectionFormats.begin();
for (; connectionFormatIterator < sourceData.listConnectionFormats.end(); ++connectionFormatIterator)
{
@@ -780,14 +779,14 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
{
logError("DatabaseHandler::enterSourceDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
//Fill SinkSoundProperties
command = "INSERT INTO SourceSoundProperty" + i2s(sourceID) + std::string("(soundPropertyType,value) VALUES (?,?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_SoundProperty_s>::const_iterator SoundPropertyIterator = sourceData.listSoundProperties.begin();
for (; SoundPropertyIterator < sourceData.listSoundProperties.end(); ++SoundPropertyIterator)
{
@@ -797,7 +796,7 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
{
logError("DatabaseHandler::enterSinkDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -809,7 +808,7 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
//Fill MainSinkSoundProperties
command = "INSERT INTO SourceMainSoundProperty" + i2s(sourceID) + std::string("(soundPropertyType,value) VALUES (?,?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_MainSoundProperty_s>::const_iterator mainSoundPropertyIterator = sourceData.listMainSoundProperties.begin();
for (; mainSoundPropertyIterator < sourceData.listMainSoundProperties.end(); ++mainSoundPropertyIterator)
{
@@ -819,7 +818,7 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
{
logError("DatabaseHandler::enterSourceDB SQLITE Step error code:", eCode);
sqlite3_finalize(query);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -829,9 +828,9 @@ am_Error_e CAmDatabaseHandler::enterSourceDB(const am_Source_s & sourceData, am_
am_Source_s source = sourceData;
source.sourceID = sourceID;
- if (mDatabaseObserver)
- mDatabaseObserver->newSource(source);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->newSource(source);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const std::vector<am_connectionID_t>& listConnectionID)
@@ -839,7 +838,7 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnecti
assert(mainconnectionID!=0);
if (!existMainConnection(mainconnectionID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
@@ -847,7 +846,7 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnecti
int16_t delay = 0;
command = "SELECT delay FROM " + std::string(CONNECTION_TABLE) + (" WHERE connectionID=?");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_connectionID_t>::const_iterator elementIterator = listConnectionID.begin();
for (; elementIterator < listConnectionID.end(); ++elementIterator)
{
@@ -865,7 +864,7 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnecti
{
logError("DatabaseHandler::changeMainConnectionRouteDB did not find route for MainConnection:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -874,7 +873,7 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnecti
{
logError("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//now we delete the data in the table
@@ -882,7 +881,7 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnecti
assert(this->sqQuery(command));
command = "INSERT INTO MainConnectionRoute" + i2s(mainconnectionID) + "(connectionID) VALUES (?)";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_connectionID_t>::const_iterator listConnectionIterator(listConnectionID.begin());
for (; listConnectionIterator != listConnectionID.end(); ++listConnectionIterator)
{
@@ -891,7 +890,7 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnecti
{
logError("DatabaseHandler::changeMainConnectionRouteDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -900,10 +899,10 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionRouteDB(const am_mainConnecti
{
logError("DatabaseHandler::changeMainConnectionRouteDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeMainConnectionRouteDB entered new route:", mainconnectionID);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState)
@@ -917,26 +916,26 @@ am_Error_e CAmDatabaseHandler::changeMainConnectionStateDB(const am_mainConnecti
if (!existMainConnection(mainconnectionID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(MAINCONNECTION_TABLE) + " SET connectionState=? WHERE mainConnectionID=" + i2s(mainconnectionID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, connectionState);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeMainConnectionStateDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeMainConnectionStateDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeMainConnectionStateDB changed mainConnectionState of MainConnection:", mainconnectionID, "to:", connectionState);
- if (mDatabaseObserver)
- mDatabaseObserver->mainConnectionStateChanged(mainconnectionID, connectionState);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->mainConnectionStateChanged(mainconnectionID, connectionState);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID)
@@ -949,28 +948,28 @@ am_Error_e CAmDatabaseHandler::changeSinkMainVolumeDB(const am_mainVolume_t main
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(SINK_TABLE) + " SET mainVolume=? WHERE sinkID=" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, mainVolume);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSinkMainVolumeDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSinkMainVolumeDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSinkMainVolumeDB changed mainVolume of sink:", sinkID, "to:", mainVolume);
- if (mDatabaseObserver)
- mDatabaseObserver->volumeChanged(sinkID, mainVolume);
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->volumeChanged(sinkID, mainVolume);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSinkAvailabilityDB(const am_Availability_s & availability, const am_sinkID_t sinkID)
@@ -985,29 +984,30 @@ am_Error_e CAmDatabaseHandler::changeSinkAvailabilityDB(const am_Availability_s
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(SINK_TABLE) + " SET availability=?, availabilityReason=? WHERE sinkID=" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, availability.availability);
sqlite3_bind_int(query, 2, availability.availabilityReason);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSinkAvailabilityDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
- }assert(sinkID!=0);
+ return (E_DATABASE_ERROR);
+ }
+ assert(sinkID!=0);
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSinkAvailabilityDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSinkAvailabilityDB changed sinkAvailability of sink:", sinkID, "to:", availability.availability, "Reason:", availability.availabilityReason);
- if (mDatabaseObserver && sourceVisible(sinkID))
- mDatabaseObserver->sinkAvailabilityChanged(sinkID, availability);
- return E_OK;
+ if (mpDatabaseObserver && sourceVisible(sinkID))
+ mpDatabaseObserver->sinkAvailabilityChanged(sinkID, availability);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID)
@@ -1021,26 +1021,26 @@ am_Error_e CAmDatabaseHandler::changDomainStateDB(const am_DomainState_e domainS
if (!existDomain(domainID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(DOMAIN_TABLE) + " SET state=? WHERE domainID=" + i2s(domainID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, domainState);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changDomainStateDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changDomainStateDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changDomainStateDB changed domainState of domain:", domainID, "to:", domainState);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID)
@@ -1054,29 +1054,30 @@ am_Error_e CAmDatabaseHandler::changeSinkMuteStateDB(const am_MuteState_e muteSt
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(SINK_TABLE) + " SET muteState=? WHERE sinkID=" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, muteState);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSinkMuteStateDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
- }assert(sinkID!=0);
+ return (E_DATABASE_ERROR);
+ }
+ assert(sinkID!=0);
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSinkMuteStateDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSinkMuteStateDB changed sinkMuteState of sink:", sinkID, "to:", muteState);
- if (mDatabaseObserver)
- mDatabaseObserver->sinkMuteStateChanged(sinkID, muteState);
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->sinkMuteStateChanged(sinkID, muteState);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sinkID_t sinkID)
@@ -1090,27 +1091,28 @@ am_Error_e CAmDatabaseHandler::changeMainSinkSoundPropertyDB(const am_MainSoundP
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE SinkMainSoundProperty" + i2s(sinkID) + " SET value=? WHERE soundPropertyType=" + i2s(soundProperty.type);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, soundProperty.value);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
- }assert(sinkID!=0);
+ return (E_DATABASE_ERROR);
+ }
+ assert(sinkID!=0);
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeMainSinkSoundPropertyDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeMainSinkSoundPropertyDB changed MainSinkSoundProperty of sink:", sinkID, "type:", soundProperty.type, "to:", soundProperty.value);
- if (mDatabaseObserver)
- mDatabaseObserver->mainSinkSoundPropertyChanged(sinkID, soundProperty);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->mainSinkSoundPropertyChanged(sinkID, soundProperty);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s & soundProperty, const am_sourceID_t sourceID)
@@ -1124,28 +1126,28 @@ am_Error_e CAmDatabaseHandler::changeMainSourceSoundPropertyDB(const am_MainSoun
if (!existSource(sourceID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE SourceMainSoundProperty" + i2s(sourceID) + " SET value=? WHERE soundPropertyType=" + i2s(soundProperty.type);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, soundProperty.value);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeMainSourceSoundPropertyDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeMainSourceSoundPropertyDB changed MainSinkSoundProperty of source:", sourceID, "type:", soundProperty.type, "to:", soundProperty.value);
- if (mDatabaseObserver)
- mDatabaseObserver->mainSourceSoundPropertyChanged(sourceID, soundProperty);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->mainSourceSoundPropertyChanged(sourceID, soundProperty);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSourceAvailabilityDB(const am_Availability_s & availability, const am_sourceID_t sourceID)
@@ -1160,29 +1162,29 @@ am_Error_e CAmDatabaseHandler::changeSourceAvailabilityDB(const am_Availability_
if (!existSource(sourceID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(SOURCE_TABLE) + " SET availability=?, availabilityReason=? WHERE sourceID=" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, availability.availability);
sqlite3_bind_int(query, 2, availability.availabilityReason);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSourceAvailabilityDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSourceAvailabilityDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSourceAvailabilityDB changed changeSourceAvailabilityDB of source:", sourceID, "to:", availability.availability, "Reason:", availability.availabilityReason);
- if (mDatabaseObserver && sourceVisible(sourceID))
- mDatabaseObserver->sourceAvailabilityChanged(sourceID, availability);
- return E_OK;
+ if (mpDatabaseObserver && sourceVisible(sourceID))
+ mpDatabaseObserver->sourceAvailabilityChanged(sourceID, availability);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSystemPropertyDB(const am_SystemProperty_s & property)
@@ -1192,28 +1194,28 @@ am_Error_e CAmDatabaseHandler::changeSystemPropertyDB(const am_SystemProperty_s
int eCode = 0;
std::string command = "UPDATE " + std::string(SYSTEM_TABLE) + " set value=? WHERE type=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, property.value);
sqlite3_bind_int(query, 2, property.type);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSystemPropertyDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSystemPropertyDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSystemPropertyDB changed system property");
- if (mDatabaseObserver)
- mDatabaseObserver->systemPropertyChanged(property);
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->systemPropertyChanged(property);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID)
@@ -1222,21 +1224,21 @@ am_Error_e CAmDatabaseHandler::removeMainConnectionDB(const am_mainConnectionID_
if (!existMainConnection(mainConnectionID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
std::string command = "DELETE from " + std::string(MAINCONNECTION_TABLE) + " WHERE mainConnectionID=" + i2s(mainConnectionID);
std::string command1 = "DROP table MainConnectionRoute" + i2s(mainConnectionID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command1))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeMainConnectionDB removed:", mainConnectionID);
- if (mDatabaseObserver)
+ if (mpDatabaseObserver)
{
- mDatabaseObserver->mainConnectionStateChanged(mainConnectionID, CS_DISCONNECTED);
- mDatabaseObserver->removedMainConnection(mainConnectionID);
+ mpDatabaseObserver->mainConnectionStateChanged(mainConnectionID, CS_DISCONNECTED);
+ mpDatabaseObserver->removedMainConnection(mainConnectionID);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeSinkDB(const am_sinkID_t sinkID)
@@ -1245,7 +1247,7 @@ am_Error_e CAmDatabaseHandler::removeSinkDB(const am_sinkID_t sinkID)
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
bool visible = sinkVisible(sinkID);
@@ -1255,19 +1257,19 @@ am_Error_e CAmDatabaseHandler::removeSinkDB(const am_sinkID_t sinkID)
std::string command2 = "DROP table SinkMainSoundProperty" + i2s(sinkID);
std::string command3 = "DROP table SinkSoundProperty" + i2s(sinkID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command1))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command2))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command3))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeSinkDB removed:", sinkID);
- if (mDatabaseObserver != NULL)
- mDatabaseObserver->removedSink(sinkID, visible);
+ if (mpDatabaseObserver != NULL)
+ mpDatabaseObserver->removedSink(sinkID, visible);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeSourceDB(const am_sourceID_t sourceID)
@@ -1276,7 +1278,7 @@ am_Error_e CAmDatabaseHandler::removeSourceDB(const am_sourceID_t sourceID)
if (!existSource(sourceID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
bool visible = sourceVisible(sourceID);
@@ -1286,17 +1288,17 @@ am_Error_e CAmDatabaseHandler::removeSourceDB(const am_sourceID_t sourceID)
std::string command2 = "DROP table SourceMainSoundProperty" + i2s(sourceID);
std::string command3 = "DROP table SourceSoundProperty" + i2s(sourceID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command1))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command2))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command3))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeSourceDB removed:", sourceID);
- if (mDatabaseObserver)
- mDatabaseObserver->removedSource(sourceID, visible);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->removedSource(sourceID, visible);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeGatewayDB(const am_gatewayID_t gatewayID)
@@ -1305,15 +1307,15 @@ am_Error_e CAmDatabaseHandler::removeGatewayDB(const am_gatewayID_t gatewayID)
if (!existGateway(gatewayID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
std::string command = "DELETE from " + std::string(GATEWAY_TABLE) + " WHERE gatewayID=" + i2s(gatewayID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeGatewayDB removed:", gatewayID);
- if (mDatabaseObserver)
- mDatabaseObserver->removeGateway(gatewayID);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->removeGateway(gatewayID);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeCrossfaderDB(const am_crossfaderID_t crossfaderID)
@@ -1322,15 +1324,15 @@ am_Error_e CAmDatabaseHandler::removeCrossfaderDB(const am_crossfaderID_t crossf
if (!existcrossFader(crossfaderID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
std::string command = "DELETE from " + std::string(CROSSFADER_TABLE) + " WHERE crossfaderID=" + i2s(crossfaderID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeDomainDB removed:", crossfaderID);
- if (mDatabaseObserver)
- mDatabaseObserver->removeCrossfader(crossfaderID);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->removeCrossfader(crossfaderID);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeDomainDB(const am_domainID_t domainID)
@@ -1339,15 +1341,15 @@ am_Error_e CAmDatabaseHandler::removeDomainDB(const am_domainID_t domainID)
if (!existDomain(domainID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
std::string command = "DELETE from " + std::string(DOMAIN_TABLE) + " WHERE domainID=" + i2s(domainID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeDomainDB removed:", domainID);
- if (mDatabaseObserver)
- mDatabaseObserver->removeDomain(domainID);
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->removeDomain(domainID);
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeSinkClassDB(const am_sinkClass_t sinkClassID)
@@ -1356,20 +1358,20 @@ am_Error_e CAmDatabaseHandler::removeSinkClassDB(const am_sinkClass_t sinkClassI
if (!existSinkClass(sinkClassID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
std::string command = "DELETE from " + std::string(SINK_CLASS_TABLE) + " WHERE sinkClassID=" + i2s(sinkClassID);
std::string command1 = "DROP table SinkClassProperties" + i2s(sinkClassID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command1))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeSinkClassDB removed:", sinkClassID);
- if (mDatabaseObserver)
- mDatabaseObserver->numberOfSinkClassesChanged();
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->numberOfSinkClassesChanged();
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeSourceClassDB(const am_sourceClass_t sourceClassID)
@@ -1378,18 +1380,18 @@ am_Error_e CAmDatabaseHandler::removeSourceClassDB(const am_sourceClass_t source
if (!existSourceClass(sourceClassID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
std::string command = "DELETE from " + std::string(SOURCE_CLASS_TABLE) + " WHERE sourceClassID=" + i2s(sourceClassID);
std::string command1 = "DROP table SourceClassProperties" + i2s(sourceClassID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
if (!sqQuery(command1))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeSourceClassDB removed:", sourceClassID);
- if (mDatabaseObserver)
- mDatabaseObserver->numberOfSourceClassesChanged();
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->numberOfSourceClassesChanged();
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::removeConnection(const am_connectionID_t connectionID)
@@ -1398,9 +1400,9 @@ am_Error_e CAmDatabaseHandler::removeConnection(const am_connectionID_t connecti
std::string command = "DELETE from " + std::string(CONNECTION_TABLE) + " WHERE connectionID=" + i2s(connectionID);
if (!sqQuery(command))
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
logInfo("DatabaseHandler::removeConnection removed:", connectionID);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s & classInfo) const
@@ -1409,13 +1411,13 @@ am_Error_e CAmDatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID
if (!existSource(sourceID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
am_ClassProperty_s propertyTemp;
std::string command = "SELECT sourceClassID FROM " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + (i2s(sourceID));
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1425,17 +1427,17 @@ am_Error_e CAmDatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::getSourceClassInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
command = "SELECT name FROM " + std::string(SOURCE_CLASS_TABLE) + " WHERE sourceClassID=" + (i2s(classInfo.sourceClassID));
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1445,18 +1447,18 @@ am_Error_e CAmDatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::getSourceClassInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out Properties
command = "SELECT classProperty, value FROM SourceClassProperties" + i2s(classInfo.sourceClassID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
propertyTemp.classProperty = (am_ClassProperty_e) sqlite3_column_int(query, 0);
@@ -1467,15 +1469,15 @@ am_Error_e CAmDatabaseHandler::getSourceClassInfoDB(const am_sourceID_t sourceID
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getSourceClassInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSourceClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s & sinkData) const
@@ -1485,7 +1487,7 @@ am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL, *qConnectionFormat = NULL, *qSoundProperty = NULL, *qMAinSoundProperty = NULL;
@@ -1494,7 +1496,7 @@ am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
std::string command = "SELECT name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume, sinkID FROM " + std::string(SINK_TABLE) + " WHERE reserved=0 and sinkID=" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1511,7 +1513,7 @@ am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM SinkConnectionFormat" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
@@ -1522,12 +1524,12 @@ am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s
{
logError("DatabaseHandler::getSinkInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out sound properties
std::string commandSoundProperty = "SELECT soundPropertyType, value FROM SinkSoundProperty" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
@@ -1539,12 +1541,12 @@ am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s
{
logError("DatabaseHandler::getSinkInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out MainSoundProperties
std::string commandMainSoundProperty = "SELECT soundPropertyType, value FROM SinkMainSoundProperty" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
@@ -1556,7 +1558,7 @@ am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s
{
logError("DatabaseHandler::getSinkInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
}
@@ -1564,17 +1566,17 @@ am_Error_e CAmDatabaseHandler::getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s
{
logError("DatabaseHandler::getSinkInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSinkInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSourceInfoDB(const am_sourceID_t sourceID, am_Source_s & sourceData) const
@@ -1583,7 +1585,7 @@ am_Error_e CAmDatabaseHandler::getSourceInfoDB(const am_sourceID_t sourceID, am_
if (!existSource(sourceID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL, *qConnectionFormat = NULL, *qSoundProperty = NULL, *qMAinSoundProperty = NULL;
@@ -1592,7 +1594,7 @@ am_Error_e CAmDatabaseHandler::getSourceInfoDB(const am_sourceID_t sourceID, am_
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
std::string command = "SELECT name, domainID, sourceClassID, sourceState, volume, visible, availability, availabilityReason, interruptState, sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE reserved=0 AND sourceID=" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1609,7 +1611,7 @@ am_Error_e CAmDatabaseHandler::getSourceInfoDB(const am_sourceID_t sourceID, am_
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM SourceConnectionFormat" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
@@ -1620,12 +1622,12 @@ am_Error_e CAmDatabaseHandler::getSourceInfoDB(const am_sourceID_t sourceID, am_
{
logError("DatabaseHandler::getListSources SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out sound properties
std::string commandSoundProperty = "SELECT soundPropertyType, value FROM SourceSoundProperty" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
@@ -1637,12 +1639,12 @@ am_Error_e CAmDatabaseHandler::getSourceInfoDB(const am_sourceID_t sourceID, am_
{
logError("DatabaseHandler::getSourceInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out MainSoundProperties
std::string commandMainSoundProperty = "SELECT soundPropertyType, value FROM SourceMainSoundProperty" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
@@ -1654,24 +1656,24 @@ am_Error_e CAmDatabaseHandler::getSourceInfoDB(const am_sourceID_t sourceID, am_
{
logError("DatabaseHandler::getSourceInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
}
else if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getSourceInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSourceInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e am::CAmDatabaseHandler::getMainConnectionInfoDB(const am_mainConnectionID_t mainConnectionID, am_MainConnection_s & mainConnectionData) const
@@ -1679,14 +1681,14 @@ am_Error_e am::CAmDatabaseHandler::getMainConnectionInfoDB(const am_mainConnecti
assert(mainConnectionID!=0);
if (!existMainConnection(mainConnectionID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt *query = NULL, *query1 = NULL;
int eCode = 0;
am_MainConnection_s temp;
std::string command = "SELECT mainConnectionID, sourceID, sinkID, connectionState, delay FROM " + std::string(MAINCONNECTION_TABLE) + " WHERE mainConnectionID=" + i2s(mainConnectionID);
std::string command1 = "SELECT connectionID FROM MainConnectionRoute";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1696,7 +1698,7 @@ am_Error_e am::CAmDatabaseHandler::getMainConnectionInfoDB(const am_mainConnecti
mainConnectionData.connectionState = (am_ConnectionState_e) sqlite3_column_int(query, 3);
mainConnectionData.delay = sqlite3_column_int(query, 4);
std::string statement = command1 + i2s(mainConnectionID);
- sqlite3_prepare_v2(mDatabase, statement.c_str(), -1, &query1, NULL);
+ sqlite3_prepare_v2(mpDatabase, statement.c_str(), -1, &query1, NULL);
while ((eCode = sqlite3_step(query1)) == SQLITE_ROW)
{
mainConnectionData.listConnectionID.push_back(sqlite3_column_int(query1, 0));
@@ -1706,16 +1708,16 @@ am_Error_e am::CAmDatabaseHandler::getMainConnectionInfoDB(const am_mainConnecti
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getMainConnectionInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getMainConnectionInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkClass)
@@ -1728,11 +1730,11 @@ am_Error_e CAmDatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkC
//check if the ID already exists
if (!existSinkClass(sinkClass.sinkClassID))
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
//fill ConnectionFormats
std::string command = "UPDATE SinkClassProperties" + i2s(sinkClass.sinkClassID) + " set value=? WHERE classProperty=?;";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_ClassProperty_s>::const_iterator Iterator = sinkClass.listClassProperties.begin();
for (; Iterator < sinkClass.listClassProperties.end(); ++Iterator)
{
@@ -1741,7 +1743,7 @@ am_Error_e CAmDatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkC
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -1749,11 +1751,11 @@ am_Error_e CAmDatabaseHandler::changeSinkClassInfoDB(const am_SinkClass_s& sinkC
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo");
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& sourceClass)
@@ -1766,11 +1768,11 @@ am_Error_e CAmDatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& s
//check if the ID already exists
if (!existSourceClass(sourceClass.sourceClassID))
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
//fill ConnectionFormats
std::string command = "UPDATE SourceClassProperties" + i2s(sourceClass.sourceClassID) + " set value=? WHERE classProperty=?;";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_ClassProperty_s>::const_iterator Iterator = sourceClass.listClassProperties.begin();
for (; Iterator < sourceClass.listClassProperties.end(); ++Iterator)
{
@@ -1779,7 +1781,7 @@ am_Error_e CAmDatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& s
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::setSinkClassInfoDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -1787,11 +1789,11 @@ am_Error_e CAmDatabaseHandler::changeSourceClassInfoDB(const am_SourceClass_s& s
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::setSinkClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::setSinkClassInfoDB set setSinkClassInfo");
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s & sinkClass) const
@@ -1800,13 +1802,13 @@ am_Error_e CAmDatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_S
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
am_ClassProperty_s propertyTemp;
std::string command = "SELECT sinkClassID FROM " + std::string(SINK_TABLE) + " WHERE sinkID=" + (i2s(sinkID));
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1816,17 +1818,17 @@ am_Error_e CAmDatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_S
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::getSinkClassInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
command = "SELECT name FROM " + std::string(SINK_CLASS_TABLE) + " WHERE sinkClassID=" + (i2s(sinkClass.sinkClassID));
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1836,18 +1838,18 @@ am_Error_e CAmDatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_S
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::getSinkClassInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out Properties
command = "SELECT classProperty, value FROM SinkClassProperties" + i2s(sinkClass.sinkClassID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
propertyTemp.classProperty = (am_ClassProperty_e) sqlite3_column_int(query, 0);
@@ -1858,15 +1860,15 @@ am_Error_e CAmDatabaseHandler::getSinkClassInfoDB(const am_sinkID_t sinkID, am_S
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getSinkClassInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSinkClassInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s & gatewayData) const
@@ -1874,13 +1876,13 @@ am_Error_e CAmDatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID,
assert(gatewayID!=0);
if (!existGateway(gatewayID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL, *qSinkConnectionFormat = NULL, *qSourceConnectionFormat = NULL;
int eCode = 0;
am_ConnectionFormat_e tempConnectionFormat;
std::string command = "SELECT name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID FROM " + std::string(GATEWAY_TABLE) + " WHERE gatewayID=" + i2s(gatewayID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1898,13 +1900,13 @@ am_Error_e CAmDatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID,
if (iter == mListConnectionFormat.end())
{
logError("DatabaseHandler::getGatewayInfoDB database error with convertionFormat");
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
gatewayData.convertionMatrix = iter->second;
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM GatewaySourceFormat" + i2s(gatewayData.gatewayID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qSourceConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSourceConnectionFormat, NULL);
while ((eCode = sqlite3_step(qSourceConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSourceConnectionFormat, 0);
@@ -1914,12 +1916,12 @@ am_Error_e CAmDatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID,
if ((eCode = sqlite3_finalize(qSourceConnectionFormat)) != SQLITE_OK)
{
logError("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out sound properties
commandConnectionFormat = "SELECT soundFormat FROM GatewaySinkFormat" + i2s(gatewayData.gatewayID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qSinkConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSinkConnectionFormat, NULL);
while ((eCode = sqlite3_step(qSinkConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSinkConnectionFormat, 0);
@@ -1929,7 +1931,7 @@ am_Error_e CAmDatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID,
if ((eCode = sqlite3_finalize(qSinkConnectionFormat)) != SQLITE_OK)
{
logError("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
}
@@ -1937,16 +1939,16 @@ am_Error_e CAmDatabaseHandler::getGatewayInfoDB(const am_gatewayID_t gatewayID,
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getGatewayInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getGatewayInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
@@ -1955,12 +1957,12 @@ am_Error_e CAmDatabaseHandler::getCrossfaderInfoDB(const am_crossfaderID_t cross
assert(crossfaderID!=0);
if (!existcrossFader(crossfaderID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
std::string command = "SELECT name, sinkID_A, sinkID_B, sourceID, hotSink,crossfaderID FROM " + std::string(CROSSFADER_TABLE) + " WHERE crossfaderID=" + i2s(crossfaderID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -1975,16 +1977,16 @@ am_Error_e CAmDatabaseHandler::getCrossfaderInfoDB(const am_crossfaderID_t cross
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getCrossfaderInfoDB SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getCrossfaderInfoDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t> & listSinkID) const
@@ -1993,13 +1995,13 @@ am_Error_e CAmDatabaseHandler::getListSinksOfDomain(const am_domainID_t domainID
listSinkID.clear();
if (!existDomain(domainID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
am_sinkID_t temp;
std::string command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE reserved=0 AND domainID=" + (i2s(domainID));
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2010,16 +2012,16 @@ am_Error_e CAmDatabaseHandler::getListSinksOfDomain(const am_domainID_t domainID
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getListSinksOfDomain SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSinksOfDomain SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t> & listSourceID) const
@@ -2028,14 +2030,14 @@ am_Error_e CAmDatabaseHandler::getListSourcesOfDomain(const am_domainID_t domain
listSourceID.clear();
if (!existDomain(domainID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
am_sourceID_t temp;
std::string command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE reserved=0 AND domainID=" + i2s(domainID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2046,16 +2048,16 @@ am_Error_e CAmDatabaseHandler::getListSourcesOfDomain(const am_domainID_t domain
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getListSourcesOfDomain SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSourcesOfDomain SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t> & listCrossfader) const
@@ -2064,14 +2066,14 @@ am_Error_e CAmDatabaseHandler::getListCrossfadersOfDomain(const am_domainID_t do
listCrossfader.clear();
if (!existDomain(domainID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
am_crossfaderID_t temp;
std::string command = "SELECT c.crossfaderID FROM " + std::string(CROSSFADER_TABLE) + " c," + std::string(SOURCE_TABLE) + " s WHERE c.sourceID=s.sourceID AND s.domainID=" + i2s(domainID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2082,16 +2084,16 @@ am_Error_e CAmDatabaseHandler::getListCrossfadersOfDomain(const am_domainID_t do
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getListCrossfadersOfDomain SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListCrossfadersOfDomain SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
@@ -2101,14 +2103,14 @@ am_Error_e CAmDatabaseHandler::getListGatewaysOfDomain(const am_domainID_t domai
listGatewaysID.clear();
if (!existDomain(domainID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
sqlite3_stmt* query = NULL;
int eCode = 0;
am_gatewayID_t temp;
std::string command = "SELECT gatewayID FROM " + std::string(GATEWAY_TABLE) + " WHERE controlDomainID=" + i2s(domainID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2119,16 +2121,16 @@ am_Error_e CAmDatabaseHandler::getListGatewaysOfDomain(const am_domainID_t domai
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getListGatewaysOfDomain SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListGatewaysOfDomain SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListMainConnections(std::vector<am_MainConnection_s> & listMainConnections) const
@@ -2139,7 +2141,7 @@ am_Error_e CAmDatabaseHandler::getListMainConnections(std::vector<am_MainConnect
am_MainConnection_s temp;
std::string command = "SELECT mainConnectionID, sourceID, sinkID, connectionState, delay FROM " + std::string(MAINCONNECTION_TABLE);
std::string command1 = "SELECT connectionID FROM MainConnectionRoute";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2149,7 +2151,7 @@ am_Error_e CAmDatabaseHandler::getListMainConnections(std::vector<am_MainConnect
temp.connectionState = (am_ConnectionState_e) sqlite3_column_int(query, 3);
temp.delay = sqlite3_column_int(query, 4);
std::string statement = command1 + i2s(temp.mainConnectionID);
- sqlite3_prepare_v2(mDatabase, statement.c_str(), -1, &query1, NULL);
+ sqlite3_prepare_v2(mpDatabase, statement.c_str(), -1, &query1, NULL);
while ((eCode = sqlite3_step(query1)) == SQLITE_ROW)
{
temp.listConnectionID.push_back(sqlite3_column_int(query1, 0));
@@ -2160,16 +2162,16 @@ am_Error_e CAmDatabaseHandler::getListMainConnections(std::vector<am_MainConnect
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getListMainConnections SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListMainConnections SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListDomains(std::vector<am_Domain_s> & listDomains) const
@@ -2179,7 +2181,7 @@ am_Error_e CAmDatabaseHandler::getListDomains(std::vector<am_Domain_s> & listDom
int eCode = 0;
am_Domain_s temp;
std::string command = "SELECT domainID, name, busname, nodename, early, complete, state FROM " + std::string(DOMAIN_TABLE) + " WHERE reserved=0";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2197,17 +2199,17 @@ am_Error_e CAmDatabaseHandler::getListDomains(std::vector<am_Domain_s> & listDom
{
logError("DatabaseHandler::getListDomains SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListDomains SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListConnections(std::vector<am_Connection_s> & listConnections) const
@@ -2217,7 +2219,7 @@ am_Error_e CAmDatabaseHandler::getListConnections(std::vector<am_Connection_s> &
int eCode = 0;
am_Connection_s temp;
std::string command = "SELECT connectionID, sourceID, sinkID, delay, connectionFormat FROM " + std::string(CONNECTION_TABLE) + " WHERE reserved=0";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2232,16 +2234,16 @@ am_Error_e CAmDatabaseHandler::getListConnections(std::vector<am_Connection_s> &
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getListConnections SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListConnections SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks) const
@@ -2254,7 +2256,7 @@ am_Error_e CAmDatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks)
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
std::string command = "SELECT name, domainID, sinkClassID, volume, visible, availability, availabilityReason, muteState, mainVolume, sinkID FROM " + std::string(SINK_TABLE) + " WHERE reserved=0";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2271,7 +2273,7 @@ am_Error_e CAmDatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks)
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM SinkConnectionFormat" + i2s(temp.sinkID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
@@ -2282,12 +2284,12 @@ am_Error_e CAmDatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks)
{
logError("DatabaseHandler::getListSinks SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out sound properties
std::string commandSoundProperty = "SELECT soundPropertyType, value FROM SinkSoundProperty" + i2s(temp.sinkID);
- sqlite3_prepare_v2(mDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
@@ -2299,12 +2301,12 @@ am_Error_e CAmDatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks)
{
logError("DatabaseHandler::getListSinks SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out MainSoundProperties
std::string commandMainSoundProperty = "SELECT soundPropertyType, value FROM SinkMainSoundProperty" + i2s(temp.sinkID);
- sqlite3_prepare_v2(mDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
@@ -2316,7 +2318,7 @@ am_Error_e CAmDatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks)
{
logError("DatabaseHandler::getListSinks SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
listSinks.push_back(temp);
temp.listConnectionFormats.clear();
@@ -2328,17 +2330,17 @@ am_Error_e CAmDatabaseHandler::getListSinks(std::vector<am_Sink_s> & listSinks)
{
logError("DatabaseHandler::getListSinks SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSinks SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListSources(std::vector<am_Source_s> & listSources) const
@@ -2351,7 +2353,7 @@ am_Error_e CAmDatabaseHandler::getListSources(std::vector<am_Source_s> & listSou
am_SoundProperty_s tempSoundProperty;
am_MainSoundProperty_s tempMainSoundProperty;
std::string command = "SELECT name, domainID, sourceClassID, sourceState, volume, visible, availability, availabilityReason, interruptState, sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE reserved=0";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2368,7 +2370,7 @@ am_Error_e CAmDatabaseHandler::getListSources(std::vector<am_Source_s> & listSou
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM SourceConnectionFormat" + i2s(temp.sourceID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
@@ -2379,12 +2381,12 @@ am_Error_e CAmDatabaseHandler::getListSources(std::vector<am_Source_s> & listSou
{
logError("DatabaseHandler::getListSources SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out sound properties
std::string commandSoundProperty = "SELECT soundPropertyType, value FROM SourceSoundProperty" + i2s(temp.sourceID);
- sqlite3_prepare_v2(mDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandSoundProperty.c_str(), -1, &qSoundProperty, NULL);
while ((eCode = sqlite3_step(qSoundProperty)) == SQLITE_ROW)
{
tempSoundProperty.type = (am_SoundPropertyType_e) sqlite3_column_int(qSoundProperty, 0);
@@ -2396,12 +2398,12 @@ am_Error_e CAmDatabaseHandler::getListSources(std::vector<am_Source_s> & listSou
{
logError("DatabaseHandler::getListSources SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out MainSoundProperties
std::string commandMainSoundProperty = "SELECT soundPropertyType, value FROM SourceMainSoundProperty" + i2s(temp.sourceID);
- sqlite3_prepare_v2(mDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandMainSoundProperty.c_str(), -1, &qMAinSoundProperty, NULL);
while ((eCode = sqlite3_step(qMAinSoundProperty)) == SQLITE_ROW)
{
tempMainSoundProperty.type = (am_MainSoundPropertyType_e) sqlite3_column_int(qMAinSoundProperty, 0);
@@ -2413,7 +2415,7 @@ am_Error_e CAmDatabaseHandler::getListSources(std::vector<am_Source_s> & listSou
{
logError("DatabaseHandler::getListSources SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
listSources.push_back(temp);
temp.listConnectionFormats.clear();
@@ -2425,17 +2427,17 @@ am_Error_e CAmDatabaseHandler::getListSources(std::vector<am_Source_s> & listSou
{
logError("DatabaseHandler::getListSources SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSources SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s> & listSourceClasses) const
@@ -2449,7 +2451,7 @@ am_Error_e CAmDatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s
std::string command = "SELECT sourceClassID, name FROM " + std::string(SOURCE_CLASS_TABLE);
std::string command2;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2458,7 +2460,7 @@ am_Error_e CAmDatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s
//read out Properties
command2 = "SELECT classProperty, value FROM SourceClassProperties" + i2s(classTemp.sourceClassID);
- sqlite3_prepare_v2(mDatabase, command2.c_str(), -1, &subQuery, NULL);
+ sqlite3_prepare_v2(mpDatabase, command2.c_str(), -1, &subQuery, NULL);
while ((eCode1 = sqlite3_step(subQuery)) == SQLITE_ROW)
{
@@ -2471,14 +2473,14 @@ am_Error_e CAmDatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s
{
logError("DatabaseHandler::getListSourceClasses SQLITE error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode1 = sqlite3_finalize(subQuery)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
listSourceClasses.push_back(classTemp);
}
@@ -2487,17 +2489,17 @@ am_Error_e CAmDatabaseHandler::getListSourceClasses(std::vector<am_SourceClass_s
{
logError("DatabaseHandler::getListSourceClasses SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListCrossfaders(std::vector<am_Crossfader_s> & listCrossfaders) const
@@ -2507,7 +2509,7 @@ am_Error_e CAmDatabaseHandler::getListCrossfaders(std::vector<am_Crossfader_s> &
int eCode = 0;
am_Crossfader_s tempData;
std::string command = "SELECT name, sinkID_A, sinkID_B, sourceID, hotSink,crossfaderID FROM " + std::string(CROSSFADER_TABLE);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2523,16 +2525,16 @@ am_Error_e CAmDatabaseHandler::getListCrossfaders(std::vector<am_Crossfader_s> &
if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::getListCrossfaders SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListCrossfaders SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listGateways) const
@@ -2544,7 +2546,7 @@ am_Error_e CAmDatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listG
am_ConnectionFormat_e tempConnectionFormat;
std::string command = "SELECT name, sinkID, sourceID, domainSinkID, domainSourceID, controlDomainID, gatewayID FROM " + std::string(GATEWAY_TABLE);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2563,13 +2565,13 @@ am_Error_e CAmDatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listG
{
logError("DatabaseHandler::getListGateways database error with convertionFormat");
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
temp.convertionMatrix = iter->second;
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM GatewaySourceFormat" + i2s(temp.gatewayID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qSourceConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSourceConnectionFormat, NULL);
while ((eCode = sqlite3_step(qSourceConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSourceConnectionFormat, 0);
@@ -2580,12 +2582,12 @@ am_Error_e CAmDatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listG
{
logError("DatabaseHandler::getListGateways SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//read out sound properties
commandConnectionFormat = "SELECT soundFormat FROM GatewaySinkFormat" + i2s(temp.gatewayID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qSinkConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qSinkConnectionFormat, NULL);
while ((eCode = sqlite3_step(qSinkConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qSinkConnectionFormat, 0);
@@ -2596,7 +2598,7 @@ am_Error_e CAmDatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listG
{
logError("DatabaseHandler::getListGateways SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
listGateways.push_back(temp);
@@ -2608,17 +2610,17 @@ am_Error_e CAmDatabaseHandler::getListGateways(std::vector<am_Gateway_s> & listG
{
logError("DatabaseHandler::getListGateways SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListGateways SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> & listSinkClasses) const
@@ -2632,7 +2634,7 @@ am_Error_e CAmDatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> &
std::string command = "SELECT sinkClassID, name FROM " + std::string(SINK_CLASS_TABLE);
std::string command2;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2641,7 +2643,7 @@ am_Error_e CAmDatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> &
//read out Properties
command2 = "SELECT classProperty, value FROM SinkClassProperties" + i2s(classTemp.sinkClassID);
- sqlite3_prepare_v2(mDatabase, command2.c_str(), -1, &subQuery, NULL);
+ sqlite3_prepare_v2(mpDatabase, command2.c_str(), -1, &subQuery, NULL);
while ((eCode = sqlite3_step(subQuery)) == SQLITE_ROW)
{
@@ -2654,14 +2656,14 @@ am_Error_e CAmDatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> &
{
logError("DatabaseHandler::getListSourceClasses SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(subQuery)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
listSinkClasses.push_back(classTemp);
}
@@ -2670,17 +2672,17 @@ am_Error_e CAmDatabaseHandler::getListSinkClasses(std::vector<am_SinkClass_s> &
{
logError("DatabaseHandler::getListSourceClasses SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSourceClasses SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListVisibleMainConnections(std::vector<am_MainConnectionType_s> & listConnections) const
@@ -2691,7 +2693,7 @@ am_Error_e CAmDatabaseHandler::getListVisibleMainConnections(std::vector<am_Main
am_MainConnectionType_s temp;
std::string command = "SELECT mainConnectionID, sourceID, sinkID, connectionState, delay FROM " + std::string(MAINCONNECTION_TABLE);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2707,17 +2709,17 @@ am_Error_e CAmDatabaseHandler::getListVisibleMainConnections(std::vector<am_Main
{
logError("DatabaseHandler::getListVisibleMainConnections SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListVisibleMainConnections SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListMainSinks(std::vector<am_SinkType_s> & listMainSinks) const
@@ -2728,7 +2730,7 @@ am_Error_e CAmDatabaseHandler::getListMainSinks(std::vector<am_SinkType_s> & lis
am_SinkType_s temp;
std::string command = "SELECT name, sinkID, availability, availabilityReason, muteState, mainVolume, sinkClassID FROM " + std::string(SINK_TABLE) + " WHERE visible=1 AND reserved=0";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2746,17 +2748,17 @@ am_Error_e CAmDatabaseHandler::getListMainSinks(std::vector<am_SinkType_s> & lis
{
logError("DatabaseHandler::getListSinks SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSinks SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListMainSources(std::vector<am_SourceType_s> & listMainSources) const
@@ -2766,7 +2768,7 @@ am_Error_e CAmDatabaseHandler::getListMainSources(std::vector<am_SourceType_s> &
int eCode = 0;
am_SourceType_s temp;
std::string command = "SELECT name, sourceClassID, availability, availabilityReason, sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE visible=1";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2783,31 +2785,31 @@ am_Error_e CAmDatabaseHandler::getListMainSources(std::vector<am_SourceType_s> &
{
logError("DatabaseHandler::getListSources SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSources SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s> & listSoundProperties) const
{
assert(sinkID!=0);
if (!existSink(sinkID))
- return E_DATABASE_ERROR; // todo: here we could change to non existen, but not shown in sequences
+ return (E_DATABASE_ERROR); // todo: here we could change to non existen, but not shown in sequences
listSoundProperties.clear();
sqlite3_stmt* query = NULL;
int eCode = 0;
am_MainSoundProperty_s temp;
std::string command = "SELECT soundPropertyType, value FROM SinkMainSoundProperty" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2820,31 +2822,31 @@ am_Error_e CAmDatabaseHandler::getListMainSinkSoundProperties(const am_sinkID_t
{
logError("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s> & listSourceProperties) const
{
assert(sourceID!=0);
if (!existSource(sourceID))
- return E_DATABASE_ERROR; // todo: here we could change to non existen, but not shown in sequences
+ return (E_DATABASE_ERROR); // todo: here we could change to non existen, but not shown in sequences
listSourceProperties.clear();
sqlite3_stmt* query = NULL;
int eCode = 0;
am_MainSoundProperty_s temp;
std::string command = "SELECT soundPropertyType, value FROM SourceMainSoundProperty" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2857,17 +2859,17 @@ am_Error_e CAmDatabaseHandler::getListMainSourceSoundProperties(const am_sourceI
{
logError("DatabaseHandler::getListMainSinkSoundProperties SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListMainSinkSoundProperties SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getListSystemProperties(std::vector<am_SystemProperty_s> & listSystemProperties) const
@@ -2878,7 +2880,7 @@ am_Error_e CAmDatabaseHandler::getListSystemProperties(std::vector<am_SystemProp
int eCode = 0;
am_SystemProperty_s temp;
std::string command = "SELECT type, value FROM " + std::string(SYSTEM_TABLE);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2891,17 +2893,17 @@ am_Error_e CAmDatabaseHandler::getListSystemProperties(std::vector<am_SystemProp
{
logError("DatabaseHandler::getListSystemProperties SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getListSystemProperties SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e am::CAmDatabaseHandler::getListSinkConnectionFormats(const am_sinkID_t sinkID, std::vector<am_ConnectionFormat_e> & listConnectionFormats) const
@@ -2911,7 +2913,7 @@ am_Error_e am::CAmDatabaseHandler::getListSinkConnectionFormats(const am_sinkID_
int eCode = 0;
am_ConnectionFormat_e tempConnectionFormat;
std::string commandConnectionFormat = "SELECT soundFormat FROM SinkConnectionFormat" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
@@ -2922,10 +2924,10 @@ am_Error_e am::CAmDatabaseHandler::getListSinkConnectionFormats(const am_sinkID_
{
logError("DatabaseHandler::getListSinkConnectionFormats SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e am::CAmDatabaseHandler::getListSourceConnectionFormats(const am_sourceID_t sourceID, std::vector<am_ConnectionFormat_e> & listConnectionFormats) const
@@ -2937,7 +2939,7 @@ am_Error_e am::CAmDatabaseHandler::getListSourceConnectionFormats(const am_sourc
//read out the connectionFormats
std::string commandConnectionFormat = "SELECT soundFormat FROM SourceConnectionFormat" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
+ sqlite3_prepare_v2(mpDatabase, commandConnectionFormat.c_str(), -1, &qConnectionFormat, NULL);
while ((eCode = sqlite3_step(qConnectionFormat)) == SQLITE_ROW)
{
tempConnectionFormat = (am_ConnectionFormat_e) sqlite3_column_int(qConnectionFormat, 0);
@@ -2948,10 +2950,10 @@ am_Error_e am::CAmDatabaseHandler::getListSourceConnectionFormats(const am_sourc
{
logError("DatabaseHandler::getListSources SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e am::CAmDatabaseHandler::getListGatewayConnectionFormats(const am_gatewayID_t gatewayID, std::vector<bool> & listConnectionFormat) const
@@ -2977,7 +2979,7 @@ am_Error_e CAmDatabaseHandler::getTimingInformation(const am_mainConnectionID_t
int eCode = 0;
std::string command = "SELECT delay FROM " + std::string(MAINCONNECTION_TABLE) + " WHERE mainConnectionID=" + i2s(mainConnectionID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -2988,43 +2990,43 @@ am_Error_e CAmDatabaseHandler::getTimingInformation(const am_mainConnectionID_t
{
logError("DatabaseHandler::getTimingInformation SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getTimingInformation SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if (delay == -1)
- return E_NOT_POSSIBLE;
+ return (E_NOT_POSSIBLE);
- return E_OK;
+ return (E_OK);
}
bool CAmDatabaseHandler::sqQuery(const std::string& query)
{
sqlite3_stmt* statement;
int eCode = 0;
- if ((eCode = sqlite3_exec(mDatabase, query.c_str(), NULL, &statement, NULL)) != SQLITE_OK)
+ if ((eCode = sqlite3_exec(mpDatabase, query.c_str(), NULL, &statement, NULL)) != SQLITE_OK)
{
logError("DatabaseHandler::sqQuery SQL Query failed:", query.c_str(), "error code:", eCode);
- return false;
+ return (false);
}
- return true;
+ return (true);
}
bool CAmDatabaseHandler::openDatabase()
{
- if (sqlite3_open_v2(mPath.c_str(), &mDatabase, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, NULL) == SQLITE_OK)
+ if (sqlite3_open_v2(mPath.c_str(), &mpDatabase, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX, NULL) == SQLITE_OK)
{
logInfo("DatabaseHandler::openDatabase opened database");
- return true;
+ return (true);
}
logError("DatabaseHandler::openDatabase failed to open database");
- return false;
+ return (false);
}
am_Error_e CAmDatabaseHandler::changeDelayMainConnection(const am_timeSync_t & delay, const am_mainConnectionID_t & connectionID)
@@ -3034,16 +3036,16 @@ am_Error_e CAmDatabaseHandler::changeDelayMainConnection(const am_timeSync_t & d
sqlite3_stmt* query = NULL;
int eCode = 0;
std::string command = "SELECT mainConnectionID FROM " + std::string(MAINCONNECTION_TABLE) + " WHERE delay=? AND mainConnectionID=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, delay);
sqlite3_bind_int(query, 2, connectionID);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
command = "UPDATE " + std::string(MAINCONNECTION_TABLE) + " SET delay=? WHERE mainConnectionID=?;";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, delay);
sqlite3_bind_int(query, 2, connectionID);
@@ -3051,20 +3053,20 @@ am_Error_e CAmDatabaseHandler::changeDelayMainConnection(const am_timeSync_t & d
{
logError("DatabaseHandler::changeDelayMainConnection SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeDelayMainConnection SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- if (mDatabaseObserver)
- mDatabaseObserver->timingInformationChanged(connectionID, delay);
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->timingInformationChanged(connectionID, delay);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterConnectionDB(const am_Connection_s& connection, am_connectionID_t& connectionID)
@@ -3078,7 +3080,7 @@ am_Error_e CAmDatabaseHandler::enterConnectionDB(const am_Connection_s& connecti
int eCode = 0;
std::string command = "INSERT INTO " + std::string(CONNECTION_TABLE) + "(sinkID, sourceID, delay, connectionFormat, reserved) VALUES (?,?,?,?,?)";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, connection.sinkID);
sqlite3_bind_int(query, 2, connection.sourceID);
sqlite3_bind_int(query, 3, connection.delay);
@@ -3089,20 +3091,20 @@ am_Error_e CAmDatabaseHandler::enterConnectionDB(const am_Connection_s& connecti
{
logError("DatabaseHandler::enterConnectionDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterConnectionDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- connectionID = sqlite3_last_insert_rowid(mDatabase);
+ connectionID = sqlite3_last_insert_rowid(mpDatabase);
logInfo("DatabaseHandler::enterConnectionDB entered new connection sourceID=", connection.sourceID, "sinkID=", connection.sinkID, "sourceID=", connection.sourceID, "connectionFormat=", connection.connectionFormat, "assigned ID=", connectionID);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass, am_sinkClass_t & sinkClassID)
@@ -3123,11 +3125,11 @@ am_Error_e CAmDatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass
{
//check if the ID already exists
if (existSinkClass(sinkClass.sinkClassID))
- return E_ALREADY_EXISTS;
+ return (E_ALREADY_EXISTS);
command = "INSERT INTO " + std::string(SINK_CLASS_TABLE) + "(name, sinkClassID) VALUES (?,?)";
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, sinkClass.name.c_str(), sinkClass.name.size(), SQLITE_STATIC);
//if the ID is not created, we add it to the query
@@ -3147,17 +3149,17 @@ am_Error_e CAmDatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass
{
logError("DatabaseHandler::enterSinkClassDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- sinkClassID = sqlite3_last_insert_rowid(mDatabase); //todo:change last_insert implementations for mulithread usage...
+ sinkClassID = sqlite3_last_insert_rowid(mpDatabase); //todo:change last_insert implementations for mulithread usage...
//now we need to create the additional tables:
command = "CREATE TABLE SinkClassProperties" + i2s(sinkClassID) + std::string("(classProperty INTEGER, value INTEGER)");
@@ -3165,7 +3167,7 @@ am_Error_e CAmDatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass
//fill ConnectionFormats
command = "INSERT INTO SinkClassProperties" + i2s(sinkClassID) + std::string("(classProperty,value) VALUES (?,?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_ClassProperty_s>::const_iterator Iterator = sinkClass.listClassProperties.begin();
for (; Iterator < sinkClass.listClassProperties.end(); ++Iterator)
{
@@ -3175,7 +3177,7 @@ am_Error_e CAmDatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass
{
logError("DatabaseHandler::enterSinkClassDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -3184,13 +3186,13 @@ am_Error_e CAmDatabaseHandler::enterSinkClassDB(const am_SinkClass_s & sinkClass
{
logError("DatabaseHandler::enterSinkClassDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::enterSinkClassDB entered new sinkClass");
- if (mDatabaseObserver)
- mDatabaseObserver->numberOfSinkClassesChanged();
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->numberOfSinkClassesChanged();
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClassID, const am_SourceClass_s & sourceClass)
@@ -3211,11 +3213,11 @@ am_Error_e CAmDatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClass
{
//check if the ID already exists
if (existSourceClass(sourceClass.sourceClassID))
- return E_ALREADY_EXISTS;
+ return (E_ALREADY_EXISTS);
command = "INSERT INTO " + std::string(SOURCE_CLASS_TABLE) + "(name, sourceClassID) VALUES (?,?)";
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, sourceClass.name.c_str(), sourceClass.name.size(), SQLITE_STATIC);
//if the ID is not created, we add it to the query
@@ -3235,17 +3237,17 @@ am_Error_e CAmDatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClass
{
logError("DatabaseHandler::enterSourceClassDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- sourceClassID = sqlite3_last_insert_rowid(mDatabase); //todo:change last_insert implementations for mulithread usage...
+ sourceClassID = sqlite3_last_insert_rowid(mpDatabase); //todo:change last_insert implementations for mulithread usage...
//now we need to create the additional tables:
command = "CREATE TABLE SourceClassProperties" + i2s(sourceClassID) + std::string("(classProperty INTEGER, value INTEGER)");
@@ -3253,7 +3255,7 @@ am_Error_e CAmDatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClass
//fill ConnectionFormats
command = "INSERT INTO SourceClassProperties" + i2s(sourceClassID) + std::string("(classProperty,value) VALUES (?,?)");
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
std::vector<am_ClassProperty_s>::const_iterator Iterator = sourceClass.listClassProperties.begin();
for (; Iterator < sourceClass.listClassProperties.end(); ++Iterator)
{
@@ -3263,7 +3265,7 @@ am_Error_e CAmDatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClass
{
logError("DatabaseHandler::enterSourceClassDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
}
@@ -3272,14 +3274,14 @@ am_Error_e CAmDatabaseHandler::enterSourceClassDB(am_sourceClass_t & sourceClass
{
logError("DatabaseHandler::enterSourceClassDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::enterSourceClassDB entered new sourceClass");
- if (mDatabaseObserver)
- mDatabaseObserver->numberOfSourceClassesChanged();
- return E_OK;
+ if (mpDatabaseObserver)
+ mpDatabaseObserver->numberOfSourceClassesChanged();
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::enterSystemProperties(const std::vector<am_SystemProperty_s> & listSystemProperties)
@@ -3293,7 +3295,7 @@ am_Error_e CAmDatabaseHandler::enterSystemProperties(const std::vector<am_System
command = "INSERT INTO " + std::string(SYSTEM_TABLE) + " (type, value) VALUES (?,?)";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
for (; listIterator < listSystemProperties.end(); ++listIterator)
{
sqlite3_bind_int(query, 1, listIterator->type);
@@ -3303,7 +3305,7 @@ am_Error_e CAmDatabaseHandler::enterSystemProperties(const std::vector<am_System
{
logError("DatabaseHandler::enterSystemProperties SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
sqlite3_reset(query);
@@ -3313,20 +3315,25 @@ am_Error_e CAmDatabaseHandler::enterSystemProperties(const std::vector<am_System
{
logError("DatabaseHandler::enterSystemProperties SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::enterSystemProperties entered system properties");
- return E_OK;
+ return (E_OK);
}
+/**
+ * checks for a certain mainConnection
+ * @param mainConnectionID to be checked for
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existMainConnection(const am_mainConnectionID_t mainConnectionID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT mainConnectionID FROM " + std::string(MAINCONNECTION_TABLE) + " WHERE mainConnectionID=" + i2s(mainConnectionID);
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
else if (eCode != SQLITE_ROW)
@@ -3335,16 +3342,21 @@ bool CAmDatabaseHandler::existMainConnection(const am_mainConnectionID_t mainCon
logError("DatabaseHandler::existMainConnection database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks for a certain Source
+ * @param sourceID to be checked for
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existSource(const am_sourceID_t sourceID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE reserved=0 AND sourceID=" + i2s(sourceID);
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
else if (eCode != SQLITE_ROW)
@@ -3353,16 +3365,22 @@ bool CAmDatabaseHandler::existSource(const am_sourceID_t sourceID) const
logError("DatabaseHandler::existSource database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks if a source name or ID exists
+ * @param sourceID the sourceID
+ * @param name the name
+ * @return true if it exits
+ */
bool CAmDatabaseHandler::existSourceNameOrID(const am_sourceID_t sourceID, const std::string & name) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE reserved=0 AND (name=? OR sourceID=?)";
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
sqlite3_bind_int(query, 2, sourceID);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
@@ -3373,16 +3391,21 @@ bool CAmDatabaseHandler::existSourceNameOrID(const am_sourceID_t sourceID, const
logError("DatabaseHandler::existSource database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks if a name exits
+ * @param name the name
+ * @return true if it exits
+ */
bool CAmDatabaseHandler::existSourceName(const std::string & name) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE reserved=0 AND name=?";
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
@@ -3392,16 +3415,21 @@ bool CAmDatabaseHandler::existSourceName(const std::string & name) const
logError("DatabaseHandler::existSource database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks for a certain Sink
+ * @param sinkID to be checked for
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existSink(const am_sinkID_t sinkID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE reserved=0 AND sinkID=" + i2s(sinkID);
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
else if (eCode != SQLITE_ROW)
@@ -3410,16 +3438,22 @@ bool CAmDatabaseHandler::existSink(const am_sinkID_t sinkID) const
logError("DatabaseHandler::existSink database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks if a sink with the ID or the name exists
+ * @param sinkID the ID
+ * @param name the name
+ * @return true if it exists.
+ */
bool CAmDatabaseHandler::existSinkNameOrID(const am_sinkID_t sinkID, const std::string & name) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE reserved=0 AND (name=? OR sinkID=?)";
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
sqlite3_bind_int(query, 2, sinkID);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
@@ -3430,16 +3464,21 @@ bool CAmDatabaseHandler::existSinkNameOrID(const am_sinkID_t sinkID, const std::
logError("DatabaseHandler::existSink database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks if a sink with the name exists
+ * @param name the name
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existSinkName(const std::string & name) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE reserved=0 AND name=?";
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
@@ -3449,16 +3488,21 @@ bool CAmDatabaseHandler::existSinkName(const std::string & name) const
logError("DatabaseHandler::existSink database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks for a certain domain
+ * @param domainID to be checked for
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existDomain(const am_domainID_t domainID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT domainID FROM " + std::string(DOMAIN_TABLE) + " WHERE reserved=0 AND domainID=" + i2s(domainID);
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
else if (eCode != SQLITE_ROW)
@@ -3467,16 +3511,21 @@ bool CAmDatabaseHandler::existDomain(const am_domainID_t domainID) const
logError("DatabaseHandler::existDomain database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks for certain gateway
+ * @param gatewayID to be checked for
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existGateway(const am_gatewayID_t gatewayID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT gatewayID FROM " + std::string(GATEWAY_TABLE) + " WHERE gatewayID=" + i2s(gatewayID);
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
else if (eCode != SQLITE_ROW)
@@ -3485,7 +3534,7 @@ bool CAmDatabaseHandler::existGateway(const am_gatewayID_t gatewayID) const
logError("DatabaseHandler::existGateway database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
am_Error_e CAmDatabaseHandler::getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t & domainID) const
@@ -3496,7 +3545,7 @@ am_Error_e CAmDatabaseHandler::getDomainOfSource(const am_sourceID_t sourceID, a
std::string command = "SELECT domainID FROM " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + i2s(sourceID);
int eCode = 0;
am_Error_e returnVal = E_DATABASE_ERROR;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
domainID = sqlite3_column_int(query, 0);
@@ -3518,7 +3567,7 @@ am_Error_e am::CAmDatabaseHandler::getDomainOfSink(const am_sinkID_t sinkID, am_
std::string command = "SELECT domainID FROM " + std::string(SINK_TABLE) + " WHERE sinkID=" + i2s(sinkID);
int eCode = 0;
am_Error_e returnVal = E_DATABASE_ERROR;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
domainID = sqlite3_column_int(query, 0);
@@ -3532,13 +3581,18 @@ am_Error_e am::CAmDatabaseHandler::getDomainOfSink(const am_sinkID_t sinkID, am_
return (returnVal);
}
+/**
+ * checks for certain SinkClass
+ * @param sinkClassID
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existSinkClass(const am_sinkClass_t sinkClassID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sinkClassID FROM " + std::string(SINK_CLASS_TABLE) + " WHERE sinkClassID=" + i2s(sinkClassID);
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
else if (eCode != SQLITE_ROW)
@@ -3547,16 +3601,21 @@ bool CAmDatabaseHandler::existSinkClass(const am_sinkClass_t sinkClassID) const
logError("DatabaseHandler::existSinkClass database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks for certain sourceClass
+ * @param sourceClassID
+ * @return true if it exists
+ */
bool CAmDatabaseHandler::existSourceClass(const am_sourceClass_t sourceClassID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT sourceClassID FROM " + std::string(SOURCE_CLASS_TABLE) + " WHERE sourceClassID=" + i2s(sourceClassID);
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
else if (eCode != SQLITE_ROW)
@@ -3565,7 +3624,7 @@ bool CAmDatabaseHandler::existSourceClass(const am_sourceClass_t sourceClassID)
logError("DatabaseHandler::existSinkClass database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
am_Error_e CAmDatabaseHandler::changeConnectionTimingInformation(const am_connectionID_t connectionID, const am_timeSync_t delay)
@@ -3576,7 +3635,7 @@ am_Error_e CAmDatabaseHandler::changeConnectionTimingInformation(const am_connec
int eCode = 0, eCode1 = 0;
std::string command = "UPDATE " + std::string(CONNECTION_TABLE) + " set delay=? WHERE connectionID=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, delay);
sqlite3_bind_int(query, 2, connectionID);
@@ -3584,14 +3643,14 @@ am_Error_e CAmDatabaseHandler::changeConnectionTimingInformation(const am_connec
{
logError("DatabaseHandler::changeConnectionTimingInformation SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
//now we need to find all mainConnections that use the changed connection and update their timing
@@ -3599,14 +3658,14 @@ am_Error_e CAmDatabaseHandler::changeConnectionTimingInformation(const am_connec
int tempMainConnectionID;
//first get all route tables for all mainconnections
command = "SELECT name FROM sqlite_master WHERE type ='table' and name LIKE 'MainConnectionRoute%'";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &queryMainConnections, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &queryMainConnections, NULL);
while ((eCode = sqlite3_step(queryMainConnections)) == SQLITE_ROW)
{
//now check if the connection ID is in this table
std::string tablename = std::string((const char*) sqlite3_column_text(queryMainConnections, 0));
std::string command2 = "SELECT connectionID FROM " + tablename + " WHERE connectionID=" + i2s(connectionID);
- sqlite3_prepare_v2(mDatabase, command2.c_str(), -1, &queryMainConnectionSubIDs, NULL);
+ sqlite3_prepare_v2(mpDatabase, command2.c_str(), -1, &queryMainConnectionSubIDs, NULL);
if ((eCode1 = sqlite3_step(queryMainConnectionSubIDs)) == SQLITE_ROW)
{
//if the connection ID is in, recalculate the mainconnection delay
@@ -3617,7 +3676,7 @@ am_Error_e CAmDatabaseHandler::changeConnectionTimingInformation(const am_connec
{
logError("DatabaseHandler::changeConnectionTimingInformation SQLITE error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
}
@@ -3625,17 +3684,17 @@ am_Error_e CAmDatabaseHandler::changeConnectionTimingInformation(const am_connec
{
logError("DatabaseHandler::changeConnectionTimingInformation SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(queryMainConnections)) != SQLITE_OK)
{
logError("DatabaseHandler::changeConnectionTimingInformation SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeConnectionFinal(const am_connectionID_t connectionID)
@@ -3646,23 +3705,23 @@ am_Error_e CAmDatabaseHandler::changeConnectionFinal(const am_connectionID_t con
int eCode = 0;
std::string command = "UPDATE " + std::string(CONNECTION_TABLE) + " set reserved=0 WHERE connectionID=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, connectionID);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeConnectionFinal SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeConnectionFinal SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_timeSync_t CAmDatabaseHandler::calculateMainConnectionDelay(const am_mainConnectionID_t mainConnectionID) const
@@ -3673,7 +3732,7 @@ am_timeSync_t CAmDatabaseHandler::calculateMainConnectionDelay(const am_mainConn
int eCode = 0;
am_timeSync_t delay = 0;
am_timeSync_t min = 0;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
delay = sqlite3_column_int(query, 0);
@@ -3683,27 +3742,36 @@ am_timeSync_t CAmDatabaseHandler::calculateMainConnectionDelay(const am_mainConn
{
logError("DatabaseHandler::calculateMainConnectionDelay SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::calculateMainConnectionDelay SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if (min < 0)
delay = -1;
- return delay;
+ return (delay);
}
+/**
+ * registers the Observer at the Database
+ * @param iObserver pointer to the observer
+ */
void CAmDatabaseHandler::registerObserver(CAmDatabaseObserver *iObserver)
{
assert(iObserver!=NULL);
- mDatabaseObserver = iObserver;
+ mpDatabaseObserver = iObserver;
}
+/**
+ * gives information about the visibility of a source
+ * @param sourceID the sourceID
+ * @return true if source is visible
+ */
bool CAmDatabaseHandler::sourceVisible(const am_sourceID_t sourceID) const
{
assert(sourceID!=0);
@@ -3711,7 +3779,7 @@ bool CAmDatabaseHandler::sourceVisible(const am_sourceID_t sourceID) const
std::string command = "SELECT visible FROM " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + i2s(sourceID);
int eCode = 0;
bool returnVal = false;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
{
returnVal = (bool) sqlite3_column_int(query, 0);
@@ -3722,16 +3790,21 @@ bool CAmDatabaseHandler::sourceVisible(const am_sourceID_t sourceID) const
logError("DatabaseHandler::sourceVisible database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * gives information about the visibility of a sink
+ * @param sinkID the sinkID
+ * @return true if source is visible
+ */
bool CAmDatabaseHandler::sinkVisible(const am_sinkID_t sinkID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT visible FROM " + std::string(SINK_TABLE) + " WHERE reserved=0 AND sinkID=" + i2s(sinkID);
int eCode = 0;
bool returnVal = false;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
{
returnVal = sqlite3_column_int(query, 0);
@@ -3742,16 +3815,22 @@ bool CAmDatabaseHandler::sinkVisible(const am_sinkID_t sinkID) const
logError("DatabaseHandler::sinkVisible database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks if a connection already exists.
+ * Only takes sink, source and format information for search!
+ * @param connection the connection to be checked
+ * @return true if connections exists
+ */
bool CAmDatabaseHandler::existConnection(const am_Connection_s connection)
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT connectionID FROM " + std::string(CONNECTION_TABLE) + " WHERE sinkID=? AND sourceID=? AND connectionFormat=? AND reserved=0";
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, connection.sinkID);
sqlite3_bind_int(query, 2, connection.sourceID);
sqlite3_bind_int(query, 3, connection.connectionFormat);
@@ -3763,16 +3842,21 @@ bool CAmDatabaseHandler::existConnection(const am_Connection_s connection)
logError("DatabaseHandler::existMainConnection database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks if a connection with the given ID exists
+ * @param connectionID
+ * @return true if connection exits
+ */
bool CAmDatabaseHandler::existConnectionID(const am_connectionID_t connectionID)
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT connectionID FROM " + std::string(CONNECTION_TABLE) + " WHERE connectionID=? AND reserved=0";
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, connectionID);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
@@ -3782,16 +3866,21 @@ bool CAmDatabaseHandler::existConnectionID(const am_connectionID_t connectionID)
logError("DatabaseHandler::existMainConnection database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
+/**
+ * checks if a CrossFader exists
+ * @param crossfaderID the ID of the crossfader to be checked
+ * @return true if exists
+ */
bool CAmDatabaseHandler::existcrossFader(const am_crossfaderID_t crossfaderID) const
{
sqlite3_stmt* query = NULL;
std::string command = "SELECT crossfaderID FROM " + std::string(CROSSFADER_TABLE) + " WHERE crossfaderID=?";
int eCode = 0;
bool returnVal = true;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, crossfaderID);
if ((eCode = sqlite3_step(query)) == SQLITE_DONE)
returnVal = false;
@@ -3801,7 +3890,7 @@ bool CAmDatabaseHandler::existcrossFader(const am_crossfaderID_t crossfaderID) c
logError("DatabaseHandler::existMainConnection database error!:", eCode);
}
sqlite3_finalize(query);
- return returnVal;
+ return (returnVal);
}
am_Error_e CAmDatabaseHandler::getSoureState(const am_sourceID_t sourceID, am_SourceState_e & sourceState) const
@@ -3811,7 +3900,7 @@ am_Error_e CAmDatabaseHandler::getSoureState(const am_sourceID_t sourceID, am_So
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);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
sourceState = (am_SourceState_e) sqlite3_column_int(query, 0);
@@ -3821,7 +3910,7 @@ am_Error_e CAmDatabaseHandler::getSoureState(const am_sourceID_t sourceID, am_So
logError("DatabaseHandler::getSoureState database error!:", eCode);
}
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSourceState(const am_sourceID_t sourceID, const am_SourceState_e sourceState)
@@ -3831,22 +3920,22 @@ am_Error_e CAmDatabaseHandler::changeSourceState(const am_sourceID_t sourceID, c
sqlite3_stmt* query = NULL;
std::string command = "UPDATE " + std::string(SOURCE_TABLE) + " SET sourceState=? WHERE sourceID=" + i2s(sourceID);
int eCode = 0;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, sourceState);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSourceState SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSourceState SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSinkVolume(const am_sinkID_t sinkID, am_volume_t & volume) const
@@ -3856,7 +3945,7 @@ am_Error_e CAmDatabaseHandler::getSinkVolume(const am_sinkID_t sinkID, am_volume
volume = -1;
std::string command = "SELECT volume FROM " + std::string(SINK_TABLE) + " WHERE sinkID=" + i2s(sinkID);
int eCode = 0;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
volume = sqlite3_column_int(query, 0);
@@ -3866,7 +3955,7 @@ am_Error_e CAmDatabaseHandler::getSinkVolume(const am_sinkID_t sinkID, am_volume
logError("DatabaseHandler::getSinkVolume database error!:", eCode);
}
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSourceVolume(const am_sourceID_t sourceID, am_volume_t & volume) const
@@ -3876,7 +3965,7 @@ am_Error_e CAmDatabaseHandler::getSourceVolume(const am_sourceID_t sourceID, am_
volume = -1;
std::string command = "SELECT volume FROM " + std::string(SOURCE_TABLE) + " WHERE sourceID=" + i2s(sourceID);
int eCode = 0;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
volume = sqlite3_column_int(query, 0);
@@ -3886,19 +3975,19 @@ am_Error_e CAmDatabaseHandler::getSourceVolume(const am_sourceID_t sourceID, am_
logError("DatabaseHandler::getSourceVolume database error!:", eCode);
}
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSinkSoundPropertyValue(const am_sinkID_t sinkID, const am_SoundPropertyType_e propertyType, uint16_t & value) const
{
assert(sinkID!=0);
if (!existSink(sinkID))
- return E_DATABASE_ERROR; // todo: here we could change to non existent, but not shown in sequences
+ return (E_DATABASE_ERROR); // todo: here we could change to non existent, but not shown in sequences
sqlite3_stmt* query = NULL;
int eCode = 0;
std::string command = "SELECT value FROM SinkSoundProperty" + i2s(sinkID) + " WHERE soundPropertyType=" + i2s(propertyType);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -3909,29 +3998,29 @@ am_Error_e CAmDatabaseHandler::getSinkSoundPropertyValue(const am_sinkID_t sinkI
{
logError("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getSourceSoundPropertyValue(const am_sourceID_t sourceID, const am_SoundPropertyType_e propertyType, uint16_t & value) const
{
assert(sourceID!=0);
if (!existSource(sourceID))
- return E_DATABASE_ERROR; // todo: here we could change to non existent, but not shown in sequences
+ return (E_DATABASE_ERROR); // todo: here we could change to non existent, but not shown in sequences
sqlite3_stmt* query = NULL;
int eCode = 0;
std::string command = "SELECT value FROM SourceSoundProperty" + i2s(sourceID) + " WHERE soundPropertyType=" + i2s(propertyType);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -3942,17 +4031,17 @@ am_Error_e CAmDatabaseHandler::getSourceSoundPropertyValue(const am_sourceID_t s
{
logError("DatabaseHandler::getSinkSoundPropertyValue SQLITE error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::getSinkSoundPropertyValue SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getDomainState(const am_domainID_t domainID, am_DomainState_e state) const
@@ -3962,7 +4051,7 @@ am_Error_e CAmDatabaseHandler::getDomainState(const am_domainID_t domainID, am_D
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);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
state = (am_DomainState_e) sqlite3_column_int(query, 0);
@@ -3972,7 +4061,7 @@ am_Error_e CAmDatabaseHandler::getDomainState(const am_domainID_t domainID, am_D
logError("DatabaseHandler::getDomainState database error!:", eCode);
}
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
@@ -3981,7 +4070,7 @@ am_Error_e CAmDatabaseHandler::peekDomain(const std::string & name, am_domainID_
sqlite3_stmt* query = NULL, *queryInsert = NULL;
std::string command = "SELECT domainID FROM " + std::string(DOMAIN_TABLE) + " WHERE name=?";
int eCode = 0, eCode1 = 0;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -3990,29 +4079,29 @@ am_Error_e CAmDatabaseHandler::peekDomain(const std::string & name, am_domainID_
else if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::peekDomain database error!:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
else
{
command = "INSERT INTO " + std::string(DOMAIN_TABLE) + " (name,reserved) VALUES (?,?)";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &queryInsert, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &queryInsert, NULL);
sqlite3_bind_text(queryInsert, 1, name.c_str(), name.size(), SQLITE_STATIC);
sqlite3_bind_int(queryInsert, 2, 1); //reservation flag
if ((eCode1 = sqlite3_step(queryInsert)) != SQLITE_DONE)
{
logError("DatabaseHandler::peekDomain SQLITE Step error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode1 = sqlite3_finalize(queryInsert)) != SQLITE_OK)
{
logError("DatabaseHandler::peekDomain SQLITE Finalize error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- domainID = sqlite3_last_insert_rowid(mDatabase);
+ domainID = sqlite3_last_insert_rowid(mpDatabase);
}
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::peekSink(const std::string & name, am_sinkID_t & sinkID)
@@ -4020,7 +4109,7 @@ am_Error_e CAmDatabaseHandler::peekSink(const std::string & name, am_sinkID_t &
sqlite3_stmt* query = NULL, *queryInsert = NULL;
std::string command = "SELECT sinkID FROM " + std::string(SINK_TABLE) + " WHERE name=?";
int eCode = 0, eCode1 = 0;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -4029,7 +4118,7 @@ am_Error_e CAmDatabaseHandler::peekSink(const std::string & name, am_sinkID_t &
else if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::peekSink database error!:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
else
{
@@ -4042,24 +4131,24 @@ am_Error_e CAmDatabaseHandler::peekSink(const std::string & name, am_sinkID_t &
{
command = "INSERT INTO " + std::string(SINK_TABLE) + " (name,reserved) VALUES (?,?)";
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &queryInsert, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &queryInsert, NULL);
sqlite3_bind_text(queryInsert, 1, name.c_str(), name.size(), SQLITE_STATIC);
sqlite3_bind_int(queryInsert, 2, 1); //reservation flag
if ((eCode1 = sqlite3_step(queryInsert)) != SQLITE_DONE)
{
logError("DatabaseHandler::peekSink SQLITE Step error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode1 = sqlite3_finalize(queryInsert)) != SQLITE_OK)
{
logError("DatabaseHandler::peekDomain SQLITE Finalize error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- sinkID = sqlite3_last_insert_rowid(mDatabase);
+ sinkID = sqlite3_last_insert_rowid(mpDatabase);
}
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::peekSource(const std::string & name, am_sourceID_t & sourceID)
@@ -4067,7 +4156,7 @@ am_Error_e CAmDatabaseHandler::peekSource(const std::string & name, am_sourceID_
sqlite3_stmt* query = NULL, *queryInsert = NULL;
std::string command = "SELECT sourceID FROM " + std::string(SOURCE_TABLE) + " WHERE name=?";
int eCode = 0, eCode1 = 0;
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
{
@@ -4076,7 +4165,7 @@ am_Error_e CAmDatabaseHandler::peekSource(const std::string & name, am_sourceID_
else if (eCode != SQLITE_DONE)
{
logError("DatabaseHandler::peekSink database error!:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
else
{
@@ -4089,24 +4178,24 @@ am_Error_e CAmDatabaseHandler::peekSource(const std::string & name, am_sourceID_
{
command = "INSERT INTO " + std::string(SOURCE_TABLE) + " (name,reserved) VALUES (?,?)";
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &queryInsert, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &queryInsert, NULL);
sqlite3_bind_text(queryInsert, 1, name.c_str(), name.size(), SQLITE_STATIC);
sqlite3_bind_int(queryInsert, 2, 1); //reservation flag
if ((eCode1 = sqlite3_step(queryInsert)) != SQLITE_DONE)
{
logError("DatabaseHandler::peekSink SQLITE Step error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode1 = sqlite3_finalize(queryInsert)) != SQLITE_OK)
{
logError("DatabaseHandler::peekDomain SQLITE Finalize error code:", eCode1);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
- sourceID = sqlite3_last_insert_rowid(mDatabase);
+ sourceID = sqlite3_last_insert_rowid(mpDatabase);
}
sqlite3_finalize(query);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSinkVolume(const am_sinkID_t sinkID, const am_volume_t volume)
@@ -4119,27 +4208,27 @@ am_Error_e CAmDatabaseHandler::changeSinkVolume(const am_sinkID_t sinkID, const
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(SINK_TABLE) + " SET volume=? WHERE sinkID=" + i2s(sinkID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, volume);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSinkVolume SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSinkVolume SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSinkVolume changed volume of sink:", sinkID, "to:", volume);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSourceVolume(const am_sourceID_t sourceID, const am_volume_t volume)
@@ -4152,27 +4241,27 @@ am_Error_e CAmDatabaseHandler::changeSourceVolume(const am_sourceID_t sourceID,
if (!existSource(sourceID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(SOURCE_TABLE) + " SET volume=? WHERE sourceID=" + i2s(sourceID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, volume);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSourceVolume SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSourceVolume SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSourceVolume changed volume of source=:", sourceID, "to:", volume);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSourceSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sourceID_t sourceID)
@@ -4186,28 +4275,28 @@ am_Error_e CAmDatabaseHandler::changeSourceSoundPropertyDB(const am_SoundPropert
if (!existSource(sourceID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE SourceSoundProperty" + i2s(sourceID) + " SET value=? WHERE soundPropertyType=" + i2s(soundProperty.type);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, soundProperty.value);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSourceSoundPropertyDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSourceSoundPropertyDB changed SourceSoundProperty of source:", sourceID, "type:", soundProperty.type, "to:", soundProperty.value);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeSinkSoundPropertyDB(const am_SoundProperty_s & soundProperty, const am_sinkID_t sinkID)
@@ -4221,26 +4310,27 @@ am_Error_e CAmDatabaseHandler::changeSinkSoundPropertyDB(const am_SoundProperty_
if (!existSink(sinkID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE SinkSoundProperty" + i2s(sinkID) + " SET value=? WHERE soundPropertyType=" + i2s(soundProperty.type);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, soundProperty.value);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
- }assert(sinkID!=0);
+ return (E_DATABASE_ERROR);
+ }
+ assert(sinkID!=0);
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeSinkSoundPropertyDB SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeSinkSoundPropertyDB changed MainSinkSoundProperty of sink:", sinkID, "type:", soundProperty.type, "to:", soundProperty.value);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::changeCrossFaderHotSink(const am_crossfaderID_t crossfaderID, const am_HotSink_e hotsink)
@@ -4254,26 +4344,26 @@ am_Error_e CAmDatabaseHandler::changeCrossFaderHotSink(const am_crossfaderID_t c
if (!existcrossFader(crossfaderID))
{
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
command = "UPDATE " + std::string(CROSSFADER_TABLE) + " SET hotsink=? WHERE crossfaderID=" + i2s(crossfaderID);
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, hotsink);
if ((eCode = sqlite3_step(query)) != SQLITE_DONE)
{
logError("DatabaseHandler::changeCrossFaderHotSink SQLITE Step error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
if ((eCode = sqlite3_finalize(query)) != SQLITE_OK)
{
logError("DatabaseHandler::changeCrossFaderHotSink SQLITE Finalize error code:", eCode);
- return E_DATABASE_ERROR;
+ return (E_DATABASE_ERROR);
}
logInfo("DatabaseHandler::changeCrossFaderHotSink changed hotsink of crossfader=", crossfaderID, "to:", hotsink);
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmDatabaseHandler::getRoutingTree(bool onlyfree, CAmRoutingTree& tree, std::vector<CAmRoutingTreeItem*>& flatTree)
@@ -4301,7 +4391,7 @@ am_Error_e CAmDatabaseHandler::getRoutingTree(bool onlyfree, CAmRoutingTree& tre
parent = flatTree.at(i - 1);
rootID = parent->returnDomainID();
}
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_int(query, 1, rootID);
while ((eCode = sqlite3_step(query)) == SQLITE_ROW)
@@ -4331,13 +4421,13 @@ am_Error_e CAmDatabaseHandler::getRoutingTree(bool onlyfree, CAmRoutingTree& tre
am_Error_e am::CAmDatabaseHandler::peekSinkClassID(const std::string & name, am_sinkClass_t & sinkClassID)
{
if (name.empty())
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
am_Error_e returnVal = E_NON_EXISTENT;
sqlite3_stmt* query = NULL;
int eCode = 0;
std::string command = "SELECT sinkClassID FROM " + std::string(SINK_CLASS_TABLE) + " WHERE name=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
@@ -4357,19 +4447,19 @@ am_Error_e am::CAmDatabaseHandler::peekSinkClassID(const std::string & name, am_
logError("DatabaseHandler::peekSinkClassID SQLITE Finalize error code:", eCode);
returnVal = E_DATABASE_ERROR;
}
- return returnVal;
+ return (returnVal);
}
am_Error_e am::CAmDatabaseHandler::peekSourceClassID(const std::string & name, am_sourceClass_t & sourceClassID)
{
if (name.empty())
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
am_Error_e returnVal = E_NON_EXISTENT;
sqlite3_stmt* query = NULL;
int eCode = 0;
std::string command = "SELECT sourceClassID FROM " + std::string(SOURCE_CLASS_TABLE) + " WHERE name=?";
- sqlite3_prepare_v2(mDatabase, command.c_str(), -1, &query, NULL);
+ sqlite3_prepare_v2(mpDatabase, command.c_str(), -1, &query, NULL);
sqlite3_bind_text(query, 1, name.c_str(), name.size(), SQLITE_STATIC);
if ((eCode = sqlite3_step(query)) == SQLITE_ROW)
@@ -4389,7 +4479,7 @@ am_Error_e am::CAmDatabaseHandler::peekSourceClassID(const std::string & name, a
logError("DatabaseHandler::peekSourceClassID SQLITE Finalize error code:", eCode);
returnVal = E_DATABASE_ERROR;
}
- return returnVal;
+ return (returnVal);
}
void CAmDatabaseHandler::createTables()
diff --git a/AudioManagerDaemon/src/CAmDatabaseObserver.cpp b/AudioManagerDaemon/src/CAmDatabaseObserver.cpp
index 9bbc275..775b239 100644
--- a/AudioManagerDaemon/src/CAmDatabaseObserver.cpp
+++ b/AudioManagerDaemon/src/CAmDatabaseObserver.cpp
@@ -1,24 +1,22 @@
/**
- * 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 CAmDatabaseObserver.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 statiasyncCally or dynamiasyncCally 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 CAmDatabaseObserver.cpp
+ * For further information see http://www.genivi.org/.
*
*/
diff --git a/AudioManagerDaemon/src/CAmDbusWrapper.cpp b/AudioManagerDaemon/src/CAmDbusWrapper.cpp
index 082d62f..6148edf 100644
--- a/AudioManagerDaemon/src/CAmDbusWrapper.cpp
+++ b/AudioManagerDaemon/src/CAmDbusWrapper.cpp
@@ -1,24 +1,22 @@
/**
- * 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 CAmSocketHandler.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \file CAmDbusWrapper.cpp
+ * For further information see http://www.genivi.org/.
*
*/
@@ -35,6 +33,9 @@
namespace am
{
+/**
+ * introspectio header
+ */
#define ROOT_INTROSPECT_XML \
DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
"<node>" \
@@ -99,12 +100,12 @@ CAmDbusWrapper::CAmDbusWrapper(CAmSocketHandler* socketHandler) :
int ret = dbus_bus_request_name(mpDbusConnection, DBUS_SERVICE_PREFIX, DBUS_NAME_FLAG_DO_NOT_QUEUE, &mDBusError);
if (dbus_error_is_set(&mDBusError))
{
- logError("DBusWrapper::DBusWrapper Name Error",mDBusError.message);
+ logError("DBusWrapper::DBusWrapper Name Error", mDBusError.message);
dbus_error_free(&mDBusError);
}
if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret)
{
- logError("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner ! Another instance already running?",ret);
+ logError("DBusWrapper::DBusWrapper Wrapper is not the Primary Owner ! Another instance already running?", ret);
exit(1);
}
}
@@ -123,9 +124,16 @@ CAmDbusWrapper::~CAmDbusWrapper()
}
}
+/**
+ * registers a callback that is entered as path below the main path.
+ * The configuration of the mainpath is done via DBusConfiguration.h
+ * @param vtable the vtable that holds a pointer to the callback that is called when the path is called from the dbus
+ * @param path the name of the path
+ * @param userdata pointer to the class that will handle the callback
+ */
void CAmDbusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata)
{
- logInfo("DBusWrapper::~registerCallback register callback:",path);
+ logInfo("DBusWrapper::~registerCallback register callback:", path);
std::string completePath = std::string(DBUS_SERVICE_OBJECT_PATH) + "/" + path;
dbus_error_init(&mDBusError);
@@ -133,12 +141,19 @@ void CAmDbusWrapper::registerCallback(const DBusObjectPathVTable* vtable, const
dbus_connection_register_object_path(mpDbusConnection, completePath.c_str(), vtable, userdata);
if (dbus_error_is_set(&mDBusError))
{
- logError("DBusWrapper::registerCallack error: ",mDBusError.message);
+ logError("DBusWrapper::registerCallack error: ", mDBusError.message);
dbus_error_free(&mDBusError);
}
mListNodes.push_back(path);
}
+/**
+ * internal callback for the root introspection
+ * @param conn
+ * @param msg
+ * @param reference
+ * @return
+ */
DBusHandlerResult CAmDbusWrapper::cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference)
{
logInfo("DBusWrapper::~cbRootIntrospection called:");
@@ -180,14 +195,18 @@ DBusHandlerResult CAmDbusWrapper::cbRootIntrospection(DBusConnection *conn, DBus
// free the reply
dbus_message_unref(reply);
- return DBUS_HANDLER_RESULT_HANDLED;
+ return (DBUS_HANDLER_RESULT_HANDLED);
}
else
{
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ return (DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
}
}
+/**
+ * returns the dbus connection
+ * @param connection pointer to the connection
+ */
void CAmDbusWrapper::getDBusConnection(DBusConnection *& connection) const
{
connection = mpDbusConnection;
@@ -197,7 +216,7 @@ dbus_bool_t CAmDbusWrapper::addWatch(DBusWatch *watch, void *userData)
{
mpReference = (CAmDbusWrapper*) userData;
assert(mpReference!=0);
- return mpReference->addWatchDelegate(watch, userData);
+ return (mpReference->addWatchDelegate(watch, userData));
}
dbus_bool_t CAmDbusWrapper::addWatchDelegate(DBusWatch * watch, void* userData)
@@ -216,14 +235,14 @@ dbus_bool_t CAmDbusWrapper::addWatchDelegate(DBusWatch * watch, void* userData)
event |= POLLOUT;
}
- logInfo("DBusWrapper::addWatchDelegate entered new watch, fd=",dbus_watch_get_unix_fd(watch),"event flag=",event);
+ logInfo("DBusWrapper::addWatchDelegate entered new watch, fd=", dbus_watch_get_unix_fd(watch), "event flag=", event);
am_Error_e error = mpSocketHandler->addFDPoll(dbus_watch_get_unix_fd(watch), event, NULL, &pDbusFireCallback, &pDbusCheckCallback, &pDbusDispatchCallback, watch, handle);
//if everything is alright, add the watch and the handle to our map so we know this relationship
if (error == E_OK && handle != 0)
{
mMapHandleWatch.insert(std::make_pair(watch, handle));
- return true;
+ return (true);
}
logError("DBusWrapper::addWatchDelegate entering watch failed");
return (true);
@@ -243,7 +262,7 @@ void CAmDbusWrapper::removeWatchDelegate(DBusWatch *watch, void *userData)
iterator = mMapHandleWatch.find(watch);
if (iterator != mMapHandleWatch.end())
mpSocketHandler->removeFDPoll(iterator->second);
- logInfo("DBusWrapper::removeWatch removed watch with handle",iterator->second);
+ logInfo("DBusWrapper::removeWatch removed watch with handle", iterator->second);
mMapHandleWatch.erase(iterator);
}
@@ -279,13 +298,13 @@ dbus_bool_t CAmDbusWrapper::addTimeout(DBusTimeout *timeout, void* userData)
{
mpReference = (CAmDbusWrapper*) userData;
assert(mpReference!=0);
- return mpReference->addTimeoutDelegate(timeout, userData);
+ return (mpReference->addTimeoutDelegate(timeout, userData));
}
dbus_bool_t CAmDbusWrapper::addTimeoutDelegate(DBusTimeout *timeout, void* userData)
{
if (!dbus_timeout_get_enabled(timeout))
- return false;
+ return (false);
//calculate the timeout in timeval
timespec pollTimeout;
@@ -296,7 +315,7 @@ dbus_bool_t CAmDbusWrapper::addTimeoutDelegate(DBusTimeout *timeout, void* userD
//prepare handle and callback. new is eval, but there is no other choice because we need the pointer!
sh_timerHandle_t* handle = new sh_timerHandle_t;
mpListTimerhandles.push_back(handle);
- CAmShTimerCallBack* buffer = &pDbusTimerCallback;
+ IAmShTimerCallBack* buffer = &pDbusTimerCallback;
//add the timer to the pollLoop
mpSocketHandler->addTimer(pollTimeout, buffer, *handle, timeout);
@@ -307,7 +326,7 @@ dbus_bool_t CAmDbusWrapper::addTimeoutDelegate(DBusTimeout *timeout, void* userD
//save timeout in Socket context
userData = timeout;
logInfo("DBusWrapper::addTimeoutDelegate a timeout was added");
- return true;
+ return (true);
}
void CAmDbusWrapper::removeTimeout(DBusTimeout *timeout, void* userData)
@@ -354,8 +373,8 @@ bool am::CAmDbusWrapper::dbusDispatchCallback(const sh_pollHandle_t handle, void
if (dbus_connection_dispatch(mpDbusConnection) == DBUS_DISPATCH_COMPLETE)
returnVal = false;
dbus_connection_unref(mpDbusConnection);
-// logInfo("DBusWrapper::dbusDispatchCallback was called");
- return returnVal;
+ //logInfo("DBusWrapper::dbusDispatchCallback was called");
+ return (returnVal);
}
bool am::CAmDbusWrapper::dbusCheckCallback(const sh_pollHandle_t handle, void *userData)
@@ -367,8 +386,8 @@ bool am::CAmDbusWrapper::dbusCheckCallback(const sh_pollHandle_t handle, void *u
if (dbus_connection_get_dispatch_status(mpDbusConnection) == DBUS_DISPATCH_DATA_REMAINS)
returnVal = true;
dbus_connection_unref(mpDbusConnection);
-// logInfo("DBusWrapper::dbusCheckCallback was called");
- return returnVal;
+ //logInfo("DBusWrapper::dbusCheckCallback was called");
+ return (returnVal);
}
void am::CAmDbusWrapper::dbusFireCallback(const pollfd pollfd, const sh_pollHandle_t handle, void *userData)
@@ -392,7 +411,7 @@ void am::CAmDbusWrapper::dbusFireCallback(const pollfd pollfd, const sh_pollHand
dbus_connection_ref(mpDbusConnection);
dbus_watch_handle(watch, flags);
dbus_connection_unref(mpDbusConnection);
-// logInfo("DBusWrapper::dbusFireCallback was called");
+ //logInfo("DBusWrapper::dbusFireCallback was called");
}
void CAmDbusWrapper::toggleTimeoutDelegate(DBusTimeout *timeout, void* userData)
@@ -414,7 +433,8 @@ void CAmDbusWrapper::toggleTimeoutDelegate(DBusTimeout *timeout, void* userData)
else
{
mpSocketHandler->stopTimer(*handle);
- }logInfo("DBusWrapper::toggleTimeoutDelegate was called");
+ }
+ logInfo("DBusWrapper::toggleTimeoutDelegate was called");
}
void CAmDbusWrapper::dbusTimerCallback(sh_timerHandle_t handle, void *userData)
diff --git a/AudioManagerDaemon/src/CAmDltWrapper.cpp b/AudioManagerDaemon/src/CAmDltWrapper.cpp
index fc7e064..7890e64 100644
--- a/AudioManagerDaemon/src/CAmDltWrapper.cpp
+++ b/AudioManagerDaemon/src/CAmDltWrapper.cpp
@@ -1,30 +1,28 @@
/**
- * 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 CAmDltWrapper.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 CAmDltWrapper.cpp
+ * For further information see http://www.genivi.org/.
*
*/
#include "shared/CAmDltWrapper.h"
-#include <string.h>
+#include <string>
#include <sstream>
#include <iostream>
@@ -41,7 +39,7 @@ CAmDltWrapper *CAmDltWrapper::instance(const bool enableNoDLTDebug)
if(enableNoDLTDebug)
mpDLTWrapper->enableNoDLTDebug(true);
#endif
- return mpDLTWrapper;
+ return (mpDLTWrapper);
}
void CAmDltWrapper::unregisterContext(DltContext & handle)
diff --git a/AudioManagerDaemon/src/CAmRouter.cpp b/AudioManagerDaemon/src/CAmRouter.cpp
index 265f77d..fd394a9 100644
--- a/AudioManagerDaemon/src/CAmRouter.cpp
+++ b/AudioManagerDaemon/src/CAmRouter.cpp
@@ -1,24 +1,22 @@
/**
- * 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 CAmRouter.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 CAmRouter.cpp
+ * For further information see http://www.genivi.org/.
*
*/
@@ -33,22 +31,30 @@
namespace am {
CAmRouter::CAmRouter(CAmDatabaseHandler* iDatabaseHandler, CAmControlSender* iSender) :
- mDatabaseHandler(iDatabaseHandler), //
- mControlSender(iSender)
+ mpDatabaseHandler(iDatabaseHandler), //
+ mpControlSender(iSender)
{
- assert(mDatabaseHandler);
- assert(mControlSender);
+ assert(mpDatabaseHandler);
+ assert(mpControlSender);
}
+/**
+ * returns the best route between a source and a sink
+ * @param onlyfree if true only free gateways are used
+ * @param sourceID
+ * @param sinkID
+ * @param returnList this list contains a set of routes
+ * @return E_OK in case of success
+ */
am_Error_e CAmRouter::getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s> & returnList)
{
returnList.clear();
//first find out in which domains the source and sink are
am_domainID_t sourceDomainID;
am_domainID_t sinkDomainID;
- if (mDatabaseHandler->getDomainOfSource(sourceID, sourceDomainID) != E_OK)
+ if (mpDatabaseHandler->getDomainOfSource(sourceID, sourceDomainID) != E_OK)
return (E_NON_EXISTENT);
- if (mDatabaseHandler->getDomainOfSink(sinkID, sinkDomainID) != E_OK)
+ if (mpDatabaseHandler->getDomainOfSink(sinkID, sinkDomainID) != E_OK)
return (E_NON_EXISTENT);
if (sourceDomainID == sinkDomainID) //shortcut if the domains are the same...
@@ -64,11 +70,11 @@ am_Error_e CAmRouter::getRoute(const bool onlyfree, const am_sourceID_t sourceID
route.route.clear();
//get the prio of the Controller:
- mControlSender->getConnectionFormatChoice(sourceID, sinkID, route, listFormats, listPriorityConnectionFormats);
+ mpControlSender->getConnectionFormatChoice(sourceID, sinkID, route, listFormats, listPriorityConnectionFormats);
//no possible connection, so no route ! But we report OK since there is no fault ...
if (listPriorityConnectionFormats.empty())
- return E_OK;
+ return (E_OK);
//return the first item as route:
am_RoutingElement_s routingElement;
@@ -85,7 +91,7 @@ am_Error_e CAmRouter::getRoute(const bool onlyfree, const am_sourceID_t sourceID
//push it to the return list - we are done here ...
returnList.push_back(actualRoute);
- return E_OK;
+ return (E_OK);
}
CAmRoutingTree routingtree(sourceDomainID); //Build up a Tree from the Source_Domain to every other domain.
@@ -96,7 +102,7 @@ am_Error_e CAmRouter::getRoute(const bool onlyfree, const am_sourceID_t sourceID
am_Route_s actualRoute; //holds the actual Route
am_sourceID_t lastSource = 0;
- mDatabaseHandler->getRoutingTree(onlyfree, routingtree, flattree); //Build up the tree out of the database as
+ mpDatabaseHandler->getRoutingTree(onlyfree, routingtree, flattree); //Build up the tree out of the database as
//we go through the returned flattree and look for our sink, after that flattree holds only treeItems that match
std::vector<CAmRoutingTreeItem*>::iterator iterator = flattree.begin();
@@ -121,7 +127,7 @@ am_Error_e CAmRouter::getRoute(const bool onlyfree, const am_sourceID_t sourceID
for (; gatewayIterator != listGatewayID.end(); ++gatewayIterator)
{
am_Gateway_s gatewayData;
- if (mDatabaseHandler->getGatewayInfoDB(*gatewayIterator, gatewayData) != E_OK)
+ if (mpDatabaseHandler->getGatewayInfoDB(*gatewayIterator, gatewayData) != E_OK)
return (E_UNKNOWN);
//at the beginning of the route, we connect first the source to the first gateway
@@ -168,8 +174,8 @@ void CAmRouter::listPossibleConnectionFormats(const am_sourceID_t sourceID, cons
{
std::vector<am_ConnectionFormat_e> listSourceFormats;
std::vector<am_ConnectionFormat_e> listSinkFormats;
- mDatabaseHandler->getListSinkConnectionFormats(sinkID, listSinkFormats);
- mDatabaseHandler->getListSourceConnectionFormats(sourceID, listSourceFormats);
+ mpDatabaseHandler->getListSinkConnectionFormats(sinkID, listSinkFormats);
+ mpDatabaseHandler->getListSourceConnectionFormats(sourceID, listSourceFormats);
std::sort(listSinkFormats.begin(), listSinkFormats.end()); //todo: this might be not needed if we use strictly sorted input
std::sort(listSourceFormats.begin(), listSourceFormats.end()); //todo: this might be not needed if we use strictly sorted input
std::insert_iterator<std::vector<am_ConnectionFormat_e> > inserter(listFormats, listFormats.begin());
@@ -210,7 +216,7 @@ am_Error_e CAmRouter::findBestWay(am_sinkID_t sinkID, am_sourceID_t sourceID, st
route.route = listRoute;
//let the controller decide:
- mControlSender->getConnectionFormatChoice(routeIterator->sourceID, routeIterator->sinkID, route, listMergeConnectionFormats, listPriorityConnectionFormats);
+ mpControlSender->getConnectionFormatChoice(routeIterator->sourceID, routeIterator->sinkID, route, listMergeConnectionFormats, listPriorityConnectionFormats);
//we have the list sorted after prios - now we try one after the other with the next part of the route
std::vector<am_ConnectionFormat_e>::iterator connectionFormatIterator = listPriorityConnectionFormats.begin();
@@ -221,10 +227,10 @@ am_Error_e CAmRouter::findBestWay(am_sinkID_t sinkID, am_sourceID_t sourceID, st
if (!listPriorityConnectionFormats.empty())
{
routeIterator->connectionFormat = listPriorityConnectionFormats.front();
- return E_OK;
+ return (E_OK);
}
else
- return E_NOT_POSSIBLE;
+ return (E_NOT_POSSIBLE);
}
for (; connectionFormatIterator != listPriorityConnectionFormats.end(); ++connectionFormatIterator)
@@ -243,7 +249,7 @@ void CAmRouter::listRestrictedOutputFormatsGateways(const am_gatewayID_t gateway
{
listFormats.clear();
am_Gateway_s gatewayData;
- mDatabaseHandler->getGatewayInfoDB(gatewayID, gatewayData);
+ mpDatabaseHandler->getGatewayInfoDB(gatewayID, gatewayData);
std::vector<am_ConnectionFormat_e>::const_iterator rowSinkIterator = gatewayData.listSinkFormats.begin();
std::vector<bool>::const_iterator matrixIterator = gatewayData.convertionMatrix.begin();
@@ -272,7 +278,7 @@ CAmRouter::~CAmRouter()
CAmRoutingTreeItem::CAmRoutingTreeItem(const am_domainID_t domainID, const am_gatewayID_t gatewayID, CAmRoutingTreeItem *parent) :
mDomainID(domainID), //
mGatewayID(gatewayID), //
- mParentItem(parent)
+ mpParentItem(parent)
{
assert(mDomainID!=0);
}
@@ -300,7 +306,7 @@ am_gatewayID_t CAmRoutingTreeItem::returnGatewayID() const
CAmRoutingTreeItem* CAmRoutingTreeItem::returnParent() const
{
- return (mParentItem);
+ return (mpParentItem);
}
CAmRoutingTreeItem::~CAmRoutingTreeItem()
@@ -318,7 +324,7 @@ CAmRoutingTreeItem *CAmRoutingTree::insertItem(const am_domainID_t domainID, con
CAmRoutingTreeItem *newTree = new CAmRoutingTreeItem(domainID, gatewayID, parent);
parent->appendChild(newTree);
mListChild.push_back(newTree);
- return newTree;
+ return (newTree);
}
void CAmRoutingTree::getRoute(CAmRoutingTreeItem *targetItem, std::vector<am_gatewayID_t>& listGateways)
diff --git a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
index 8f489fb..3e9aa65 100644
--- a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
@@ -1,25 +1,22 @@
/**
- * 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 CAmRoutingReceiver.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \section LicenseCAmRoutingReceiver.h
*
- * 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 CAmRoutingReceiver.cpp
+ * For further information see http://www.genivi.org/.
*
*/
@@ -36,37 +33,37 @@ namespace am
{
CAmRoutingReceiver::CAmRoutingReceiver(CAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler) :
- mDatabaseHandler(iDatabaseHandler), //
- mRoutingSender(iRoutingSender), //
- mControlSender(iControlSender), //
- mSocketHandler(iSocketHandler), //
+ mpDatabaseHandler(iDatabaseHandler), //
+ mpRoutingSender(iRoutingSender), //
+ mpControlSender(iControlSender), //
+ mpSocketHandler(iSocketHandler), //
mListStartupHandles(), //
mListRundownHandles(), //
mWaitStartup(false), //
mWaitRundown(false)
{
- assert(mDatabaseHandler!=NULL);
- assert(mRoutingSender!=NULL);
- assert(mControlSender!=NULL);
- assert(mSocketHandler!=NULL);
+ assert(mpDatabaseHandler!=NULL);
+ assert(mpRoutingSender!=NULL);
+ assert(mpControlSender!=NULL);
+ assert(mpSocketHandler!=NULL);
}
CAmRoutingReceiver::CAmRoutingReceiver(CAmDatabaseHandler *iDatabaseHandler, CAmRoutingSender *iRoutingSender, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler, CAmDbusWrapper *iDBusWrapper) :
- mDatabaseHandler(iDatabaseHandler), //
- mRoutingSender(iRoutingSender), //
- mControlSender(iControlSender), //
- mSocketHandler(iSocketHandler), //
- mDBusWrapper(iDBusWrapper), //
+ mpDatabaseHandler(iDatabaseHandler), //
+ mpRoutingSender(iRoutingSender), //
+ mpControlSender(iControlSender), //
+ mpSocketHandler(iSocketHandler), //
+ mpDBusWrapper(iDBusWrapper), //
mListStartupHandles(), //
mListRundownHandles(), //
mWaitStartup(false), //
mWaitRundown(false)
{
- assert(mDatabaseHandler!=NULL);
- assert(mRoutingSender!=NULL);
- assert(mControlSender!=NULL);
- assert(mSocketHandler!=NULL);
- assert(mDBusWrapper!=NULL);
+ assert(mpDatabaseHandler!=NULL);
+ assert(mpRoutingSender!=NULL);
+ assert(mpControlSender!=NULL);
+ assert(mpSocketHandler!=NULL);
+ assert(mpDBusWrapper!=NULL);
}
CAmRoutingReceiver::~CAmRoutingReceiver()
@@ -75,266 +72,266 @@ CAmRoutingReceiver::~CAmRoutingReceiver()
void CAmRoutingReceiver::ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
{
- mRoutingSender->removeHandle(handle);
+ mpRoutingSender->removeHandle(handle);
if (error == E_OK)
{
- mDatabaseHandler->changeConnectionFinal(connectionID);
+ mpDatabaseHandler->changeConnectionFinal(connectionID);
}
else
{
- mDatabaseHandler->removeConnection(connectionID);
+ mpDatabaseHandler->removeConnection(connectionID);
}
- mControlSender->cbAckConnect(handle, error);
+ mpControlSender->cbAckConnect(handle, error);
}
void CAmRoutingReceiver::ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)
{
- mRoutingSender->removeHandle(handle);
+ mpRoutingSender->removeHandle(handle);
if (error == E_OK)
{
- mDatabaseHandler->removeConnection(connectionID);
+ mpDatabaseHandler->removeConnection(connectionID);
}
- mControlSender->cbAckDisconnect(handle, error);
+ mpControlSender->cbAckDisconnect(handle, error);
}
void CAmRoutingReceiver::ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.sinkID != 0)
{
//todo: check if volume in handleData is same than volume. React to it.
- mDatabaseHandler->changeSinkVolume(handleData.sinkID, volume);
+ mpDatabaseHandler->changeSinkVolume(handleData.sinkID, volume);
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckSetSinkVolumeChange(handle, volume, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckSetSinkVolumeChange(handle, volume, error);
}
void CAmRoutingReceiver::ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.sourceID != 0)
{
//todo: check if volume in handleData is same than volume. React to it.
- mDatabaseHandler->changeSourceVolume(handleData.sourceID, volume);
+ mpDatabaseHandler->changeSourceVolume(handleData.sourceID, volume);
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckSetSourceVolumeChange(handle, volume, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckSetSourceVolumeChange(handle, volume, error);
}
void CAmRoutingReceiver::ackSetSourceState(const am_Handle_s handle, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.sourceID != 0)
{
//todo: check if volume in handleData is same than volume. React to it.
- mDatabaseHandler->changeSourceState(handleData.sourceID, handleData.sourceState);
+ mpDatabaseHandler->changeSourceState(handleData.sourceID, handleData.sourceState);
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckSetSourceState(handle, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckSetSourceState(handle, error);
}
void CAmRoutingReceiver::ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.sinkID != 0)
{
- mDatabaseHandler->changeSinkSoundPropertyDB(handleData.soundPropery, handleData.sinkID);
+ mpDatabaseHandler->changeSinkSoundPropertyDB(handleData.soundPropery, handleData.sinkID);
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckSetSinkSoundProperty(handle, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckSetSinkSoundProperty(handle, error);
}
void am::CAmRoutingReceiver::ackSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.sinkID != 0)
{
std::vector<am_SoundProperty_s>::const_iterator it = handleData.soundProperties->begin();
for (; it != handleData.soundProperties->end(); ++it)
{
- mDatabaseHandler->changeSinkSoundPropertyDB(*it, handleData.sinkID);
+ mpDatabaseHandler->changeSinkSoundPropertyDB(*it, handleData.sinkID);
}
delete handleData.soundProperties;
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckSetSinkSoundProperties(handle, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckSetSinkSoundProperties(handle, error);
}
void CAmRoutingReceiver::ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.sourceID != 0)
{
- mDatabaseHandler->changeSourceSoundPropertyDB(handleData.soundPropery, handleData.sourceID);
+ mpDatabaseHandler->changeSourceSoundPropertyDB(handleData.soundPropery, handleData.sourceID);
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckSetSourceSoundProperty(handle, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckSetSourceSoundProperty(handle, error);
}
void am::CAmRoutingReceiver::ackSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.sourceID != 0)
{
std::vector<am_SoundProperty_s>::const_iterator it = handleData.soundProperties->begin();
for (; it != handleData.soundProperties->end(); ++it)
{
- mDatabaseHandler->changeSourceSoundPropertyDB(*it, handleData.sourceID);
+ mpDatabaseHandler->changeSourceSoundPropertyDB(*it, handleData.sourceID);
}
delete handleData.soundProperties;
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckSetSourceSoundProperties(handle, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckSetSourceSoundProperties(handle, error);
}
void CAmRoutingReceiver::ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error)
{
- CAmRoutingSender::am_handleData_c handleData = mRoutingSender->returnHandleData(handle);
+ CAmRoutingSender::am_handleData_c handleData = mpRoutingSender->returnHandleData(handle);
if (error == E_OK && handleData.crossfaderID != 0)
{
//todo: check if volume in handleData is same than volume. React to it.
- mDatabaseHandler->changeCrossFaderHotSink(handleData.crossfaderID, hotSink);
+ mpDatabaseHandler->changeCrossFaderHotSink(handleData.crossfaderID, hotSink);
}
- mRoutingSender->removeHandle(handle);
- mControlSender->cbAckCrossFade(handle, hotSink, error);
+ mpRoutingSender->removeHandle(handle);
+ mpControlSender->cbAckCrossFade(handle, hotSink, error);
}
void CAmRoutingReceiver::ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
{
- mControlSender->hookSystemSourceVolumeTick(handle, sourceID, volume);
+ mpControlSender->hookSystemSourceVolumeTick(handle, sourceID, volume);
}
void CAmRoutingReceiver::ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
{
- mControlSender->hookSystemSinkVolumeTick(handle, sinkID, volume);
+ mpControlSender->hookSystemSinkVolumeTick(handle, sinkID, volume);
}
am_Error_e CAmRoutingReceiver::peekDomain(const std::string & name, am_domainID_t & domainID)
{
- return mDatabaseHandler->peekDomain(name, domainID);
+ return (mpDatabaseHandler->peekDomain(name, domainID));
}
am_Error_e CAmRoutingReceiver::registerDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
{
- return mControlSender->hookSystemRegisterDomain(domainData, domainID);
+ return (mpControlSender->hookSystemRegisterDomain(domainData, domainID));
}
am_Error_e CAmRoutingReceiver::deregisterDomain(const am_domainID_t domainID)
{
- return mControlSender->hookSystemDeregisterDomain(domainID);
+ return (mpControlSender->hookSystemDeregisterDomain(domainID));
}
am_Error_e CAmRoutingReceiver::registerGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
{
- return mControlSender->hookSystemRegisterGateway(gatewayData, gatewayID);
+ return (mpControlSender->hookSystemRegisterGateway(gatewayData, gatewayID));
}
am_Error_e CAmRoutingReceiver::deregisterGateway(const am_gatewayID_t gatewayID)
{
- return mControlSender->hookSystemDeregisterGateway(gatewayID);
+ return (mpControlSender->hookSystemDeregisterGateway(gatewayID));
}
am_Error_e CAmRoutingReceiver::peekSink(const std::string& name, am_sinkID_t & sinkID)
{
- return mDatabaseHandler->peekSink(name, sinkID);
+ return (mpDatabaseHandler->peekSink(name, sinkID));
}
am_Error_e CAmRoutingReceiver::registerSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
{
- return mControlSender->hookSystemRegisterSink(sinkData, sinkID);
+ return (mpControlSender->hookSystemRegisterSink(sinkData, sinkID));
}
am_Error_e CAmRoutingReceiver::deregisterSink(const am_sinkID_t sinkID)
{
- return mControlSender->hookSystemDeregisterSink(sinkID);
+ return (mpControlSender->hookSystemDeregisterSink(sinkID));
}
am_Error_e CAmRoutingReceiver::peekSource(const std::string & name, am_sourceID_t & sourceID)
{
- return mDatabaseHandler->peekSource(name, sourceID);
+ return (mpDatabaseHandler->peekSource(name, sourceID));
}
am_Error_e CAmRoutingReceiver::registerSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
{
- return mControlSender->hookSystemRegisterSource(sourceData, sourceID);
+ return (mpControlSender->hookSystemRegisterSource(sourceData, sourceID));
}
am_Error_e CAmRoutingReceiver::deregisterSource(const am_sourceID_t sourceID)
{
- return mControlSender->hookSystemDeregisterSource(sourceID);
+ return (mpControlSender->hookSystemDeregisterSource(sourceID));
}
am_Error_e CAmRoutingReceiver::registerCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
{
- return mControlSender->hookSystemRegisterCrossfader(crossfaderData, crossfaderID);
+ return (mpControlSender->hookSystemRegisterCrossfader(crossfaderData, crossfaderID));
}
am_Error_e CAmRoutingReceiver::deregisterCrossfader(const am_crossfaderID_t crossfaderID)
{
- return mControlSender->hookSystemDeregisterCrossfader(crossfaderID);
+ return (mpControlSender->hookSystemDeregisterCrossfader(crossfaderID));
}
void CAmRoutingReceiver::hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
{
- return mControlSender->hookSystemInterruptStateChange(sourceID, interruptState);
+ return (mpControlSender->hookSystemInterruptStateChange(sourceID, interruptState));
}
void CAmRoutingReceiver::hookDomainRegistrationComplete(const am_domainID_t domainID)
{
- mControlSender->hookSystemDomainRegistrationComplete(domainID);
+ mpControlSender->hookSystemDomainRegistrationComplete(domainID);
}
void CAmRoutingReceiver::hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s & availability)
{
- mControlSender->hookSystemSinkAvailablityStateChange(sinkID, availability);
+ mpControlSender->hookSystemSinkAvailablityStateChange(sinkID, availability);
}
void CAmRoutingReceiver::hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s & availability)
{
- mControlSender->hookSystemSourceAvailablityStateChange(sourceID, availability);
+ mpControlSender->hookSystemSourceAvailablityStateChange(sourceID, availability);
}
void CAmRoutingReceiver::hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState)
{
- mControlSender->hookSystemDomainStateChange(domainID, domainState);
+ mpControlSender->hookSystemDomainStateChange(domainID, domainState);
}
void CAmRoutingReceiver::hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay)
{
- mDatabaseHandler->changeConnectionTimingInformation(connectionID, delay);
+ mpDatabaseHandler->changeConnectionTimingInformation(connectionID, delay);
}
void CAmRoutingReceiver::sendChangedData(const std::vector<am_EarlyData_s> & earlyData)
{
- mControlSender->hookSystemReceiveEarlyData(earlyData);
+ mpControlSender->hookSystemReceiveEarlyData(earlyData);
}
am_Error_e CAmRoutingReceiver::peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID)
{
- return mDatabaseHandler->peekSinkClassID(name, sinkClassID);
+ return (mpDatabaseHandler->peekSinkClassID(name, sinkClassID));
}
am_Error_e CAmRoutingReceiver::peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID)
{
- return mDatabaseHandler->peekSourceClassID(name, sourceClassID);
+ return (mpDatabaseHandler->peekSourceClassID(name, sourceClassID));
}
am_Error_e CAmRoutingReceiver::getDBusConnectionWrapper(CAmDbusWrapper *& dbusConnectionWrapper) const
{
#ifdef WITH_DBUS_WRAPPER
- dbusConnectionWrapper = mDBusWrapper;
- return E_OK;
+ dbusConnectionWrapper = mpDBusWrapper;
+ return (E_OK);
#else
- return E_UNKNOWN;
+ return (E_UNKNOWN);
#endif
}
am_Error_e CAmRoutingReceiver::getSocketHandler(CAmSocketHandler *& socketHandler) const
{
- socketHandler = mSocketHandler;
- return E_OK;
+ socketHandler = mpSocketHandler;
+ return (E_OK);
}
void CAmRoutingReceiver::getInterfaceVersion(std::string & version) const
@@ -346,28 +343,28 @@ void CAmRoutingReceiver::confirmRoutingReady(const uint16_t handle)
{
mListStartupHandles.erase(std::remove(mListStartupHandles.begin(), mListStartupHandles.end(), handle), mListStartupHandles.end());
if (mWaitStartup && mListStartupHandles.empty())
- mControlSender->confirmRoutingReady();
+ mpControlSender->confirmRoutingReady();
}
void CAmRoutingReceiver::confirmRoutingRundown(const uint16_t handle)
{
mListRundownHandles.erase(std::remove(mListRundownHandles.begin(), mListRundownHandles.end(), handle), mListRundownHandles.end());
if (mWaitRundown && mListRundownHandles.empty())
- mControlSender->confirmCommandRundown();
+ mpControlSender->confirmCommandRundown();
}
uint16_t am::CAmRoutingReceiver::getStartupHandle()
{
uint16_t handle = ++handleCount; //todo: handle overflow
mListStartupHandles.push_back(handle);
- return handle;
+ return (handle);
}
uint16_t am::CAmRoutingReceiver::getRundownHandle()
{
uint16_t handle = ++handleCount; //todo: handle overflow
mListRundownHandles.push_back(handle);
- return handle;
+ return (handle);
}
void am::CAmRoutingReceiver::waitOnStartup(bool startup)
diff --git a/AudioManagerDaemon/src/CAmRoutingSender.cpp b/AudioManagerDaemon/src/CAmRoutingSender.cpp
index c134c3f..d14c826 100644
--- a/AudioManagerDaemon/src/CAmRoutingSender.cpp
+++ b/AudioManagerDaemon/src/CAmRoutingSender.cpp
@@ -1,24 +1,22 @@
/**
- * 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 CAmRoutingSender.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \file CAmRoutingSender.cpp
+ * For further information see http://www.genivi.org/.
*
*/
@@ -36,9 +34,12 @@
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
+/**
+ * macro to call all interfaces
+ *
+ */
#define CALL_ALL_INTERFACES(...) \
std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin(); \
std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end(); \
@@ -57,7 +58,7 @@ CAmRoutingSender::CAmRoutingSender(const std::vector<std::string>& listOfPluginD
mMapSinkInterface(), //
mMapSourceInterface(), //
mMapHandleInterface(), //
- mRoutingReceiver()
+ mpRoutingReceiver()
{
std::vector<std::string> sharedLibraryNameList;
std::vector<std::string>::const_iterator dirIter = listOfPluginDirectories.begin();
@@ -167,7 +168,7 @@ CAmRoutingSender::~CAmRoutingSender()
am_Error_e CAmRoutingSender::startupInterfaces(CAmRoutingReceiver *iRoutingReceiver)
{
- mRoutingReceiver = iRoutingReceiver;
+ mpRoutingReceiver = iRoutingReceiver;
am_Error_e returnError = E_OK;
std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
@@ -180,7 +181,7 @@ am_Error_e CAmRoutingSender::startupInterfaces(CAmRoutingReceiver *iRoutingRecei
returnError = error;
}
}
- return returnError;
+ return (returnError);
}
am_Error_e CAmRoutingSender::asyncAbort(const am_Handle_s& handle)
@@ -189,10 +190,10 @@ am_Error_e CAmRoutingSender::asyncAbort(const am_Handle_s& handle)
iter = mMapHandleInterface.find(handle.handle);
if (iter != mMapHandleInterface.end())
{
- return iter->second->asyncAbort(handle);
+ return (iter->second->asyncAbort(handle));
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
am_Error_e CAmRoutingSender::asyncConnect(am_Handle_s& handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_ConnectionFormat_e connectionFormat)
@@ -206,10 +207,10 @@ am_Error_e CAmRoutingSender::asyncConnect(am_Handle_s& handle, const am_connecti
handle = createHandle(handleData, H_CONNECT);
mMapConnectionInterface.insert(std::make_pair(connectionID, iter->second));
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncConnect(handle, connectionID, sourceID, sinkID, connectionFormat);
+ return (iter->second->asyncConnect(handle, connectionID, sourceID, sinkID, connectionFormat));
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
am_Error_e CAmRoutingSender::asyncDisconnect(am_Handle_s& handle, const am_connectionID_t connectionID)
@@ -224,10 +225,10 @@ am_Error_e CAmRoutingSender::asyncDisconnect(am_Handle_s& handle, const am_conne
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
am_Error_e returnVal = iter->second->asyncDisconnect(handle, connectionID);
mMapConnectionInterface.erase(iter);
- return returnVal;
+ return (returnVal);
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
am_Error_e CAmRoutingSender::asyncSetSinkVolume(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
@@ -241,9 +242,9 @@ am_Error_e CAmRoutingSender::asyncSetSinkVolume(am_Handle_s& handle, const am_si
handleData.volume = volume;
handle = createHandle(handleData, H_SETSINKVOLUME);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncSetSinkVolume(handle, sinkID, volume, ramp, time);
+ return (iter->second->asyncSetSinkVolume(handle, sinkID, volume, ramp, time));
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
am_Error_e CAmRoutingSender::asyncSetSourceVolume(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time)
@@ -257,9 +258,9 @@ am_Error_e CAmRoutingSender::asyncSetSourceVolume(am_Handle_s& handle, const am_
handleData.volume = volume;
handle = createHandle(handleData, H_SETSOURCEVOLUME);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncSetSourceVolume(handle, sourceID, volume, ramp, time);
+ return (iter->second->asyncSetSourceVolume(handle, sourceID, volume, ramp, time));
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
am_Error_e CAmRoutingSender::asyncSetSourceState(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state)
@@ -273,9 +274,9 @@ am_Error_e CAmRoutingSender::asyncSetSourceState(am_Handle_s& handle, const am_s
handleData.sourceState = state;
handle = createHandle(handleData, H_SETSOURCESTATE);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncSetSourceState(handle, sourceID, state);
+ return (iter->second->asyncSetSourceState(handle, sourceID, state));
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
am_Error_e CAmRoutingSender::asyncSetSinkSoundProperty(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s & soundProperty)
@@ -289,7 +290,7 @@ am_Error_e CAmRoutingSender::asyncSetSinkSoundProperty(am_Handle_s& handle, cons
handleData.soundPropery = soundProperty;
handle = createHandle(handleData, H_SETSINKSOUNDPROPERTY);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncSetSinkSoundProperty(handle, sinkID, soundProperty);
+ return (iter->second->asyncSetSinkSoundProperty(handle, sinkID, soundProperty));
}
return (E_NON_EXISTENT);
}
@@ -305,7 +306,7 @@ am_Error_e CAmRoutingSender::asyncSetSourceSoundProperty(am_Handle_s& handle, co
handleData.soundPropery = soundProperty;
handle = createHandle(handleData, H_SETSOURCESOUNDPROPERTY);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncSetSourceSoundProperty(handle, sourceID, soundProperty);
+ return (iter->second->asyncSetSourceSoundProperty(handle, sourceID, soundProperty));
}
return (E_NON_EXISTENT);
}
@@ -321,7 +322,7 @@ am_Error_e CAmRoutingSender::asyncSetSourceSoundProperties(am_Handle_s& handle,
handleData.soundProperties = new std::vector<am_SoundProperty_s>(listSoundProperties);
handle = createHandle(handleData, H_SETSOURCESOUNDPROPERTIES);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncSetSourceSoundProperties(handle, sourceID, listSoundProperties);
+ return (iter->second->asyncSetSourceSoundProperties(handle, sourceID, listSoundProperties));
}
return (E_NON_EXISTENT);
}
@@ -337,7 +338,7 @@ am_Error_e CAmRoutingSender::asyncSetSinkSoundProperties(am_Handle_s& handle, co
handleData.soundProperties = new std::vector<am_SoundProperty_s>(listSoundProperties);
handle = createHandle(handleData, H_SETSINKSOUNDPROPERTIES);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncSetSinkSoundProperties(handle, sinkID, listSoundProperties);
+ return (iter->second->asyncSetSinkSoundProperties(handle, sinkID, listSoundProperties));
}
return (E_NON_EXISTENT);
@@ -354,9 +355,9 @@ am_Error_e CAmRoutingSender::asyncCrossFade(am_Handle_s& handle, const am_crossf
handleData.hotSink = hotSink;
handle = createHandle(handleData, H_CROSSFADE);
mMapHandleInterface.insert(std::make_pair(handle.handle, iter->second));
- return iter->second->asyncCrossFade(handle, crossfaderID, hotSink, rampType, time);
+ return (iter->second->asyncCrossFade(handle, crossfaderID, hotSink, rampType, time));
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
am_Error_e CAmRoutingSender::setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState)
@@ -364,10 +365,15 @@ am_Error_e CAmRoutingSender::setDomainState(const am_domainID_t domainID, const
DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
iter = mMapDomainInterface.find(domainID);
if (iter != mMapDomainInterface.end())
- return iter->second->setDomainState(domainID, domainState);
- return E_NON_EXISTENT;
+ return (iter->second->setDomainState(domainID, domainState));
+ return (E_NON_EXISTENT);
}
+/**
+ * @author Christian
+ * this adds the domain to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a domain is registered.
+ */
am_Error_e CAmRoutingSender::addDomainLookup(const am_Domain_s& domainData)
{
std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
@@ -377,13 +383,18 @@ am_Error_e CAmRoutingSender::addDomainLookup(const am_Domain_s& domainData)
if ((*iter).busName.compare(domainData.busname) == 0)
{
mMapDomainInterface.insert(std::make_pair(domainData.domainID, (*iter).routingInterface));
- return E_OK;
+ return (E_OK);
}
}
- return E_UNKNOWN;
+ return (E_UNKNOWN);
}
+/**
+ * @author Christian
+ * this adds the Source to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a Source is registered.
+ */
am_Error_e CAmRoutingSender::addSourceLookup(const am_Source_s& sourceData)
{
DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
@@ -391,12 +402,17 @@ am_Error_e CAmRoutingSender::addSourceLookup(const am_Source_s& sourceData)
if (iter != mMapDomainInterface.end())
{
mMapSourceInterface.insert(std::make_pair(sourceData.sourceID, iter->second));
- return E_OK;
+ return (E_OK);
}
- return E_UNKNOWN;
+ return (E_UNKNOWN);
}
+/**
+ * @author Christian
+ * this adds the Sink to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a Sink is registered.
+ */
am_Error_e CAmRoutingSender::addSinkLookup(const am_Sink_s& sinkData)
{
DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
@@ -404,12 +420,17 @@ am_Error_e CAmRoutingSender::addSinkLookup(const am_Sink_s& sinkData)
if (iter != mMapDomainInterface.end())
{
mMapSinkInterface.insert(std::make_pair(sinkData.sinkID, iter->second));
- return E_OK;
+ return (E_OK);
}
- return E_UNKNOWN;
+ return (E_UNKNOWN);
}
+/**
+ * @author Christian
+ * this adds the Crossfader to the lookup table of the Router. The data is used to have a quick lookup of the correct pluginInterface.
+ * This must be done whenever a Crossfader is registered.
+ */
am_Error_e CAmRoutingSender::addCrossfaderLookup(const am_Crossfader_s& crossfaderData)
{
DomainInterfaceMap::iterator iter = mMapSourceInterface.begin();
@@ -417,12 +438,16 @@ am_Error_e CAmRoutingSender::addCrossfaderLookup(const am_Crossfader_s& crossfad
if (iter != mMapSourceInterface.end())
{
mMapSourceInterface.insert(std::make_pair(crossfaderData.crossfaderID, iter->second));
- return E_OK;
+ return (E_OK);
}
- return E_UNKNOWN;
+ return (E_UNKNOWN);
}
+/**
+ * @author Christian
+ * this removes the Domain to the lookup table of the Router. This must be done everytime a domain is deregistered.
+ */
am_Error_e CAmRoutingSender::removeDomainLookup(const am_domainID_t domainID)
{
DomainInterfaceMap::iterator iter = mMapDomainInterface.begin();
@@ -430,12 +455,16 @@ am_Error_e CAmRoutingSender::removeDomainLookup(const am_domainID_t domainID)
if (iter != mMapDomainInterface.end())
{
mMapDomainInterface.erase(iter);
- return E_OK;
+ return (E_OK);
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
+/**
+ * @author Christian
+ * this removes the Source to the lookup table of the Router. This must be done everytime a source is deregistered.
+ */
am_Error_e CAmRoutingSender::removeSourceLookup(const am_sourceID_t sourceID)
{
SourceInterfaceMap::iterator iter = mMapSourceInterface.begin();
@@ -443,12 +472,16 @@ am_Error_e CAmRoutingSender::removeSourceLookup(const am_sourceID_t sourceID)
if (iter != mMapSourceInterface.end())
{
mMapSourceInterface.erase(iter);
- return E_OK;
+ return (E_OK);
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
+/**
+ * @author Christian
+ * this removes the Sink to the lookup table of the Router. This must be done everytime a sink is deregistered.
+ */
am_Error_e CAmRoutingSender::removeSinkLookup(const am_sinkID_t sinkID)
{
SinkInterfaceMap::iterator iter = mMapSinkInterface.begin();
@@ -456,12 +489,16 @@ am_Error_e CAmRoutingSender::removeSinkLookup(const am_sinkID_t sinkID)
if (iter != mMapSinkInterface.end())
{
mMapSinkInterface.erase(iter);
- return E_OK;
+ return (E_OK);
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
+/**
+ * @author Christian
+ * this removes the Crossfader to the lookup table of the Router. This must be done everytime a crossfader is deregistered.
+ */
am_Error_e CAmRoutingSender::removeCrossfaderLookup(const am_crossfaderID_t crossfaderID)
{
CrossfaderInterfaceMap::iterator iter = mMapCrossfaderInterface.begin();
@@ -469,17 +506,22 @@ am_Error_e CAmRoutingSender::removeCrossfaderLookup(const am_crossfaderID_t cros
if (iter != mMapCrossfaderInterface.end())
{
mMapCrossfaderInterface.erase(iter);
- return E_OK;
+ return (E_OK);
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
+/**
+ * removes a handle from the list
+ * @param handle to be removed
+ * @return E_OK in case of success
+ */
am_Error_e CAmRoutingSender::removeHandle(const am_Handle_s& handle)
{
if (mlistActiveHandles.erase(handle))
- return E_OK;
- return E_UNKNOWN;
+ return (E_OK);
+ return (E_UNKNOWN);
}
am_Error_e CAmRoutingSender::getListHandles(std::vector<am_Handle_s> & listHandles) const
@@ -490,18 +532,29 @@ am_Error_e CAmRoutingSender::getListHandles(std::vector<am_Handle_s> & listHandl
{
listHandles.push_back(it->first);
}
- return E_OK;
+ return (E_OK);
}
+/**
+ * creates a handle and adds it to the list of handles
+ * @param handleData the data that should be saves together with the handle
+ * @param type the type of handle to be created
+ * @return the handle
+ */
am_Handle_s CAmRoutingSender::createHandle(const am_handleData_c& handleData, const am_Handle_e type)
{
am_Handle_s handle;
handle.handle = ++mHandleCount; //todo: handle overflows here...
handle.handleType = type;
mlistActiveHandles.insert(std::make_pair(handle, handleData));
- return handle;
+ return (handle);
}
+/**
+ * returns the data that belong to handles
+ * @param handle the handle
+ * @return a class holding the handle data
+ */
CAmRoutingSender::am_handleData_c CAmRoutingSender::returnHandleData(const am_Handle_s handle) const
{
HandlesMap::const_iterator it = mlistActiveHandles.begin();
@@ -511,26 +564,26 @@ CAmRoutingSender::am_handleData_c CAmRoutingSender::returnHandleData(const am_Ha
void CAmRoutingSender::setRoutingReady()
{
- mRoutingReceiver->waitOnStartup(false);
+ mpRoutingReceiver->waitOnStartup(false);
std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end();
for (; iter < iterEnd; ++iter)
{
- (*iter).routingInterface->setRoutingReady(mRoutingReceiver->getStartupHandle());
+ (*iter).routingInterface->setRoutingReady(mpRoutingReceiver->getStartupHandle());
}
- mRoutingReceiver->waitOnStartup(true);
+ mpRoutingReceiver->waitOnStartup(true);
}
void CAmRoutingSender::setRoutingRundown()
{
- mRoutingReceiver->waitOnRundown(false);
+ mpRoutingReceiver->waitOnRundown(false);
std::vector<InterfaceNamePairs>::iterator iter = mListInterfaces.begin();
std::vector<InterfaceNamePairs>::iterator iterEnd = mListInterfaces.end();
for (; iter < iterEnd; ++iter)
{
- (*iter).routingInterface->setRoutingRundown(mRoutingReceiver->getStartupHandle());
+ (*iter).routingInterface->setRoutingRundown(mpRoutingReceiver->getStartupHandle());
}
- mRoutingReceiver->waitOnRundown(true);
+ mpRoutingReceiver->waitOnRundown(true);
}
void CAmRoutingSender::unloadLibraries(void)
@@ -550,7 +603,7 @@ am_Error_e CAmRoutingSender::getListPlugins(std::vector<std::string>& interfaces
{
interfaces.push_back(it->busName);
}
- return E_OK;
+ return (E_OK);
}
void CAmRoutingSender::getInterfaceVersion(std::string & version) const
diff --git a/AudioManagerDaemon/src/CAmSocketHandler.cpp b/AudioManagerDaemon/src/CAmSocketHandler.cpp
index 2d5c7d7..d13ea7b 100644
--- a/AudioManagerDaemon/src/CAmSocketHandler.cpp
+++ b/AudioManagerDaemon/src/CAmSocketHandler.cpp
@@ -1,24 +1,22 @@
/**
- * 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 CAmDbusWrapper.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \file CAmSocketHandler.cpp
+ * For further information see http://www.genivi.org/.
*
*/
@@ -37,7 +35,8 @@
//todo: implement time correction if timer was interrupted by call
//todo: change hitlist to a list that holds all information, because entering and removing items will be cheaper than with std::vector
-namespace am {
+namespace am
+{
CAmSocketHandler::CAmSocketHandler() :
mListPoll(), //
@@ -64,7 +63,7 @@ CAmSocketHandler::~CAmSocketHandler()
*/
void CAmSocketHandler::start_listenting()
{
- gDispatchDone=0;
+ gDispatchDone = 0;
int16_t pollStatus;
std::list<int16_t> hitList;
@@ -84,7 +83,7 @@ void CAmSocketHandler::start_listenting()
{
//first we go through the registered filedescriptors and check if someone needs preparation:
mListPoll_t::iterator prepIter = mListPoll.begin();
- CAmShPollPrepare *prep = NULL;
+ IAmShPollPrepare *prep = NULL;
for (; prepIter != mListPoll.end(); ++prepIter)
{
if ((prep = prepIter->prepareCB) != NULL)
@@ -156,7 +155,7 @@ void CAmSocketHandler::start_listenting()
std::list<int16_t>::iterator hListIt = hitList.begin();
for (; hListIt != hitList.end(); ++hListIt)
{
- CAmShPollFired* fire = NULL;
+ IAmShPollFired* fire = NULL;
if ((fire = listPoll.at(*hListIt).firedCB) != NULL)
fire->Call(mfdPollingArray.at(*hListIt), listPoll.at(*hListIt).handle, listPoll.at(*hListIt).userData);
}
@@ -165,7 +164,7 @@ void CAmSocketHandler::start_listenting()
hListIt = hitList.begin();
for (; hListIt != hitList.end(); ++hListIt)
{
- CAmShPollCheck* check = NULL;
+ IAmShPollCheck* check = NULL;
if ((check = listPoll.at(*hListIt).checkCB) != NULL)
{
if (!check->Call(listPoll.at(*hListIt).handle, listPoll.at(*hListIt).userData))
@@ -181,7 +180,7 @@ void CAmSocketHandler::start_listenting()
hListIt = hitList.begin();
for (; hListIt != hitList.end(); ++hListIt)
{
- CAmShPollDispatch *dispatch = NULL;
+ IAmShPollDispatch *dispatch = NULL;
if ((dispatch = listPoll.at(*hListIt).dispatchCB) != NULL)
{
if (!dispatch->Call(listPoll.at(*hListIt).handle, listPoll.at(*hListIt).userData))
@@ -215,15 +214,20 @@ void CAmSocketHandler::stop_listening()
/**
* Adds a filedescriptor to the polling loop
- * @param fd this is a valid filedescriptor
+ * @param fd the filedescriptor
* @param event the event flags
- * @param callback the callback that shall be called if the filedescriptor poll succeeded
+ * @param prepare a callback that is called before the loop is entered
+ * @param fired a callback that is called when the filedescriptor needs to be read
+ * @param check a callback that is called to check if further actions are neccessary
+ * @param dispatch a callback that is called to dispatch the received data
+ * @param userData a pointer to userdata that is always passed around
+ * @param handle the handle of this poll
* @return E_OK if the descriptor was added, E_NON_EXISTENT if the fd is not valid
*/
-am_Error_e CAmSocketHandler::addFDPoll(const int fd, const short event, CAmShPollPrepare *prepare, CAmShPollFired *fired, CAmShPollCheck *check, CAmShPollDispatch *dispatch, void *userData, sh_pollHandle_t & handle)
+am_Error_e CAmSocketHandler::addFDPoll(const int fd, const short event, IAmShPollPrepare *prepare, IAmShPollFired *fired, IAmShPollCheck *check, IAmShPollDispatch *dispatch, void *userData, sh_pollHandle_t & handle)
{
if (!fdIsValid(fd))
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
sh_poll_s pollData;
pollData.pollfdValue.fd = fd;
@@ -242,13 +246,13 @@ am_Error_e CAmSocketHandler::addFDPoll(const int fd, const short event, CAmShPo
mRecreatePollfds = true;
handle = pollData.handle;
- return E_OK;
+ return (E_OK);
}
/**
* removes a filedescriptor from the poll loop
- * @param fd the filedescriptor to be removed
- * @return E_OK in case of sucess, E_NON_EXISTENT or E_UNKNOWN if the fd in not registered
+ * @param handle
+ * @return
*/
am_Error_e CAmSocketHandler::removeFDPoll(const sh_pollHandle_t handle)
{
@@ -260,10 +264,10 @@ am_Error_e CAmSocketHandler::removeFDPoll(const sh_pollHandle_t handle)
{
iterator = mListPoll.erase(iterator);
mRecreatePollfds = true;
- return E_OK;
+ return (E_OK);
}
}
- return E_UNKNOWN;
+ return (E_UNKNOWN);
}
/**
@@ -271,12 +275,13 @@ am_Error_e CAmSocketHandler::removeFDPoll(const sh_pollHandle_t handle)
* This is not a high precise timer, it is very coarse. It is meant to be used for timeouts when waiting
* for an answer via a filedescriptor.
* One time timer. If you need again a timer, you need to add a new timer in the callback of the old one.
- * @param timeouts time until the callback is fired
- * @param callback the callback
- * @param handle the handle that is created for the timer is returned. Can be used to remove the timer
+ * @param timeouts timeouts time until the callback is fired
+ * @param callback callback the callback
+ * @param handle handle the handle that is created for the timer is returned. Can be used to remove the timer
+ * @param userData pointer always passed with the call
* @return E_OK in case of success
*/
-am_Error_e CAmSocketHandler::addTimer(const timespec timeouts, CAmShTimerCallBack*& callback, sh_timerHandle_t& handle, void * userData)
+am_Error_e CAmSocketHandler::addTimer(const timespec timeouts, IAmShTimerCallBack*& callback, sh_timerHandle_t& handle, void * userData)
{
assert(!((timeouts.tv_sec==0) && (timeouts.tv_nsec==0)));
assert(callback!=NULL);
@@ -298,7 +303,7 @@ am_Error_e CAmSocketHandler::addTimer(const timespec timeouts, CAmShTimerCallBac
//very important: sort the list so that the smallest value is front
mListActiveTimer.sort(compareCountdown);
mTimeout = mListActiveTimer.front().countdown;
- return E_OK;
+ return (E_OK);
}
/**
@@ -319,10 +324,10 @@ am_Error_e CAmSocketHandler::removeTimer(const sh_timerHandle_t handle)
if (it->handle == handle)
{
it = mListTimer.erase(it);
- return E_OK;
+ return (E_OK);
}
}
- return E_UNKNOWN;
+ return (E_UNKNOWN);
}
/**
@@ -354,7 +359,7 @@ am_Error_e CAmSocketHandler::restartTimer(const sh_timerHandle_t handle, const t
//very important: sort the list so that the smallest value is front
mListActiveTimer.sort(compareCountdown);
mTimeout = mListActiveTimer.front().countdown;
- return E_OK;
+ return (E_OK);
}
am_Error_e CAmSocketHandler::stopTimer(const sh_timerHandle_t handle)
@@ -375,17 +380,17 @@ am_Error_e CAmSocketHandler::stopTimer(const sh_timerHandle_t handle)
mTimeout.tv_nsec = -1;
mTimeout.tv_sec = -1;
}
- return E_OK;
+ return (E_OK);
}
}
- return E_NON_EXISTENT;
+ return (E_NON_EXISTENT);
}
/**
* updates the eventFlags of a poll
- * @param fd the filedescriptor of the poll
- * @param event the event flags
- * @return E_OK on succsess, E_NON_EXISTENT if fd was not found
+ * @param handle
+ * @param events
+ * @return @return E_OK on succsess, E_NON_EXISTENT if fd was not found
*/
am_Error_e CAmSocketHandler::updateEventFlags(const sh_pollHandle_t handle, const short events)
{
@@ -397,10 +402,10 @@ am_Error_e CAmSocketHandler::updateEventFlags(const sh_pollHandle_t handle, cons
{
iterator->pollfdValue.events = events;
mRecreatePollfds = true;
- return E_OK;
+ return (E_OK);
}
}
- return E_UNKNOWN;
+ return (E_UNKNOWN);
}
/**
@@ -460,14 +465,14 @@ void CAmSocketHandler::initTimer()
*/
inline int CAmSocketHandler::timespec2ms(const timespec & time)
{
- return (time.tv_nsec == -1 && time.tv_sec == -1) ? -1 : time.tv_sec * 1000 + time.tv_nsec / 1000000;
+ return ((time.tv_nsec == -1 && time.tv_sec == -1) ? -1 : time.tv_sec * 1000 + time.tv_nsec / 1000000);
}
inline timespec* CAmSocketHandler::insertTime(timespec& buffertime)
{
buffertime.tv_nsec = mTimeout.tv_nsec;
buffertime.tv_sec = mTimeout.tv_sec;
- return (mTimeout.tv_nsec == -1 && mTimeout.tv_sec == -1) ? NULL : &buffertime;
+ return ((mTimeout.tv_nsec == -1 && mTimeout.tv_sec == -1) ? NULL : &buffertime);
}
/**
diff --git a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp
index 92fb09d..46dccf3 100644
--- a/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp
+++ b/AudioManagerDaemon/src/CAmTelnetMenuHelper.cpp
@@ -1,24 +1,23 @@
/**
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
* Copyright (C) 2012, BMW AG
*
- * GeniviAudioMananger AudioManagerDaemon
+ * This file is part of GENIVI Project AudioManager.
*
- * \file CAmTelnetMenuHelper.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 24-Jan-2012
- * \author Frank Herchet (frank.fh.herchet@bmw.de)
*
- * \section License
- * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
- * Copyright (C) 2012, BMW AG Frank Herchet frank.fh.herchet@bmw.de
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Frank Herchet, frank.fh.herchet@bmw.de BMW 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 CAmTelnetMenuHelper.cpp
+ * For further information see http://www.genivi.org/.
*
*/
diff --git a/AudioManagerDaemon/src/CAmTelnetServer.cpp b/AudioManagerDaemon/src/CAmTelnetServer.cpp
index 1274a8d..079e6e3 100644
--- a/AudioManagerDaemon/src/CAmTelnetServer.cpp
+++ b/AudioManagerDaemon/src/CAmTelnetServer.cpp
@@ -1,24 +1,23 @@
/**
- * 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 CAmTelnetServer.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
+ * \author Frank Herchet, frank.fh.herchet@bmw.de BMW 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 CAmTelnetServer.cpp
+ * For further information see http://www.genivi.org/.
*
*/
@@ -37,78 +36,61 @@
#include <iterator>
#include "CAmDatabaseHandler.h"
#include "CAmRoutingSender.h"
-#include "shared/CAmDltWrapper.h"
#include "CAmTelnetMenuHelper.h"
+#include "shared/CAmDltWrapper.h"
-namespace am {
+namespace am
+{
-CAmTelnetServer* CAmTelnetServer::instance = NULL;
+CAmTelnetServer* CAmTelnetServer::mpInstance = NULL;
#define PRINT_BOOL(var) var ? output+="true\t\t" : output+="false\t\t";
-CAmTelnetServer::CAmTelnetServer(CAmSocketHandler *iSocketHandler, CAmCommandSender *iCommandSender, CAmCommandReceiver *iCommandReceiver, CAmRoutingSender *iRoutingSender, CAmRoutingReceiver *iRoutingReceiver, CAmControlSender *iControlSender, CAmControlReceiver *iControlReceiver, CAmDatabaseHandler *iDatabasehandler, CAmRouter *iRouter, unsigned int servPort, unsigned int maxConnections)
- :telnetConnectFiredCB(this,&CAmTelnetServer::connectSocket),
- telnetReceiveFiredCB(this,&CAmTelnetServer::receiveData),
- telnetDispatchCB(this,&CAmTelnetServer::dispatchData),
- telnetCheckCB(this,&CAmTelnetServer::check),
- mSocketHandler(iSocketHandler),
- mCommandSender(iCommandSender),
- mCommandReceiver(iCommandReceiver),
- mRoutingSender(iRoutingSender),
- mRoutingReceiver(iRoutingReceiver),
- mControlSender(iControlSender),
- mControlReceiver(iControlReceiver),
- mDatabasehandler(iDatabasehandler),
- mRouter(iRouter),
- mConnecthandle(),
- mMsgList(),
- mListConnections(),
- mConnectFD(NULL),
- mServerPort(servPort),
- mMaxConnections(maxConnections),
- mTelnetMenuHelper(iSocketHandler,iCommandSender,iCommandReceiver,iRoutingSender,iRoutingReceiver,iControlSender,iControlReceiver,iDatabasehandler,iRouter,this)
+CAmTelnetServer::CAmTelnetServer(CAmSocketHandler *iSocketHandler, CAmCommandSender *iCommandSender, CAmCommandReceiver *iCommandReceiver, CAmRoutingSender *iRoutingSender, CAmRoutingReceiver *iRoutingReceiver, CAmControlSender *iControlSender, CAmControlReceiver *iControlReceiver, CAmDatabaseHandler *iDatabasehandler, CAmRouter *iRouter, unsigned int servPort, unsigned int maxConnections) :
+ telnetConnectFiredCB(this, &CAmTelnetServer::connectSocket), telnetReceiveFiredCB(this, &CAmTelnetServer::receiveData), telnetDispatchCB(this, &CAmTelnetServer::dispatchData), telnetCheckCB(this, &CAmTelnetServer::check), mpSocketHandler(iSocketHandler), mpCommandSender(iCommandSender), mpCommandReceiver(iCommandReceiver), mpRoutingSender(iRoutingSender), mpRoutingReceiver(iRoutingReceiver), mpControlSender(iControlSender), mpControlReceiver(iControlReceiver), mpDatabasehandler(iDatabasehandler), mpRouter(iRouter), mConnecthandle(), mListMessages(), mListConnections(), mConnectFD(NULL), mServerPort(servPort), mMaxConnections(maxConnections), mTelnetMenuHelper(iSocketHandler, iCommandSender, iCommandReceiver, iRoutingSender, iRoutingReceiver, iControlSender, iControlReceiver,
+ iDatabasehandler, iRouter, this)
{
- assert(mSocketHandler!=NULL);
- assert(mCommandReceiver!=NULL);
- assert(mCommandSender!=NULL);
- assert(mControlSender!=NULL);
- assert(mControlReceiver!=NULL);
- assert(mRoutingSender!=NULL);
- assert(mRoutingReceiver!=NULL);
- assert(mDatabasehandler!=NULL);
- assert(mRouter!=NULL);
- assert(servPort!=0);
- assert(mMaxConnections!=0);
-
- instance = this;
- //mTelnetMenuHelper.setTelnetServer(this);
-
- int yes = 1;
- struct sockaddr_in servAddr;
+ assert(mpSocketHandler!=NULL);
+ assert(mpCommandReceiver!=NULL);
+ assert(mpCommandSender!=NULL);
+ assert(mpControlSender!=NULL);
+ assert(mpControlReceiver!=NULL);
+ assert(mpRoutingSender!=NULL);
+ assert(mpRoutingReceiver!=NULL);
+ assert(mpDatabasehandler!=NULL);
+ assert(mpRouter!=NULL);
+ assert(servPort!=0);
+ assert(mMaxConnections!=0);
+
+ mpInstance = this;
+ //mTelnetMenuHelper.setTelnetServer(this);
+
+ int yes = 1;
+ struct sockaddr_in servAddr;
//setup the port Listener
mConnectFD = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
setsockopt(mConnectFD, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int));
memset(&servAddr, 0, sizeof(servAddr));
- servAddr.sin_family = AF_INET;
+ servAddr.sin_family = AF_INET;
servAddr.sin_addr.s_addr = INADDR_ANY;
- servAddr.sin_port = htons(servPort);
+ servAddr.sin_port = htons(servPort);
bind(mConnectFD, (struct sockaddr *) &servAddr, sizeof(servAddr));
- if (listen(mConnectFD,mMaxConnections) < 0)
+ if (listen(mConnectFD, mMaxConnections) < 0)
{
- logError("TelnetServer::TelnetServerk cannot listen ",errno);
+ logError("TelnetServer::TelnetServerk cannot listen ", errno);
}
else
logInfo("TelnetServer::TelnetServer started listening on port", mServerPort);
- int a=1;
- ioctl (mConnectFD, FIONBIO, (char *) &a);
- setsockopt (mConnectFD, SOL_SOCKET, SO_KEEPALIVE, (char *) &a, sizeof (a));
+ int a = 1;
+ ioctl(mConnectFD, FIONBIO, (char *) &a);
+ setsockopt(mConnectFD, SOL_SOCKET, SO_KEEPALIVE, (char *) &a, sizeof(a));
short events = 0;
events |= POLLIN;
- mSocketHandler->addFDPoll(mConnectFD, events, NULL, &telnetConnectFiredCB, NULL, NULL, NULL, mConnecthandle);
+ mpSocketHandler->addFDPoll(mConnectFD, events, NULL, &telnetConnectFiredCB, NULL, NULL, NULL, mConnecthandle);
}
CAmTelnetServer::~CAmTelnetServer()
@@ -119,112 +101,95 @@ void CAmTelnetServer::connectSocket(const pollfd pfd, const sh_pollHandle_t hand
{
(void) handle;
(void) userData;
- //first, accept the connection, create a new filedescriptor
- struct sockaddr answer;
- socklen_t len=sizeof(answer);
- connection_s connection;
- connection.handle = 0;
- connection.filedescriptor = accept(pfd.fd, (struct sockaddr*)&answer, &len);
-
- // Notiy menuhelper
- mTelnetMenuHelper.newSocketConnection(connection.filedescriptor);
-
- //set the correct event:
- short event = 0;
- event |=POLLIN;
-
- //aded the filedescriptor to the sockethandler and register the callbacks for receiving the data
- mSocketHandler->addFDPoll(connection.filedescriptor,event,NULL,&telnetReceiveFiredCB,&telnetCheckCB,&telnetDispatchCB,NULL,connection.handle);
- mListConnections.push_back(connection);
+ //first, accept the connection, create a new filedescriptor
+ struct sockaddr answer;
+ socklen_t len = sizeof(answer);
+ connection_s connection;
+ connection.handle = 0;
+ connection.filedescriptor = accept(pfd.fd, (struct sockaddr*) &answer, &len);
+
+ // Notiy menuhelper
+ mTelnetMenuHelper.newSocketConnection(connection.filedescriptor);
+
+ //set the correct event:
+ short event = 0;
+ event |= POLLIN;
+
+ //aded the filedescriptor to the sockethandler and register the callbacks for receiving the data
+ mpSocketHandler->addFDPoll(connection.filedescriptor, event, NULL, &telnetReceiveFiredCB, &telnetCheckCB, &telnetDispatchCB, NULL, connection.handle);
+ mListConnections.push_back(connection);
}
void CAmTelnetServer::disconnectClient(int filedescriptor)
{
- std::vector<connection_s>::iterator iter = mListConnections.begin();
- while(iter != mListConnections.end())
- {
- if( filedescriptor == iter->filedescriptor )
- {
- if( E_OK == mSocketHandler->removeFDPoll(iter->handle))
- {
- mListConnections.erase(iter);
- close(filedescriptor);
- }
- else
- {
- // TODO: Handle error
- }
-
- break;
- }
- iter++;
- }
+ std::vector<connection_s>::iterator iter = mListConnections.begin();
+ while (iter != mListConnections.end())
+ {
+ if (filedescriptor == iter->filedescriptor)
+ {
+ if (E_OK == mpSocketHandler->removeFDPoll(iter->handle))
+ {
+ mListConnections.erase(iter);
+ close(filedescriptor);
+ }
+ else
+ {
+ // TODO: Handle error
+ }
+
+ break;
+ }
+ iter++;
+ }
}
void CAmTelnetServer::receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void *userData)
{
(void) handle;
(void) userData;
- //initialize buffer
- char buffer[100];
- //read until buffer is full or no more data is there
- int read=recv(pollfd.fd,buffer,100,NULL);
- if (read>1)
- {
- //read the message and store it in a queue - its a telnet connection so data will be sent on enter !
- std::string msg=std::string(buffer,read);
- mMsgList.push(msg);
- }
+ //initialize buffer
+ char buffer[100];
+ //read until buffer is full or no more data is there
+ int read = recv(pollfd.fd, buffer, 100, NULL);
+ if (read > 1)
+ {
+ //read the message and store it in a queue - its a telnet connection so data will be sent on enter !
+ std::string msg = std::string(buffer, read);
+ mListMessages.push(msg);
+ }
}
bool CAmTelnetServer::dispatchData(const sh_pollHandle_t handle, void *userData)
{
(void) userData;
- std::vector<connection_s>::iterator iterator=mListConnections.begin();
- for(;iterator!=mListConnections.end();++iterator)
- {
- if(iterator->handle==handle) break;
- }
- //if (iterator==mListConnections.end()) return false;
-
- std::string command;
- std::queue<std::string> MsgQueue;
- if(!mMsgList.empty())
- {
- sliceCommand(mMsgList.front(),command,MsgQueue);
- mMsgList.pop();
- }
-
- mTelnetMenuHelper.enterCmdQueue(MsgQueue,iterator->filedescriptor);
+ std::vector<connection_s>::iterator iterator = mListConnections.begin();
+ for (; iterator != mListConnections.end(); ++iterator)
+ {
+ if (iterator->handle == handle)
+ break;
+ }
- // must return false to stop endless polling
- return false;
+ std::string command;
+ std::queue<std::string> MsgQueue;
+ if (!mListMessages.empty())
+ {
+ sliceCommand(mListMessages.front(), command, MsgQueue);
+ mListMessages.pop();
+ }
- /*
- mMsgList.pop();
- mMapCommand_t::iterator commandIter=mMapCommands.find(command);
- if (commandIter==mMapCommands.end())
- {
- send(iterator->filedescriptor,"Command not found!\n",20,0);
- }
- else
- {
- commandIter->second(msg,iterator->filedescriptor);
- //(*commandIter).second(msg,iterator->filedescriptor);
- }
+ mTelnetMenuHelper.enterCmdQueue(MsgQueue, iterator->filedescriptor);
- //remove the message from the queue and return false if there is no more message to read.
- if (mMsgList.size()!=0) return true;
- return false;
- */
+ // must return false to stop endless polling
+ return (false);
}
bool CAmTelnetServer::check(const sh_pollHandle_t handle, void *userData)
{
- (void)handle;
- (void)userData;
- if (mMsgList.size() != 0) return true;
- return false;
+ (void) handle;
+ (void) userData;
+ if (mListMessages.size() != 0)
+ return (true);
+ return (false);
}
void am::CAmTelnetServer::sliceCommand(const std::string & string, std::string & command, std::queue<std::string> & MsgQueue)
@@ -238,25 +203,18 @@ void am::CAmTelnetServer::sliceCommand(const std::string & string, std::string &
int c = 0;
- while(!endOfStream)
+ while (!endOfStream)
{
- cmd = *begin;
- MsgQueue.push(cmd);
- begin++;
-
- if(begin == end )
- {
- endOfStream = true;
- }
- c++;
+ cmd = *begin;
+ MsgQueue.push(cmd);
+ begin++;
+
+ if (begin == end)
+ {
+ endOfStream = true;
+ }
+ c++;
}
-
-
- /*
- command = *begin++;
- msg = std::vector<std::string>(begin, end);
- */
}
}
-
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index 4e95baa..9c5820d 100644
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -1,29 +1,24 @@
/**
- * 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 main.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Frank Herchet, frank.fh.herchet@bmw.de BMW 2012
+ *
+ * \file main.cpp
+ * For further information see http://www.genivi.org/.
*
- */
-
-/**
- * Please make sure to have read the documentation on genivi.org!
*/
//todo: create systemd compatibility
@@ -33,24 +28,15 @@
//todo: clean up startup sequences controller, command and routing interfaces----
//todo: package generation only works if package directory exists...
-#include <config.h>
+#include "config.h"
+
#ifdef WITH_TELNET
#include "CAmTelnetServer.h"
#endif
#ifdef WITH_DBUS_WRAPPER
#include <shared/CAmDbusWrapper.h>
#endif
-#include <shared/CAmSocketHandler.h>
-#include "CAmDatabaseHandler.h"
-#include "CAmControlSender.h"
-#include "CAmCommandSender.h"
-#include "CAmRoutingSender.h"
-#include "CAmRoutingReceiver.h"
-#include "CAmCommandReceiver.h"
-#include "CAmControlReceiver.h"
-#include "CAmDatabaseObserver.h"
-#include "CAmRouter.h"
-#include "shared/CAmDltWrapper.h"
+
#include <sys/resource.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -62,6 +48,18 @@
#include <cstring>
#include <cstdio>
#include <new>
+#include "CAmRouter.h"
+#include "CAmDatabaseHandler.h"
+#include "CAmControlSender.h"
+#include "CAmCommandSender.h"
+#include "CAmRoutingSender.h"
+#include "CAmRoutingReceiver.h"
+#include "CAmCommandReceiver.h"
+#include "CAmControlReceiver.h"
+#include "CAmDatabaseObserver.h"
+#include "shared/CAmDltWrapper.h"
+#include "shared/CAmSocketHandler.h"
+
DLT_DECLARE_CONTEXT(AudioManager)
@@ -94,6 +92,9 @@ unsigned int maxConnections = MAX_TELNETCONNECTIONS;
int fd0, fd1, fd2;
bool enableNoDLTDebug = false;
+/**
+ * the out of memory handler
+ */
void OutOfMemoryHandler()
{
logError("No more memory - bye");
@@ -101,6 +102,9 @@ void OutOfMemoryHandler()
exit(1);
}
+/**
+ * daemonizes the AudioManager
+ */
void daemonize()
{
umask(0);
@@ -149,6 +153,11 @@ void daemonize()
}
}
+/**
+ * parses the command line
+ * @param argc
+ * @param argv
+ */
void parseCommandLine(int argc, char **argv)
{
while (optind < argc)
@@ -211,7 +220,7 @@ void parseCommandLine(int argc, char **argv)
exit(-1);
break;
#ifndef WITH_DLT
- case 'V':
+ case 'V':
printf("[DLT] debug output to stdout enabled\n");
enableNoDLTDebug = true;
break;
@@ -225,6 +234,12 @@ void parseCommandLine(int argc, char **argv)
}
}
+/**
+ * the signal handler
+ * @param sig
+ * @param siginfo
+ * @param context
+ */
static void signalHandler(int sig, siginfo_t *siginfo, void *context)
{
(void) sig;
@@ -236,6 +251,12 @@ static void signalHandler(int sig, siginfo_t *siginfo, void *context)
exit(1);
}
+/**
+ * main
+ * @param argc
+ * @param argv
+ * @return
+ */
int main(int argc, char *argv[])
{
listCommandPluginDirs.push_back(std::string(DEFAULT_PLUGIN_COMMAND_DIR));
@@ -271,7 +292,6 @@ int main(int argc, char *argv[])
//Instantiate all classes. Keep in same order !
CAmSocketHandler iSocketHandler;
-
#ifdef WITH_DBUS_WRAPPER
CAmDbusWrapper iDBusWrapper(&iSocketHandler);
#endif /*WITH_DBUS_WRAPPER */
@@ -299,7 +319,6 @@ int main(int argc, char *argv[])
CAmDatabaseObserver iObserver(&iCommandSender,&iRoutingSender, &iSocketHandler);
#endif
-
iDatabaseHandler.registerObserver(&iObserver);
//startup all the Plugins and Interfaces
diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
index 6e9ead1..e1fdb5e 100644
--- a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.cpp
@@ -1,26 +1,24 @@
/**
- * 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 controlInterfaceTest.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
*/
+
#include "CAmControlInterfaceTest.h"
#include <algorithm>
#include <string>
diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h
index a39e9ed..22a09de 100644
--- a/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h
+++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CAmControlInterfaceTest.h
@@ -1,24 +1,21 @@
/**
- * 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 controlInterfaceTest.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
*/
diff --git a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
index 54f7c35..fa5ad7c 100644
--- a/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmControlInterfaceTest/CMakeLists.txt
@@ -1,24 +1,19 @@
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-# Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger AmControlInterfaceTest
-#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.cpp b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.cpp
index a5948ed..89cd9a9 100644
--- a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.cpp
+++ b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.cpp
@@ -1,26 +1,22 @@
/**
- * 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 databasetest.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#include "CAmDatabaseHandlerTest.h"
diff --git a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.h b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.h
index a66af97..384ad58 100644
--- a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.h
+++ b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CAmDatabaseHandlerTest.h
@@ -1,26 +1,22 @@
/**
- * 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 databasetest.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef DATABASETEST_H_
diff --git a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
index da326da..6469e87 100644
--- a/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmDatabaseHandlerTest/CMakeLists.txt
@@ -1,24 +1,19 @@
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-# Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger AmDatabaseHandlerTest
-#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp
index 27ad546..9fc4bd4 100644
--- a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp
+++ b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.cpp
@@ -1,26 +1,22 @@
/**
- * 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 databasetest.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#include "CAmRouterTest.h"
diff --git a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h
index 53788be..70feb26 100644
--- a/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h
+++ b/AudioManagerDaemon/test/AmRouterTest/CAmRouterTest.h
@@ -1,26 +1,22 @@
/**
- * 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 databasetest.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef DATABASETEST_H_
diff --git a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
index 3c06729..117edd1 100644
--- a/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmRouterTest/CMakeLists.txt
@@ -1,24 +1,19 @@
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-# Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger DatbaseTest
-#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp
index 3e8cd21..7c06f15 100644
--- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.cpp
@@ -1,26 +1,22 @@
/**
- * 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 routingInterfaces.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#include "CAmRoutingInterfaceTest.h"
diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h
index a66599d..5aef70e 100644
--- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h
+++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CAmRoutingInterfaceTest.h
@@ -1,26 +1,22 @@
/**
- * 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 routingInterfaces.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef ROUTINGINTERFACETEST_H_
diff --git a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
index ac87e8d..1634bdf 100644
--- a/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmRoutingInterfaceTest/CMakeLists.txt
@@ -1,24 +1,19 @@
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-# Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger AmRoutingInterfaceTest
-#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp b/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp
index b0b5639..5fb65ae 100644
--- a/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp
+++ b/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp
@@ -1,26 +1,22 @@
/**
- * 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 sockethandlerTest.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#include "CAmSocketHandlerTest.h"
@@ -73,7 +69,7 @@ void am::CAmTimerCb::timer1Callback(sh_timerHandle_t handle, void* userData)
timespec timeout;
timeout.tv_nsec = 0;
timeout.tv_sec = 1;
- CAmShTimerCallBack *buf = &pTimer1Callback;
+ IAmShTimerCallBack *buf = &pTimer1Callback;
sh_timerHandle_t handle_;
mSocketHandler->addTimer(timeout, buf, handle_, NULL);
}
@@ -86,7 +82,7 @@ void am::CAmTimerCb::timer2Callback(sh_timerHandle_t handle, void* userData)
timespec timeout;
timeout.tv_nsec = 0;
timeout.tv_sec = 1;
- CAmShTimerCallBack *buf = &pTimer2Callback;
+ IAmShTimerCallBack *buf = &pTimer2Callback;
sh_timerHandle_t handle_;
mSocketHandler->addTimer(timeout, buf, handle_, NULL);
}
@@ -218,10 +214,10 @@ TEST(CAmSocketHandlerTest,playWithTimers)
timeout3.tv_sec = 2;
timeout4.tv_nsec = 0;
timeout4.tv_sec = 13;
- CAmShTimerCallBack* buf = &testCallback.pTimer1Callback;
- CAmShTimerCallBack* buf2 = &testCallback.pTimer2Callback;
- CAmShTimerCallBack* buf3 = &testCallback.pTimer3Callback;
- CAmShTimerCallBack* buf4 = &testCallback.pTimer4Callback;
+ IAmShTimerCallBack* buf = &testCallback.pTimer1Callback;
+ IAmShTimerCallBack* buf2 = &testCallback.pTimer2Callback;
+ IAmShTimerCallBack* buf3 = &testCallback.pTimer3Callback;
+ IAmShTimerCallBack* buf4 = &testCallback.pTimer4Callback;
sh_timerHandle_t handle;
myHandler.addTimer(timeoutTime, buf, handle, NULL);
myHandler.addTimer(timeout2, buf2, handle, NULL);
diff --git a/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.h b/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
index f45376e..fad6aa0 100644
--- a/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
+++ b/AudioManagerDaemon/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
@@ -1,26 +1,22 @@
/**
- * 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 sockethandlerTest.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * 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/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt
index 692b903..a13883c 100644
--- a/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmSocketHandlerTest/CMakeLists.txt
@@ -1,24 +1,19 @@
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-# Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger ControlInterfaceTest
-#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp b/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp
index 2219834..ba9e11b 100644
--- a/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp
+++ b/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.cpp
@@ -1,18 +1,35 @@
-/*
- * CAmTelnetServerTest.cpp
+/**
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * 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/.
+ *
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Frank Herchet, frank.fh.herchet@bmw.de BMW 2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * Created on: Feb 7, 2012
- * Author: demo
*/
-#include <sys/socket.h> /* for socket(), connect(), (), and recv() */
-#include <arpa/inet.h> /* for sockaddr_in and inet_addr() */
-#include <netdb.h> /* for struct hostent */
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <string>
#include "CAmTelnetServerTest.h"
#include "CAmCommandReceiver.h"
#include "CAmRoutingReceiver.h"
#include "CAmControlReceiver.h"
+#include "config.h"
using namespace testing;
diff --git a/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.h b/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.h
index 7a87e68..d0d8216 100644
--- a/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.h
+++ b/AudioManagerDaemon/test/AmTelnetServerTest/CAmTelnetServerTest.h
@@ -1,8 +1,23 @@
-/*
- * CAmTelnetServerTest.h
+/**
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * 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/.
+ *
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ * \author Frank Herchet, frank.fh.herchet@bmw.de BMW 2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * Created on: Feb 7, 2012
- * Author: Frank Herchet
*/
#ifndef CAMTELNETSERVERTEST_H_
diff --git a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
index c70ec2d..dfa8952 100644
--- a/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
+++ b/AudioManagerDaemon/test/AmTelnetServerTest/CMakeLists.txt
@@ -1,24 +1,19 @@
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-# Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger ControlInterfaceTest
-#
-# \file CMakeLists.txt
-#
-# \date 13-Feb-2012
-# \author Frank Herchet (frank.fh.herchet@bmw.de)
-#
-# \section License
-# GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
-# Copyright (C) 2012, BMW AG Frank Herchet frank.fh.herchet@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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/CAmCommonFunctions.cpp b/AudioManagerDaemon/test/CAmCommonFunctions.cpp
index 5136e59..5877a2b 100644
--- a/AudioManagerDaemon/test/CAmCommonFunctions.cpp
+++ b/AudioManagerDaemon/test/CAmCommonFunctions.cpp
@@ -1,26 +1,22 @@
/**
- * 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 CAmCommonFunctions.cpp
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#include "CAmCommonFunctions.h"
diff --git a/AudioManagerDaemon/test/CAmCommonFunctions.h b/AudioManagerDaemon/test/CAmCommonFunctions.h
index 9d6b5e6..ec6c768 100644
--- a/AudioManagerDaemon/test/CAmCommonFunctions.h
+++ b/AudioManagerDaemon/test/CAmCommonFunctions.h
@@ -1,26 +1,22 @@
/**
- * 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 CAmCommonFunctions.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef COMMONHEADERS_H_
diff --git a/AudioManagerDaemon/test/CMakeLists.txt b/AudioManagerDaemon/test/CMakeLists.txt
index 97600a9..d3ba552 100644
--- a/AudioManagerDaemon/test/CMakeLists.txt
+++ b/AudioManagerDaemon/test/CMakeLists.txt
@@ -1,24 +1,19 @@
-#GENIVI AUDIOMANAGER
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-#Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-#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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/AudioManagerDaemon/test/IAmCommandBackdoor.h b/AudioManagerDaemon/test/IAmCommandBackdoor.h
index 650d3e1..051b2ae 100644
--- a/AudioManagerDaemon/test/IAmCommandBackdoor.h
+++ b/AudioManagerDaemon/test/IAmCommandBackdoor.h
@@ -1,26 +1,22 @@
/**
- * 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 IAmCommandBackdoor
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef COMMANDINTERFACEBACKDOOR_H_
diff --git a/AudioManagerDaemon/test/IAmControlBackdoor.h b/AudioManagerDaemon/test/IAmControlBackdoor.h
index 90a2c67..4f77ad6 100644
--- a/AudioManagerDaemon/test/IAmControlBackdoor.h
+++ b/AudioManagerDaemon/test/IAmControlBackdoor.h
@@ -1,26 +1,22 @@
/**
- * 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 IAmControlBackdoor.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef CONTROLINTERFACEBACKDOOR_H_
diff --git a/AudioManagerDaemon/test/IAmRoutingBackdoor.h b/AudioManagerDaemon/test/IAmRoutingBackdoor.h
index 9ffff54..a30102f 100644
--- a/AudioManagerDaemon/test/IAmRoutingBackdoor.h
+++ b/AudioManagerDaemon/test/IAmRoutingBackdoor.h
@@ -1,26 +1,22 @@
/**
- * 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 IAmRoutingBackdoor.h
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
*
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+ * \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/.
*
- * \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.
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
#ifndef ROUTINGINTERFACEBACKDOOR_H_
diff --git a/AudioManagerDaemon/test/MockIAmCommandSend.h b/AudioManagerDaemon/test/MockIAmCommandSend.h
index 1833511..1efd20a 100644
--- a/AudioManagerDaemon/test/MockIAmCommandSend.h
+++ b/AudioManagerDaemon/test/MockIAmCommandSend.h
@@ -1,27 +1,23 @@
/**
-* Copyright (C) 2011, BMW AG
-*
-* GeniviAudioMananger AudioManagerDaemon
-*
-* \file MockInterfaces.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
-*/
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * 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/.
+ *
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
+ *
+ */
#ifndef MOCKCOMMANDINTERFACE_H_
#define MOCKCOMMANDINTERFACE_H_
diff --git a/AudioManagerDaemon/test/MockIAmControlSend.h b/AudioManagerDaemon/test/MockIAmControlSend.h
index dc45fab..382e475 100644
--- a/AudioManagerDaemon/test/MockIAmControlSend.h
+++ b/AudioManagerDaemon/test/MockIAmControlSend.h
@@ -1,27 +1,23 @@
/**
-* Copyright (C) 2011, BMW AG
-*
-* GeniviAudioMananger AudioManagerDaemon
-*
-* \file MockInterfaces.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
-*/
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * 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/.
+ *
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
+ *
+ */
#ifndef MOCKCONTROLINTERFACE_H_
#define MOCKCONTROLINTERFACE_H_
diff --git a/AudioManagerDaemon/test/MockIAmRoutingSend.h b/AudioManagerDaemon/test/MockIAmRoutingSend.h
index 4e6c6cb..44b9195 100644
--- a/AudioManagerDaemon/test/MockIAmRoutingSend.h
+++ b/AudioManagerDaemon/test/MockIAmRoutingSend.h
@@ -1,27 +1,23 @@
/**
-* Copyright (C) 2011, BMW AG
-*
-* GeniviAudioMananger AudioManagerDaemon
-*
-* \file MockInterfaces.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
-*/
+ * Copyright (C) 2012, GENIVI Alliance, Inc.
+ * Copyright (C) 2012, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * 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/.
+ *
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * For further information see http://www.genivi.org/.
+ *
+ */
#ifndef MOCKROUTINGINTERFACE_H_
#define MOCKROUTINGINTERFACE_H_
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f847ec9..1de73a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,24 +1,19 @@
-#GENIVI AUDIOMANAGER
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-#Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-#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.
+# For further information see http://www.genivi.org/.
#
@@ -39,6 +34,7 @@ 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})
+#STRING(REGEX REPLACE "EXAMPLE_PATH = $.*" "EXAMPLE_PATH = ${CMAKE_CURRENT_SOURCE_DIR}$" DOXYFILE ${DOXYFILE})
FILE(WRITE "cmake/DoxyFile.in" ${DOXYFILE} )
execute_process(COMMAND git log --pretty=short WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/LICENCE b/LICENCE
index bec695e..14e2f77 100644
--- a/LICENCE
+++ b/LICENCE
@@ -1,10 +1,373 @@
-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
-
-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.
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ 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/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/PluginCommandInterfaceDbus/CMakeLists.txt b/PluginCommandInterfaceDbus/CMakeLists.txt
index 2d5c6cc..e0ad671 100644
--- a/PluginCommandInterfaceDbus/CMakeLists.txt
+++ b/PluginCommandInterfaceDbus/CMakeLists.txt
@@ -1,3 +1,20 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
+
cmake_minimum_required(VERSION 2.6)
PROJECT(PluginCommandInterfaceDbus)
diff --git a/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h b/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h
index ad625dc..bf21def 100644
--- a/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h
+++ b/PluginCommandInterfaceDbus/include/CAmCommandSenderDbus.h
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
- *
- * GeniviAudioMananger DbusPlugin
- *
- * \file CommandSender.h
- *
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * \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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+ * For further information see http://www.genivi.org/.
*/
#ifndef DBUSCOMMANDSENDER_H_
diff --git a/PluginCommandInterfaceDbus/include/CAmDbusMessageHandler.h b/PluginCommandInterfaceDbus/include/CAmDbusMessageHandler.h
index 5431e2b..50c1526 100644
--- a/PluginCommandInterfaceDbus/include/CAmDbusMessageHandler.h
+++ b/PluginCommandInterfaceDbus/include/CAmDbusMessageHandler.h
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
- *
- * GeniviAudioMananger DbusPlugin
- *
- * \file DBusMessageHandler
- *
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * \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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+ * For further information see http://www.genivi.org/.
*/
#ifndef _DBUSMESSAGEHANDLER_H_
diff --git a/PluginCommandInterfaceDbus/include/IAmCommandReceiverShadow.h b/PluginCommandInterfaceDbus/include/IAmCommandReceiverShadow.h
index dd5a23d..c255bdf 100644
--- a/PluginCommandInterfaceDbus/include/IAmCommandReceiverShadow.h
+++ b/PluginCommandInterfaceDbus/include/IAmCommandReceiverShadow.h
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
- *
- * GeniviAudioMananger DbusPlugin
- *
- * \file CommandReceiverShadow.h
- *
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * \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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+ * For further information see http://www.genivi.org/.
*/
#ifndef COMMANDRECEIVERSHADOW_H_
diff --git a/PluginCommandInterfaceDbus/src/CAmCommandSenderDbus.cpp b/PluginCommandInterfaceDbus/src/CAmCommandSenderDbus.cpp
index cb5b838..a1d263a 100644
--- a/PluginCommandInterfaceDbus/src/CAmCommandSenderDbus.cpp
+++ b/PluginCommandInterfaceDbus/src/CAmCommandSenderDbus.cpp
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
- *
- * GeniviAudioMananger DbusPlugin
- *
- * \file CAmCommandSender.cpp
- *
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * \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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+ * For further information see http://www.genivi.org/.
*/
#include "CAmCommandSenderDbus.h"
diff --git a/PluginCommandInterfaceDbus/src/CAmDbusMessageHandler.cpp b/PluginCommandInterfaceDbus/src/CAmDbusMessageHandler.cpp
index 6b2dc3f..2a57a51 100644
--- a/PluginCommandInterfaceDbus/src/CAmDbusMessageHandler.cpp
+++ b/PluginCommandInterfaceDbus/src/CAmDbusMessageHandler.cpp
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger DbusPlugin
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file DBusMessageHandler.cpp
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * \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
+ * For further information see http://www.genivi.org/.
*/
#include "CAmDbusMessageHandler.h"
diff --git a/PluginCommandInterfaceDbus/src/IAmCommandReceiverShadow.cpp b/PluginCommandInterfaceDbus/src/IAmCommandReceiverShadow.cpp
index f43c9e6..55bef15 100644
--- a/PluginCommandInterfaceDbus/src/IAmCommandReceiverShadow.cpp
+++ b/PluginCommandInterfaceDbus/src/IAmCommandReceiverShadow.cpp
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
- *
- * GeniviAudioMananger DbusPlugin
- *
- * \file CommandReceiverShadow.cpp
- *
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * \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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+ * For further information see http://www.genivi.org/.
*/
#include "IAmCommandReceiverShadow.h"
diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.cpp b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.cpp
index c3f53e1..67b7792 100644
--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.cpp
+++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.cpp
@@ -1,27 +1,19 @@
-/**
-* Copyright (C) 2011, BMW AG
-*
-* GeniviAudioMananger AudioManagerDaemon
-*
-* \file DbusCommandInterfaceBackdoor.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
-*/
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
#include "CAmCommandSenderDbusBackdoor.h"
#include "command/IAmCommandReceive.h"
diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.h b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.h
index bbbeda9..f0f7a4e 100644
--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.h
+++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusBackdoor.h
@@ -1,27 +1,19 @@
-/**
-* Copyright (C) 2011, BMW AG
-*
-* GeniviAudioMananger AudioManagerDaemon
-*
-* \file DubsIAmCommandBackdoor
-*
-* \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
-*/
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
#ifndef DBUSCOMMANDINTERFACEBACKDOOR_H_
#define DBUSCOMMANDINTERFACEBACKDOOR_H_
diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp
index 071af58..c5adecb 100644
--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp
+++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.cpp
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger AudioManagerDaemon
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file dbuscommandinterfacesignalsTest.cpp
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * \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
+ * For further information see http://www.genivi.org/.
*/
#include "CAmCommandSenderDbusSignalTest.h"
diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.h b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.h
index 14ad9ef..9d3a058 100644
--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.h
+++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusSignalTest.h
@@ -1,27 +1,19 @@
-/**
-* Copyright (C) 2011, BMW AG
-*
-* GeniviAudioMananger AudioManagerDaemon
-*
-* \file dbuscommandinterfacesignalsTest.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
-*/
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
#ifndef DBUSCOMMANINTERFACESIGNALSTEST_H_
#define DBUSCOMMANINTERFACESIGNALSTEST_H_
diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp
index e1d0197..3ff25ff 100644
--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp
+++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.cpp
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger AudioManagerDaemon
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file dbuscommandpluginInterfaceTest.cpp
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * \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
+ * For further information see http://www.genivi.org/.
*/
#include "CAmCommandSenderDbusTest.h"
diff --git a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.h b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.h
index a89affd..9a4aa64 100644
--- a/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.h
+++ b/PluginCommandInterfaceDbus/test/CAmCommandSenderDbusTest.h
@@ -1,27 +1,19 @@
-/**
-* Copyright (C) 2011, BMW AG
-*
-* GeniviAudioMananger AudioManagerDaemon
-*
-* \file dbuscommandpluginInterfaceTest.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
-*/
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
#ifndef DBUSCOMMANDPLUGININTERFACETEST_H_
diff --git a/PluginCommandInterfaceDbus/test/CMakeLists.txt b/PluginCommandInterfaceDbus/test/CMakeLists.txt
index d1eabbf..8d8f971 100644
--- a/PluginCommandInterfaceDbus/test/CMakeLists.txt
+++ b/PluginCommandInterfaceDbus/test/CMakeLists.txt
@@ -1,24 +1,18 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
#
-# Copyright (C) 2011, BMW AG
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger ControlInterfaceTest
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/PluginCommandInterfaceDbus/test/MockIAmCommandReceive.h b/PluginCommandInterfaceDbus/test/MockIAmCommandReceive.h
index bb9e53f..6141117 100644
--- a/PluginCommandInterfaceDbus/test/MockIAmCommandReceive.h
+++ b/PluginCommandInterfaceDbus/test/MockIAmCommandReceive.h
@@ -1,3 +1,20 @@
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
#ifndef MOCKCOMMANDRECEIVENTERFACE_H_
#define MOCKCOMMANDRECEIVENTERFACE_H_
diff --git a/PluginControlInterface/CMakeLists.txt b/PluginControlInterface/CMakeLists.txt
index 9111c84..480594f 100644
--- a/PluginControlInterface/CMakeLists.txt
+++ b/PluginControlInterface/CMakeLists.txt
@@ -1,3 +1,20 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
+
cmake_minimum_required(VERSION 2.6)
PROJECT(PluginControlInterface)
diff --git a/PluginControlInterface/include/CAmControlSenderBase.h b/PluginControlInterface/include/CAmControlSenderBase.h
index 3d06356..20b97d1 100644
--- a/PluginControlInterface/include/CAmControlSenderBase.h
+++ b/PluginControlInterface/include/CAmControlSenderBase.h
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger DbusPlugin
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file CAmControlSender.h
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * \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
+ * For further information see http://www.genivi.org/.
*/
#ifndef CONTROLSENDER_H_
diff --git a/PluginControlInterface/include/IAmControlReceiverShadow.h b/PluginControlInterface/include/IAmControlReceiverShadow.h
index bf5580b..f42fef7 100644
--- a/PluginControlInterface/include/IAmControlReceiverShadow.h
+++ b/PluginControlInterface/include/IAmControlReceiverShadow.h
@@ -1,8 +1,18 @@
-/*
- * IAmControlReceiverShadow.h
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * Created on: Mar 2, 2012
- * Author: christian
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
*/
#ifndef IAMCONTROLRECEIVERSHADOW_H_
diff --git a/PluginControlInterface/src/CAmControlSenderBase.cpp b/PluginControlInterface/src/CAmControlSenderBase.cpp
index 9538ca3..61e261d 100644
--- a/PluginControlInterface/src/CAmControlSenderBase.cpp
+++ b/PluginControlInterface/src/CAmControlSenderBase.cpp
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger DbusPlugin
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file CAmControlSender.cpp
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * \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
+ * For further information see http://www.genivi.org/.
*/
#include "CAmControlSenderBase.h"
diff --git a/PluginControlInterface/src/IAmControlReceiverShadow.cpp b/PluginControlInterface/src/IAmControlReceiverShadow.cpp
index e7572ff..4e2be5c 100644
--- a/PluginControlInterface/src/IAmControlReceiverShadow.cpp
+++ b/PluginControlInterface/src/IAmControlReceiverShadow.cpp
@@ -1,8 +1,18 @@
-/*
- * IAmControlReceiverShadow.cpp
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * Created on: Mar 2, 2012
- * Author: christian
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
*/
#include "IAmControlReceiverShadow.h"
diff --git a/PluginControlInterface/test/CAmControlReceiverShadowTest.cpp b/PluginControlInterface/test/CAmControlReceiverShadowTest.cpp
index 3452868..2f0ee44 100644
--- a/PluginControlInterface/test/CAmControlReceiverShadowTest.cpp
+++ b/PluginControlInterface/test/CAmControlReceiverShadowTest.cpp
@@ -1,8 +1,18 @@
-/*
- * CAmControlReceiverShadowTest.cpp
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * Created on: Mar 2, 2012
- * Author: christian
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
*/
#include "CAmControlReceiverShadowTest.h"
@@ -31,7 +41,7 @@ void CAmControlReceiverShadowTest::SetUp()
sh_timerHandle_t handle;
- CAmShTimerCallBack *buf = &ptimerCallback;
+ IAmShTimerCallBack *buf = &ptimerCallback;
//lets use a timeout so the test will finish
psocketHandler.addTimer(t, buf, handle, (void*) NULL);
}
@@ -115,6 +125,8 @@ TEST_F(CAmControlReceiverShadowTest,disconnect)
pthread_join(ptestThread, NULL);
}
+//todo: implement more tests !
+
int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);
diff --git a/PluginControlInterface/test/CAmControlReceiverShadowTest.h b/PluginControlInterface/test/CAmControlReceiverShadowTest.h
index 42cec0d..ae17386 100644
--- a/PluginControlInterface/test/CAmControlReceiverShadowTest.h
+++ b/PluginControlInterface/test/CAmControlReceiverShadowTest.h
@@ -1,8 +1,18 @@
-/*
- * CAmControlReceiverShadowTest.h
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * Created on: Mar 2, 2012
- * Author: christian
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
*/
#ifndef CAMCONTROLRECEIVERSHADOWTEST_H_
diff --git a/PluginControlInterface/test/CMakeLists.txt b/PluginControlInterface/test/CMakeLists.txt
index 0cc914a..b64e1c1 100644
--- a/PluginControlInterface/test/CMakeLists.txt
+++ b/PluginControlInterface/test/CMakeLists.txt
@@ -1,3 +1,19 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
cmake_minimum_required(VERSION 2.6)
PROJECT(AmControlReceiverShadowTest)
diff --git a/PluginControlInterface/test/MockIAmControlReceive.h b/PluginControlInterface/test/MockIAmControlReceive.h
index a04889d..076bfae 100644
--- a/PluginControlInterface/test/MockIAmControlReceive.h
+++ b/PluginControlInterface/test/MockIAmControlReceive.h
@@ -1,3 +1,20 @@
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
#ifndef MOCKCONTROLINTERFACE_H_
#define MOCKCONTROLINTERFACE_H_
diff --git a/PluginRoutingInterfaceAsync/CMakeLists.txt b/PluginRoutingInterfaceAsync/CMakeLists.txt
index 35f9e7e..b655a42 100644
--- a/PluginRoutingInterfaceAsync/CMakeLists.txt
+++ b/PluginRoutingInterfaceAsync/CMakeLists.txt
@@ -1,24 +1,18 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
#
-# Copyright (C) 2011, BMW AG
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger ControlInterfaceTest
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h b/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h
index 377b7c5..5b92841 100644
--- a/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h
+++ b/PluginRoutingInterfaceAsync/include/CAmRoutingSenderAsync.h
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
- *
- * GeniviAudioMananger DbusPlugin
- *
- * \file CAmRoutingSender.h
- *
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * \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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
+ * For further information see http://www.genivi.org/.
*/
#ifndef ROUTINGSENDER_H_
diff --git a/PluginRoutingInterfaceAsync/include/IAmRoutingReceiverShadow.h b/PluginRoutingInterfaceAsync/include/IAmRoutingReceiverShadow.h
index cfce5a1..2dd9395 100644
--- a/PluginRoutingInterfaceAsync/include/IAmRoutingReceiverShadow.h
+++ b/PluginRoutingInterfaceAsync/include/IAmRoutingReceiverShadow.h
@@ -1,25 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
- *
- * GeniviAudioMananger AudioManagerDaemon
- *
- * \file testRoutingItnerfaceAsync.h
- *
- * \date 20-Oct-2011 3:42:04 PM
- * \author Christian Mueller (christian.ei.mueller@bmw.de)
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * \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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * For further information see http://www.genivi.org/.
*/
#ifndef ROUTINGRECEIVERASYNCSHADOW_H_
diff --git a/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp b/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp
index 31e5948..4874bb7 100644
--- a/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp
+++ b/PluginRoutingInterfaceAsync/src/CAmRoutingSenderAsync.cpp
@@ -1,25 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger DbusPlugin
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file CAmRoutingSender.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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * For further information see http://www.genivi.org/.
*/
#include "CAmRoutingSenderAsync.h"
diff --git a/PluginRoutingInterfaceAsync/src/IAmRoutingReceiverShadow.cpp b/PluginRoutingInterfaceAsync/src/IAmRoutingReceiverShadow.cpp
index c894954..144e8c5 100644
--- a/PluginRoutingInterfaceAsync/src/IAmRoutingReceiverShadow.cpp
+++ b/PluginRoutingInterfaceAsync/src/IAmRoutingReceiverShadow.cpp
@@ -1,25 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger AudioManagerDaemon
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file RoutingReceiverAsyncShadow.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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * For further information see http://www.genivi.org/.
*/
#include "IAmRoutingReceiverShadow.h"
diff --git a/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp b/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp
index 1c2c7a9..378e0b4 100644
--- a/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp
+++ b/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.cpp
@@ -1,25 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger AudioManagerDaemon
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file testRoutingItnerfaceAsync.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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * For further information see http://www.genivi.org/.
*/
#include "CAmRoutingReceiverAsync.h"
@@ -90,7 +83,7 @@ void CAmEnvironment::SetUp()
sh_timerHandle_t handle;
- CAmShTimerCallBack *buf = &ptimerCallback;
+ IAmShTimerCallBack *buf = &ptimerCallback;
//lets use a timeout so the test will finish
pSocketHandler.addTimer(t, buf, handle, (void*) NULL);
pSocketHandler.start_listenting();
diff --git a/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.h b/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.h
index e8aab64..6334040 100644
--- a/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.h
+++ b/PluginRoutingInterfaceAsync/test/CAmRoutingReceiverAsync.h
@@ -1,25 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger AudioManagerDaemon
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file testRoutingItnerfaceAsync.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.
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * For further information see http://www.genivi.org/.
*/
#ifndef TESTROUTINGINTERFACEASYNC_H_
diff --git a/PluginRoutingInterfaceAsync/test/CMakeLists.txt b/PluginRoutingInterfaceAsync/test/CMakeLists.txt
index cf537bd..f64a3af 100644
--- a/PluginRoutingInterfaceAsync/test/CMakeLists.txt
+++ b/PluginRoutingInterfaceAsync/test/CMakeLists.txt
@@ -1,24 +1,18 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
#
-# Copyright (C) 2011, BMW AG
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-# GeniviAudioMananger ControlInterfaceTest
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-# \file CMakeLists.txt
-#
-# \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.
+# For further information see http://www.genivi.org/.
#
cmake_minimum_required(VERSION 2.6)
diff --git a/PluginRoutingInterfaceAsync/test/MockIAmRoutingReceive.h b/PluginRoutingInterfaceAsync/test/MockIAmRoutingReceive.h
index 145afd4..e80d956 100644
--- a/PluginRoutingInterfaceAsync/test/MockIAmRoutingReceive.h
+++ b/PluginRoutingInterfaceAsync/test/MockIAmRoutingReceive.h
@@ -1,3 +1,20 @@
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
+ *
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+ *
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * For further information see http://www.genivi.org/.
+ */
+
#ifndef MOCKROUTINGINTERFACE_H_
#define MOCKROUTINGINTERFACE_H_
diff --git a/PluginRoutingInterfaceDbus/CMakeLists.txt b/PluginRoutingInterfaceDbus/CMakeLists.txt
index 5242f51..40f4fe3 100644
--- a/PluginRoutingInterfaceDbus/CMakeLists.txt
+++ b/PluginRoutingInterfaceDbus/CMakeLists.txt
@@ -1,3 +1,19 @@
+# Copyright (c) 2012 GENIVI Alliance
+# Copyright (c) 2012 BMW
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
+#
+# copyright
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# For further information see http://www.genivi.org/.
+#
cmake_minimum_required(VERSION 2.6)
PROJECT(PluginRoutingInterfaceDbus)
diff --git a/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h b/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
index 6e27a31..bb32a9e 100644
--- a/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
+++ b/PluginRoutingInterfaceDbus/include/CAmRoutingSenderDbus.h
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger DbusPlugin
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file CAmRoutingSender.h
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * \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
+ * For further information see http://www.genivi.org/.
*/
#ifndef ROUTINGSENDER_H_
diff --git a/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp b/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp
index 53d4380..89281ed 100644
--- a/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp
+++ b/PluginRoutingInterfaceDbus/src/CAmRoutingSenderDbus.cpp
@@ -1,26 +1,18 @@
-/**
- * Copyright (C) 2011, BMW AG
+/** Copyright (c) 2012 GENIVI Alliance
+ * Copyright (c) 2012 BMW
*
- * GeniviAudioMananger DbusPlugin
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \file CAmRoutingSender.cpp
+ * \copyright
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * \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
+ * For further information see http://www.genivi.org/.
*/
#include "CAmRoutingSenderDbus.h"
diff --git a/README b/README
index 486f2a3..babe0b6 100644
--- a/README
+++ b/README
@@ -1,32 +1,39 @@
-GENIVI AUDIOMANAGER
-
-Copyright (C) 2011, BMW AG
-
-Datum 15.1.2012
-author Christian Müller (christian.ei.mueller@bmw.de)
-
***********************************************************************************************************
-LICENSE
+GENIVI AudioManager
***********************************************************************************************************
-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) 2012, GENIVI Alliance, Inc.
+Copyright (C) 2012, BMW AG
-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 file is part of GENIVI Project AudioManager.
+
+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/.
+
+author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
-Version 0.0.1
+For further information see http://www.genivi.org/.
***********************************************************************************************************
-CURRENT STATUS
+License
***********************************************************************************************************
-The most important parts of the audiomanager are already there - nevertheless there are main features missing (pls look at the todos)
-It should be sufficient to start working on a POC around it.
+The licenses of this project are split into two parts:
+1) the AudioManagerDaemon, licensed under MPL 2.0
+2) all other parts that serve as example code that can be taken to build up an own project with it -
+ these parts are licensed with the MIT license
+
+Contribution is done under GENIVI CLA.
+
+***********************************************************************************************************
+Version
+***********************************************************************************************************
+The current version can be taken out of the git. The version 1.0.0 is the first GENIVI compliant code,
+in the compliance statement of discovery (2.0)
***********************************************************************************************************
COMPILE PROGRAMS
@@ -49,8 +56,8 @@ COMPILE PROGRAMS
WITH_TESTS ON
-In order to change these options, you can modify this values with ccmake, do the appropriate changes in CmakeList.txt or via
-the commandline for cmake or (when installed via ccmake)
+In order to change these options, you can modify this values with ccmake, do the appropriate changes in
+CmakeList.txt or via the commandline for cmake or (when installed via ccmake)
You will need some packages in order to comile the GENIVI AudioManager Daemon, these are:
-dbus (only when DBUS_WRAPPER==ON) [tested on version 1.2.16]
@@ -74,7 +81,8 @@ More details in the CMake Files CmakeList.txt in the projects.
The build was tested on a freshly setup LinuxMint 12 (don't like Unity) with the following steps:
sudo apt-get update
sudo apt-get upgrade
- sudo apt-get install libdbus-1-dev libsqlite3-dev doxygen libgtest-dev google-mock git cmake build-essential python2.6-dev
+ sudo apt-get install libdbus-1-dev libsqlite3-dev doxygen libgtest-dev google-mock git cmake
+ build-essential python2.6-dev
git clone https://<kavi-account>:<kavi-password>@git.genivi.org/srv/git/AudioManager
@@ -108,7 +116,8 @@ if your version is above, you will get 4 packages (all binaries stripped) :
AudioManager-<git verison>-Linux-bin.deb [AudioManager binary]
AudioManager-<git verison>-Linux-dev.deb [header files needed to compile plugins]
AudioManager-<git verison>-Linux-sampleplugins.deb [sample plugins]
- AudioManager-<git verison>-Linux-tests.deb [tests including tests for sample plugins, installed in the ~/AudioMAnagerTests]
+ AudioManager-<git verison>-Linux-tests.deb [tests including tests for sample plugins,
+ installed in the ~/AudioMAnagerTests]
to create a tar.gz file of all sources (not including .git, build and bin folder,config files), you can do:
@@ -137,9 +146,14 @@ The commandline options of the AudioManager:
-L<Name> add command plugin directory with <Name> (full path)
-R<Name> add routing plugin directory with <Name> (full path)
-Telnet-Server:
- If you compile your AudioManager with TelnetServer support (cmake -DWITH_TELNET=ON), you will be able to set with commandline argument -t the port number and
- with -m the maximum supported connections. The default telnet port is 6060.
+
+***********************************************************************************************************
+Telnet Server
+***********************************************************************************************************
+The audiomanager has a build- in telnetserver that serves for debuggin purposes.
+If you compile your AudioManager with TelnetServer support (cmake -DWITH_TELNET=ON), you will be able to
+set with commandline argument -t the port number and with -m the maximum supported connections.
+The default telnet port is 6060.
For example, launch a telnet session on port 6060:
telnet localhost 6060
@@ -203,10 +217,40 @@ Telnet-Server:
#Connection closed by foreign host.
-
+***********************************************************************************************************
+Code Formatting
+***********************************************************************************************************
The source code if formatted with eclipse, the style sheet used can be found in the cmake folder:
cmake/AudioManager_Codestyle.xml
+***********************************************************************************************************
+Working on the code & contribution
+***********************************************************************************************************
+First get the code from the git:
+ git clone https://<kavi-account>:<kavi-password>@git.genivi.org/srv/git/AudioManager
+
+Get an overview of all branches:
+ git branch
+
+Switch to the branch you want to work on (see versioning schmeme, the master is the feature branch)
+and verify that it has switched (* changed)
+ git checkout <your branch>
+ git branch
+
+Best practice is to create a local branch based on the current branch:
+ git branch working_branch
+
+Start working, best practice is to commit smaller, compilable peaced during the work that makes it easier to
+handle later on.
+
+If you want to commit you changes, send them to the audiomanager-dev list, you can create a patch like this:
+ git format-patch working_branch <your branch>
+
+This creates a set of patches that are published via the mailing list (this is already the submission under CLA).
+The patches will be discussed and then merged & uploaded on the git. For more information about git checkout the
+Genivi wiki and the stuff on the web.
+
+
_..-------++._
_.-'/ | _|| \"--._
__.--'`._/_\j_____/_||___\ `----.
diff --git a/cmake/AudioDomains.gif b/cmake/AudioDomains.gif
new file mode 100644
index 0000000..d3f1c8d
--- /dev/null
+++ b/cmake/AudioDomains.gif
Binary files differ
diff --git a/cmake/AudioManagement.png b/cmake/AudioManagement.png
new file mode 100644
index 0000000..8d74798
--- /dev/null
+++ b/cmake/AudioManagement.png
Binary files differ
diff --git a/cmake/Gateway.gif b/cmake/Gateway.gif
new file mode 100644
index 0000000..45badf9
--- /dev/null
+++ b/cmake/Gateway.gif
Binary files differ
diff --git a/cmake/GatewayMatrix.png b/cmake/GatewayMatrix.png
new file mode 100644
index 0000000..dcc0682
--- /dev/null
+++ b/cmake/GatewayMatrix.png
Binary files differ
diff --git a/cmake/Levels.png b/cmake/Levels.png
new file mode 100644
index 0000000..9ba0886
--- /dev/null
+++ b/cmake/Levels.png
Binary files differ
diff --git a/cmake/add_package_dependencies.sh b/cmake/add_package_dependencies.sh
index 453a0a2..de71317 100755
--- a/cmake/add_package_dependencies.sh
+++ b/cmake/add_package_dependencies.sh
@@ -1,26 +1,19 @@
-#!/bin/bash
-#GENIVI AUDIOMANAGER
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-#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.
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
+# For further information see http://www.genivi.org/.
#
PACKAGE_NAME=$1
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
index 3e41575..648ad51 100755
--- a/cmake/cmake_uninstall.cmake.in
+++ b/cmake/cmake_uninstall.cmake.in
@@ -1,24 +1,19 @@
-#GENIVI AUDIOMANAGER
+# Copyright (C) 2012, GENIVI Alliance, Inc.
+# Copyright (C) 2012, BMW AG
#
-#Copyright (C) 2011, BMW AG
+# This file is part of GENIVI Project AudioManager.
+#
+# 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/.
+#
+# author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
#
-#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.
+# For further information see http://www.genivi.org/.
#
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
diff --git a/cmake/delay.jpg b/cmake/delay.jpg
new file mode 100644
index 0000000..6b645b7
--- /dev/null
+++ b/cmake/delay.jpg
Binary files differ
diff --git a/cmake/early.png b/cmake/early.png
new file mode 100644
index 0000000..016cad7
--- /dev/null
+++ b/cmake/early.png
Binary files differ
diff --git a/cmake/late.png b/cmake/late.png
new file mode 100644
index 0000000..76753a8
--- /dev/null
+++ b/cmake/late.png
Binary files differ
diff --git a/cmake/views.png b/cmake/views.png
new file mode 100644
index 0000000..d036ef4
--- /dev/null
+++ b/cmake/views.png
Binary files differ
diff --git a/include/audiomanagertypes.h b/include/audiomanagertypes.h
index afc5519..b16b637 100644
--- a/include/audiomanagertypes.h
+++ b/include/audiomanagertypes.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_1F9A0AD1_FF28_4de6_A5C7_2F570F618734__INCLUDED_)
-#define EA_1F9A0AD1_FF28_4de6_A5C7_2F570F618734__INCLUDED_
+#if !defined(EA_FF16184D_524E_4747_8AC7_DD40DA868A0E__INCLUDED_)
+#define EA_FF16184D_524E_4747_8AC7_DD40DA868A0E__INCLUDED_
#include <stdint.h>
#include "projecttypes.h"
@@ -31,63 +31,63 @@ namespace am {
/**
* a domain ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_domainID_t;
/**
* a source ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sourceID_t;
/**
* a sink ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sinkID_t;
/**
* a gateway ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_gatewayID_t;
/**
* a crossfader ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_crossfaderID_t;
/**
* a connection ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_connectionID_t;
/**
* a mainConnection ID
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_mainConnectionID_t;
/**
* speed
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 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 Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef int16_t am_volume_t;
@@ -95,40 +95,40 @@ namespace am {
* 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 Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef int16_t am_mainVolume_t;
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sourceClass_t;
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_sinkClass_t;
/**
* time in ms!
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef uint16_t am_time_t;
/**
* offset time that is introduced in milli seconds.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
typedef int16_t am_timeSync_t;
/**
* with the help of this enum, sinks and sources can report their availability state
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_Availablility_e
{
@@ -150,7 +150,7 @@ namespace am {
/**
* represents the connection state
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_ConnectionState_e
{
@@ -180,7 +180,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_DomainState_e
{
@@ -206,7 +206,7 @@ namespace am {
/**
* This enum characterizes the data of the EarlyData_t
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_EarlyDataType_e
{
@@ -236,7 +236,7 @@ namespace am {
/**
* the errors of the audiomanager. All possible errors are in here. This enum is used widely as return parameter.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_Error_e
{
@@ -289,7 +289,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_MuteState_e
{
@@ -311,7 +311,7 @@ namespace am {
/**
* The source state reflects the state of the source
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_SourceState_e
{
@@ -334,7 +334,7 @@ namespace am {
/**
* This enumeration is used to define the type of the action that is correlated to a handle.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_Handle_e
{
@@ -354,7 +354,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_InterruptState_e
{
@@ -376,7 +376,7 @@ namespace am {
/**
* describes the active sink of a crossfader.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:36 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
enum am_HotSink_e
{
@@ -402,7 +402,7 @@ namespace am {
/**
* this describes the availability of a sink or a source together with the latest change
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_Availability_s
{
@@ -420,51 +420,109 @@ namespace am {
};
/**
+ * describes class properties
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_ClassProperty_s
{
public:
+ /**
+ * the property as enum
+ */
am_ClassProperty_e classProperty;
+ /**
+ * the value of the property
+ */
int16_t value;
};
/**
+ * This struct describes the attribiutes of a crossfader.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_Crossfader_s
{
public:
+ /**
+ * This is the ID of the crossfader, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManager daemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_crossfaderID_t crossfaderID;
+ /**
+ * The name of the crossfader. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * The sinkID of the SinkA. Sinks shall be registered before registering the crossfader.
+ */
am_sinkID_t sinkID_A;
+ /**
+ * The sinkID of the SinkB. Sinks shall be registered before registering the crossfader.
+ */
am_sinkID_t sinkID_B;
+ /**
+ * The sourceID of the crossfader source. The source shall be registered before the crossfader.
+ */
am_sourceID_t sourceID;
+ /**
+ * This enum can have 3 states:
+ *
+ * HS_SINKA sinkA is the current hot one, sinkB is not audible
+ * HS_SINKB sinkB is the current hot one, sinkB is not audible
+ * HS_INTERMEDIATE the fader is stuck in between a cross-fading action. This could be due to an abort or an error. Before using the crossfader, it must be set to either HS_SINKA or HS_SINKB.
+ */
am_HotSink_e hotSink;
};
/**
+ * This struct describes the attributes of a gateway.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:04 PM
*/
struct am_Gateway_s
{
public:
+ /**
+ * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_gatewayID_t gatewayID;
+ /**
+ * The name of the gateway. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * The sinkID of the gateway sink-end. The sink is a full blown sink with connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of a gateway as non-visible. Care needs to be taken that the connectionsFormats match with the ones in the conversionMatrix. If the sink is located in the controllingDomain, the ID needs to be retrieved by registering the sink before registering the gateway. In case the sink is in a different domain, the ID needs to be retrieved via peeking.
+ */
am_sinkID_t sinkID;
+ /**
+ * The sourceID of the gateway sink-end. The sink is a full blown source with connectionFormats, sinkClassIDs etc... It makes sense to register the sources of a gateway as non-visible. Care needs to be taken that the connectionsFormats match with the ones in the conversionMatrix. If the source is located in the controllingDomain, the ID needs to be retrieved by registering the source before registering the gateway. In case the source is in a different domain, the ID needs to be retrieved via peeking.
+ */
am_sourceID_t sourceID;
+ /**
+ * The ID of the sink. If the domain is the same like the controlling domain, the ID is known due to registration. If the domain is different, the ID needs to be retrieved via peeking.
+ */
am_domainID_t domainSinkID;
+ /**
+ * The ID of the source. If the domain is the same like the controlling domain, the ID is known due to registration. If the domain is different, the ID needs to be retrieved via peeking.
+ */
am_domainID_t domainSourceID;
+ /**
+ * This is the ID of the domain that registers the gateway.
+ */
am_domainID_t controlDomainID;
+ /**
+ * This is the list of available formats on the source side of the gateway. It is not defined during the gateway registration but copied from the source registration.
+ */
std::vector<am_ConnectionFormat_e> listSourceFormats;
+ /**
+ * This is the list of available formats on the sink side of the gateway. It is not defined during the gateway registration but copied from the sink registration.
+ */
std::vector<am_ConnectionFormat_e> listSinkFormats;
/**
* This is matrix holding information about the conversion capability of the gateway, it's length is defined by the length(listSinkFormats) x length(listSourceFormats).
@@ -491,49 +549,79 @@ namespace am {
/**
* This represents one "hopp" in a route
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_RoutingElement_s
{
public:
+ /**
+ * the source ID
+ */
am_sourceID_t sourceID;
+ /**
+ * the sinkID
+ */
am_sinkID_t sinkID;
+ /**
+ * the domainID the routeElement is in
+ */
am_domainID_t domainID;
+ /**
+ * the connectionformat that is used for the route
+ */
am_ConnectionFormat_e connectionFormat;
};
/**
+ * a list of routing elements that lead from source to sink
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_Route_s
{
public:
+ /**
+ * the sourceID where the route starts
+ */
am_sourceID_t sourceID;
+ /**
+ * the sinkID where the route ends
+ */
am_sinkID_t sinkID;
+ /**
+ * the actual route as list of routing elements
+ */
std::vector<am_RoutingElement_s> route;
};
/**
+ * struct describing the sound property
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SoundProperty_s
{
public:
+ /**
+ * the type of the property - a project specific enum
+ */
am_SoundPropertyType_e type;
+ /**
+ * the actual value of the property
+ */
int16_t value;
};
/**
+ * struct describing system properties
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:37 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SystemProperty_s
{
@@ -551,22 +639,33 @@ namespace am {
};
/**
+ * struct describing sinkclasses
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SinkClass_s
{
public:
+ /**
+ * the ID of the sinkClass
+ */
am_sinkClass_t sinkClassID;
+ /**
+ * the name of the sinkClass - must be unique in the system
+ */
std::string name;
+ /**
+ * the list of the class properties. These are pairs of a project specific enum describing the type of the value and an integer holding the real value.
+ */
std::vector<am_ClassProperty_s> listClassProperties;
};
/**
+ * struct describing source classes
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SourceClass_s
{
@@ -576,7 +675,13 @@ namespace am {
* the source ID
*/
am_sourceClass_t sourceClassID;
+ /**
+ * the name of the sourceClass - must be unique in the system
+ */
std::string name;
+ /**
+ * the list of the class properties. These are pairs of a project specific enum describing the type of the value and an integer holding the real value.
+ */
std::vector<am_ClassProperty_s> listClassProperties;
};
@@ -584,15 +689,27 @@ namespace am {
/**
* this type holds all information of sources relevant to the HMI
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SourceType_s
{
public:
+ /**
+ * This is the ID of the source, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sourceID_t sourceID;
+ /**
+ * The name of the source. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * the availability of the source
+ */
am_Availability_s availability;
+ /**
+ * the sourceClassID, indicates the class the source is in. This information can be used by the Controller to implement different behaviour for different classes.
+ */
am_sourceClass_t sourceClassID;
};
@@ -600,43 +717,75 @@ namespace am {
/**
* this type holds all information of sinks relevant to the HMI
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_SinkType_s
{
public:
+ /**
+ * This is the ID of the sink, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sinkID_t sinkID;
+ /**
+ * The name of the sink. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * This attribute reflects the availability of the sink. There are several reasons why a sink could be not available for the moment: for example the shutdown of a sink because of overtemperature or over- & undervoltage. The availability consists of two pieces of information:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
+ */
am_Availability_s availability;
+ /**
+ * This is the representation of the Volume for the commandInterface. It is used by the HMI to set the volume of a sink, the AudioManagerController has to transform this into real source and sink volumes.
+ */
am_mainVolume_t volume;
am_MuteState_e muteState;
+ /**
+ * The sinkClassID references to a sinkClass. With the help of classification, rules can be setup to define the system behaviour.
+ */
am_sinkClass_t sinkClassID;
};
/**
+ * a handle is used for asynchronous operations and is uniquely assigned for each of this operations
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:05 PM
*/
struct am_Handle_s
{
public:
+ /**
+ * the handletype
+ */
am_Handle_e handleType:4;
+ /**
+ * the handle as value
+ */
uint16_t handle:12;
};
/**
+ * struct describung mainsound property
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_MainSoundProperty_s
{
public:
+ /**
+ * the type of the property
+ */
am_MainSoundPropertyType_e type;
+ /**
+ * the actual value
+ */
int16_t value;
};
@@ -644,29 +793,51 @@ namespace am {
/**
* this type holds all information of connections relevant to the HMI
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:38 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_MainConnectionType_s
{
public:
+ /**
+ * the ID of the mainconnection
+ */
am_mainConnectionID_t mainConnectionID;
+ /**
+ * the sourceID where the connection starts
+ */
am_sourceID_t sourceID;
+ /**
+ * the sinkID where the connection ends
+ */
am_sinkID_t sinkID;
+ /**
+ * the delay of the mainconnection
+ */
am_timeSync_t delay;
+ /**
+ * the current connection state
+ */
am_ConnectionState_e connectionState;
};
/**
+ * struct that holds attribiutes of a mainconnection
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_MainConnection_s
{
public:
+ /**
+ * the assigned ID
+ */
am_mainConnectionID_t mainConnectionID;
+ /**
+ * the current connection state
+ */
am_ConnectionState_e connectionState;
/**
* the sinkID
@@ -676,96 +847,218 @@ namespace am {
* the sourceID
*/
am_sourceID_t sourceID;
+ /**
+ * the delay of the connection
+ */
am_timeSync_t delay;
+ /**
+ * the list of sub connection IDs the mainconnection consists of
+ */
std::vector<am_connectionID_t> listConnectionID;
};
/**
+ * This struct describes the attribiutes of a sink
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Sink_s
{
public:
+ /**
+ * This is the ID of the sink, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sinkID_t sinkID;
+ /**
+ * The name of the sink. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * The domainID is the domain the sink belongs to. A sink can only be in one domain.
+ */
am_domainID_t domainID;
+ /**
+ * The sinkClassID references to a sinkClass. With the help of classification, rules can be setup to define the system behaviour.
+ */
am_sinkClass_t sinkClassID;
+ /**
+ * This is the volume of the sink. It is set by the AudioManagerController.
+ */
am_volume_t volume;
+ /**
+ * This Boolean flag indicates whether a sink is visible to the commandInterface or not. If the User must have the possibility to choose the source in the HMI, it must be visible. But there are also good reasons for invisible sinks, for example if the sink is part of a crossfader or gateway. HMI relevant changes in visible sinks will be automatically reported by the daemon to the commandInterface.
+ */
bool visible;
+ /**
+ * This attribute reflects the availability of the sink. There are several reasons why a sink could be not available for the moment: for example the shutdown of a sink because of overtemperature or over- & undervoltage. The availability consists of two pieces of information:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
+ */
am_Availability_s available;
+ /**
+ * This attribute reflects the muteState of the sink. The information is not the "real" state of the sink, but the HMI representation for he commandInterface controlled by the AudioManagerController.
+ */
am_MuteState_e muteState;
+ /**
+ * This is the representation of the Volume for the commandInterface. It is used by the HMI to set the volume of a sink, the AudioManagerController has to transform this into real source and sink volumes.
+ */
am_mainVolume_t mainVolume;
+ /**
+ * This is the list of soundProperties, that the sink is capable of. The soundProperties itself are project specific. For sinks, a possible soundProperty could be for example settings.
+ */
std::vector<am_SoundProperty_s> listSoundProperties;
+ /**
+ * This list holds information about the formats that the Source is capable of supporting when delivering audio.
+ */
std::vector<am_ConnectionFormat_e> listConnectionFormats;
+ /**
+ * This is the list of the available mainSoundProperties. The principle is the same than with soundProperties, but they are only visible to the CommandInterface.
+ */
std::vector<am_MainSoundProperty_s> listMainSoundProperties;
};
/**
+ * This struct describes the attribiutes of a source
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Source_s
{
public:
+ /**
+ * This is the ID of the source, it is unique in the system. There are 2 ways, ID can be created: either it is assigned during the registration process (in a dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it is a fixed (the project has to ensure the uniqueness of the ID).
+ */
am_sourceID_t sourceID;
+ /**
+ * The domainID is the domain the source belongs to. A source can only be in one domain.
+ */
am_domainID_t domainID;
+ /**
+ * The name of the source. Must be unique in the whole system.
+ */
std::string name;
+ /**
+ * the sourceClassID, indicates the class the source is in. This information can be used by the Controller to implement different behaviour for different classes.
+ */
am_sourceClass_t sourceClassID;
+ /**
+ * The source state is an indication towards the source if it is actively heard or not. The source can use this information to implement features like automatic spin down of CD's in case the CD is not the active source or AF following of a tuner that is not actively heard. The source state is set by the AudioManagerController.There are 3 possible states:
+ *
+ * SS_ON: the source is active
+ * SS_OFF: the source is off
+ * SS_PAUSED: the source is paused and not active.
+ */
am_SourceState_e sourceState;
+ /**
+ * This is the volume of the source. It is set by the AudioManagerController. It is used to adopt different audiolevels in a system and mixing of sources (e.g. navigation hints & music).
+ */
am_volume_t volume;
+ /**
+ * This Boolean flag indicates whether a source is visible to the commandInterface or not. If the User must have the possibility to choose the source in the HMI, it must be visible. But there are also good reasons for invisible sources, for example if the source is part of a crossfader or gateway. HMI relevant changes in visible sources will be automatically reported by the daemon to the commandInterface.
+ */
bool visible;
+ /**
+ * This attribute reflects the availability of the source. There are several reasons why a source could be not available for the moment. For example a CD player which has no CD entered in the slot can be unavailable, or a USB player with no or unreadable stick attached. Other scenarios involve the shutdown of a source because of overtemperature or over- & undervoltage. The availability consists of two informations:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in availability. The reasons itself are product specific.
+ */
am_Availability_s available;
+ /**
+ * Some special sources can have special behaviors, the are so called "Low Level Interrupts". Here the current status is documented. The information can be used by the AudioManagerController to react to the changes by for example lowering the volume of the mainSources. The two states are
+ *
+ * IS_OFF: the interrupt is not active at the moment
+ * IS_INTERRUPTED: the interrupt is playing at the moment.
+ */
am_InterruptState_e interruptState;
/**
- * This list holds all soundProperties of the source
+ * This is the list of soundProperties, that the source is capable of. The soundProperties itself are project specific. For sources, a possible soundProperty could be navigation volume offset, for example.
*/
std::vector<am_SoundProperty_s> listSoundProperties;
/**
- * list of the supported ConnectionFormats
+ * This list holds information about the formats that the Source is capable of supporting when delivering audio.
*/
std::vector<am_ConnectionFormat_e> listConnectionFormats;
/**
- * This list holds all MainSoundProperties of the source (all the ones that can be set via the HMI)
+ * This is the list of the available mainSoundProperties. The principle is the same than with soundProperties, but they are only visible to the CommandInterface.
*/
std::vector<am_MainSoundProperty_s> listMainSoundProperties;
};
/**
+ * This struct describes the attribiutes of a domain
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Domain_s
{
public:
+ /**
+ * the domain ID
+ */
am_domainID_t domainID;
+ /**
+ * the name of the domain
+ */
std::string name;
+ /**
+ * the busname. This is equal to a plugin name and is used to dispatch messages to the elements of a plugin
+ */
std::string busname;
+ /**
+ * the name of the node
+ */
std::string nodename;
+ /**
+ * indicated if the domain is independent at startup or not
+ */
bool early;
+ /**
+ * indicates if the domain registration is complete or not
+ */
bool complete;
+ /**
+ * the current domain state
+ */
am_DomainState_e state;
};
/**
+ * a connection
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:06 PM
*/
struct am_Connection_s
{
public:
+ /**
+ * the assigned ID
+ */
am_connectionID_t connectionID;
+ /**
+ * the source the audio flows from
+ */
am_sourceID_t sourceID;
+ /**
+ * the sink the audio flows to
+ */
am_sinkID_t sinkID;
+ /**
+ * the delay of the conneciton
+ */
am_timeSync_t delay;
+ /**
+ * the used connectionformat
+ */
am_ConnectionFormat_e connectionFormat;
};
@@ -775,7 +1068,7 @@ namespace am {
* volume_t in case of ED_SOURCE_VOLUME, ED_SINK_VOLUME
* soundProperty_t in case of ED_SOURCE_PROPERTY, ED_SINK_PROPERTY
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
union am_EarlyData_u
{
@@ -791,7 +1084,7 @@ namespace am {
* sourceID in case of ED_SOURCE_VOLUME, ED_SOURCE_PROPERTY
* sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:39 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
union am_DataType_u
{
@@ -804,7 +1097,7 @@ namespace am {
/**
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
struct am_EarlyData_s
{
@@ -816,4 +1109,4 @@ namespace am {
};
}
-#endif // !defined(EA_1F9A0AD1_FF28_4de6_A5C7_2F570F618734__INCLUDED_)
+#endif // !defined(EA_FF16184D_524E_4747_8AC7_DD40DA868A0E__INCLUDED_)
diff --git a/include/command/IAmCommandReceive.h b/include/command/IAmCommandReceive.h
index f56c838..bd76d35 100644
--- a/include/command/IAmCommandReceive.h
+++ b/include/command/IAmCommandReceive.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_33827DF9_2BDB_4811_85B2_0EA4CD5519E4__INCLUDED_)
-#define EA_33827DF9_2BDB_4811_85B2_0EA4CD5519E4__INCLUDED_
+#if !defined(EA_1D908AFD_101D_4782_AA75_196D1BE1ED96__INCLUDED_)
+#define EA_1D908AFD_101D_4782_AA75_196D1BE1ED96__INCLUDED_
#include <vector>
#include <string>
@@ -33,13 +33,15 @@ class CAmSocketHandler;
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.
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* 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.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:42 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
class IAmCommandReceive
{
@@ -217,4 +219,4 @@ namespace am {
};
}
-#endif // !defined(EA_33827DF9_2BDB_4811_85B2_0EA4CD5519E4__INCLUDED_)
+#endif // !defined(EA_1D908AFD_101D_4782_AA75_196D1BE1ED96__INCLUDED_)
diff --git a/include/command/IAmCommandSend.h b/include/command/IAmCommandSend.h
index 0a447f9..64d2a39 100644
--- a/include/command/IAmCommandSend.h
+++ b/include/command/IAmCommandSend.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_E4CFF16E_3331_4608_971A_20131753B26D__INCLUDED_)
-#define EA_E4CFF16E_3331_4608_971A_20131753B26D__INCLUDED_
+#if !defined(EA_92DF8B64_35C7_48b1_9BE8_4D9BA5BA43E7__INCLUDED_)
+#define EA_92DF8B64_35C7_48b1_9BE8_4D9BA5BA43E7__INCLUDED_
#include <vector>
#include <string>
@@ -34,13 +34,15 @@ class IAmCommandReceive;
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.
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* 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.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:43 PM
+ * @created 05-Mar-2012 9:02:08 PM
*/
class IAmCommandSend
{
@@ -191,4 +193,4 @@ namespace am {
};
}
-#endif // !defined(EA_E4CFF16E_3331_4608_971A_20131753B26D__INCLUDED_)
+#endif // !defined(EA_92DF8B64_35C7_48b1_9BE8_4D9BA5BA43E7__INCLUDED_)
diff --git a/include/control/IAmControlReceive.h b/include/control/IAmControlReceive.h
index bc160aa..0c440f4 100644
--- a/include/control/IAmControlReceive.h
+++ b/include/control/IAmControlReceive.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_857044C8_1BA8_4972_9083_E7BDD50F6922__INCLUDED_)
-#define EA_857044C8_1BA8_4972_9083_E7BDD50F6922__INCLUDED_
+#if !defined(EA_9408C8ED_AF20_4839_B557_1316C8F36E07__INCLUDED_)
+#define EA_9408C8ED_AF20_4839_B557_1316C8F36E07__INCLUDED_
#include <vector>
#include <string>
@@ -32,13 +32,15 @@ class CAmSocketHandler;
namespace am {
/**
* 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:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* 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.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:43 PM
+ * @created 05-Mar-2012 9:02:08 PM
*/
class IAmControlReceive
{
@@ -611,4 +613,4 @@ namespace am {
};
}
-#endif // !defined(EA_857044C8_1BA8_4972_9083_E7BDD50F6922__INCLUDED_)
+#endif // !defined(EA_9408C8ED_AF20_4839_B557_1316C8F36E07__INCLUDED_)
diff --git a/include/control/IAmControlSend.h b/include/control/IAmControlSend.h
index edf6d2e..74b840a 100644
--- a/include/control/IAmControlSend.h
+++ b/include/control/IAmControlSend.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_4CA53F2D_FD24_4389_9279_AD92791BD0B6__INCLUDED_)
-#define EA_4CA53F2D_FD24_4389_9279_AD92791BD0B6__INCLUDED_
+#if !defined(EA_F93E3E9B_27D4_41be_8507_07034DAC88C8__INCLUDED_)
+#define EA_F93E3E9B_27D4_41be_8507_07034DAC88C8__INCLUDED_
#include <vector>
#include <string>
@@ -28,18 +28,22 @@ namespace am {
class IAmControlReceive;
}
+#include "IAmControlReceive.h"
+
#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.
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* 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.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:44 PM
+ * @created 05-Mar-2012 9:02:08 PM
*/
class IAmControlSend
{
@@ -385,4 +389,4 @@ namespace am {
};
}
-#endif // !defined(EA_4CA53F2D_FD24_4389_9279_AD92791BD0B6__INCLUDED_)
+#endif // !defined(EA_F93E3E9B_27D4_41be_8507_07034DAC88C8__INCLUDED_)
diff --git a/include/projecttypes.h b/include/projecttypes.h
index 2c03d5a..e4b7cb4 100644
--- a/include/projecttypes.h
+++ b/include/projecttypes.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,19 +11,20 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_3B985F0B_FAF4_4ad9_B5EA_59C989D2321B__INCLUDED_)
-#define EA_3B985F0B_FAF4_4ad9_B5EA_59C989D2321B__INCLUDED_
+#if !defined(EA_E3FA794F_2DEB_48eb_BF6A_69D59A10533C__INCLUDED_)
+#define EA_E3FA794F_2DEB_48eb_BF6A_69D59A10533C__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 Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_ConnectionFormat_e
{
@@ -54,7 +54,7 @@ namespace am {
/**
* This enum gives the information about reason for reason for Source/Sink change
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_AvailabilityReason_e
{
@@ -92,7 +92,7 @@ namespace am {
/**
* product specific identifier of property
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_ClassProperty_e
{
@@ -115,7 +115,7 @@ namespace am {
* 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 Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_RampType_e
{
@@ -137,7 +137,7 @@ namespace am {
/**
* sound properties. Within genivi only the standard properties are defined, for products these need to be extended.
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_SoundPropertyType_e
{
@@ -163,7 +163,7 @@ namespace am {
/**
* Here are all SoundProperties that can be set via the CommandInterface. Product specific
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_MainSoundPropertyType_e
{
@@ -189,7 +189,7 @@ namespace am {
/**
* describes the different system properties. Project specific
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:40 PM
+ * @created 05-Mar-2012 9:02:07 PM
*/
enum am_SystemPropertyType_e
{
@@ -200,4 +200,4 @@ namespace am {
SYP_MAX
};
}
-#endif // !defined(EA_3B985F0B_FAF4_4ad9_B5EA_59C989D2321B__INCLUDED_)
+#endif // !defined(EA_E3FA794F_2DEB_48eb_BF6A_69D59A10533C__INCLUDED_)
diff --git a/include/routing/IAmRoutingReceive.h b/include/routing/IAmRoutingReceive.h
index d654d23..62d784e 100644
--- a/include/routing/IAmRoutingReceive.h
+++ b/include/routing/IAmRoutingReceive.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_8A0F2164_0638_43df_A114_D343F60C0938__INCLUDED_)
-#define EA_8A0F2164_0638_43df_A114_D343F60C0938__INCLUDED_
+#if !defined(EA_34CAC05D_FC87_41fc_825D_9F6B9A5177B0__INCLUDED_)
+#define EA_34CAC05D_FC87_41fc_825D_9F6B9A5177B0__INCLUDED_
#include <vector>
#include <string>
@@ -34,13 +34,15 @@ class CAmSocketHandler;
namespace am {
/**
* 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:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* 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.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:44 PM
+ * @created 05-Mar-2012 9:02:09 PM
*/
class IAmRoutingReceive
{
@@ -345,4 +347,4 @@ namespace am {
};
}
-#endif // !defined(EA_8A0F2164_0638_43df_A114_D343F60C0938__INCLUDED_)
+#endif // !defined(EA_34CAC05D_FC87_41fc_825D_9F6B9A5177B0__INCLUDED_)
diff --git a/include/routing/IAmRoutingSend.h b/include/routing/IAmRoutingSend.h
index d22489b..79d268c 100644
--- a/include/routing/IAmRoutingSend.h
+++ b/include/routing/IAmRoutingSend.h
@@ -1,10 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * @author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * @copyright
- * {
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,13 +11,14 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- * }
+
+ * For further information see http://www.genivi.org/.
*
*
* THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
*/
-#if !defined(EA_98A8173D_A5F4_4ee2_B909_152612E7BF00__INCLUDED_)
-#define EA_98A8173D_A5F4_4ee2_B909_152612E7BF00__INCLUDED_
+#if !defined(EA_D9F37547_FAF0_4337_9048_07D8EDDE0AB0__INCLUDED_)
+#define EA_D9F37547_FAF0_4337_9048_07D8EDDE0AB0__INCLUDED_
#include <vector>
#include <string>
@@ -34,13 +34,15 @@ class IAmRoutingReceive;
namespace am {
/**
* This class implements everything from Audiomanager -> RoutingAdapter
- * There are two rules that have to be kept in mind when implementing against this interface:\n<b>
+ * There are two rules that have to be kept in mind when implementing against this interface:\n
+ * \warning
* 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.</b>\n
+ * 2. YOU MAY NOT THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
* 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.\n
* For more information, please check CAmSerializer
* @author Christian Mueller
- * @created 29-Feb-2012 6:16:44 PM
+ * @created 05-Mar-2012 9:02:09 PM
*/
class IAmRoutingSend
{
@@ -201,4 +203,4 @@ namespace am {
};
}
-#endif // !defined(EA_98A8173D_A5F4_4ee2_B909_152612E7BF00__INCLUDED_)
+#endif // !defined(EA_D9F37547_FAF0_4337_9048_07D8EDDE0AB0__INCLUDED_)
diff --git a/include/shared/CAmDbusWrapper.h b/include/shared/CAmDbusWrapper.h
index 26131c2..c89220f 100644
--- a/include/shared/CAmDbusWrapper.h
+++ b/include/shared/CAmDbusWrapper.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,21 +12,24 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmDbusWrapper.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef DBUSWRAPPER_H_
#define DBUSWRAPPER_H_
-#include <config.h>
#include <dbus/dbus.h>
#include <string>
#include <list>
+#include "config.h"
#include "shared/CAmSocketHandler.h"
namespace am
{
+
/**
- * This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins)
+ * This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins). Works on the basis of CAmSocketHandler
*/
class CAmDbusWrapper
{
@@ -34,19 +37,7 @@ public:
CAmDbusWrapper(CAmSocketHandler* socketHandler);
virtual ~CAmDbusWrapper();
- /**
- * registers a callback that is entered as path below the main path.
- * The configuration of the mainpath is done via DBusConfiguration.h
- * @param vtable the vtable that holds a pointer to the callback that is called when the path is called from the dbus
- * @param path the name of the path
- * @param userdata pointer to the class that will handle the callback
- */
void registerCallback(const DBusObjectPathVTable* vtable, const std::string& path, void* userdata);
-
- /**
- * returns the dbus connection
- * @param connection pointer to the connection
- */
void getDBusConnection(DBusConnection*& connection) const;
static dbus_bool_t addWatch(DBusWatch *watch, void *userData);
@@ -70,7 +61,7 @@ public:
TAmShTimerCallBack<CAmDbusWrapper> pDbusTimerCallback;
private:
- static CAmDbusWrapper* mpReference;
+ static CAmDbusWrapper* mpReference; //!< reference to the dbus instance
static DBusHandlerResult cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference);
dbus_bool_t addWatchDelegate(DBusWatch * watch, void* userData);
void removeWatchDelegate(DBusWatch *watch, void *userData);
@@ -78,13 +69,13 @@ private:
dbus_bool_t addTimeoutDelegate(DBusTimeout *timeout, void* userData);
void removeTimeoutDelegate(DBusTimeout *timeout, void* userData);
void toggleTimeoutDelegate(DBusTimeout *timeout, void* userData);
- DBusObjectPathVTable mObjectPathVTable;
- DBusConnection* mpDbusConnection;
- DBusError mDBusError;
- std::list<std::string> mListNodes;
- std::vector<sh_timerHandle_t*> mpListTimerhandles;
- CAmSocketHandler *mpSocketHandler;
- std::map<DBusWatch*, sh_pollHandle_t> mMapHandleWatch;
+ DBusObjectPathVTable mObjectPathVTable; //!< the vpathtable
+ DBusConnection* mpDbusConnection; //!< pointer to the dbus connection used
+ DBusError mDBusError; //!< dbuserror
+ std::list<std::string> mListNodes; //!< holds a list of all nodes of the dbus
+ std::vector<sh_timerHandle_t*> mpListTimerhandles; //!< pointer to the timer handles
+ CAmSocketHandler *mpSocketHandler; //!< pointer to the sockethandler
+ std::map<DBusWatch*, sh_pollHandle_t> mMapHandleWatch; //!< map to the handle watches
};
}
diff --git a/include/shared/CAmDltWrapper.h b/include/shared/CAmDltWrapper.h
index 0df9cde..f3d39cc 100644
--- a/include/shared/CAmDltWrapper.h
+++ b/include/shared/CAmDltWrapper.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,78 +12,78 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmDltWrapper.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef DLTWRAPPER_H_
#define DLTWRAPPER_H_
#include "config.h"
+#include <string>
#ifdef WITH_DLT
#include <dlt/dlt.h>
#else
-#include <stdint.h>
+#include <cstdint>
#include <sstream>
-namespace am {
-
-#define DLT_USER_BUF_MAX_SIZE 2048
-
-/**
- * This structure is used for every context used in an application.
- */
-typedef struct
+namespace am
{
- char contextID[4]; /**< context id */
- int32_t log_level_pos; /**< offset in user-application context field */
-} DltContext;
-/**
- * Definitions of DLT log level
- */
-typedef enum
-{
- DLT_LOG_DEFAULT = -1, /**< Default log level */
- DLT_LOG_OFF = 0x00, /**< Log level off */
- DLT_LOG_FATAL = 0x01, /**< fatal system error */
- DLT_LOG_ERROR = 0x02, /**< error with impact to correct functionality */
- DLT_LOG_WARN = 0x03, /**< warning, correct behaviour could not be ensured */
- DLT_LOG_INFO = 0x04, /**< informational */
- DLT_LOG_DEBUG = 0x05, /**< debug */
- DLT_LOG_VERBOSE = 0x06 /**< highest grade of information */
-} DltLogLevelType;
+#define DLT_USER_BUF_MAX_SIZE 2048
-/**
- * This structure is used for context data used in an application.
- */
-typedef struct
-{
- DltContext *handle; /**< pointer to DltContext */
- std::stringstream buffer; /**< buffer for building log message*/
- int32_t log_level; /**< log level */
- int32_t trace_status; /**< trace status */
- int32_t args_num; /**< number of arguments for extended header*/
- uint8_t mcnt; /**< message counter */
- char* context_description; /**< description of context */
-} DltContextData;
+ /**
+ * This structure is used for every context used in an application.
+ */
+ typedef struct
+ {
+ char contextID[4]; /**< context id */
+ int32_t log_level_pos; /**< offset in user-application context field */
+ }DltContext;
+
+ /**
+ * Definitions of DLT log level
+ */
+ typedef enum
+ {
+ DLT_LOG_DEFAULT = -1, /**< Default log level */
+ DLT_LOG_OFF = 0x00, /**< Log level off */
+ DLT_LOG_FATAL = 0x01, /**< fatal system error */
+ DLT_LOG_ERROR = 0x02, /**< error with impact to correct functionality */
+ DLT_LOG_WARN = 0x03, /**< warning, correct behaviour could not be ensured */
+ DLT_LOG_INFO = 0x04, /**< informational */
+ DLT_LOG_DEBUG = 0x05, /**< debug */
+ DLT_LOG_VERBOSE = 0x06 /**< highest grade of information */
+ }DltLogLevelType;
+
+ /**
+ * This structure is used for context data used in an application.
+ */
+ typedef struct
+ {
+ DltContext *handle; /**< pointer to DltContext */
+ std::stringstream buffer; /**< buffer for building log message*/
+ int32_t log_level; /**< log level */
+ int32_t trace_status; /**< trace status */
+ int32_t args_num; /**< number of arguments for extended header*/
+ uint8_t mcnt; /**< message counter */
+ char* context_description; /**< description of context */
+ }DltContextData;
#define DLT_DECLARE_CONTEXT(CONTEXT) \
DltContext CONTEXT;
-
#define DLT_IMPORT_CONTEXT(CONTEXT) \
extern DltContext CONTEXT;
#endif // WITH_DLT
-
-#include <string>
-
namespace am
{
/**
- * Wraps around the dlt wrapper. This class is instantiated as a singleton and offers a default
+ * Wraps around the dlt. This class is instantiated as a singleton and offers a default
* context (maincontext) that is registered to log to.
* Logging under the default context can simply be done with the logInfo/logError templates with up to 10 values at a time.
* For logging with a different context, you can use the log template. First register a context with registerContext.
@@ -114,8 +114,8 @@ public:
private:
CAmDltWrapper(const bool enableNoDLTDebug); //is private because of singleton pattern
#ifndef WITH_DLT
- template<class T> void appendNoDLT(T value);
- bool mEnableNoDLTDebug;
+ template<class T> void appendNoDLT(T value);
+ bool mEnableNoDLTDebug;
#endif
DltContext mDltContext; //!< the default context
DltContextData mDltContextData; //!< contextdata
@@ -129,7 +129,7 @@ private:
*/
inline CAmDltWrapper* getWrapper()
{
- return CAmDltWrapper::instance();
+ return (CAmDltWrapper::instance());
}
/**
diff --git a/include/shared/CAmSerializer.h b/include/shared/CAmSerializer.h
index 3cb8f5a..8a955df 100644
--- a/include/shared/CAmSerializer.h
+++ b/include/shared/CAmSerializer.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,6 +12,8 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmSerializer.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef CAMSERIALIZER_H_
@@ -74,7 +76,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)();
- return true;
+ return (true);
};
};
@@ -99,7 +101,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument);
- return true;
+ return (true);
};
};
@@ -126,7 +128,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument, mArgument1);
- return true;
+ return (true);
};
};
@@ -157,7 +159,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument, mArgument1, mArgument2);
- return true;
+ return (true);
}
;
};
@@ -191,7 +193,7 @@ private:
{
(void) pipe;
(*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3);
- return true;
+ return (true);
}
;
};
@@ -220,13 +222,13 @@ private:
{
mRetval = (*mInstance.*mFunction)();
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
TretVal returnResults()
{
- return mRetval;
+ return (mRetval);
}
};
@@ -256,14 +258,14 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
TretVal returnResults(Targ& argument)
{
argument = mArgument;
- return mRetval;
+ return (mRetval);
}
};
@@ -290,14 +292,14 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
TretVal returnResults(Targ& argument)
{
argument = mArgument;
- return mRetval;
+ return (mRetval);
}
};
@@ -329,7 +331,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -337,7 +339,7 @@ private:
{
argument = mArgument;
argument1 = mArgument1;
- return mRetval;
+ return (mRetval);
}
};
@@ -366,7 +368,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -374,7 +376,7 @@ private:
{
argument = mArgument;
argument1 = mArgument1;
- return mRetval;
+ return (mRetval);
}
};
@@ -407,7 +409,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -416,7 +418,7 @@ private:
argument = mArgument;
argument1 = mArgument1;
argument2 = mArgument2;
- return mRetval;
+ return (mRetval);
}
};
@@ -450,7 +452,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -460,7 +462,7 @@ private:
argument1 = mArgument1;
argument2 = mArgument2;
argument3 = mArgument3;
- return mRetval;
+ return (mRetval);
}
};
@@ -494,7 +496,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3, mArgument4);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -505,7 +507,7 @@ private:
argument2 = mArgument2;
argument3 = mArgument3;
argument4 = mArgument4;
- return mRetval;
+ return (mRetval);
}
};
@@ -540,7 +542,7 @@ private:
{
mRetval = (*mInstance.*mFunction)(mArgument, mArgument1, mArgument2, mArgument3, mArgument4, mArgument5);
write(pipe[1], this, sizeof(this));
- return false;
+ return (false);
}
;
@@ -552,7 +554,7 @@ private:
argument3 = mArgument3;
argument4 = mArgument4;
argument5 = mArgument5;
- return mRetval;
+ return (mRetval);
}
};
@@ -913,8 +915,8 @@ public:
(void) handle;
(void) userData;
if (mListDelegatePoiters.empty())
- return false;
- return true;
+ return (false);
+ return (true);
}
bool dispatcherCallback(const sh_pollHandle_t handle, void* userData)
@@ -926,8 +928,8 @@ public:
if (delegatePoiter->call(mReturnPipe))
delete delegatePoiter;
if (mListDelegatePoiters.empty())
- return false;
- return true;
+ return (false);
+ return (true);
}
TAmShPollFired<CAmSerializer> receiverCallbackT;
diff --git a/include/shared/CAmSocketHandler.h b/include/shared/CAmSocketHandler.h
index e0ea797..8df6872 100644
--- a/include/shared/CAmSocketHandler.h
+++ b/include/shared/CAmSocketHandler.h
@@ -1,9 +1,9 @@
/** Copyright (c) 2012 GENIVI Alliance
* Copyright (c) 2012 BMW
*
- * \author Christian Mueller, BMW
+ * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
*
- * \section license
+ * \copyright
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@@ -12,6 +12,8 @@
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
+ * \file CAmSocketHandler.h
+ * For further information see http://www.genivi.org/.
*/
#ifndef SOCKETHANDLER_H_
@@ -34,22 +36,26 @@ static volatile sig_atomic_t gDispatchDone = 0; //this global is used to stop th
typedef uint16_t sh_timerHandle_t; //!<this is a handle for a timer to be used with the SocketHandler
typedef uint16_t sh_pollHandle_t; //!<this is a handle for a filedescriptor to be used with the SocketHandler
-class CAmShPollPrepare;
-class CAmShPollCheck;
-class CAmShPollFired;
-class CAmShPollDispatch;
-class CAmShTimerCallBack;
+class IAmShPollPrepare;
+class IAmShPollCheck;
+class IAmShPollFired;
+class IAmShPollDispatch;
+class IAmShTimerCallBack;
+/**
+ * The sockethandler implements a mainloop for the audiomanager. Plugins and different parts of the audiomanager add their filedescriptors to the handler to get called
+ * on communication of the filedescriptors.
+ */
class CAmSocketHandler
{
public:
CAmSocketHandler();
- virtual ~CAmSocketHandler();
+ ~CAmSocketHandler();
- am_Error_e addFDPoll(const int fd, const short event, CAmShPollPrepare *prepare, CAmShPollFired *fired, CAmShPollCheck *check, CAmShPollDispatch *dispatch, void* userData, sh_pollHandle_t& handle);
+ am_Error_e addFDPoll(const int fd, const short event, IAmShPollPrepare *prepare, IAmShPollFired *fired, IAmShPollCheck *check, IAmShPollDispatch *dispatch, void* userData, sh_pollHandle_t& handle);
am_Error_e removeFDPoll(const sh_pollHandle_t handle);
am_Error_e updateEventFlags(const sh_pollHandle_t handle, const short events);
- am_Error_e addTimer(const timespec timeouts, CAmShTimerCallBack*& callback, sh_timerHandle_t& handle, void* userData);
+ am_Error_e addTimer(const timespec timeouts, IAmShTimerCallBack*& callback, sh_timerHandle_t& handle, void* userData);
am_Error_e removeTimer(const sh_timerHandle_t handle);
am_Error_e restartTimer(const sh_timerHandle_t handle, const timespec timeouts);
am_Error_e stopTimer(const sh_timerHandle_t handle);
@@ -61,7 +67,7 @@ private:
sh_timerHandle_t handle; //!<the handle of the timer
timespec countdown; //!<the countdown, this value is decreased every time the timer is up
timespec timeout; //!<the original timer value
- CAmShTimerCallBack* callback; //!<the callbackfunction
+ IAmShTimerCallBack* callback; //!<the callbackfunction
void * userData; //!<saves a void pointer together with the rest.
};
@@ -71,17 +77,19 @@ private:
timespec param;
public:
CAmShSubstractTime(timespec param) :
- param(param){}
+ param(param)
+ {
+ }
void operator()(sh_timer_s& t) const;
};
struct sh_poll_s //!<struct that holds information about polls
{
sh_pollHandle_t handle; //!<handle to uniquely adress a filedesriptor
- CAmShPollPrepare *prepareCB;
- CAmShPollFired *firedCB;
- CAmShPollCheck *checkCB;
- CAmShPollDispatch *dispatchCB;
+ IAmShPollPrepare *prepareCB;
+ IAmShPollFired *firedCB;
+ IAmShPollCheck *checkCB;
+ IAmShPollDispatch *dispatchCB;
pollfd pollfdValue; //!<the array for polling the filedescriptors
void *userData; //!<userdata saved together with the callback.
};
@@ -95,7 +103,9 @@ private:
mListPollfd_t& mArray;
public:
CAmShCopyPollfd(mListPollfd_t& dest) :
- mArray(dest){}
+ mArray(dest)
+ {
+ }
void operator()(const sh_poll_s& row);
};
@@ -106,12 +116,12 @@ private:
timespec* insertTime(timespec& buffertime);
static bool compareCountdown(const sh_timer_s& a, const sh_timer_s& b)
{
- return (a.countdown.tv_sec == b.countdown.tv_sec) ? (a.countdown.tv_nsec < b.countdown.tv_nsec) : (a.countdown.tv_sec < b.countdown.tv_sec);
+ return ((a.countdown.tv_sec == b.countdown.tv_sec) ? (a.countdown.tv_nsec < b.countdown.tv_nsec) : (a.countdown.tv_sec < b.countdown.tv_sec));
}
static bool onlyFiredEvents(const pollfd& a)
{
- return a.revents == 0 ? false : true;
+ return (a.revents == 0 ? false : true);
}
//todo: maybe we could simplify mListActiveTimer to hold only the handle and the countdown ....
@@ -127,56 +137,68 @@ private:
};
/**
- * classic functor for the BasicTimerCallback
+ * prototype for the timer callback
*/
-class CAmShTimerCallBack
+class IAmShTimerCallBack
{
public:
virtual void Call(const sh_timerHandle_t handle, void* userData)=0;
- virtual ~CAmShTimerCallBack(){};
+ virtual ~IAmShTimerCallBack(){};
};
-class CAmShPollPrepare
+/**
+ * prototype for poll prepared callback
+ */
+class IAmShPollPrepare
{
public:
virtual void Call(const sh_pollHandle_t handle, void* userData)=0;
- virtual ~CAmShPollPrepare(){};
+ virtual ~IAmShPollPrepare(){};
};
-class CAmShPollFired
+/**
+ * prototype for poll fired callback
+ */
+class IAmShPollFired
{
public:
virtual void Call(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)=0;
- virtual ~ CAmShPollFired(){};
+ virtual ~ IAmShPollFired(){};
};
-class CAmShPollCheck
+/**
+ * prototype for poll check callback
+ */
+class IAmShPollCheck
{
public:
virtual bool Call(const sh_pollHandle_t handle, void* userData)=0;
- virtual ~ CAmShPollCheck(){};
+ virtual ~ IAmShPollCheck(){};
};
-class CAmShPollDispatch
+/**
+ * prototype for dispatch callback
+ */
+class IAmShPollDispatch
{
public:
virtual bool Call(const sh_pollHandle_t handle, void* userData)=0;
- virtual ~ CAmShPollDispatch() {};
+ virtual ~ IAmShPollDispatch(){};
};
/**
* template to create the functor for a class
*/
-template<class TClass> class TAmShTimerCallBack: public CAmShTimerCallBack
+template<class TClass> class TAmShTimerCallBack: public IAmShTimerCallBack
{
private:
TClass* mInstance;
void (TClass::*mFunction)(sh_timerHandle_t handle, void* userData);
public:
- TAmShTimerCallBack(TClass* instance, void(TClass::*function)(sh_timerHandle_t handle, void* userData)) :
- mInstance(instance),//
- mFunction(function) {};
+ TAmShTimerCallBack(TClass* instance, void (TClass::*function)(sh_timerHandle_t handle, void* userData)) :
+ mInstance(instance), //
+ mFunction(function){};
virtual void Call(sh_timerHandle_t handle, void* userData)
{
@@ -185,74 +207,87 @@ public:
};
/**
- * template to create the functor for a class
+ * template for a callback
*/
-template<class TClass> class TAmShPollPrepare: public CAmShPollPrepare
+template<class TClass> class TAmShPollPrepare: public IAmShPollPrepare
{
private:
TClass* mInstance;
void (TClass::*mFunction)(const sh_timerHandle_t handle, void* userData);
public:
- TAmShPollPrepare(TClass* instance, void(TClass::*function)(const sh_timerHandle_t handle, void* userData)) :
+ TAmShPollPrepare(TClass* instance, void (TClass::*function)(const sh_timerHandle_t handle, void* userData)) :
mInstance(instance), //
mFunction(function){};
virtual void Call(const sh_timerHandle_t handle, void* userData)
{
(*mInstance.*mFunction)(handle, userData);
- };
+ }
+ ;
};
-template<class TClass> class TAmShPollFired: public CAmShPollFired
+/**
+ * template for a callback
+ */
+template<class TClass> class TAmShPollFired: public IAmShPollFired
{
private:
TClass* mInstance;
void (TClass::*mFunction)(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
public:
- TAmShPollFired(TClass* instance, void(TClass::*function)(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)) :
+ TAmShPollFired(TClass* instance, void (TClass::*function)(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)) :
mInstance(instance), //
mFunction(function){};
virtual void Call(const pollfd pollfd, const sh_pollHandle_t handle, void* userData)
{
(*mInstance.*mFunction)(pollfd, handle, userData);
- };
+ }
+ ;
};
-template<class TClass> class TAmShPollCheck: public CAmShPollCheck
+/**
+ * template for a callback
+ */
+template<class TClass> class TAmShPollCheck: public IAmShPollCheck
{
private:
TClass* mInstance;
bool (TClass::*mFunction)(const sh_pollHandle_t handle, void* userData);
public:
- TAmShPollCheck(TClass* instance, bool(TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
+ TAmShPollCheck(TClass* instance, bool (TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
mInstance(instance), //
mFunction(function){};
virtual bool Call(const sh_pollHandle_t handle, void* userData)
{
- return (*mInstance.*mFunction)(handle, userData);
- };
+ return ((*mInstance.*mFunction)(handle, userData));
+ }
+ ;
};
-template<class TClass> class TAmShPollDispatch: public CAmShPollDispatch
+/**
+ * template for a callback
+ */
+template<class TClass> class TAmShPollDispatch: public IAmShPollDispatch
{
private:
TClass* mInstance;
bool (TClass::*mFunction)(const sh_pollHandle_t handle, void* userData);
public:
- TAmShPollDispatch(TClass* instance, bool(TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
+ TAmShPollDispatch(TClass* instance, bool (TClass::*function)(const sh_pollHandle_t handle, void* userData)) :
mInstance(instance), //
- mFunction(function) {};
+ mFunction(function){};
virtual bool Call(const sh_pollHandle_t handle, void* userData)
{
- return (*mInstance.*mFunction)(handle, userData);
- };
+ return ((*mInstance.*mFunction)(handle, userData));
+ }
+ ;
};
} /* namespace am */
#endif /* SOCKETHANDLER_H_ */
diff --git a/lgpl-2.1.txt b/lgpl-2.1.txt
deleted file mode 100644
index 4362b49..0000000
--- a/lgpl-2.1.txt
+++ /dev/null
@@ -1,502 +0,0 @@
- 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!