From 958a34ae8c5c6f25ba73640b9e7f9998b23fd62a Mon Sep 17 00:00:00 2001 From: Christian Linke Date: Thu, 12 Sep 2013 10:59:47 +0200 Subject: * added some documentation, removed sample project since it seems to addle users. Now the fidls are the matching final the EA version. Signed-off-by: Christian Linke --- AudioManagerDaemon/docx/04_components.dox | 14 + AudioManagerDaemon/docx/04_d_commonAPI.dox | 30 + .../docx/14_z_nodeStateManagement.dox | 2 + AudioManagerDaemon/docx/16_readme.dox | 2 +- AudioManagerDaemon/docx/Doxyfile.in | 2 +- .../docx/images/PluginCommandInterfaceCAPI.png | Bin 0 -> 114519 bytes .../docx/images/PluginRoutingInterfaceCAPI.png | Bin 0 -> 167624 bytes AudioManagerDaemon/docx/images/Register_Domain.png | Bin 0 -> 17905 bytes AudioManagerDaemon/docx/images/daemon_insight.png | Bin 50992 -> 64057 bytes AudioManagerDaemon/docx/images/dependencies.png | Bin 34175 -> 38376 bytes .../docx/images/dependencies_test.png | Bin 55504 -> 59908 bytes CMakeLists.txt | 1 + .../fidl/CommandInterface.fidl | 7 +- .../fidl/PluginCommandInterfaceCAPI_dbus.conf | 4 +- .../include/CAmCommandSenderService.h | 2 +- .../src-gen/org/genivi/am.cpp | 24 +- PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h | 24 +- .../src-gen/org/genivi/am/CommandControl.h | 24 +- .../org/genivi/am/CommandControlDBusProxy.cpp | 32 +- .../org/genivi/am/CommandControlDBusProxy.h | 26 +- .../genivi/am/CommandControlDBusStubAdapter.cpp | 30 +- .../org/genivi/am/CommandControlDBusStubAdapter.h | 24 +- .../src-gen/org/genivi/am/CommandControlProxy.h | 30 +- .../org/genivi/am/CommandControlProxyBase.h | 28 +- .../src-gen/org/genivi/am/CommandControlStub.h | 26 +- .../org/genivi/am/CommandControlStubDefault.cpp | 26 +- .../org/genivi/am/CommandControlStubDefault.h | 26 +- .../src/CAmCommandSenderService.cpp | 2 +- .../test/CAmCommandSenderCAPITest.cpp | 2 +- .../fidl/PluginRoutingInterfaceCAPI_dbus.conf | 4 +- .../fidl/RoutingInterface.fidl | 2 +- .../src-gen/org/genivi/am.cpp | 24 +- PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h | 24 +- .../src-gen/org/genivi/am/RoutingControl.h | 24 +- .../org/genivi/am/RoutingControlDBusProxy.cpp | 24 +- .../org/genivi/am/RoutingControlDBusProxy.h | 24 +- .../genivi/am/RoutingControlDBusStubAdapter.cpp | 24 +- .../org/genivi/am/RoutingControlDBusStubAdapter.h | 24 +- .../src-gen/org/genivi/am/RoutingControlObserver.h | 24 +- .../genivi/am/RoutingControlObserverDBusProxy.cpp | 24 +- .../genivi/am/RoutingControlObserverDBusProxy.h | 24 +- .../am/RoutingControlObserverDBusStubAdapter.cpp | 24 +- .../am/RoutingControlObserverDBusStubAdapter.h | 24 +- .../org/genivi/am/RoutingControlObserverProxy.h | 24 +- .../genivi/am/RoutingControlObserverProxyBase.h | 24 +- .../org/genivi/am/RoutingControlObserverStub.h | 24 +- .../am/RoutingControlObserverStubDefault.cpp | 24 +- .../genivi/am/RoutingControlObserverStubDefault.h | 24 +- .../src-gen/org/genivi/am/RoutingControlProxy.h | 24 +- .../org/genivi/am/RoutingControlProxyBase.h | 24 +- .../src-gen/org/genivi/am/RoutingControlStub.h | 24 +- .../org/genivi/am/RoutingControlStubDefault.cpp | 24 +- .../org/genivi/am/RoutingControlStubDefault.h | 24 +- README | 28 +- README.html | 30 +- exampleCode/player/Makefile | 336 ------ exampleCode/player/README | 5 - exampleCode/player/audiomanagerinteractor.cpp | 77 -- exampleCode/player/audiomanagerinteractor.h | 76 -- exampleCode/player/audiomanagertypes.h | 1243 -------------------- exampleCode/player/dbushandler.cpp | 742 ------------ exampleCode/player/dbushandler.h | 103 -- exampleCode/player/images/screen.png | Bin 4358 -> 0 bytes exampleCode/player/main.cpp | 98 -- exampleCode/player/mainwindow.cpp | 14 - exampleCode/player/mainwindow.h | 23 - exampleCode/player/mainwindow.ui | 24 - exampleCode/player/mediaplayer.cpp | 970 --------------- exampleCode/player/mediaplayer.h | 164 --- exampleCode/player/mediaplayer.qrc | 5 - exampleCode/player/player.pro | 53 - exampleCode/player/player.pro.user | 365 ------ exampleCode/player/settings.ui | 495 -------- src-gen/org/genivi/NodeStateManager/Consumer.h | 55 - .../genivi/NodeStateManager/ConsumerDBusProxy.cpp | 277 ----- .../genivi/NodeStateManager/ConsumerDBusProxy.h | 99 -- .../org/genivi/NodeStateManager/ConsumerProxy.h | 604 ---------- .../genivi/NodeStateManager/ConsumerProxyBase.h | 99 -- src-gen/org/genivi/NodeStateManager/ConsumerStub.h | 147 --- .../NodeStateManager/ConsumerStubDefault.cpp | 217 ---- .../genivi/NodeStateManager/ConsumerStubDefault.h | 126 -- .../genivi/NodeStateManager/LifeCycleConsumer.h | 55 - .../LifeCycleConsumerDBusProxy.cpp | 67 -- .../NodeStateManager/LifeCycleConsumerDBusProxy.h | 53 - .../LifeCycleConsumerDBusStubAdapter.cpp | 67 -- .../LifeCycleConsumerDBusStubAdapter.h | 46 - .../NodeStateManager/LifeCycleConsumerProxy.h | 151 --- .../NodeStateManager/LifeCycleConsumerProxyBase.h | 43 - .../NodeStateManager/LifeCycleConsumerStub.h | 78 -- .../LifeCycleConsumerStubDefault.cpp | 36 - .../LifeCycleConsumerStubDefault.h | 59 - 91 files changed, 828 insertions(+), 7224 deletions(-) create mode 100644 AudioManagerDaemon/docx/04_d_commonAPI.dox create mode 100644 AudioManagerDaemon/docx/images/PluginCommandInterfaceCAPI.png create mode 100644 AudioManagerDaemon/docx/images/PluginRoutingInterfaceCAPI.png create mode 100644 AudioManagerDaemon/docx/images/Register_Domain.png mode change 100755 => 100644 AudioManagerDaemon/docx/images/dependencies.png delete mode 100644 exampleCode/player/Makefile delete mode 100644 exampleCode/player/README delete mode 100644 exampleCode/player/audiomanagerinteractor.cpp delete mode 100644 exampleCode/player/audiomanagerinteractor.h delete mode 100755 exampleCode/player/audiomanagertypes.h delete mode 100644 exampleCode/player/dbushandler.cpp delete mode 100644 exampleCode/player/dbushandler.h delete mode 100644 exampleCode/player/images/screen.png delete mode 100644 exampleCode/player/main.cpp delete mode 100755 exampleCode/player/mainwindow.cpp delete mode 100755 exampleCode/player/mainwindow.h delete mode 100755 exampleCode/player/mainwindow.ui delete mode 100644 exampleCode/player/mediaplayer.cpp delete mode 100644 exampleCode/player/mediaplayer.h delete mode 100644 exampleCode/player/mediaplayer.qrc delete mode 100755 exampleCode/player/player.pro delete mode 100755 exampleCode/player/player.pro.user delete mode 100644 exampleCode/player/settings.ui delete mode 100644 src-gen/org/genivi/NodeStateManager/Consumer.h delete mode 100644 src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp delete mode 100644 src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h delete mode 100644 src-gen/org/genivi/NodeStateManager/ConsumerProxy.h delete mode 100644 src-gen/org/genivi/NodeStateManager/ConsumerProxyBase.h delete mode 100644 src-gen/org/genivi/NodeStateManager/ConsumerStub.h delete mode 100644 src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.cpp delete mode 100644 src-gen/org/genivi/NodeStateManager/ConsumerStubDefault.h delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumer.h delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.cpp delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusProxy.h delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.cpp delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerDBusStubAdapter.h delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxy.h delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerProxyBase.h delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStub.h delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.cpp delete mode 100644 src-gen/org/genivi/NodeStateManager/LifeCycleConsumerStubDefault.h diff --git a/AudioManagerDaemon/docx/04_components.dox b/AudioManagerDaemon/docx/04_components.dox index c4084b8..7c8f9b4 100644 --- a/AudioManagerDaemon/docx/04_components.dox +++ b/AudioManagerDaemon/docx/04_components.dox @@ -81,5 +81,19 @@ am::IAmRoutingSend::returnBusName. The AudioManagerDaemon used this information to link a plugin with a domain. All other elements like sinks, sources etc are linked to domains. This is how the hierarchy looks like that is used: \image html routing_hierarchy.png + + \subsection CAPIplugins CommonAPI plugins + As "sample code" with MIT license, PluginCommandInterfaceCAPI and PluginRoutingInterfaceCAPI are provided with the source code. The FRANCA + fidls have been generated out of the Enterprise architect model, so they might be used to draw project specific behavior in sequences. + The sources in src-gen have been generated out of the provided fidl files. + + \image html PluginCommandInterfaceCAPI.png + + \image html PluginRoutingInterfaceCAPI.png + + There is no fixed domain associated with this plugin. So you have to implement the interface org::genivi::am::RoutingControlStub and report + busname and path to the routingplugin on the interface org::genivi::am::RoutingControlObserverStub like this: + + \image html Register_Domain.png */ diff --git a/AudioManagerDaemon/docx/04_d_commonAPI.dox b/AudioManagerDaemon/docx/04_d_commonAPI.dox new file mode 100644 index 0000000..7e837dd --- /dev/null +++ b/AudioManagerDaemon/docx/04_d_commonAPI.dox @@ -0,0 +1,30 @@ + /* + * 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 Linke (christian.linke@bmw.de) + * + */ + + /*! + \page comminAPI AudioManager and CommonAPI +The audiomanager supports CommonAPI in very comfortable way. It will register CommonAPI in the audiomanager mainloop (am::CAmSocketHandler) and make +threadsafe calls to the stubs registered via the factory provided by the wrapper. + If enabled (by default) via cmake, the am::CAmCommonAPIWrapper is created. It is instantiated as singleton +and every Plugin can use it. +First, you have to create the interfaces out of the FIDL data like usual. +Then, you can access the singletons via am::CAmCommonAPIWrapper::factory and am::CAmCommonAPIWrapper::runtime. + +More information about CommonAPI can be found here: +http://projects.genivi.org/commonapi/ + +*/ diff --git a/AudioManagerDaemon/docx/14_z_nodeStateManagement.dox b/AudioManagerDaemon/docx/14_z_nodeStateManagement.dox index 216338a..e149310 100644 --- a/AudioManagerDaemon/docx/14_z_nodeStateManagement.dox +++ b/AudioManagerDaemon/docx/14_z_nodeStateManagement.dox @@ -21,6 +21,8 @@ The nodestatemanager is part of the GENIVI compliance. It basically handles startup and rundown of components in the IVI context.\n For more information, please go to http://projects.genivi.org +The Nodestatemanagement will either work with CommonAPI or DBus native. + \section nsmiact The Interaction between the NodeStateManager and the AudioManager It is the job of am::CAmNodeStateCommunicator to interact with the nodestatemanager via DBUS.\n The ControllerPlugin can register by the NSM to be informed when a shutdown will occour. For this, the Audiomanager presents an DBus interface, defined in LifeCycleConsumer.xml that will be called from the NSM during a shutdown, diff --git a/AudioManagerDaemon/docx/16_readme.dox b/AudioManagerDaemon/docx/16_readme.dox index 9483a68..7798fee 100644 --- a/AudioManagerDaemon/docx/16_readme.dox +++ b/AudioManagerDaemon/docx/16_readme.dox @@ -16,5 +16,5 @@ */ /*! \page comp Compiling & Co - README + README */ \ No newline at end of file diff --git a/AudioManagerDaemon/docx/Doxyfile.in b/AudioManagerDaemon/docx/Doxyfile.in index a71d39d..a17e7c6 100644 --- a/AudioManagerDaemon/docx/Doxyfile.in +++ b/AudioManagerDaemon/docx/Doxyfile.in @@ -93,7 +93,7 @@ FILE_PATTERNS = *.h *.cpp *.dox RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = */test/* */Plugin*/* */build*/* */cmake/* */exampleCode/* */googleMock/* */ProjectSpecific/* +EXCLUDE_PATTERNS = */test/* */Plugin*DBus*/* */PluginControl*/* */build*/* */cmake/* */exampleCode/* */googleMock/* */ProjectSpecific/* EXCLUDE_SYMBOLS = EXAMPLE_PATH = @CMAKE_SOURCE_DIR@ EXAMPLE_PATTERNS = diff --git a/AudioManagerDaemon/docx/images/PluginCommandInterfaceCAPI.png b/AudioManagerDaemon/docx/images/PluginCommandInterfaceCAPI.png new file mode 100644 index 0000000..882be93 Binary files /dev/null and b/AudioManagerDaemon/docx/images/PluginCommandInterfaceCAPI.png differ diff --git a/AudioManagerDaemon/docx/images/PluginRoutingInterfaceCAPI.png b/AudioManagerDaemon/docx/images/PluginRoutingInterfaceCAPI.png new file mode 100644 index 0000000..0ae79f5 Binary files /dev/null and b/AudioManagerDaemon/docx/images/PluginRoutingInterfaceCAPI.png differ diff --git a/AudioManagerDaemon/docx/images/Register_Domain.png b/AudioManagerDaemon/docx/images/Register_Domain.png new file mode 100644 index 0000000..09a1251 Binary files /dev/null and b/AudioManagerDaemon/docx/images/Register_Domain.png differ diff --git a/AudioManagerDaemon/docx/images/daemon_insight.png b/AudioManagerDaemon/docx/images/daemon_insight.png index 78c0928..341e3ab 100755 Binary files a/AudioManagerDaemon/docx/images/daemon_insight.png and b/AudioManagerDaemon/docx/images/daemon_insight.png differ diff --git a/AudioManagerDaemon/docx/images/dependencies.png b/AudioManagerDaemon/docx/images/dependencies.png old mode 100755 new mode 100644 index f5c925d..30d272f Binary files a/AudioManagerDaemon/docx/images/dependencies.png and b/AudioManagerDaemon/docx/images/dependencies.png differ diff --git a/AudioManagerDaemon/docx/images/dependencies_test.png b/AudioManagerDaemon/docx/images/dependencies_test.png index 05a30ad..870bc26 100644 Binary files a/AudioManagerDaemon/docx/images/dependencies_test.png and b/AudioManagerDaemon/docx/images/dependencies_test.png differ diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b2911d..be807be 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,6 +214,7 @@ ENDIF(WITH_TESTS) IF(WITH_DOCUMENTATION) find_package(Doxygen) configure_file(${DOXY_FILE} ${DOC_OUTPUT_PATH}/Doxyfile @ONLY IMMEDIATE) + configure_file("README.html" ${DOC_OUTPUT_PATH}/html/README.html) add_custom_target (AudioManangerDoku ALL COMMAND ${DOXYGEN_EXECUTABLE} ${DOC_OUTPUT_PATH}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH} SOURCES ${CMAKE_SOURCE_DIR} ${DOC_OUTPUT_PATH}/Doxyfile diff --git a/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl b/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl index 0d752d6..1fc0d5f 100644 --- a/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl +++ b/PluginCommandInterfaceCAPI/fidl/CommandInterface.fidl @@ -101,7 +101,7 @@ interface CommandControl { **> method setMainSinkSoundProperty { in { - am_sinkID_t sinkID + am_sinkID_t sinkID am_MainSoundProperty_s soundProperty } out { @@ -115,7 +115,7 @@ interface CommandControl { **> method setMainSourceSoundProperty { in { - am_sourceID_t sourceID + am_sourceID_t sourceID am_MainSoundProperty_s soundProperty } out { @@ -146,12 +146,12 @@ interface CommandControl { **> method getListMainConnections { out { - am_Error_e ^error <** @description : returns a list of all connections **> am_MainConnection_L listConnections + am_Error_e ^error } } @@ -602,4 +602,5 @@ interface CommandControl { am_NotificationConfiguration_s mainNotificationConfiguration } } + } \ No newline at end of file diff --git a/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf b/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf index b3ae199..35c5558 100644 --- a/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf +++ b/PluginCommandInterfaceCAPI/fidl/PluginCommandInterfaceCAPI_dbus.conf @@ -4,5 +4,5 @@ ################################################################################################################## [local:org.genivi.audiomanger.commandinterface:org.genivi.audiomanger] dbus_connection=org.genivi.audiomanager -dbus_object=/org/genivi/audiomanager/commandinterface -dbus_interface=org.genivi.audiomanager.commandinterface \ No newline at end of file +dbus_object=/org/genivi/audiomanager/CommandControl +dbus_interface=org.genivi.audiomanager.CommandControl \ No newline at end of file diff --git a/PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h b/PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h index 0fbf499..654436f 100644 --- a/PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h +++ b/PluginCommandInterfaceCAPI/include/CAmCommandSenderService.h @@ -49,7 +49,7 @@ public: virtual void setSystemProperty(org::genivi::am::am_SystemProperty_s soundProperty, org::genivi::am::am_Error_e& result); - virtual void getListMainConnections(org::genivi::am::am_Error_e& result, org::genivi::am::am_MainConnection_L& listConnections); + virtual void getListMainConnections(org::genivi::am::am_MainConnection_L& listConnections,org::genivi::am::am_Error_e& result); virtual void getListMainSinks(org::genivi::am::am_SinkType_L& listMainSinks, org::genivi::am::am_Error_e& result); diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp index 01169e7..ab69bbb 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "am.h" diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h index 8e9b4be..4d94244 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_am_H_ #define ORG_GENIVI_am_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h index 88f5ca2..f631c92 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControl.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Command_Control_H_ #define ORG_GENIVI_AM_Command_Control_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp index 4901145..cf6f32b 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "CommandControlDBusProxy.h" @@ -281,18 +299,18 @@ std::future CommandControlDBusProxy::setSystemPropertyAsy property, std::move(callback)); } -void CommandControlDBusProxy::getListMainConnections(CommonAPI::CallStatus& callStatus, am_Error_e& error, am_MainConnection_L& listConnections) { +void CommandControlDBusProxy::getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error) { CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( + CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( *this, "getListMainConnections", "", callStatus - , error, listConnections); + , listConnections, error); } std::future CommandControlDBusProxy::getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) { return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( + CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( *this, "getListMainConnections", "", diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h index 0c6e470..3f146b7 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusProxy.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Command_Control_DBUS_PROXY_H_ #define ORG_GENIVI_AM_Command_Control_DBUS_PROXY_H_ @@ -85,7 +103,7 @@ class CommandControlDBusProxy: virtual public CommandControlProxyBase, virtual p virtual void setSystemProperty(const am_SystemProperty_s& property, CommonAPI::CallStatus& callStatus, am_Error_e& error); virtual std::future setSystemPropertyAsync(const am_SystemProperty_s& property, SetSystemPropertyAsyncCallback callback); - virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_Error_e& error, am_MainConnection_L& listConnections); + virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error); virtual std::future getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback); virtual void getListMainSinks(CommonAPI::CallStatus& callStatus, am_SinkType_L& listMainSinks, am_Error_e& error); diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp index 89d06a8..4715cdb 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "CommandControlDBusStubAdapter.h" #include @@ -162,8 +180,8 @@ const char* CommandControlDBusStubAdapter::getMethodsDBusIntrospectionXmlData() "\n" "\n" "\n" - "\n" "\n" + "\n" "\n" "\n" "\n" @@ -268,8 +286,8 @@ static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, - std::tuple - > getListMainConnectionsStubDispatcher(&CommandControlStub::getListMainConnections, "ia(qqqni)"); + std::tuple + > getListMainConnectionsStubDispatcher(&CommandControlStub::getListMainConnections, "a(qqqni)i"); static CommonAPI::DBus::DBusMethodWithReplyStubDispatcher< CommandControlStub, std::tuple<>, diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h index 0435d14..d51fdd7 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlDBusStubAdapter.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_ #define ORG_GENIVI_AM_Command_Control_DBUS_STUB_ADAPTER_H_ diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h index 3f6b3fc..8bcb7fe 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxy.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Command_Control_PROXY_H_ #define ORG_GENIVI_AM_Command_Control_PROXY_H_ @@ -336,7 +354,7 @@ class CommandControlProxy: virtual public CommandControl, virtual public Command * will be set. * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. */ - virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_Error_e& error, am_MainConnection_L& listConnections); + virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error); /** * Calls getListMainConnections with asynchronous semantics. * @@ -746,8 +764,8 @@ std::future CommandControlProxy<_AttributeExtensions...>: } template -void CommandControlProxy<_AttributeExtensions...>::getListMainConnections(CommonAPI::CallStatus& callStatus, am_Error_e& error, am_MainConnection_L& listConnections) { - delegate_->getListMainConnections(callStatus, error, listConnections); +void CommandControlProxy<_AttributeExtensions...>::getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error) { + delegate_->getListMainConnections(callStatus, listConnections, error); } template diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h index eaf1fc8..588e2a7 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlProxyBase.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 + * This file was generated by the CommonAPI Generators. + * + * This file was generated by the CommonAPI Generators. + * + * 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 + * \author Christian Linke christian.linke@bmw.de BMW 2013 + * + * For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Command_Control_PROXY_BASE_H_ #define ORG_GENIVI_AM_Command_Control_PROXY_BASE_H_ @@ -66,7 +84,7 @@ typedef std::function SetMainSinkSoundPropertyAsyncCallback; typedef std::function SetMainSourceSoundPropertyAsyncCallback; typedef std::function SetSystemPropertyAsyncCallback; - typedef std::function GetListMainConnectionsAsyncCallback; + typedef std::function GetListMainConnectionsAsyncCallback; typedef std::function GetListMainSinksAsyncCallback; typedef std::function GetListMainSourcesAsyncCallback; typedef std::function GetListMainSinkSoundPropertiesAsyncCallback; @@ -130,7 +148,7 @@ virtual void setSystemProperty(const am_SystemProperty_s& property, CommonAPI::CallStatus& callStatus, am_Error_e& error) = 0; virtual std::future setSystemPropertyAsync(const am_SystemProperty_s& property, SetSystemPropertyAsyncCallback callback) = 0; - virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_Error_e& error, am_MainConnection_L& listConnections) = 0; + virtual void getListMainConnections(CommonAPI::CallStatus& callStatus, am_MainConnection_L& listConnections, am_Error_e& error) = 0; virtual std::future getListMainConnectionsAsync(GetListMainConnectionsAsyncCallback callback) = 0; virtual void getListMainSinks(CommonAPI::CallStatus& callStatus, am_SinkType_L& listMainSinks, am_Error_e& error) = 0; diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h index 5bca231..838a7e6 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStub.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Command_Control_STUB_H_ #define ORG_GENIVI_AM_Command_Control_STUB_H_ @@ -205,7 +223,7 @@ class CommandControlStub : public CommonAPI::Stub @@ -53,7 +71,7 @@ void CommandControlStubDefault::setSystemProperty(am_SystemProperty_s property, // No operation in default } -void CommandControlStubDefault::getListMainConnections(am_Error_e& error, am_MainConnection_L& listConnections) { +void CommandControlStubDefault::getListMainConnections(am_MainConnection_L& listConnections, am_Error_e& error) { // No operation in default } diff --git a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h index e718d76..5b30746 100644 --- a/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h +++ b/PluginCommandInterfaceCAPI/src-gen/org/genivi/am/CommandControlStubDefault.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Command_Control_STUB_DEFAULT_H_ #define ORG_GENIVI_AM_Command_Control_STUB_DEFAULT_H_ @@ -47,7 +65,7 @@ class CommandControlStubDefault : public CommandControlStub { virtual void setSystemProperty(am_SystemProperty_s property, am_Error_e& error); - virtual void getListMainConnections(am_Error_e& error, am_MainConnection_L& listConnections); + virtual void getListMainConnections(am_MainConnection_L& listConnections, am_Error_e& error); virtual void getListMainSinks(am_SinkType_L& listMainSinks, am_Error_e& error); diff --git a/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp index e9f7f9a..552ff9a 100644 --- a/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp +++ b/PluginCommandInterfaceCAPI/src/CAmCommandSenderService.cpp @@ -81,7 +81,7 @@ void CAmCommandSenderService::setSystemProperty(org::genivi::am::am_SystemProper result = CAmConvert2CAPIType(mpIAmCommandReceive->setSystemProperty(property)); } -void CAmCommandSenderService::getListMainConnections(org::genivi::am::am_Error_e& result, org::genivi::am::am_MainConnection_L& listConnections) { +void CAmCommandSenderService::getListMainConnections(org::genivi::am::am_MainConnection_L& listConnections,org::genivi::am::am_Error_e& result) { assert(mpIAmCommandReceive); std::vector list; result = CAmConvert2CAPIType(mpIAmCommandReceive->getListMainConnections(list)); diff --git a/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp index 8285b6e..7cbc0c8 100644 --- a/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp +++ b/PluginCommandInterfaceCAPI/test/CAmCommandSenderCAPITest.cpp @@ -372,7 +372,7 @@ TEST_F(CAmCommandSenderCAPITest, GetListMainConnectionsTest) EXPECT_CALL(*env->mpCommandReceive, getListMainConnections(_)).WillOnce(DoAll(returnListConnections(), Return(E_OK))); org::genivi::am::am_MainConnection_L listConnections; - env->mProxy->getListMainConnections(callStatus, result, listConnections); + env->mProxy->getListMainConnections(callStatus, listConnections, result); ASSERT_EQ(result, org::genivi::am::am_Error_e::E_OK); ASSERT_EQ(1, listConnections.size()); ASSERT_EQ(15, listConnections.at(0).mainConnectionID); diff --git a/PluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf b/PluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf index 799a9a3..583d99d 100755 --- a/PluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf +++ b/PluginRoutingInterfaceCAPI/fidl/PluginRoutingInterfaceCAPI_dbus.conf @@ -4,5 +4,5 @@ ################################################################################################################## [local:org.genivi.audiomanger.routinginterface:org.genivi.audiomanger] dbus_connection=org.genivi.audiomanager -dbus_object=/org/genivi/audiomanager/routinginterface -dbus_interface=org.genivi.audiomanager.routinginterface \ No newline at end of file +dbus_object=/org/genivi/audiomanager/RoutingObserver +dbus_interface=org.genivi.audiomanager.RoutingObserver \ No newline at end of file diff --git a/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl b/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl index 877b75c..0a6e700 100644 --- a/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl +++ b/PluginRoutingInterfaceCAPI/fidl/RoutingInterface.fidl @@ -201,7 +201,7 @@ interface RoutingControlObserver { @description : This attribute signals to the clients the current routing state. A client should notify himself to this attribute in order to know the current state and act accordingly. **> - attribute am_RoutingReady_e RoutingReady + attribute am_RoutingReady_e RoutingReady //readonly <** @description : acknowledges a asyncConnect diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.cpp index 01169e7..ab69bbb 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.cpp +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "am.h" diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h index 8e9b4be..4d94244 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_am_H_ #define ORG_GENIVI_am_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControl.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControl.h index 40ef21c..04818d5 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControl.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControl.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_H_ #define ORG_GENIVI_AM_Routing_Control_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.cpp index e55f256..dfb0e8c 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.cpp +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "RoutingControlDBusProxy.h" diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.h index 9e73446..96e8f2d 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusProxy.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_DBUS_PROXY_H_ #define ORG_GENIVI_AM_Routing_Control_DBUS_PROXY_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.cpp index fe14623..9b66f5a 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.cpp +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "RoutingControlDBusStubAdapter.h" #include diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.h index c25c98a..0cd33f3 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlDBusStubAdapter.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_DBUS_STUB_ADAPTER_H_ #define ORG_GENIVI_AM_Routing_Control_DBUS_STUB_ADAPTER_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserver.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserver.h index e5b6803..85a2ac0 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserver.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserver.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_Observer_H_ #define ORG_GENIVI_AM_Routing_Control_Observer_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.cpp index 370b831..38cf3c3 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.cpp +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "RoutingControlObserverDBusProxy.h" diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.h index 0c057e2..42e0828 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusProxy.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_Observer_DBUS_PROXY_H_ #define ORG_GENIVI_AM_Routing_Control_Observer_DBUS_PROXY_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.cpp index 11e838b..5f55964 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.cpp +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include "RoutingControlObserverDBusStubAdapter.h" #include diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.h index 79d460f..e8eefd1 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverDBusStubAdapter.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_Observer_DBUS_STUB_ADAPTER_H_ #define ORG_GENIVI_AM_Routing_Control_Observer_DBUS_STUB_ADAPTER_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxy.h index 8ad2394..421912f 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxy.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxy.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_Observer_PROXY_H_ #define ORG_GENIVI_AM_Routing_Control_Observer_PROXY_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxyBase.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxyBase.h index de76001..7325057 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxyBase.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverProxyBase.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 + * This file was generated by the CommonAPI Generators. + * + * This file was generated by the CommonAPI Generators. + * + * 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 + * \author Christian Linke christian.linke@bmw.de BMW 2013 + * + * For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_Observer_PROXY_BASE_H_ #define ORG_GENIVI_AM_Routing_Control_Observer_PROXY_BASE_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStub.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStub.h index 803fa59..bc767cf 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStub.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStub.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_Observer_STUB_H_ #define ORG_GENIVI_AM_Routing_Control_Observer_STUB_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.cpp index 2483387..99515c0 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.cpp +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.h index 5ff81d0..2196e1d 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlObserverStubDefault.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_Observer_STUB_DEFAULT_H_ #define ORG_GENIVI_AM_Routing_Control_Observer_STUB_DEFAULT_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxy.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxy.h index 817567f..0bace13 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxy.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxy.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_PROXY_H_ #define ORG_GENIVI_AM_Routing_Control_PROXY_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxyBase.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxyBase.h index 8f2bc8e..7c7c9fe 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxyBase.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlProxyBase.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 + * This file was generated by the CommonAPI Generators. + * + * This file was generated by the CommonAPI Generators. + * + * 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 + * \author Christian Linke christian.linke@bmw.de BMW 2013 + * + * For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_PROXY_BASE_H_ #define ORG_GENIVI_AM_Routing_Control_PROXY_BASE_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStub.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStub.h index cdaebc4..25f74b8 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStub.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStub.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_STUB_H_ #define ORG_GENIVI_AM_Routing_Control_STUB_H_ diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.cpp b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.cpp index 69a0e6e..0a5e4a2 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.cpp +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.cpp @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #include diff --git a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.h b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.h index 922c975..f8ca0a9 100644 --- a/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.h +++ b/PluginRoutingInterfaceCAPI/src-gen/org/genivi/am/RoutingControlStubDefault.h @@ -1,9 +1,27 @@ /* * This file was generated by the CommonAPI Generators. * - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 +* This file was generated by the CommonAPI Generators. +* +* This file was generated by the CommonAPI Generators. +* +* 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 Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013 +* \author Christian Linke christian.linke@bmw.de BMW 2013 +* +* For further information see http://www.genivi.org/. */ #ifndef ORG_GENIVI_AM_Routing_Control_STUB_DEFAULT_H_ #define ORG_GENIVI_AM_Routing_Control_STUB_DEFAULT_H_ diff --git a/README b/README index d20ab37..3519f23 100755 --- a/README +++ b/README @@ -60,28 +60,33 @@ These are the compile options with default values: BUILD_SHARED_LIBS OFF CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX /usr/local + COMMON_API_DBUS_LIBRARY /usr/local/lib/libCommonAPI-DBus.so + COMMON_API_LIBRARY /usr/local/lib/libCommonAPI.so GLIB_DBUS_TYPES_TOLERANT ON USE_BUILD_LIBS ON - WITH_COMMAND_INTERFACE_DBUS ON - WITH_DATABASE_STORAGE ON - WITH_DBUS_WRAPPER ON - WITH_DLT OFF - WITH_DOCUMENTATION ON - WITH_NSM OFF + WITH_COMMAND_INTERFACE_COMMON_ ON + WITH_DATABASE_STORAGE OFF + WITH_DLT ON + WITH_DOCUMENTATION ON + WITH_ENABLED_IPC CAPI + WITH_LOGSTATE ON + WITH_NSM ON + WITH_OXF_ANIMATION OFF + WITH_OXF_TRACE OFF WITH_PLUGIN_COMMAND ON WITH_PLUGIN_CONTROL ON WITH_PLUGIN_ROUTING ON WITH_ROUTING_INTERFACE_ASYNC OFF - WITH_ROUTING_INTERFACE_DBUS ON + WITH_ROUTING_INTERFACE_CAPI ON WITH_SYSTEMD_WATCHDOG OFF - WITH_TELNET OFF - WITH_TESTS OFF + WITH_TELNET ON + WITH_TESTS ON WITH_TEST_CONTROLLER OFF gmock_build_tests OFF gtest_build_samples OFF gtest_build_tests OFF gtest_disable_pthreads OFF - gtest_force_shared_crt OFF + gtest_force_shared_crt OFF === Passing options to cmake: @@ -118,7 +123,8 @@ You will need optionally fullfill some dependencies in order to comile the GENIV * dbus (only when DBUS_WRAPPER==ON) [tested on version 1.2.16] * sqlite3 [tested on version 3.6.22] (only when WITH_DATABASE_STORAGE==ON) * automotive-dlt [greater 2.5.0] (only when WITH_DLT==ON) -* doxygen (only when WITH_DOCUMENTATION==ON) [tested on version 1.6.3] +* doxygen [tested on version 1.6.3] (only when WITH_DOCUMENTATION==ON) +* commonAPI [version > 2.1] (only with WITH_ENABLED_IPC CAPI), more information here http://projects.genivi.org/commonapi/ To install them in a build environment like Ubuntu you can use: ---- diff --git a/README.html b/README.html index 97e8328..6fa0e72 100644 --- a/README.html +++ b/README.html @@ -805,22 +805,27 @@ make
BUILD_SHARED_LIBS                OFF
 CMAKE_BUILD_TYPE
 CMAKE_INSTALL_PREFIX             /usr/local
+COMMON_API_DBUS_LIBRARY          /usr/local/lib/libCommonAPI-DBus.so
+COMMON_API_LIBRARY               /usr/local/lib/libCommonAPI.so
 GLIB_DBUS_TYPES_TOLERANT         ON
 USE_BUILD_LIBS                   ON
-WITH_COMMAND_INTERFACE_DBUS      ON
-WITH_DATABASE_STORAGE            ON
-WITH_DBUS_WRAPPER                ON
-WITH_DLT                         OFF
+WITH_COMMAND_INTERFACE_COMMON_   ON
+WITH_DATABASE_STORAGE            OFF
+WITH_DLT                         ON
 WITH_DOCUMENTATION               ON
-WITH_NSM                         OFF
+WITH_ENABLED_IPC                 CAPI
+WITH_LOGSTATE                    ON
+WITH_NSM                         ON
+WITH_OXF_ANIMATION               OFF
+WITH_OXF_TRACE                   OFF
 WITH_PLUGIN_COMMAND              ON
 WITH_PLUGIN_CONTROL              ON
 WITH_PLUGIN_ROUTING              ON
 WITH_ROUTING_INTERFACE_ASYNC     OFF
-WITH_ROUTING_INTERFACE_DBUS      ON
+WITH_ROUTING_INTERFACE_CAPI      ON
 WITH_SYSTEMD_WATCHDOG            OFF
-WITH_TELNET                      OFF
-WITH_TESTS                       OFF
+WITH_TELNET                      ON
+WITH_TESTS                       ON
 WITH_TEST_CONTROLLER             OFF
 gmock_build_tests                OFF
 gtest_build_samples              OFF
@@ -864,7 +869,12 @@ automotive-dlt [greater 2.5.0] (only when WITH_DLT==ON)
 
 
  • -doxygen (only when WITH_DOCUMENTATION==ON) [tested on version 1.6.3] +doxygen [tested on version 1.6.3] (only when WITH_DOCUMENTATION==ON) +

    +
  • +
  • +

    +commonAPI [version > 2.1] (only with WITH_ENABLED_IPC CAPI), more information here http://projects.genivi.org/commonapi/

  • @@ -1210,7 +1220,7 @@ handle later on.


    diff --git a/exampleCode/player/Makefile b/exampleCode/player/Makefile deleted file mode 100644 index 75cbae6..0000000 --- a/exampleCode/player/Makefile +++ /dev/null @@ -1,336 +0,0 @@ -############################################################################# -# Makefile for building: qmediaplayer -# Generated by qmake (2.01a) (Qt 4.8.1) on: Mon Jun 4 13:20:55 2012 -# Project: qmediaplayer.pro -# Template: app -# Command: /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake -spec /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++-32 CONFIG+=debug CONFIG+=declarative_debug -o Makefile qmediaplayer.pro -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -CFLAGS = -m32 -pipe -g -Wall -W -D_REENTRANT $(DEFINES) -CXXFLAGS = -m32 -pipe -g -Wall -W -D_REENTRANT $(DEFINES) -INCPATH = -I/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++-32 -I. -I/opt/QtSDK/Desktop/Qt/4.8.1/gcc/include/QtCore -I/opt/QtSDK/Desktop/Qt/4.8.1/gcc/include/QtGui -I/opt/QtSDK/Desktop/Qt/4.8.1/gcc/include/phonon -I/opt/QtSDK/Desktop/Qt/4.8.1/gcc/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/opt/QtSDK/Desktop/Qt/4.8.1/gcc/include/phonon_compat -I. -I. -LINK = g++ -LFLAGS = -m32 -Wl,-rpath,/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib -LIBS = $(SUBLIBS) -L/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib -ldbus-glib-1 -ldbus-1 -lrt -lgobject-2.0 -lphonon -L/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib -lpulse-mainloop-glib -lpulse -lglib-2.0 -lQtDBus -lQtXml -L/usr/X11R6/lib64 -lQtGui -lQtCore -lpthread -AR = ar cqs -RANLIB = -QMAKE = /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake -TAR = tar -cf -COMPRESS = gzip -9f -COPY = cp -f -SED = sed -COPY_FILE = $(COPY) -COPY_DIR = $(COPY) -r -STRIP = strip -INSTALL_FILE = install -m 644 -p -INSTALL_DIR = $(COPY_DIR) -INSTALL_PROGRAM = install -m 755 -p -DEL_FILE = rm -f -SYMLINK = ln -f -s -DEL_DIR = rmdir -MOVE = mv -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p - -####### Output directory - -OBJECTS_DIR = ./ - -####### Files - -SOURCES = main.cpp \ - mediaplayer.cpp \ - audiomanagerinteractor.cpp \ - dbushandler.cpp moc_mediaplayer.cpp \ - moc_audiomanagerinteractor.cpp \ - moc_dbushandler.cpp \ - qrc_mediaplayer.cpp -OBJECTS = main.o \ - mediaplayer.o \ - audiomanagerinteractor.o \ - dbushandler.o \ - moc_mediaplayer.o \ - moc_audiomanagerinteractor.o \ - moc_dbushandler.o \ - qrc_mediaplayer.o -DIST = /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/unix.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/linux.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/gcc-base.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/gcc-base-unix.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/g++-base.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/g++-unix.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/qconfig.pri \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/modules/qt_webkit_version.pri \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt_functions.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt_config.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/exclusive_builds.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/default_pre.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/debug.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/default_post.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/link_pkgconfig.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/declarative_debug.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/unix/gdb_dwarf_index.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/warn_on.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/unix/thread.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/moc.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/resources.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/uic.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/yacc.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/lex.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/include_source_dir.prf \ - qmediaplayer.pro -QMAKE_TARGET = qmediaplayer -DESTDIR = -TARGET = qmediaplayer - -first: all -####### Implicit rules - -.SUFFIXES: .o .c .cpp .cc .cxx .C - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" - -####### Build rules - -all: Makefile $(TARGET) - -$(TARGET): ui_settings.h $(OBJECTS) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) - { test -n "$(DESTDIR)" && DESTDIR="$(DESTDIR)" || DESTDIR=.; } && test $$(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $$DESTDIR" -ex quit '$(TARGET)' && test -f $(TARGET).gdb-index && objcopy --add-section '.gdb_index=$(TARGET).gdb-index' --set-section-flags '.gdb_index=readonly' '$(TARGET)' '$(TARGET)' && rm -f $(TARGET).gdb-index || true - -Makefile: qmediaplayer.pro /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++-32/qmake.conf /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/unix.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/linux.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/gcc-base.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/gcc-base-unix.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/g++-base.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/g++-unix.conf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/qconfig.pri \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/modules/qt_webkit_version.pri \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt_functions.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt_config.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/exclusive_builds.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/default_pre.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/debug.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/default_post.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/link_pkgconfig.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/declarative_debug.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/unix/gdb_dwarf_index.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/warn_on.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/unix/thread.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/moc.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/resources.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/uic.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/yacc.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/lex.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/include_source_dir.prf \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libphonon.prl \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDBus.prl \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXml.prl \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.prl \ - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtGui.prl - $(QMAKE) -spec /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++-32 CONFIG+=debug CONFIG+=declarative_debug -o Makefile qmediaplayer.pro -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/unix.conf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/linux.conf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/gcc-base.conf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/gcc-base-unix.conf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/g++-base.conf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/common/g++-unix.conf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/qconfig.pri: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/modules/qt_webkit_version.pri: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt_functions.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt_config.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/exclusive_builds.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/default_pre.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/debug.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/default_post.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/link_pkgconfig.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/declarative_debug.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/unix/gdb_dwarf_index.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/warn_on.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/qt.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/unix/thread.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/moc.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/resources.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/uic.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/yacc.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/lex.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/features/include_source_dir.prf: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libphonon.prl: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDBus.prl: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXml.prl: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.prl: -/opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtGui.prl: -qmake: FORCE - @$(QMAKE) -spec /opt/QtSDK/Desktop/Qt/4.8.1/gcc/mkspecs/linux-g++-32 CONFIG+=debug CONFIG+=declarative_debug -o Makefile qmediaplayer.pro - -dist: - @$(CHK_DIR_EXISTS) .tmp/qmediaplayer1.0.0 || $(MKDIR) .tmp/qmediaplayer1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qmediaplayer1.0.0/ && $(COPY_FILE) --parents mediaplayer.h audiomanagerinteractor.h dbushandler.h audiomanagertypes.h .tmp/qmediaplayer1.0.0/ && $(COPY_FILE) --parents mediaplayer.qrc .tmp/qmediaplayer1.0.0/ && $(COPY_FILE) --parents main.cpp mediaplayer.cpp audiomanagerinteractor.cpp dbushandler.cpp .tmp/qmediaplayer1.0.0/ && $(COPY_FILE) --parents settings.ui .tmp/qmediaplayer1.0.0/ && (cd `dirname .tmp/qmediaplayer1.0.0` && $(TAR) qmediaplayer1.0.0.tar qmediaplayer1.0.0 && $(COMPRESS) qmediaplayer1.0.0.tar) && $(MOVE) `dirname .tmp/qmediaplayer1.0.0`/qmediaplayer1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qmediaplayer1.0.0 - - -clean:compiler_clean - -$(DEL_FILE) $(OBJECTS) - -$(DEL_FILE) *~ core *.core - - -####### Sub-libraries - -distclean: clean - -$(DEL_FILE) $(TARGET) - -$(DEL_FILE) Makefile - - -check: first - -mocclean: compiler_moc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_source_make_all - -compiler_moc_header_make_all: moc_mediaplayer.cpp moc_audiomanagerinteractor.cpp moc_dbushandler.cpp -compiler_moc_header_clean: - -$(DEL_FILE) moc_mediaplayer.cpp moc_audiomanagerinteractor.cpp moc_dbushandler.cpp -moc_mediaplayer.cpp: mediaplayer.h - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/moc $(DEFINES) $(INCPATH) mediaplayer.h -o moc_mediaplayer.cpp - -moc_audiomanagerinteractor.cpp: dbushandler.h \ - audiomanagertypes.h \ - projecttypes.h \ - audiomanagerinteractor.h - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/moc $(DEFINES) $(INCPATH) audiomanagerinteractor.h -o moc_audiomanagerinteractor.cpp - -moc_dbushandler.cpp: audiomanagertypes.h \ - projecttypes.h \ - dbushandler.h - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/moc $(DEFINES) $(INCPATH) dbushandler.h -o moc_dbushandler.cpp - -compiler_rcc_make_all: qrc_mediaplayer.cpp -compiler_rcc_clean: - -$(DEL_FILE) qrc_mediaplayer.cpp -qrc_mediaplayer.cpp: mediaplayer.qrc \ - images/screen.png - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/rcc -name mediaplayer mediaplayer.qrc -o qrc_mediaplayer.cpp - -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: ui_settings.h -compiler_uic_clean: - -$(DEL_FILE) ui_settings.h -ui_settings.h: settings.ui - /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/uic settings.ui -o ui_settings.h - -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_uic_clean - -####### Compile - -main.o: main.cpp mediaplayer.h \ - dbushandler.h \ - audiomanagertypes.h \ - projecttypes.h \ - audiomanagerinteractor.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp - -mediaplayer.o: mediaplayer.cpp mediaplayer.h \ - ui_settings.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mediaplayer.o mediaplayer.cpp - -audiomanagerinteractor.o: audiomanagerinteractor.cpp audiomanagerinteractor.h \ - dbushandler.h \ - audiomanagertypes.h \ - projecttypes.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o audiomanagerinteractor.o audiomanagerinteractor.cpp - -dbushandler.o: dbushandler.cpp dbushandler.h \ - audiomanagertypes.h \ - projecttypes.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dbushandler.o dbushandler.cpp - -moc_mediaplayer.o: moc_mediaplayer.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mediaplayer.o moc_mediaplayer.cpp - -moc_audiomanagerinteractor.o: moc_audiomanagerinteractor.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_audiomanagerinteractor.o moc_audiomanagerinteractor.cpp - -moc_dbushandler.o: moc_dbushandler.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dbushandler.o moc_dbushandler.cpp - -qrc_mediaplayer.o: qrc_mediaplayer.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_mediaplayer.o qrc_mediaplayer.cpp - -####### Install - -install_target: first FORCE - @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ || $(MKDIR) $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_PROGRAM) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/$(QMAKE_TARGET)" - -uninstall_target: FORCE - -$(DEL_FILE) "$(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/$(QMAKE_TARGET)" - -$(DEL_DIR) $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - - -install_sources: first FORCE - @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ || $(MKDIR) $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/main.cpp $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/mediaplayer.cpp $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/audiomanagerinteractor.cpp $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/dbushandler.cpp $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/mediaplayer.h $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/audiomanagerinteractor.h $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/dbushandler.h $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_PROGRAM) /home/christian/workspace/qmediaplayer/audiomanagertypes.h $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/settings.ui $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/mediaplayer.qrc $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_FILE) /home/christian/workspace/qmediaplayer/qmediaplayer.pro $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - -$(INSTALL_DIR) /home/christian/workspace/qmediaplayer/images $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - - -uninstall_sources: FORCE - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/main.cpp - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/mediaplayer.cpp - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/audiomanagerinteractor.cpp - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/dbushandler.cpp - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/mediaplayer.h - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/audiomanagerinteractor.h - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/dbushandler.h - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/audiomanagertypes.h - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/settings.ui - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/mediaplayer.qrc - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/qmediaplayer.pro - -$(DEL_FILE) -r $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/images - -$(DEL_DIR) $(INSTALL_ROOT)/opt/QtSDK/Demos/4.7/qmediaplayer/ - - -install: install_target install_sources FORCE - -uninstall: uninstall_target uninstall_sources FORCE - -FORCE: - diff --git a/exampleCode/player/README b/exampleCode/player/README deleted file mode 100644 index aa8fca3..0000000 --- a/exampleCode/player/README +++ /dev/null @@ -1,5 +0,0 @@ -This code is a sample player for the AudioManager and was used for the POC in 2012. - -It is based on a QT sample player. - -In order to compile it, open it with a QT Creator. diff --git a/exampleCode/player/audiomanagerinteractor.cpp b/exampleCode/player/audiomanagerinteractor.cpp deleted file mode 100644 index 528006b..0000000 --- a/exampleCode/player/audiomanagerinteractor.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (C) 2012, BMW AG - * - * - * \copyright - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2 - * of the License. - - * 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 General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * - * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012 - * - * - */ - -#include "audiomanagerinteractor.h" -#include - -using namespace am; - -AudioManagerInteractor::AudioManagerInteractor(DbusHandler* DbusHandler, am_sourceID_t sourceID, am_sinkID_t sinkID) : - mDbusHandler(DbusHandler), - mSourceID(sourceID), - mSinkID(sinkID), - mConnectionID(0), - mState(Phonon::StoppedState), - mConnectedState(DISCONNECTED) -{ -} - -void AudioManagerInteractor::playPause() -{ - if (mState==Phonon::StoppedState || mState==Phonon::PausedState) - { - mDbusHandler->connect(mSourceID,mSinkID,mConnectionID); - mConnectedState=CONNECTING; - } - else - { - mDbusHandler->disconnect(mConnectionID); - mConnectedState=DISCONNECTED; - } -} - -void AudioManagerInteractor::SourceActivity(am_sourceID_t source,am_SourceState_e state) -{ - std::cout<<"got source activity ID "<play(); - else if (source==mSourceID && (state==SS_OFF || state==SS_PAUSED)) - emit this->stop(); -} - -void AudioManagerInteractor::getPlayerState(Phonon::State newstate) -{ - mState=newstate; - if (newstate==Phonon::StoppedState && mConnectedState==CONNECTED) - mDbusHandler->disconnect(mConnectionID); - else if (mConnectedState==CONNECTING) - mConnectedState=CONNECTED; -} - - -AudioManagerInteractor::~AudioManagerInteractor() -{ - -} diff --git a/exampleCode/player/audiomanagerinteractor.h b/exampleCode/player/audiomanagerinteractor.h deleted file mode 100644 index 77b01eb..0000000 --- a/exampleCode/player/audiomanagerinteractor.h +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (C) 2012, BMW AG - * - * - * \copyright - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2 - * of the License. - - * 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 General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * - * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012 - * - * - */ - - -#ifndef AUDIOMANAGERINTERACTOR_H -#define AUDIOMANAGERINTERACTOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "dbushandler.h" - -class AudioManagerInteractor : public QObject -{ - Q_OBJECT -public: - AudioManagerInteractor(DbusHandler* DbusHandler, am_sourceID_t sourceID, am_sinkID_t sinkID); - ~AudioManagerInteractor(); - -signals: - void play(); - void stop(); - -public slots: - void playPause(); - void SourceActivity(am_sourceID_t source,am_SourceState_e state); - void getPlayerState(Phonon::State newstate); -private: - DbusHandler* mDbusHandler; - am_sourceID_t mSourceID; - am_sinkID_t mSinkID; - am_connectionID_t mConnectionID; - Phonon::State mState; - enum connected_e - { - CONNECTED, - CONNECTING, - DISCONNECTED - }; - connected_e mConnectedState; -}; - -#endif // AUDIOMANAGERINTERACTOR_H diff --git a/exampleCode/player/audiomanagertypes.h b/exampleCode/player/audiomanagertypes.h deleted file mode 100755 index 8ac58b7..0000000 --- a/exampleCode/player/audiomanagertypes.h +++ /dev/null @@ -1,1243 +0,0 @@ -/** - * Copyright (C) 2012, BMW AG - * - * - * \copyright - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2 - * of the License. - - * 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 General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * - * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012 - * - * - */ -#if !defined(EA_F9B4F59D_FED5_44ac_85F2_F9F60549C133__INCLUDED_) -#define EA_F9B4F59D_FED5_44ac_85F2_F9F60549C133__INCLUDED_ - -#include -#include "projecttypes.h" -#include -#include - -#define AM_MUTE -3000 - -namespace am { - /** - * a domain ID - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_domainID_t; - - /** - * a source ID - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_sourceID_t; - - /** - * a sink ID - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_sinkID_t; - - /** - * a gateway ID - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_gatewayID_t; - - /** - * a crossfader ID - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_crossfaderID_t; - - /** - * a connection ID - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_connectionID_t; - - /** - * a mainConnection ID - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_mainConnectionID_t; - - /** - * speed - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 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 07-Mar-2012 6:06:13 PM - */ - typedef int16_t am_volume_t; - - /** - * This is the volume presented on the command interface. It is in the duty of the - * Controller to change the volumes given here into meaningful values on the - * routing interface. - * The range of this type is customer specific. - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef int16_t am_mainVolume_t; - - /** - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_sourceClass_t; - - /** - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_sinkClass_t; - - /** - * time in ms! - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 PM - */ - typedef uint16_t am_time_t; - - /** - * offset time that is introduced in milli seconds. - * @author Christian Mueller - * @created 07-Mar-2012 6:06:13 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 07-Mar-2012 6:06:14 PM - */ - enum am_Availability_e - { - /** - * default - */ - A_UNKNOWN = 0, - /** - * The source / sink is available - */ - A_AVAILABLE = 1, - /** - * the source / sink is not available - */ - A_UNAVAILABLE = 2, - A_MAX - }; - - /** - * represents the connection state - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_ConnectionState_e - { - CS_UNKNOWN = 0, - /** - * This means the connection is just building up - */ - CS_CONNECTING = 1, - /** - * the connection is ready to be used - */ - CS_CONNECTED = 2, - /** - * the connection is in the course to be knocked down - */ - CS_DISCONNECTING = 3, - /** - * only relevant for connectionStatechanged. Is send after the connection was - * removed - */ - CS_DISCONNECTED = 4, - /** - * this means the connection is still build up but unused at the moment - */ - CS_SUSPENDED = 5, - CS_MAX - }; - - /** - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_DomainState_e - { - /** - * default - */ - DS_UNKNOWN = 0, - /** - * the domain is controlled by the daemon - */ - DS_CONTROLLED = 1, - /** - * the domain is independent starting up - */ - DS_INDEPENDENT_STARTUP = 1, - /** - * the domain is independent running down - */ - DS_INDEPENDENT_RUNDOWN = 2, - DS_MAX - }; - - /** - * This enum characterizes the data of the EarlyData_t - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_EarlyDataType_e - { - /** - * default - */ - ES_UNKNOWN = 0, - /** - * the source volume - */ - ED_SOURCE_VOLUME = 1, - /** - * the sink volume - */ - ED_SINK_VOLUME = 2, - /** - * a source property - */ - ED_SOURCE_PROPERTY = 3, - /** - * a sink property - */ - ED_SINK_PROPERTY = 4, - ED_MAX - }; - - /** - * the errors of the audiomanager. All possible errors are in here. This enum is - * used widely as return parameter. - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_Error_e - { - /** - * no error - positive reply - */ - E_OK = 0, - /** - * default - */ - E_UNKNOWN = 1, - /** - * value out of range - */ - E_OUT_OF_RANGE = 2, - /** - * not used - */ - E_NOT_USED = 3, - /** - * a database error occurred - */ - E_DATABASE_ERROR = 4, - /** - * the desired object already exists - */ - E_ALREADY_EXISTS = 5, - /** - * there is no change - */ - E_NO_CHANGE = 6, - /** - * the desired action is not possible - */ - E_NOT_POSSIBLE = 7, - /** - * the desired object is non existent - */ - E_NON_EXISTENT = 8, - /** - * the asynchronous action was aborted - */ - E_ABORTED = 9, - /** - * This error is returned in case a connect is issued with a connectionFormat that - * cannot be selected for the connection. This could be either due to the - * capabilities of a source or a sink or gateway compatibilities for example - */ - E_WRONG_FORMAT = 10, - E_MAX - }; - - /** - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_MuteState_e - { - /** - * default - */ - MS_UNKNOWN = 0, - /** - * the source / sink is muted - */ - MS_MUTED = 1, - /** - * the source / sink is unmuted - */ - MS_UNMUTED = 2, - MS_MAX - }; - - /** - * The source state reflects the state of the source - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_SourceState_e - { - SS_UNKNNOWN = 0, - /** - * The source can be activly heared - */ - SS_ON = 1, - /** - * The source cannot be heared - */ - SS_OFF = 2, - /** - * The source is paused. Meaning it cannot be heared but should be prepared to - * play again soon. - */ - SS_PAUSED = 3, - SS_MAX - }; - - /** - * This enumeration is used to define the type of the action that is correlated to - * a handle. - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_Handle_e - { - H_UNKNOWN = 0, - H_CONNECT = 1, - H_DISCONNECT = 2, - H_SETSOURCESTATE = 3, - H_SETSINKVOLUME = 4, - H_SETSOURCEVOLUME = 5, - H_SETSINKSOUNDPROPERTY = 6, - H_SETSOURCESOUNDPROPERTY = 7, - H_SETSINKSOUNDPROPERTIES = 8, - H_SETSOURCESOUNDPROPERTIES = 9, - H_CROSSFADE = 10, - H_MAX - }; - - /** - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_InterruptState_e - { - /** - * default - */ - IS_UNKNOWN = 0, - /** - * the interrupt state is off - no interrupt - */ - IS_OFF = 1, - /** - * the interrupt state is interrupted - the interrupt is active - */ - IS_INTERRUPTED = 2, - IS_MAX - }; - - /** - * describes the active sink of a crossfader. - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - enum am_HotSink_e - { - /** - * default - */ - HS_UNKNOWN = 0, - /** - * sinkA is active - */ - HS_SINKA = 1, - /** - * sinkB is active - */ - HS_SINKB = 2, - /** - * the crossfader is in the transition state - */ - HS_INTERMEDIATE = 3, - HS_MAX - }; - - /** - * this describes the availability of a sink or a source together with the latest - * change - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 PM - */ - struct am_Availability_s - { - - public: - /** - * the current availability state - */ - am_Availability_e availability; - /** - * the reason for the last change. This can be used to trigger events that deal - * with state changes. - */ - am_AvailabilityReason_e availabilityReason; - - }; - - /** - * describes class properties - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 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 07-Mar-2012 6:06:14 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 07-Mar-2012 6:06:14 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 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 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). - * If a SinkFormat can be converted into a SourceFormat, the vector will hold a 1, - * if no conversion is possible, a 0. - * The data is stored row orientated, where the rows are related to the - * sinksFormats and the columns to the sourceFormats. The first value will hold - * the conversion information from the first sourceFormat to the first sinkFormat - * for example and the seventh value the information about the 3rd sinkFormat to - * the 1st sourceFormat in case we would have 3 sourceFormats. - * - * This matrix - * 110 011 000 111 001 - * - * reads as this: - * Source - * ** 1 2 3 - * ********************* - * S 1* 1 1 0 - * i 2* 0 1 1 - * n 3* 0 0 0 - * k 4* 1 1 1 - * 5* 0 0 1 - */ - std::vector convertionMatrix; - - }; - - /** - * This represents one "hopp" in a route - * @author Christian Mueller - * @created 07-Mar-2012 6:06:14 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 07-Mar-2012 6:06:14 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 route; - - }; - - /** - * struct describing the sound property - * @author Christian Mueller - * @created 07-Mar-2012 6:06:15 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 07-Mar-2012 6:06:15 PM - */ - struct am_SystemProperty_s - { - - public: - /** - * the type that is set - */ - am_SystemPropertyType_e type; - /** - * the value - */ - int16_t value; - - }; - - /** - * struct describing sinkclasses - * @author Christian Mueller - * @created 07-Mar-2012 6:06:15 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 listClassProperties; - - }; - - /** - * struct describing source classes - * @author Christian Mueller - * @created 07-Mar-2012 6:06:15 PM - */ - struct am_SourceClass_s - { - - public: - /** - * 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 listClassProperties; - - }; - - /** - * this type holds all information of sources relevant to the HMI - * @author Christian Mueller - * @created 07-Mar-2012 6:06:15 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; - - }; - - /** - * this type holds all information of sinks relevant to the HMI - * @author Christian Mueller - * @created 07-Mar-2012 6:06:15 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 07-Mar-2012 6:06:15 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 07-Mar-2012 6:06:15 PM - */ - struct am_MainSoundProperty_s - { - - public: - /** - * the type of the property - */ - am_MainSoundPropertyType_e type; - /** - * the actual value - */ - int16_t value; - - }; - - /** - * this type holds all information of connections relevant to the HMI - * @author Christian Mueller - * @created 07-Mar-2012 6:06:15 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 07-Mar-2012 6:06:16 PM - */ - struct am_MainConnection_s - { - - public: - /** - * the assigned ID - */ - am_mainConnectionID_t mainConnectionID; - /** - * the current connection state - */ - am_ConnectionState_e connectionState; - /** - * the sinkID - */ - am_sinkID_t sinkID; - /** - * 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 listConnectionID; - - }; - - /** - * This struct describes the attribiutes of a sink - * @author Christian Mueller - * @created 07-Mar-2012 6:06:16 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 listSoundProperties; - /** - * This list holds information about the formats that the Source is capable of - * supporting when delivering audio. - */ - std::vector 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 listMainSoundProperties; - - }; - - /** - * This struct describes the attribiutes of a source - * @author Christian Mueller - * @created 07-Mar-2012 6:06:16 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 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 listSoundProperties; - /** - * This list holds information about the formats that the Source is capable of - * supporting when delivering audio. - */ - std::vector 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 listMainSoundProperties; - - }; - - /** - * This struct describes the attribiutes of a domain - * @author Christian Mueller - * @created 07-Mar-2012 6:06:16 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 07-Mar-2012 6:06:16 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; - - }; - - /** - * data type depends of am_EarlyDataType_e: - * volume_t in case of ED_SOURCE_VOLUME, ED_SINK_VOLUME - * soundProperty_t in case of ED_SOURCE_PROPERTY, ED_SINK_PROPERTY - * @author Christian Mueller - * @created 07-Mar-2012 6:06:16 PM - */ - union am_EarlyData_u - { - - public: - am_volume_t volume; - am_SoundProperty_s soundProperty; - - }; - - /** - * data type depends of am_EarlyDataType_e: - * sourceID in case of ED_SOURCE_VOLUME, ED_SOURCE_PROPERTY - * sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY - * @author Christian Mueller - * @created 07-Mar-2012 6:06:16 PM - */ - union am_DataType_u - { - - public: - am_sinkID_t sink; - am_sourceID_t source; - - }; - - /** - * @author Christian Mueller - * @created 07-Mar-2012 6:06:17 PM - */ - struct am_EarlyData_s - { - - public: - am_EarlyDataType_e type; - am_DataType_u sinksource; - am_EarlyData_u data; - - }; -} -#endif // !defined(EA_F9B4F59D_FED5_44ac_85F2_F9F60549C133__INCLUDED_) diff --git a/exampleCode/player/dbushandler.cpp b/exampleCode/player/dbushandler.cpp deleted file mode 100644 index 1e8cd80..0000000 --- a/exampleCode/player/dbushandler.cpp +++ /dev/null @@ -1,742 +0,0 @@ -/** - * Copyright (C) 2012, BMW AG - * - * - * \copyright - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2 - * of the License. - - * 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 General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * - * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012 - * - * - */ -#include "dbushandler.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DBusMessage* DbusHandler::msg; -DBusMessageIter DbusHandler::args; -DBusConnection* DbusHandler::conn; -DBusError DbusHandler::err; -DBusPendingCall* DbusHandler::pending; -gboolean DbusHandler:: ret; -dbus_uint16_t DbusHandler::result; -GMainLoop* DbusHandler::mainloop; - -DbusHandler::DbusHandler() -{ - dbus_error_init(&err); - conn = dbus_bus_get(DBUS_BUS_SESSION, &err); - if (!conn) - printf("did not get connection error %s", err.message); - pthread_t thread1; - int threadid; - threadid = pthread_create(&thread1,NULL,DbusHandler::Initialize,(void*)this); -} - - DBusHandlerResult DbusHandler::signal_filter(DBusConnection *c, DBusMessage *message, void *user_data) -{ - fprintf(stderr,"entered into signal_filter\n"); - - // s_userdata * tempUserdata=static_cast(user_data); - // GMainLoop *loop = tempUserdata->Tempmainloop; - DbusHandler * tempHandler=static_cast(user_data); - DBusMessageIter args,args1; - dbus_uint16_t sink; - - - fprintf(stderr,"received: member %s\n",dbus_message_get_member(message)); - - if (dbus_message_is_signal(message, "org.genivi.audiomanager", "VolumeChanged")) - { - dbus_int16_t Vol; - fprintf(stderr,"Message customized received\n"); - if (!dbus_message_iter_init(message, &args)) - fprintf(stderr, "VolumeChanged :Message Has No Parameters\n"); - else - dbus_message_iter_get_basic(&args, &sink); - if (!dbus_message_iter_next(&args)) - fprintf(stderr, "VolumeChanged :Message has too few arguments!\n"); - else - dbus_message_iter_get_basic(&args, &Vol); - emit tempHandler->Volumechanged(sink,Vol); - fprintf(stderr,"Got Signal with value %d ,%d\n", sink, Vol); - return DBUS_HANDLER_RESULT_HANDLED; - } - - if (dbus_message_is_signal(message, "org.genivi.audiomanager", "NumberOfMainConnectionsChanged")) - { - - fprintf(stderr,"Message customized received\n"); - emit tempHandler->NumberOfConnectionsChanged(); - return DBUS_HANDLER_RESULT_HANDLED; - } - if (dbus_message_is_signal(message, "org.genivi.audiomanager", "MainConnectionStateChanged")) - { - - fprintf(stderr,"Message customized received\n"); - emit tempHandler->NumberOfConnectionsChanged(); - return DBUS_HANDLER_RESULT_HANDLED; - } - - if (dbus_message_is_signal(message, "org.genivi.audiomanager", "SinkMuteStateChanged")) - {dbus_int16_t mutestate; - fprintf(stderr,"Message customized received\n"); - if (!dbus_message_iter_init(message, &args)) - fprintf(stderr, "SinkMuteStateChanged :Message Has No Parameters\n"); - else - dbus_message_iter_get_basic(&args, &sink); - if (!dbus_message_iter_next(&args)) - fprintf(stderr, "SinkMuteStateChanged :Message has too few arguments!\n"); - else{ - dbus_message_iter_get_basic(&args, &mutestate); - - emit tempHandler->Mutestatechanged(sink,static_cast(mutestate)); - } - return DBUS_HANDLER_RESULT_HANDLED; - } - if (dbus_message_is_signal(message, "org.genivi.audiomanager", "MainSinkSoundPropertyChanged")) - {dbus_int16_t type,value; - if (!dbus_message_iter_init(message, &args)) - fprintf(stderr, "SoundProperychanged :Message Has No Parameters\n"); - else - dbus_message_iter_get_basic(&args, &sink); - if (!dbus_message_iter_next(&args)) - fprintf(stderr, "SoundProperychanged :Message has too few arguments!\n"); - else - if (DBUS_TYPE_STRUCT == dbus_message_iter_get_arg_type(&args)) - { - - dbus_message_iter_recurse(&args, &args1); - dbus_message_iter_get_basic(&args1, &type); - fprintf(stderr, "type :%d\n",type); - dbus_message_iter_next(&args1); - dbus_message_iter_get_basic(&args1, &value); - fprintf(stderr, "value :%d\n",value); - } - fprintf(stderr,"Message customized received\n"); - am_MainSoundProperty_s tempsoundproperty; - tempsoundproperty.type=static_cast(type); - tempsoundproperty.value=value; - emit tempHandler->SoundpropertyChanged(sink,tempsoundproperty); - return DBUS_HANDLER_RESULT_HANDLED; - } - - - const char* interface = dbus_message_get_interface(message); - const char* member = dbus_message_get_member(message); - const char* path = dbus_message_get_path(message); - fprintf(stderr,"path %s\n",path); - - if (strcmp(member,"asyncSetSourceState")==0) - { - uint16_t sourceID=0, handle=0; - int16_t state=0; - if (!dbus_message_iter_init(message, &args)) - fprintf(stderr, "asyncSetSourceState :Message Has No Parameters\n"); - else - dbus_message_iter_get_basic(&args, &handle); - if (!dbus_message_iter_next(&args)) - fprintf(stderr, "asyncSetSourceState :Message has too few arguments!\n"); - else - dbus_message_iter_get_basic(&args, &sourceID); - if (!dbus_message_iter_next(&args)) - fprintf(stderr, "asyncSetSourceState :Message has too few arguments!\n"); - else - dbus_message_iter_get_basic(&args, &state); - - emit tempHandler->SourceActivity(static_cast(sourceID),static_cast(state)); - } - return DBUS_HANDLER_RESULT_HANDLED; - } - -void* DbusHandler::Initialize(void * userdata) -{ - // DbusHandler * abc =static_cast(userdata); - static DBusObjectPathVTable vtable_root; - vtable_root.message_function = signal_filter; - mainloop = g_main_loop_new(NULL, FALSE); - dbus_connection_setup_with_g_main (conn, NULL); - dbus_bus_add_match(conn, "type='signal',interface='org.genivi.audiomanager'", &err); - dbus_bus_add_match(conn, "sender='org.genivi.audiomanager',member='asyncSetSourceState'", &err); - if (dbus_error_is_set(&err)) - { - printf("Match Error (%s)\n", err.message); - exit(1); - } - - ret = dbus_connection_add_filter(conn,signal_filter,userdata, NULL); - if (!ret) - { - fprintf(stderr,"dbus_connection_add_filter failed"); - } - - dbus_connection_flush(conn); - if (dbus_error_is_set(&err)) - { - printf("Problem to flush (%s)\n", err.message); - exit(1); - } - - fprintf(stderr,"Match rule sent\n"); - - g_main_loop_run (mainloop); -} -//------------------------------------------------------------------------- -int DbusHandler::Sender() -{ - if (NULL == msg) - { - fprintf(stderr, "Message Null\n"); - exit(1); - } - //sleep(1); - - if (!dbus_connection_send_with_reply(conn, msg, &pending, -1)) - { - fprintf(stderr, "Sender: Out Of Memory!\n"); - exit(1); - } - if (NULL == pending) - { - fprintf(stderr, "Pending Call Null\n"); - exit(1); - } - dbus_connection_flush(conn); - printf("Request Sent\n"); - - dbus_message_unref(msg); - - dbus_pending_call_block(pending); - - msg = dbus_pending_call_steal_reply(pending); - if (NULL == msg) - { - fprintf(stderr, "Reply Null\n"); - exit(1); - } - return 0; -} -//--------------------------------------------------------------------- -int DbusHandler::Sender_forlists() -{ - if (NULL == msg) - { - fprintf(stderr, "Message Null\n"); - exit(1); - } - sleep(1); - - if (!dbus_connection_send_with_reply(conn, msg, &pending, -1)) - { - fprintf(stderr, "Sender: Out Of Memory!\n"); - exit(1); - } - if (NULL == pending) - { - fprintf(stderr, "Pending Call Null\n"); - exit(1); - } - dbus_connection_flush(conn); - printf("Request Sent\n"); - - dbus_message_unref(msg); - - dbus_pending_call_block(pending); - - msg = dbus_pending_call_steal_reply(pending); - if (NULL == msg) - { - fprintf(stderr, "Reply Null\n"); - exit(1); - } - return 0; -} - -//---------------------------------------------------------------- -am_Error_e DbusHandler::connect(am_sourceID_t SourceID,am_sinkID_t SinkID ,am_connectionID_t &ConnectionID) -{ - msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "Connect"); - - dbus_message_iter_init_append(msg, &args); - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &SourceID)) - { - fprintf(stderr, "in Connect 1st Arg Out Of Memory!\n"); - exit(1); - } - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &SinkID)) - { - fprintf(stderr, "in Connect 2nd Arg Out Of Memory!\n"); - exit(1); - } - Sender(); - dbus_pending_call_unref(pending); - DBusMessageIter iter1 ; - - - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved %c",dbus_message_iter_get_arg_type(&iter1)); - exit(1); - } - dbus_message_iter_get_basic(&iter1, &result); - fprintf(stderr,"Got result ,%d\n", result); - dbus_message_iter_next(&iter1); - if (DBUS_TYPE_UINT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved %c",dbus_message_iter_get_arg_type(&iter1)); - exit(1); - } - dbus_message_iter_get_basic(&iter1, &ConnectionID); - fprintf(stderr,"Got result ,%d\n", ConnectionID); -return static_cast (result); -} - -////------------------------------------------------------------------------------------ -am_Error_e DbusHandler::disconnect(unsigned int ConnectionID) -{ - msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "Disconnect"); - dbus_message_iter_init_append(msg, &args); - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &ConnectionID)) - { - fprintf(stderr, "Out Of Memory!\n"); - exit(1); - } - cout<<"Attempting to send"<(result); -} -////---------------------------------------------------------------------------- -am_Error_e DbusHandler:: SetVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) -{ - msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "SetVolume"); - dbus_message_iter_init_append(msg, &args); - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &sinkID)) - { - fprintf(stderr, "Out Of Memory!\n"); - exit(1); - } - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_INT16, &volume)) - { - fprintf(stderr, "Out Of Memory!\n"); - exit(1); - } - - Sender(); - dbus_pending_call_unref(pending); - DBusMessageIter iter1 ; - - - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { - printf("Incorrect value recieved %c",dbus_message_iter_get_arg_type(&iter1)); - - exit(1); - } - dbus_message_iter_get_basic(&iter1, &result); - fprintf(stderr,"Got result ,%d\n", result); - return static_cast (result); -} -////------------------------------------------------------------------------------------------ - -am_Error_e DbusHandler:: VolumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) -{msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "VolumeStep"); -dbus_message_iter_init_append(msg, &args); -if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &sinkID)) -{ - fprintf(stderr, "Out Of Memory!\n"); - exit(1); -} -if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_INT16, &volumeStep)) -{ - fprintf(stderr, "Out Of Memory!\n"); - exit(1); -} - -Sender(); -dbus_pending_call_unref(pending); -DBusMessageIter iter1 ; - - -if (!dbus_message_iter_init(msg, &iter1)) -fprintf(stderr, "Message Has No Parameters\n"); -if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) -{ printf("Incorrect value recieved %c",dbus_message_iter_get_arg_type(&iter1)); -exit(1); -} -dbus_message_iter_get_basic(&iter1, &result); -fprintf(stderr,"Got result ,%d\n", result); -return static_cast (result); - -} -////----------------------------------------------------------------------------------------- -am_Error_e DbusHandler:: SetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) -{ - msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "SetSinkMuteState"); - dbus_message_iter_init_append(msg, &args); - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &sinkID)) - { - fprintf(stderr, "Out Of Memory!\n"); - exit(1); - } - int temp_mutestate = static_cast(muteState); - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_INT16, &temp_mutestate)) - { - fprintf(stderr, "Out Of Memory!\n"); - exit(1); - } - - Sender(); - dbus_pending_call_unref(pending); - DBusMessageIter iter1 ; - - - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved %c",dbus_message_iter_get_arg_type(&iter1)); - exit(1); - } - dbus_message_iter_get_basic(&iter1, &result); - fprintf(stderr,"Got result ,%d\n", result); - return static_cast (result); - - -} -////--------------------------------------------------------------------------------------------------- -am_Error_e DbusHandler ::SetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s &soundProperty) -{ - msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "SetMainSinkSoundProperty"); - dbus_message_iter_init_append(msg, &args); - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &sinkID)) - { - fprintf(stderr, "Out Of Memory!\n"); - exit(1); - } - DBusMessageIter structIter; - dbus_bool_t success = true; - dbus_message_iter_open_container(&args, DBUS_TYPE_STRUCT, NULL, &structIter); - success = success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &soundProperty.type); - success = success && dbus_message_iter_append_basic(&structIter, DBUS_TYPE_INT16, &soundProperty.value); - success = success && dbus_message_iter_close_container(&args, &structIter); - - Sender(); - dbus_pending_call_unref(pending); - DBusMessageIter iter1 ; - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved %c",dbus_message_iter_get_arg_type(&iter1)); - char * abc; - dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &abc); - printf("Incorrect value recieved %s",abc); - exit(1); - } - dbus_message_iter_get_basic(&iter1, &result); - fprintf(stderr,"Got result ,%d\n", result); - return static_cast (result); - - -} -////---------------------------------------------------------------------------------------------------------------------- -am_Error_e DbusHandler::GetListMainConnections(std::vector &listConnections) -{ - msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "GetListMainConnections"); - Sender(); - dbus_pending_call_unref(pending); - DBusMessageIter subIter,iter1,iter2 ; - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved"); - exit(1); - } - dbus_message_iter_get_basic(&iter1, &result); - fprintf(stderr,"Got result ,%d\n", result); - dbus_message_iter_next(&iter1); - if (DBUS_TYPE_ARRAY== dbus_message_iter_get_arg_type(&iter1)) - { // fprintf(stderr, "a:%d\n", a); - for (dbus_message_iter_recurse(&iter1, &iter2); - dbus_message_iter_get_arg_type(&iter2) != DBUS_TYPE_INVALID; - dbus_message_iter_next(&iter2)) - { - am_MainConnectionType_s* TempConnection= new am_MainConnectionType_s(); - if (DBUS_TYPE_STRUCT == dbus_message_iter_get_arg_type(&iter2)) - { - dbus_message_iter_recurse(&iter2, &subIter); - dbus_uint16_t ConnID,SourceID,SinkID; - dbus_int16_t Timedelay,ConnectionState; - dbus_message_iter_get_basic(&subIter, &ConnID); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &SourceID); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &SinkID); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &Timedelay); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &ConnectionState); - dbus_message_iter_next(&subIter); - - { - TempConnection->mainConnectionID=ConnID; - TempConnection->sourceID=SourceID; - TempConnection->sinkID=SinkID; - TempConnection->delay=Timedelay; - TempConnection->connectionState=static_cast(ConnectionState); - listConnections.push_back(TempConnection); - } - } - - } - } - - - -return static_cast (result); -} -////------------------------------------------------------------Rossini-------------------------------------------------- -am_Error_e DbusHandler::GetListMainSinks(std::vector &listSinks) -{ msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "GetListMainSinks"); - - Sender(); - dbus_pending_call_unref(pending); - DBusMessageIter subIter,iter1,iter2,subsubiter ; - - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved"); - exit(1); - } - dbus_message_iter_get_basic(&iter1, &result); - fprintf(stderr,"Got result ,%d\n", result); - dbus_message_iter_next(&iter1); - if (DBUS_TYPE_ARRAY== dbus_message_iter_get_arg_type(&iter1)) - { // fprintf(stderr, "a:%d\n", a); - for (dbus_message_iter_recurse(&iter1, &iter2); - dbus_message_iter_get_arg_type(&iter2) != DBUS_TYPE_INVALID; - dbus_message_iter_next(&iter2)) - { - am_SinkType_s TempSink; - if (DBUS_TYPE_STRUCT == dbus_message_iter_get_arg_type(&iter2)) - { - dbus_message_iter_recurse(&iter2, &subIter); - dbus_uint16_t SinkID,SinkClassID,availability,availability_reason,volume,mute_state; - char* Sinkname; - dbus_message_iter_get_basic(&subIter, &SinkID); - //fprintf(stderr, "sourceID:%d\n",sourceID); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &Sinkname); - //fprintf(stderr, "name :%s\n",sourcename); - dbus_message_iter_next(&subIter); - if (DBUS_TYPE_STRUCT == dbus_message_iter_get_arg_type(&subIter)) - { - dbus_message_iter_recurse(&subIter, &subsubiter); - dbus_message_iter_get_basic(&subsubiter, &availability); - fprintf(stderr, "availability value:%d\n",availability); - dbus_message_iter_next(&subsubiter); - dbus_message_iter_get_basic(&subsubiter, &availability_reason); - fprintf(stderr, "availability reason value:%d\n",availability_reason); - } - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &volume); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &mute_state); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &SinkClassID); - fprintf(stderr, "muteState value:%d\n",SinkClassID); - fprintf(stderr, "*****************************************\n"); - TempSink.sinkID=SinkID; - TempSink.name=Sinkname; - TempSink.availability.availability=static_cast(availability); - TempSink.availability.availabilityReason=static_cast(availability_reason); - TempSink.sinkClassID=SinkClassID; - TempSink.volume=volume; - TempSink.muteState=static_cast(mute_state); - listSinks.push_back(TempSink); - } - - } - } - return static_cast (result); -} -////------------------------------------------------------------------------------------------------- - -am_Error_e DbusHandler::GetListMainSources(std::vector &listSources) -{ - - msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "GetListMainSources"); - - Sender_forlists(); - dbus_pending_call_unref(pending); - DBusMessageIter subIter,iter1,iter2,subsubiter ; - dbus_bool_t success = true; - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved"); - exit(1); - } - dbus_message_iter_get_basic(&iter1, &result); - fprintf(stderr,"Got result ,%d\n", result); - dbus_message_iter_next(&iter1); - if (DBUS_TYPE_ARRAY== dbus_message_iter_get_arg_type(&iter1)) - { // fprintf(stderr, "a:%d\n", a); - for (dbus_message_iter_recurse(&iter1, &iter2); - dbus_message_iter_get_arg_type(&iter2) != DBUS_TYPE_INVALID; - dbus_message_iter_next(&iter2)) - { - am_SourceType_s TempSource; - - if (DBUS_TYPE_STRUCT == dbus_message_iter_get_arg_type(&iter2)) - { - dbus_message_iter_recurse(&iter2, &subIter); - dbus_uint16_t sourceID,SourceClassID,availability,availability_reason; - char* sourcename; - dbus_message_iter_get_basic(&subIter, &sourceID); - //fprintf(stderr, "sourceID:%d\n",sourceID); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &sourcename); - //fprintf(stderr, "name :%s\n",sourcename); - dbus_message_iter_next(&subIter); - if (DBUS_TYPE_STRUCT == dbus_message_iter_get_arg_type(&subIter)) - { - dbus_message_iter_recurse(&subIter, &subsubiter); - dbus_message_iter_get_basic(&subsubiter, &availability); - fprintf(stderr, "availability value:%d\n",availability); - dbus_message_iter_next(&subsubiter); - dbus_message_iter_get_basic(&subsubiter, &availability_reason); - fprintf(stderr, "availability reason value:%d\n",availability_reason); - } - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &SourceClassID); - fprintf(stderr, "muteState value:%d\n",SourceClassID); - fprintf(stderr, "*****************************************\n"); - TempSource.sourceID=sourceID; - TempSource.name=sourcename; - TempSource.availability.availability=static_cast(availability); - TempSource.availability.availabilityReason=static_cast(availability_reason); - TempSource.sourceClassID=SourceClassID; - listSources.push_back(TempSource); - } - - } - } - return static_cast (result); -} - - -////-------------------------------------------------------------------------------------------------------------------- -am_Error_e DbusHandler::GetListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector &listSoundProperties) -{ msg = dbus_message_new_method_call("org.genivi.audiomanager", // target for the method call - "/org/genivi/audiomanager/CommandInterface", // object to call on - "org.genivi.audiomanager.CommandInterface", // interface to call on - "GetListMainSinkSoundProperties"); - - - dbus_message_iter_init_append(msg, &args); - if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_UINT16, &sinkID)) - { - fprintf(stderr, "GetListMainSinkSoundProperties Out Of Memory!\n"); - exit(1); - } - Sender(); - dbus_pending_call_unref(pending); - DBusMessageIter subIter,iter1,iter2 ; - - if (!dbus_message_iter_init(msg, &iter1)) - fprintf(stderr, "Message Has No Parameters\n"); - if (DBUS_TYPE_INT16!= dbus_message_iter_get_arg_type(&iter1)) - { printf("Incorrect value recieved,%c",dbus_message_iter_get_arg_type(&iter1)); - exit(1); - } - - dbus_message_iter_get_basic(&iter1, &result); - - dbus_message_iter_next(&iter1); - if (DBUS_TYPE_ARRAY== dbus_message_iter_get_arg_type(&iter1)) - { // fprintf(stderr, "a:%d\n", a); - for (dbus_message_iter_recurse(&iter1, &iter2); - dbus_message_iter_get_arg_type(&iter2) != DBUS_TYPE_INVALID; - dbus_message_iter_next(&iter2)) - {am_MainSoundProperty_s* SoundProperty= new am_MainSoundProperty_s(); - - if (DBUS_TYPE_STRUCT == dbus_message_iter_get_arg_type(&iter2)) - { - dbus_message_iter_recurse(&iter2, &subIter); - dbus_uint16_t Type,Value; - dbus_message_iter_get_basic(&subIter, &Type); - //fprintf(stderr, "sourceID:%d\n",sourceID); - dbus_message_iter_next(&subIter); - dbus_message_iter_get_basic(&subIter, &Value); - SoundProperty->type=static_cast(Type); - SoundProperty->value=Value; - listSoundProperties.push_back(SoundProperty); - } - - } - } - return static_cast (result); - -} - diff --git a/exampleCode/player/dbushandler.h b/exampleCode/player/dbushandler.h deleted file mode 100644 index 884f8c1..0000000 --- a/exampleCode/player/dbushandler.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef DBUSHANDLER_H -#define DBUSHANDLER_H - -/** - * Copyright (C) 2012, BMW AG - * - * - * \copyright - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, version 2 - * of the License. - - * 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 General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * - * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012 - * \author Sruthi Mohan - * - * - */ - -/** - * This is the Class that handles dbus message message communication. - * This is implemented using glib-dbus-c binding - * @author Sruthi Mohan - * @version 1.0 - * @created 10-Feb-2012 1:31:06 PM - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "audiomanagertypes.h" -#include -#include -#include -#include - -#define SERVICE_NAME "org.genivi.audiomanager" -#define PATH_NAME "/org/genivi/audiomanager/CommandInterface" -#define INTERFACENAME "org.genivi.audiomanager.CommandInterface" - -using namespace std; -using namespace am; -class AudiomanagerHMIController; - -class DbusHandler : public QObject -{ - Q_OBJECT -public: - explicit DbusHandler(); -signals: - void NumberOfConnectionsChanged(); - void Volumechanged(am_sinkID_t,am_volume_t); - void SoundpropertyChanged(am_sinkID_t,am_MainSoundProperty_s); - void Mutestatechanged(am_sinkID_t,am_MuteState_e); - void SourceActivity(am_sourceID_t source,am_SourceState_e state); -public slots: - static void* Initialize(void*); - int Sender(); - int Sender_forlists(); - am_Error_e connect(am_sourceID_t SourceID,am_sinkID_t SinkID ,am_connectionID_t &ConnectionID); - am_Error_e disconnect(unsigned int ConnectionID); - am_Error_e SetVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) ; - am_Error_e VolumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) ; - am_Error_e SetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) ; - am_Error_e SetMainSinkSoundProperty( const am_sinkID_t sinkID,const am_MainSoundProperty_s& soundProperty) ; - am_Error_e GetListMainConnections(std::vector& listConnections) ; - am_Error_e GetListMainSinks(std::vector& listSinks) ; - am_Error_e GetListMainSources(std::vector& listSources) ; - am_Error_e GetListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector& listSoundProperties) ; - static DBusHandlerResult signal_filter(DBusConnection *c, DBusMessage *message, void *user_data); - -private: - static DBusMessage* msg; - static DBusMessageIter args; - static DBusConnection* conn; - static DBusError err; - static DBusPendingCall* pending; - static gboolean ret; - static dbus_uint16_t result; - static GMainLoop* mainloop; -}; -struct s_userdata -{ - GMainLoop* Tempmainloop; - DbusHandler *ptrDbusHanndler; -}; - -#endif // DBUSHANDLER_H diff --git a/exampleCode/player/images/screen.png b/exampleCode/player/images/screen.png deleted file mode 100644 index a15df92..0000000 Binary files a/exampleCode/player/images/screen.png and /dev/null differ diff --git a/exampleCode/player/main.cpp b/exampleCode/player/main.cpp deleted file mode 100644 index 20cc021..0000000 --- a/exampleCode/player/main.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the demonstration applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** GNU General Public License Usage -** This file is licensed under GPL v2. -** -** -** $QT_END_LICENSE$ -** -***************************************************************************/ - -#include -#include "mediaplayer.h" -#include "dbushandler.h" -#include "audiomanagerinteractor.h" - -const qreal DefaultVolume = -1.0; - -int main (int argc, char *argv[]) -{ - Q_INIT_RESOURCE(mediaplayer); - QApplication app(argc, argv); - - QStringList args = app.arguments(); - app.setApplicationName(args.at(1)); - std::string appName=args.at(1).toStdString(); - std::string targetName=args.at(2).toStdString(); - - app.setOrganizationName("Genivi"); - app.setQuitOnLastWindowClosed(true); - - QString fileName; - qreal volume = DefaultVolume; - bool smallScreen = false; -#ifdef Q_OS_SYMBIAN - smallScreen = true; -#endif - - am_sourceID_t mySourceID=0; - am_sinkID_t targetSinkID=0; - - DbusHandler dbusHandler; - - //first we need to find out our sourceID - std::vector listSources; - std::vector listSinks; - dbusHandler.GetListMainSources(listSources); - dbusHandler.GetListMainSinks(listSinks); - - std::vector::iterator sourceIter(listSources.begin()); - for (;sourceIter!=listSources.end();++sourceIter) - { - if (sourceIter->name.compare(appName)==0) - mySourceID=sourceIter->sourceID; - } - - std::vector::iterator sinkIter(listSinks.begin()); - for (;sinkIter!=listSinks.end();++sinkIter) - { - - if (sinkIter->name.compare(targetName)==0) - targetSinkID=sinkIter->sinkID; - } - - std::cout<< "SourceID "<setupUi(this); -} - -MainWindow::~MainWindow() -{ - delete ui; -} diff --git a/exampleCode/player/mainwindow.h b/exampleCode/player/mainwindow.h deleted file mode 100755 index dc809f8..0000000 --- a/exampleCode/player/mainwindow.h +++ /dev/null @@ -1,23 +0,0 @@ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include - -namespace Ui { -class MainWindow; -} - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - explicit MainWindow(QWidget *parent = 0); - ~MainWindow(); - -private: - Ui::MainWindow *ui; -}; - -#endif // MAINWINDOW_H diff --git a/exampleCode/player/mainwindow.ui b/exampleCode/player/mainwindow.ui deleted file mode 100755 index 6050363..0000000 --- a/exampleCode/player/mainwindow.ui +++ /dev/null @@ -1,24 +0,0 @@ - - MainWindow - - - - 0 - 0 - 400 - 300 - - - - MainWindow - - - - - - - - - - - diff --git a/exampleCode/player/mediaplayer.cpp b/exampleCode/player/mediaplayer.cpp deleted file mode 100644 index 1939585..0000000 --- a/exampleCode/player/mediaplayer.cpp +++ /dev/null @@ -1,970 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the demonstration applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** GNU General Public License Usage -** This file is licensed under GPL v2. -** -** -** $QT_END_LICENSE$ -** -***************************************************************************/ - -#include - -#define SLIDER_RANGE 8 - -#include "mediaplayer.h" -#include "ui_settings.h" - -#ifdef Q_OS_SYMBIAN -#include -#include -#include -#endif - -MediaVideoWidget::MediaVideoWidget(MediaPlayer *player, QWidget *parent) : - Phonon::VideoWidget(parent), m_player(player), m_action(this) -{ - m_action.setCheckable(true); - m_action.setChecked(false); - m_action.setShortcut(QKeySequence( Qt::AltModifier + Qt::Key_Return)); - m_action.setShortcutContext(Qt::WindowShortcut); - connect(&m_action, SIGNAL(toggled(bool)), SLOT(setFullScreen(bool))); - addAction(&m_action); - setAcceptDrops(true); -} - -void MediaVideoWidget::setFullScreen(bool enabled) -{ - Phonon::VideoWidget::setFullScreen(enabled); - emit fullScreenChanged(enabled); -} - -void MediaVideoWidget::mouseDoubleClickEvent(QMouseEvent *e) -{ - Phonon::VideoWidget::mouseDoubleClickEvent(e); - setFullScreen(!isFullScreen()); -} - -void MediaVideoWidget::keyPressEvent(QKeyEvent *e) -{ - if(!e->modifiers()) { - // On non-QWERTY Symbian key-based devices, there is no space key. - // The zero key typically is marked with a space character. - if (e->key() == Qt::Key_Space || e->key() == Qt::Key_0) { - //m_player->playPause(); - e->accept(); - return; - } - - // On Symbian devices, there is no key which maps to Qt::Key_Escape - // On devices which lack a backspace key (i.e. non-QWERTY devices), - // the 'C' key maps to Qt::Key_Backspace - else if (e->key() == Qt::Key_Escape || e->key() == Qt::Key_Backspace) { - setFullScreen(false); - e->accept(); - return; - } - } - Phonon::VideoWidget::keyPressEvent(e); -} - -bool MediaVideoWidget::event(QEvent *e) -{ - switch(e->type()) - { - case QEvent::Close: - //we just ignore the cose events on the video widget - //this prevents ALT+F4 from having an effect in fullscreen mode - e->ignore(); - return true; - case QEvent::MouseMove: -#ifndef QT_NO_CURSOR - unsetCursor(); -#endif - //fall through - case QEvent::WindowStateChange: - { - //we just update the state of the checkbox, in case it wasn't already - m_action.setChecked(windowState() & Qt::WindowFullScreen); - const Qt::WindowFlags flags = m_player->windowFlags(); - if (windowState() & Qt::WindowFullScreen) { - m_timer.start(1000, this); - } else { - m_timer.stop(); -#ifndef QT_NO_CURSOR - unsetCursor(); -#endif - } - } - break; - default: - break; - } - - return Phonon::VideoWidget::event(e); -} - -void MediaVideoWidget::timerEvent(QTimerEvent *e) -{ - if (e->timerId() == m_timer.timerId()) { - //let's store the cursor shape -#ifndef QT_NO_CURSOR - setCursor(Qt::BlankCursor); -#endif - } - Phonon::VideoWidget::timerEvent(e); -} - -void MediaVideoWidget::dropEvent(QDropEvent *e) -{ - m_player->handleDrop(e); -} - -void MediaVideoWidget::dragEnterEvent(QDragEnterEvent *e) { - if (e->mimeData()->hasUrls()) - e->acceptProposedAction(); -} - - -MediaPlayer::MediaPlayer(QString AppName) : - playButton(0), nextEffect(0), settingsDialog(0), ui(0), - m_AudioOutput(Phonon::VideoCategory), - m_videoWidget(new MediaVideoWidget(this)) -{ - setWindowTitle(AppName); - setContextMenuPolicy(Qt::CustomContextMenu); - m_videoWidget->setContextMenuPolicy(Qt::CustomContextMenu); - - QSize buttonSize(34, 28); - - QPushButton *openButton = new QPushButton(this); - - openButton->setIcon(style()->standardIcon(QStyle::SP_DialogOpenButton)); - QPalette bpal; - QColor arrowcolor = bpal.buttonText().color(); - if (arrowcolor == Qt::black) - arrowcolor = QColor(80, 80, 80); - bpal.setBrush(QPalette::ButtonText, arrowcolor); - openButton->setPalette(bpal); - - rewindButton = new QPushButton(this); - rewindButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward)); - - forwardButton = new QPushButton(this); - forwardButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipForward)); - forwardButton->setEnabled(false); - - playButton = new QPushButton(this); - playIcon = style()->standardIcon(QStyle::SP_MediaPlay); - pauseIcon = style()->standardIcon(QStyle::SP_MediaPause); - playButton->setIcon(playIcon); - - slider = new Phonon::SeekSlider(this); - slider->setMediaObject(&m_MediaObject); - volume = new Phonon::VolumeSlider(&m_AudioOutput); - - QVBoxLayout *vLayout = new QVBoxLayout(this); - vLayout->setContentsMargins(8, 8, 8, 8); - - QHBoxLayout *layout = new QHBoxLayout(); - - info = new QLabel(this); - info->setMinimumHeight(70); - info->setAcceptDrops(false); - info->setMargin(2); - info->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); - info->setLineWidth(2); - info->setAutoFillBackground(true); - - QPalette palette; - palette.setBrush(QPalette::WindowText, Qt::white); -#ifndef Q_WS_MAC - openButton->setMinimumSize(54, buttonSize.height()); - rewindButton->setMinimumSize(buttonSize); - forwardButton->setMinimumSize(buttonSize); - playButton->setMinimumSize(buttonSize); -#endif - info->setStyleSheet("border-image:url(:/images/screen.png) ; border-width:3px"); - info->setPalette(palette); - info->setText(tr("
    No media
    ")); - - volume->setFixedWidth(120); - - layout->addWidget(openButton); - layout->addWidget(rewindButton); - layout->addWidget(playButton); - layout->addWidget(forwardButton); - - layout->addStretch(); - layout->addWidget(volume); - - vLayout->addWidget(info); - initVideoWindow(); - vLayout->addWidget(&m_videoWindow); - QVBoxLayout *buttonPanelLayout = new QVBoxLayout(); - m_videoWindow.hide(); - buttonPanelLayout->addLayout(layout); - - timeLabel = new QLabel(this); - progressLabel = new QLabel(this); - QWidget *sliderPanel = new QWidget(this); - QHBoxLayout *sliderLayout = new QHBoxLayout(); - sliderLayout->addWidget(slider); - sliderLayout->addWidget(timeLabel); - sliderLayout->addWidget(progressLabel); - sliderLayout->setContentsMargins(0, 0, 0, 0); - sliderPanel->setLayout(sliderLayout); - - buttonPanelLayout->addWidget(sliderPanel); - buttonPanelLayout->setContentsMargins(0, 0, 0, 0); -#ifdef Q_OS_MAC - layout->setSpacing(4); - buttonPanelLayout->setSpacing(0); - info->setMinimumHeight(100); - info->setFont(QFont("verdana", 15)); - // QStyle *flatButtonStyle = new QWindowsStyle; - openButton->setFocusPolicy(Qt::NoFocus); - // openButton->setStyle(flatButtonStyle); - // playButton->setStyle(flatButtonStyle); - // rewindButton->setStyle(flatButtonStyle); - // forwardButton->setStyle(flatButtonStyle); - #endif - QWidget *buttonPanelWidget = new QWidget(this); - buttonPanelWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - buttonPanelWidget->setLayout(buttonPanelLayout); - vLayout->addWidget(buttonPanelWidget); - - QHBoxLayout *labelLayout = new QHBoxLayout(); - - vLayout->addLayout(labelLayout); - setLayout(vLayout); - - // Create menu bar: - fileMenu = new QMenu(this); - QAction *openFileAction = fileMenu->addAction(tr("Open &File...")); - QAction *openUrlAction = fileMenu->addAction(tr("Open &Location...")); -#ifdef Q_OS_SYMBIAN - QAction *selectIAPAction = fileMenu->addAction(tr("Select &IAP...")); - connect(selectIAPAction, SIGNAL(triggered(bool)), this, SLOT(selectIAP())); -#endif - QAction *const openLinkAction = fileMenu->addAction(tr("Open &RAM File...")); - - connect(openLinkAction, SIGNAL(triggered(bool)), this, SLOT(openRamFile())); - - fileMenu->addSeparator(); - QMenu *aspectMenu = fileMenu->addMenu(tr("&Aspect ratio")); - QActionGroup *aspectGroup = new QActionGroup(aspectMenu); - connect(aspectGroup, SIGNAL(triggered(QAction*)), this, SLOT(aspectChanged(QAction*))); - aspectGroup->setExclusive(true); - QAction *aspectActionAuto = aspectMenu->addAction(tr("Auto")); - aspectActionAuto->setCheckable(true); - aspectActionAuto->setChecked(true); - aspectGroup->addAction(aspectActionAuto); - QAction *aspectActionScale = aspectMenu->addAction(tr("Scale")); - aspectActionScale->setCheckable(true); - aspectGroup->addAction(aspectActionScale); - QAction *aspectAction16_9 = aspectMenu->addAction(tr("16/9")); - aspectAction16_9->setCheckable(true); - aspectGroup->addAction(aspectAction16_9); - QAction *aspectAction4_3 = aspectMenu->addAction(tr("4/3")); - aspectAction4_3->setCheckable(true); - aspectGroup->addAction(aspectAction4_3); - - QMenu *scaleMenu = fileMenu->addMenu(tr("&Scale mode")); - QActionGroup *scaleGroup = new QActionGroup(scaleMenu); - connect(scaleGroup, SIGNAL(triggered(QAction*)), this, SLOT(scaleChanged(QAction*))); - scaleGroup->setExclusive(true); - QAction *scaleActionFit = scaleMenu->addAction(tr("Fit in view")); - scaleActionFit->setCheckable(true); - scaleActionFit->setChecked(true); - scaleGroup->addAction(scaleActionFit); - QAction *scaleActionCrop = scaleMenu->addAction(tr("Scale and crop")); - scaleActionCrop->setCheckable(true); - scaleGroup->addAction(scaleActionCrop); - - m_fullScreenAction = fileMenu->addAction(tr("Full screen video")); - m_fullScreenAction->setCheckable(true); - m_fullScreenAction->setEnabled(false); // enabled by hasVideoChanged - bool b = connect(m_fullScreenAction, SIGNAL(toggled(bool)), m_videoWidget, SLOT(setFullScreen(bool))); - Q_ASSERT(b); - b = connect(m_videoWidget, SIGNAL(fullScreenChanged(bool)), m_fullScreenAction, SLOT(setChecked(bool))); - Q_ASSERT(b); - - fileMenu->addSeparator(); - QAction *settingsAction = fileMenu->addAction(tr("&Settings...")); - - // Setup signal connections: - connect(rewindButton, SIGNAL(clicked()), this, SLOT(rewind())); - //connect(openButton, SIGNAL(clicked()), this, SLOT(openFile())); - openButton->setMenu(fileMenu); - - //connect(playButton, SIGNAL(clicked()), this, SLOT(playPause())); - connect(forwardButton, SIGNAL(clicked()), this, SLOT(forward())); - //connect(openButton, SIGNAL(clicked()), this, SLOT(openFile())); - connect(settingsAction, SIGNAL(triggered(bool)), this, SLOT(showSettingsDialog())); - connect(openUrlAction, SIGNAL(triggered(bool)), this, SLOT(openUrl())); - connect(openFileAction, SIGNAL(triggered(bool)), this, SLOT(openFile())); - - connect(m_videoWidget, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); - connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); - connect(&m_MediaObject, SIGNAL(metaDataChanged()), this, SLOT(updateInfo())); - connect(&m_MediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(updateTime())); - connect(&m_MediaObject, SIGNAL(tick(qint64)), this, SLOT(updateTime())); - connect(&m_MediaObject, SIGNAL(finished()), this, SLOT(finished())); - connect(&m_MediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), this, SLOT(stateChanged(Phonon::State,Phonon::State))); - connect(&m_MediaObject, SIGNAL(bufferStatus(int)), this, SLOT(bufferStatus(int))); - connect(&m_MediaObject, SIGNAL(hasVideoChanged(bool)), this, SLOT(hasVideoChanged(bool))); - - rewindButton->setEnabled(false); - playButton->setEnabled(false); - setAcceptDrops(true); - - m_audioOutputPath = Phonon::createPath(&m_MediaObject, &m_AudioOutput); - Phonon::createPath(&m_MediaObject, m_videoWidget); - - resize(minimumSizeHint()); -} - -void MediaPlayer::stateChanged(Phonon::State newstate, Phonon::State oldstate) -{ - Q_UNUSED(oldstate); - - emit this->MediaStateChanged(newstate); - - if (oldstate == Phonon::LoadingState) { - QRect videoHintRect = QRect(QPoint(0, 0), m_videoWindow.sizeHint()); - QRect newVideoRect = QApplication::desktop()->screenGeometry().intersected(videoHintRect); - if (!m_smallScreen) { - if (m_MediaObject.hasVideo()) { - // Flush event que so that sizeHint takes the - // recently shown/hidden m_videoWindow into account: - qApp->processEvents(); - resize(sizeHint()); - } else - resize(minimumSize()); - } - } - - switch (newstate) { - case Phonon::ErrorState: - if (m_MediaObject.errorType() == Phonon::FatalError) { - playButton->setEnabled(false); - rewindButton->setEnabled(false); - } else { - m_MediaObject.pause(); - } - QMessageBox::warning(this, "Phonon Mediaplayer", m_MediaObject.errorString(), QMessageBox::Close); - break; - - case Phonon::StoppedState: - m_videoWidget->setFullScreen(false); - // Fall through - case Phonon::PausedState: - playButton->setIcon(playIcon); - if (m_MediaObject.currentSource().type() != Phonon::MediaSource::Invalid){ - playButton->setEnabled(true); - rewindButton->setEnabled(true); - } else { - playButton->setEnabled(false); - rewindButton->setEnabled(false); - } - break; - case Phonon::PlayingState: - playButton->setEnabled(true); - playButton->setIcon(pauseIcon); - if (m_MediaObject.hasVideo()) - m_videoWindow.show(); - // Fall through - case Phonon::BufferingState: - rewindButton->setEnabled(true); - break; - case Phonon::LoadingState: - rewindButton->setEnabled(false); - break; - } - -} - -void MediaPlayer::initSettingsDialog() -{ - settingsDialog = new QDialog(this); - ui = new Ui_settings(); - ui->setupUi(settingsDialog); - - connect(ui->brightnessSlider, SIGNAL(valueChanged(int)), this, SLOT(setBrightness(int))); - connect(ui->hueSlider, SIGNAL(valueChanged(int)), this, SLOT(setHue(int))); - connect(ui->saturationSlider, SIGNAL(valueChanged(int)), this, SLOT(setSaturation(int))); - connect(ui->contrastSlider , SIGNAL(valueChanged(int)), this, SLOT(setContrast(int))); - connect(ui->aspectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setAspect(int))); - connect(ui->scalemodeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setScale(int))); - - ui->brightnessSlider->setValue(int(m_videoWidget->brightness() * SLIDER_RANGE)); - ui->hueSlider->setValue(int(m_videoWidget->hue() * SLIDER_RANGE)); - ui->saturationSlider->setValue(int(m_videoWidget->saturation() * SLIDER_RANGE)); - ui->contrastSlider->setValue(int(m_videoWidget->contrast() * SLIDER_RANGE)); - ui->aspectCombo->setCurrentIndex(m_videoWidget->aspectRatio()); - ui->scalemodeCombo->setCurrentIndex(m_videoWidget->scaleMode()); - connect(ui->effectButton, SIGNAL(clicked()), this, SLOT(configureEffect())); - -#ifdef Q_WS_X11 - //Cross fading is not currently implemented in the GStreamer backend - ui->crossFadeSlider->setVisible(false); - ui->crossFadeLabel->setVisible(false); - ui->crossFadeLabel1->setVisible(false); - ui->crossFadeLabel2->setVisible(false); - ui->crossFadeLabel3->setVisible(false); -#endif - ui->crossFadeSlider->setValue((int)(2 * m_MediaObject.transitionTime() / 1000.0f)); - - // Insert audio devices: - QList devices = Phonon::BackendCapabilities::availableAudioOutputDevices(); - for (int i=0; ideviceCombo->addItem(itemText); - if (devices[i] == m_AudioOutput.outputDevice()) - ui->deviceCombo->setCurrentIndex(i); - } - - // Insert audio effects: - ui->audioEffectsCombo->addItem(tr("")); - QList currEffects = m_audioOutputPath.effects(); - Phonon::Effect *currEffect = currEffects.size() ? currEffects[0] : 0; - QList availableEffects = Phonon::BackendCapabilities::availableAudioEffects(); - for (int i=0; iaudioEffectsCombo->addItem(availableEffects[i].name()); - if (currEffect && availableEffects[i] == currEffect->description()) - ui->audioEffectsCombo->setCurrentIndex(i+1); - } - connect(ui->audioEffectsCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(effectChanged())); - -} - -void MediaPlayer::setVolume(qreal volume) -{ - m_AudioOutput.setVolume(volume); -} - -void MediaPlayer::setSmallScreen(bool smallScreen) -{ - m_smallScreen = smallScreen; -} - -void MediaPlayer::effectChanged() -{ - int currentIndex = ui->audioEffectsCombo->currentIndex(); - if (currentIndex) { - QList availableEffects = Phonon::BackendCapabilities::availableAudioEffects(); - Phonon::EffectDescription chosenEffect = availableEffects[currentIndex - 1]; - - QList currEffects = m_audioOutputPath.effects(); - Phonon::Effect *currentEffect = currEffects.size() ? currEffects[0] : 0; - - // Deleting the running effect will stop playback, it is deleted when removed from path - if (nextEffect && !(currentEffect && (currentEffect->description().name() == nextEffect->description().name()))) - delete nextEffect; - - nextEffect = new Phonon::Effect(chosenEffect); - } - ui->effectButton->setEnabled(currentIndex); -} - -void MediaPlayer::showSettingsDialog() -{ - const bool hasPausedForDialog = playPauseForDialog(); - - if (!settingsDialog) - initSettingsDialog(); - - float oldBrightness = m_videoWidget->brightness(); - float oldHue = m_videoWidget->hue(); - float oldSaturation = m_videoWidget->saturation(); - float oldContrast = m_videoWidget->contrast(); - Phonon::VideoWidget::AspectRatio oldAspect = m_videoWidget->aspectRatio(); - Phonon::VideoWidget::ScaleMode oldScale = m_videoWidget->scaleMode(); - int currentEffect = ui->audioEffectsCombo->currentIndex(); - settingsDialog->exec(); - - if (settingsDialog->result() == QDialog::Accepted){ - m_MediaObject.setTransitionTime((int)(1000 * float(ui->crossFadeSlider->value()) / 2.0f)); - QList devices = Phonon::BackendCapabilities::availableAudioOutputDevices(); - m_AudioOutput.setOutputDevice(devices[ui->deviceCombo->currentIndex()]); - QList currEffects = m_audioOutputPath.effects(); - QList availableEffects = Phonon::BackendCapabilities::availableAudioEffects(); - - if (ui->audioEffectsCombo->currentIndex() > 0){ - Phonon::Effect *currentEffect = currEffects.size() ? currEffects[0] : 0; - if (!currentEffect || currentEffect->description() != nextEffect->description()){ - foreach(Phonon::Effect *effect, currEffects) { - m_audioOutputPath.removeEffect(effect); - delete effect; - } - m_audioOutputPath.insertEffect(nextEffect); - } - } else { - foreach(Phonon::Effect *effect, currEffects) { - m_audioOutputPath.removeEffect(effect); - delete effect; - nextEffect = 0; - } - } - } else { - // Restore previous settings - m_videoWidget->setBrightness(oldBrightness); - m_videoWidget->setSaturation(oldSaturation); - m_videoWidget->setHue(oldHue); - m_videoWidget->setContrast(oldContrast); - m_videoWidget->setAspectRatio(oldAspect); - m_videoWidget->setScaleMode(oldScale); - ui->audioEffectsCombo->setCurrentIndex(currentEffect); - } - - if (hasPausedForDialog) - m_MediaObject.play(); -} - -void MediaPlayer::initVideoWindow() -{ - QVBoxLayout *videoLayout = new QVBoxLayout(); - videoLayout->addWidget(m_videoWidget); - videoLayout->setContentsMargins(0, 0, 0, 0); - m_videoWindow.setLayout(videoLayout); - m_videoWindow.setMinimumSize(100, 100); -} - - -void MediaPlayer::configureEffect() -{ - if (!nextEffect) - return; - - - QList currEffects = m_audioOutputPath.effects(); - const QList availableEffects = Phonon::BackendCapabilities::availableAudioEffects(); - if (ui->audioEffectsCombo->currentIndex() > 0) { - Phonon::EffectDescription chosenEffect = availableEffects[ui->audioEffectsCombo->currentIndex() - 1]; - - QDialog effectDialog; - effectDialog.setWindowTitle(tr("Configure effect")); - QVBoxLayout *topLayout = new QVBoxLayout(&effectDialog); - - QLabel *description = new QLabel("Description:
    " + chosenEffect.description(), &effectDialog); - description->setWordWrap(true); - topLayout->addWidget(description); - - QScrollArea *scrollArea = new QScrollArea(&effectDialog); - topLayout->addWidget(scrollArea); - - QVariantList savedParamValues; - foreach(Phonon::EffectParameter param, nextEffect->parameters()) { - savedParamValues << nextEffect->parameterValue(param); - } - - QWidget *scrollWidget = new Phonon::EffectWidget(nextEffect); - scrollWidget->setMinimumWidth(320); - scrollWidget->setContentsMargins(10, 10, 10,10); - scrollArea->setWidget(scrollWidget); - - QDialogButtonBox *bbox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, &effectDialog); - connect(bbox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), &effectDialog, SLOT(accept())); - connect(bbox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), &effectDialog, SLOT(reject())); - topLayout->addWidget(bbox); - - effectDialog.exec(); - - if (effectDialog.result() != QDialog::Accepted) { - //we need to restore the parameters values - int currentIndex = 0; - foreach(Phonon::EffectParameter param, nextEffect->parameters()) { - nextEffect->setParameterValue(param, savedParamValues.at(currentIndex++)); - } - - } - } -} - -void MediaPlayer::handleDrop(QDropEvent *e) -{ - QList urls = e->mimeData()->urls(); - if (e->proposedAction() == Qt::MoveAction){ - // Just add to the queue: - for (int i=0; i 0) { - QString fileName = urls[0].toLocalFile(); - QDir dir(fileName); - if (dir.exists()) { - dir.setFilter(QDir::Files); - QStringList entries = dir.entryList(); - if (entries.size() > 0) { - setFile(fileName + QDir::separator() + entries[0]); - for (int i=1; i< entries.size(); ++i) - m_MediaObject.enqueue(fileName + QDir::separator() + entries[i]); - } - } else { - setFile(fileName); - for (int i=1; isetEnabled(m_MediaObject.queue().size() > 0); - m_MediaObject.play(); -} - -void MediaPlayer::dropEvent(QDropEvent *e) -{ - if (e->mimeData()->hasUrls() && e->proposedAction() != Qt::LinkAction) { - e->acceptProposedAction(); - handleDrop(e); - } else { - e->ignore(); - } -} - -void MediaPlayer::dragEnterEvent(QDragEnterEvent *e) -{ - dragMoveEvent(e); -} - -void MediaPlayer::dragMoveEvent(QDragMoveEvent *e) -{ - if (e->mimeData()->hasUrls()) { - if (e->proposedAction() == Qt::CopyAction || e->proposedAction() == Qt::MoveAction){ - e->acceptProposedAction(); - } - } -} - -void MediaPlayer::play() -{ - m_MediaObject.play(); -} - -void MediaPlayer::stop() -{ - m_MediaObject.pause(); -} - -void MediaPlayer::setFile(const QString &fileName) -{ - //setWindowTitle(fileName.right(fileName.length() - fileName.lastIndexOf('/') - 1)); - m_MediaObject.setCurrentSource(Phonon::MediaSource(fileName)); -} - -void MediaPlayer::setLocation(const QString& location) -{ - //setWindowTitle(location.right(location.length() - location.lastIndexOf('/') - 1)); - m_MediaObject.setCurrentSource(Phonon::MediaSource(QUrl::fromEncoded(location.toUtf8()))); - //m_MediaObject.play(); -} - -bool MediaPlayer::playPauseForDialog() -{ - // If we're running on a small screen, we want to pause the video when - // popping up dialogs. We neither want to tamper with the state if the - // user has paused. - if (m_smallScreen && m_MediaObject.hasVideo()) { - if (Phonon::PlayingState == m_MediaObject.state()) { - m_MediaObject.pause(); - return true; - } - } - return false; -} - -void MediaPlayer::openFile() -{ - const bool hasPausedForDialog = playPauseForDialog(); - - QStringList fileNames = QFileDialog::getOpenFileNames(this, QString(), - QDesktopServices::storageLocation(QDesktopServices::MusicLocation)); - - if (hasPausedForDialog) - m_MediaObject.play(); - - m_MediaObject.clearQueue(); - if (fileNames.size() > 0) { - QString fileName = fileNames[0]; - setFile(fileName); - for (int i=1; isetEnabled(m_MediaObject.queue().size() > 0); -} - -void MediaPlayer::bufferStatus(int percent) -{ - if (percent == 100) - progressLabel->setText(QString()); - else { - QString str = QString::fromLatin1("(%1%)").arg(percent); - progressLabel->setText(str); - } -} - -void MediaPlayer::setSaturation(int val) -{ - m_videoWidget->setSaturation(val / qreal(SLIDER_RANGE)); -} - -void MediaPlayer::setHue(int val) -{ - m_videoWidget->setHue(val / qreal(SLIDER_RANGE)); -} - -void MediaPlayer::setAspect(int val) -{ - m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio(val)); -} - -void MediaPlayer::setScale(int val) -{ - m_videoWidget->setScaleMode(Phonon::VideoWidget::ScaleMode(val)); -} - -void MediaPlayer::setBrightness(int val) -{ - m_videoWidget->setBrightness(val / qreal(SLIDER_RANGE)); -} - -void MediaPlayer::setContrast(int val) -{ - m_videoWidget->setContrast(val / qreal(SLIDER_RANGE)); -} - -void MediaPlayer::updateInfo() -{ - int maxLength = 30; - QString font = ""; - QString fontmono = ""; - - QMap metaData = m_MediaObject.metaData(); - QString trackArtist = metaData.value("ARTIST"); - if (trackArtist.length() > maxLength) - trackArtist = trackArtist.left(maxLength) + "..."; - - QString trackTitle = metaData.value("TITLE"); - int trackBitrate = metaData.value("BITRATE").toInt(); - - QString fileName; - if (m_MediaObject.currentSource().type() == Phonon::MediaSource::Url) { - fileName = m_MediaObject.currentSource().url().toString(); - } else { - fileName = m_MediaObject.currentSource().fileName(); - fileName = fileName.right(fileName.length() - fileName.lastIndexOf('/') - 1); - if (fileName.length() > maxLength) - fileName = fileName.left(maxLength) + "..."; - } - - QString title; - if (!trackTitle.isEmpty()) { - if (trackTitle.length() > maxLength) - trackTitle = trackTitle.left(maxLength) + "..."; - title = "Title: " + font + trackTitle + "
    "; - } else if (!fileName.isEmpty()) { - if (fileName.length() > maxLength) - fileName = fileName.left(maxLength) + "..."; - title = font + fileName + "
    "; - if (m_MediaObject.currentSource().type() == Phonon::MediaSource::Url) { - title.prepend("Url: "); - } else { - title.prepend("File: "); - } - } - - QString artist; - if (!trackArtist.isEmpty()) - artist = "Artist: " + font + trackArtist + ""; - - QString bitrate; - if (trackBitrate != 0) - bitrate = "
    Bitrate: " + font + QString::number(trackBitrate/1000) + "kbit"; - - info->setText(title + artist + bitrate); -} - -void MediaPlayer::updateTime() -{ - long len = m_MediaObject.totalTime(); - long pos = m_MediaObject.currentTime(); - QString timeString; - if (pos || len) - { - int sec = pos/1000; - int min = sec/60; - int hour = min/60; - int msec = pos; - - QTime playTime(hour%60, min%60, sec%60, msec%1000); - sec = len / 1000; - min = sec / 60; - hour = min / 60; - msec = len; - - QTime stopTime(hour%60, min%60, sec%60, msec%1000); - QString timeFormat = "m:ss"; - if (hour > 0) - timeFormat = "h:mm:ss"; - timeString = playTime.toString(timeFormat); - if (len) - timeString += " / " + stopTime.toString(timeFormat); - } - timeLabel->setText(timeString); -} - -void MediaPlayer::rewind() -{ - m_MediaObject.seek(0); -} - -void MediaPlayer::forward() -{ - QList queue = m_MediaObject.queue(); - if (queue.size() > 0) { - m_MediaObject.setCurrentSource(queue[0]); - forwardButton->setEnabled(queue.size() > 1); - m_MediaObject.play(); - } -} - -void MediaPlayer::openUrl() -{ - QSettings settings; - settings.beginGroup(QLatin1String("BrowserMainWindow")); - QString sourceURL = settings.value("location").toString(); - bool ok = false; - sourceURL = QInputDialog::getText(this, tr("Open Location"), tr("Please enter a valid address here:"), QLineEdit::Normal, sourceURL, &ok); - if (ok && !sourceURL.isEmpty()) { - setLocation(sourceURL); - settings.setValue("location", sourceURL); - } -} - -/*! - \since 4.6 - */ -void MediaPlayer::openRamFile() -{ - QSettings settings; - settings.beginGroup(QLatin1String("BrowserMainWindow")); - - const QStringList fileNameList(QFileDialog::getOpenFileNames(this, - QString(), - settings.value("openRamFile").toString(), - QLatin1String("RAM files (*.ram)"))); - - if (fileNameList.isEmpty()) - return; - - QFile linkFile; - QList list; - QByteArray sourceURL; - for (int i = 0; i < fileNameList.count(); i++ ) { - linkFile.setFileName(fileNameList[i]); - if (linkFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - while (!linkFile.atEnd()) { - sourceURL = linkFile.readLine().trimmed(); - if (!sourceURL.isEmpty()) { - const QUrl url(QUrl::fromEncoded(sourceURL)); - if (url.isValid()) - list.append(url); - } - } - linkFile.close(); - } - } - - if (!list.isEmpty()) { - m_MediaObject.clearQueue(); - setLocation(list[0].toString()); - for (int i = 1; i < list.count(); i++) - m_MediaObject.enqueue(Phonon::MediaSource(list[i])); - m_MediaObject.play(); - } - - forwardButton->setEnabled(!m_MediaObject.queue().isEmpty()); - settings.setValue("openRamFile", fileNameList[0]); -} - -void MediaPlayer::finished() -{ -} - -void MediaPlayer::showContextMenu(const QPoint &p) -{ - fileMenu->popup(m_videoWidget->isFullScreen() ? p : mapToGlobal(p)); -} - -void MediaPlayer::scaleChanged(QAction *act) -{ - if (act->text() == tr("Scale and crop")) - m_videoWidget->setScaleMode(Phonon::VideoWidget::ScaleAndCrop); - else - m_videoWidget->setScaleMode(Phonon::VideoWidget::FitInView); -} - -void MediaPlayer::aspectChanged(QAction *act) -{ - if (act->text() == tr("16/9")) - m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio16_9); - else if (act->text() == tr("Scale")) - m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatioWidget); - else if (act->text() == tr("4/3")) - m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio4_3); - else - m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatioAuto); -} - -void MediaPlayer::hasVideoChanged(bool bHasVideo) -{ - info->setVisible(!bHasVideo); - m_videoWindow.setVisible(bHasVideo); - m_fullScreenAction->setEnabled(bHasVideo); -} - -#ifdef Q_OS_SYMBIAN -void MediaPlayer::selectIAP() -{ - TRAPD(err, selectIAPL()); - if (KErrNone != err) - QMessageBox::warning(this, "Phonon Mediaplayer", "Error selecting IAP", QMessageBox::Close); -} - -void MediaPlayer::selectIAPL() -{ - QVariant currentIAPValue = m_MediaObject.property("InternetAccessPointName"); - QString currentIAPString = currentIAPValue.toString(); - bool ok = false; - CCommsDatabase *commsDb = CCommsDatabase::NewL(EDatabaseTypeIAP); - CleanupStack::PushL(commsDb); - commsDb->ShowHiddenRecords(); - CCommsDbTableView* view = commsDb->OpenTableLC(TPtrC(IAP)); - QStringList items; - TInt currentIAP = 0; - for (TInt l = view->GotoFirstRecord(), i = 0; l != KErrNotFound; l = view->GotoNextRecord(), i++) { - TBuf iapName; - view->ReadTextL(TPtrC(COMMDB_NAME), iapName); - QString iapString = QString::fromUtf16(iapName.Ptr(), iapName.Length()); - items << iapString; - if (iapString == currentIAPString) - currentIAP = i; - } - currentIAPString = QInputDialog::getItem(this, tr("Select Access Point"), tr("Select Access Point"), items, currentIAP, false, &ok); - if (ok) - m_MediaObject.setProperty("InternetAccessPointName", currentIAPString); - CleanupStack::PopAndDestroy(2); //commsDB, view -} -#endif diff --git a/exampleCode/player/mediaplayer.h b/exampleCode/player/mediaplayer.h deleted file mode 100644 index 8dd0602..0000000 --- a/exampleCode/player/mediaplayer.h +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the demonstration applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:GPL$ -** GNU General Public License Usage -** This file is licensed under GPL v2. -** -** -** $QT_END_LICENSE$ -** -***************************************************************************/ - -#ifndef MEDIALAYER_H -#define MEDIAPLAYER_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE -class QPushButton; -class QLabel; -class QSlider; -class QTextEdit; -class QMenu; -class Ui_settings; -QT_END_NAMESPACE - -class MediaPlayer; - -class MediaVideoWidget : public Phonon::VideoWidget -{ - Q_OBJECT - -public: - MediaVideoWidget(MediaPlayer *player, QWidget *parent = 0); - -public slots: - // Over-riding non-virtual Phonon::VideoWidget slot - void setFullScreen(bool); - -signals: - void fullScreenChanged(bool); - -protected: - void mouseDoubleClickEvent(QMouseEvent *e); - void keyPressEvent(QKeyEvent *e); - bool event(QEvent *e); - void timerEvent(QTimerEvent *e); - void dropEvent(QDropEvent *e); - void dragEnterEvent(QDragEnterEvent *e); - -private: - MediaPlayer *m_player; - QBasicTimer m_timer; - QAction m_action; -}; - -class MediaPlayer : - public QWidget -{ - Q_OBJECT -public: - MediaPlayer(QString AppName); - - void dragEnterEvent(QDragEnterEvent *e); - void dragMoveEvent(QDragMoveEvent *e); - void dropEvent(QDropEvent *e); - void handleDrop(QDropEvent *e); - void setFile(const QString &text); - void setLocation(const QString &location); - void initVideoWindow(); - void initSettingsDialog(); - void setVolume(qreal volume); - void setSmallScreen(bool smallScreen); - - QPushButton *playButton; - -signals: - void MediaStateChanged(Phonon::State newstate); -public slots: - void openFile(); - void rewind(); - void forward(); - void updateInfo(); - void updateTime(); - void finished(); - void play(); - void stop(); - void scaleChanged(QAction *); - void aspectChanged(QAction *); - -private slots: - void setAspect(int); - void setScale(int); - void setSaturation(int); - void setContrast(int); - void setHue(int); - void setBrightness(int); - void stateChanged(Phonon::State newstate, Phonon::State oldstate); - void effectChanged(); - void showSettingsDialog(); - void showContextMenu(const QPoint& point); - void bufferStatus(int percent); - void openUrl(); -#ifdef Q_OS_SYMBIAN - void selectIAP(); -#endif - void openRamFile(); - void configureEffect(); - void hasVideoChanged(bool); - -private: - bool playPauseForDialog(); -#ifdef Q_OS_SYMBIAN - void selectIAPL(); -#endif - - QIcon playIcon; - QIcon pauseIcon; - QMenu *fileMenu; - QPushButton *rewindButton; - QPushButton *forwardButton; - Phonon::SeekSlider *slider; - QLabel *timeLabel; - QLabel *progressLabel; - Phonon::VolumeSlider *volume; - QSlider *m_hueSlider; - QSlider *m_satSlider; - QSlider *m_contSlider; - QLabel *info; - Phonon::Effect *nextEffect; - QDialog *settingsDialog; - Ui_settings *ui; - QAction *m_fullScreenAction; - - QWidget m_videoWindow; - Phonon::MediaObject m_MediaObject; - Phonon::AudioOutput m_AudioOutput; - MediaVideoWidget *m_videoWidget; - Phonon::Path m_audioOutputPath; - bool m_smallScreen; -}; - -#endif //MEDIAPLAYER_H diff --git a/exampleCode/player/mediaplayer.qrc b/exampleCode/player/mediaplayer.qrc deleted file mode 100644 index bcdf404..0000000 --- a/exampleCode/player/mediaplayer.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - images/screen.png - - diff --git a/exampleCode/player/player.pro b/exampleCode/player/player.pro deleted file mode 100755 index 7feffba..0000000 --- a/exampleCode/player/player.pro +++ /dev/null @@ -1,53 +0,0 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Thu Aug 23 18:02:14 2007 -###################################################################### - -TEMPLATE = app -DEPENDPATH += . build src ui - -QT += phonon - -FORMS += settings.ui -RESOURCES += mediaplayer.qrc - -!win32:CONFIG += CONSOLE - -SOURCES += main.cpp mediaplayer.cpp \ - audiomanagerinteractor.cpp \ - dbushandler.cpp -HEADERS += mediaplayer.h \ - audiomanagerinteractor.h \ - dbushandler.h \ - audiomanagertypes.h - -target.path = $$[QT_INSTALL_DEMOS]/qmediaplayer -sources.files = $$SOURCES $$HEADERS $$FORMS $$RESOURCES *.pro *.html *.doc images -sources.path = $$[QT_INSTALL_DEMOS]/qmediaplayer -INSTALLS += target sources - -wince*{ -DEPLOYMENT_PLUGIN += phonon_ds9 phonon_waveout -} - -symbian { - TARGET.UID3 = 0xA000C613 - - addFiles.sources = ../embedded/desktopservices/data/sax.mp3 - addFiles.path = /data/sounds/ - DEPLOYMENT += addFiles - - include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) - - LIBS += -lcommdb - - TARGET.CAPABILITY="NetworkServices" -} - - -unix { - CONFIG += link_pkgconfig - PKGCONFIG += glib-2.0 - PKGCONFIG += dbus-1 - PKGCONFIG += dbus-glib-1 - -} diff --git a/exampleCode/player/player.pro.user b/exampleCode/player/player.pro.user deleted file mode 100755 index 5ce0d49..0000000 --- a/exampleCode/player/player.pro.user +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - System - false - 4 - true - 1 - true - 0 - true - 0 - 8 - true - 1 - true - true - true - false - - - - ProjectExplorer.Project.PluginSettings - - - - ProjectExplorer.Project.Target.0 - - Desktop - Desktop - Qt4ProjectManager.Target.DesktopTarget - 3 - 0 - 0 - - INVALID - - - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - Make - - Qt4ProjectManager.MakeStep - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - Make - - Qt4ProjectManager.MakeStep - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Desktop Qt 4.8.1 for GCC (Qt SDK) Release - - Qt4ProjectManager.Qt4BuildConfiguration - 0 - /home/christian/workspace/player-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release - -1 - true - - - INVALID - - - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - Make - - Qt4ProjectManager.MakeStep - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - Make - - Qt4ProjectManager.MakeStep - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Desktop Qt 4.8.1 for GCC (Qt SDK) Debug - - Qt4ProjectManager.Qt4BuildConfiguration - 2 - /home/christian/workspace/player-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug - -1 - true - - - INVALID - - - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - Make - - Qt4ProjectManager.MakeStep - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - Make - - Qt4ProjectManager.MakeStep - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Qt 4.8.1 (System) Release - - Qt4ProjectManager.Qt4BuildConfiguration - 0 - /home/christian/workspace/player-build-desktop-Qt_4_8_1__System__Release - -1 - true - - - ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb - - - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - Make - - Qt4ProjectManager.MakeStep - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - Make - - Qt4ProjectManager.MakeStep - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Desktop Qt 4.8.1 for GCC (Qt SDK) Debug2 - - Qt4ProjectManager.Qt4BuildConfiguration - 2 - /home/christian/workspace/player-build-desktop-Qt_4_8_1__System__Debug - 5 - true - - 4 - - - 0 - Deploy - - ProjectExplorer.BuildSteps.Deploy - - 1 - No deployment - - ProjectExplorer.DefaultDeployConfiguration - - 1 - - true - true - - - false - false - false - false - false - false - false - false - true - true - 0.01 - 0.01 - 10 - 10 - true - true - 25 - 25 - - - true - true - valgrind - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - player - - Qt4ProjectManager.Qt4RunConfiguration - 2 - player alsa_output.default - player.pro - false - false - - - 3768 - true - false - false - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.EnvironmentId - {ff8ada78-76cc-4ca1-bc41-e44127bd6bd0} - - - ProjectExplorer.Project.Updater.FileVersion - 10 - - diff --git a/exampleCode/player/settings.ui b/exampleCode/player/settings.ui deleted file mode 100644 index 03bd70e..0000000 --- a/exampleCode/player/settings.ui +++ /dev/null @@ -1,495 +0,0 @@ - - - settings - - - - 0 - 0 - 175 - 397 - - - - Settings - - - - - - Video options: - - - true - - - - - - QComboBox::AdjustToContentsOnFirstShow - - - - Fit in view - - - - - Scale and crop - - - - - - - - Contrast: - - - - - - - - 0 - 0 - - - - -8 - - - 8 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - 4 - - - - - - - Brightness: - - - - - - - -8 - - - 8 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - 4 - - - - - - - Saturation: - - - - - - - -8 - - - 8 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - 4 - - - - - - - Hue: - - - - - - - -8 - - - 8 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - 4 - - - - - - - Aspect ratio: - - - - - - - QComboBox::AdjustToContentsOnFirstShow - - - - Auto - - - - - Stretch - - - - - 4/3 - - - - - 16/9 - - - - - - - - Scale Mode: - - - - - scalemodeCombo - label_9 - contrastSlider - label_8 - brightnessSlider - label_7 - saturationSlider - label_2 - hueSlider - label_10 - aspectCombo - label_11 - - - - - - Audio options: - - - true - - - - - - - - - 0 - 0 - - - - - 10 - 0 - - - - Audio device: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - - 10 - 0 - - - - QComboBox::AdjustToMinimumContentsLength - - - - - - - - - - - - 0 - 0 - - - - - 10 - 0 - - - - Audio effect: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - 0 - 0 - - - - - 10 - 0 - - - - QComboBox::AdjustToMinimumContentsLength - - - - - - - false - - - Setup - - - - - - - - - - - - 0 - 0 - - - - - 10 - 0 - - - - Cross fade: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - 0 - 0 - - - - -20 - - - 20 - - - 1 - - - 2 - - - 0 - - - Qt::Horizontal - - - QSlider::TicksBelow - - - - - - - - - - 9 - - - - -10 Sec - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - 9 - - - - 0 - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - 9 - - - - 10 Sec - - - - - - - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - settings - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - settings - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/src-gen/org/genivi/NodeStateManager/Consumer.h b/src-gen/org/genivi/NodeStateManager/Consumer.h deleted file mode 100644 index 026f431..0000000 --- a/src-gen/org/genivi/NodeStateManager/Consumer.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 -*/ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_H_ - - - -#define COMMONAPI_INTERNAL_COMPILATION - -#include - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class Consumer { - public: - virtual ~Consumer() { } - - static inline const char* getInterfaceId(); - static inline CommonAPI::Version getInterfaceVersion(); -}; - -const char* Consumer::getInterfaceId() { - return "org.genivi.NodeStateManager.Consumer"; -} - -CommonAPI::Version Consumer::getInterfaceVersion() { - return CommonAPI::Version(1, 0); -} - - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -namespace CommonAPI { - -} - - -namespace std { - //hashes for types - - //hashes for error types -} - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_H_ diff --git a/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp b/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp deleted file mode 100644 index 202680d..0000000 --- a/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 -*/ -#include "ConsumerDBusProxy.h" - -namespace org { -namespace genivi { -namespace NodeStateManager { - -std::shared_ptr createConsumerDBusProxy( - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr& dbusProxyConnection) { - return std::make_shared(commonApiAddress, interfaceName, busName, objectPath, dbusProxyConnection); -} - -__attribute__((constructor)) void registerConsumerDBusProxy(void) { - CommonAPI::DBus::DBusFactory::registerProxyFactoryMethod(Consumer::getInterfaceId(), - &createConsumerDBusProxy); -} - -ConsumerDBusProxy::ConsumerDBusProxy( - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr& dbusProxyconnection): - CommonAPI::DBus::DBusProxy(commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection) -, bootMode_(*this, interfaceName.c_str(), "BootMode"), - restartReason_(*this, interfaceName.c_str(), "RestartReason"), - shutdownReason_(*this, interfaceName.c_str(), "ShutdownReason"), - wakeUpReason_(*this, interfaceName.c_str(), "WakeUpReason") -, nodeApplicationMode_(*this, "NodeApplicationMode", "i"), - sessionStateChanged_(*this, "SessionStateChanged", "sii"), - nodeState_(*this, "NodeState", "i") - { -} - -ConsumerDBusProxy::BootModeAttribute& ConsumerDBusProxy::getBootModeAttribute() { - return bootMode_; -} -ConsumerDBusProxy::RestartReasonAttribute& ConsumerDBusProxy::getRestartReasonAttribute() { - return restartReason_; -} -ConsumerDBusProxy::ShutdownReasonAttribute& ConsumerDBusProxy::getShutdownReasonAttribute() { - return shutdownReason_; -} -ConsumerDBusProxy::WakeUpReasonAttribute& ConsumerDBusProxy::getWakeUpReasonAttribute() { - return wakeUpReason_; -} - -ConsumerDBusProxy::NodeApplicationModeEvent& ConsumerDBusProxy::getNodeApplicationModeEvent() { - return nodeApplicationMode_; -} -ConsumerDBusProxy::SessionStateChangedEvent& ConsumerDBusProxy::getSessionStateChangedEvent() { - return sessionStateChanged_; -} -ConsumerDBusProxy::NodeStateEvent& ConsumerDBusProxy::getNodeStateEvent() { - return nodeState_; -} - -void ConsumerDBusProxy::GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "GetAppHealthCount", - "", - callStatus - , Count); -} -std::future ConsumerDBusProxy::GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "GetAppHealthCount", - "", - std::move(callback)); -} -void ConsumerDBusProxy::LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "LifecycleRequestComplete", - "ui", - RequestId, Status, - callStatus - , ErrorCode); -} -std::future ConsumerDBusProxy::LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "LifecycleRequestComplete", - "ui", - RequestId, Status, - std::move(callback)); -} -void ConsumerDBusProxy::GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "GetInterfaceVersion", - "", - callStatus - , Version); -} -std::future ConsumerDBusProxy::GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "GetInterfaceVersion", - "", - std::move(callback)); -} -void ConsumerDBusProxy::GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "GetApplicationMode", - "", - callStatus - , ErrorCode, ApplicationModeId); -} -std::future ConsumerDBusProxy::GetApplicationModeAsync(GetApplicationModeAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "GetApplicationMode", - "", - std::move(callback)); -} -void ConsumerDBusProxy::UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "UnRegisterSession", - "ssi", - SessionName, SessionOwner, SeatID, - callStatus - , ErrorCode); -} -std::future ConsumerDBusProxy::UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "UnRegisterSession", - "ssi", - SessionName, SessionOwner, SeatID, - std::move(callback)); -} -void ConsumerDBusProxy::RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "RegisterSession", - "ssii", - SessionName, SessionOwner, SeatID, SessionState, - callStatus - , ErrorCode); -} -std::future ConsumerDBusProxy::RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "RegisterSession", - "ssii", - SessionName, SessionOwner, SeatID, SessionState, - std::move(callback)); -} -void ConsumerDBusProxy::UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "UnRegisterShutdownClient", - "ssu", - BusName, ObjName, ShutdownMode, - callStatus - , ErrorCode); -} -std::future ConsumerDBusProxy::UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "UnRegisterShutdownClient", - "ssu", - BusName, ObjName, ShutdownMode, - std::move(callback)); -} -void ConsumerDBusProxy::RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "RegisterShutdownClient", - "ssuu", - BusName, ObjName, ShutdownMode, TimeoutMs, - callStatus - , ErrorCode); -} -std::future ConsumerDBusProxy::RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "RegisterShutdownClient", - "ssuu", - BusName, ObjName, ShutdownMode, TimeoutMs, - std::move(callback)); -} -void ConsumerDBusProxy::GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "GetNodeState", - "", - callStatus - , ErrorCode, NodeStateId); -} -std::future ConsumerDBusProxy::GetNodeStateAsync(GetNodeStateAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "GetNodeState", - "", - std::move(callback)); -} -void ConsumerDBusProxy::GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "GetSessionState", - "si", - SessionName, SeatID, - callStatus - , SessionState, ErrorCode); -} -std::future ConsumerDBusProxy::GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "GetSessionState", - "si", - SessionName, SeatID, - std::move(callback)); -} -void ConsumerDBusProxy::SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode) { - CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodWithReply( - *this, - "SetSessionState", - "ssii", - SessionName, SessionOwner, SessionState, SeatID, - callStatus - , ErrorCode); -} -std::future ConsumerDBusProxy::SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback) { - return CommonAPI::DBus::DBusProxyHelper, - CommonAPI::DBus::DBusSerializableArguments >::callMethodAsync( - *this, - "SetSessionState", - "ssii", - SessionName, SessionOwner, SessionState, SeatID, - std::move(callback)); -} - -void ConsumerDBusProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const { - ownVersionMajor = 1; - ownVersionMinor = 0; -} - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org diff --git a/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h b/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h deleted file mode 100644 index fe17687..0000000 --- a/src-gen/org/genivi/NodeStateManager/ConsumerDBusProxy.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 -*/ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_PROXY_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_PROXY_H_ - -#include - -#define COMMONAPI_INTERNAL_COMPILATION - -#include -#include -#include -#include - -#undef COMMONAPI_INTERNAL_COMPILATION - -#include - -namespace org { -namespace genivi { -namespace NodeStateManager { - -class ConsumerDBusProxy: virtual public ConsumerProxyBase, virtual public CommonAPI::DBus::DBusProxy { - public: - ConsumerDBusProxy( - const std::string& commonApiAddress, - const std::string& interfaceName, - const std::string& busName, - const std::string& objectPath, - const std::shared_ptr& dbusProxyconnection); - - virtual ~ConsumerDBusProxy() { } - - virtual BootModeAttribute& getBootModeAttribute(); - virtual RestartReasonAttribute& getRestartReasonAttribute(); - virtual ShutdownReasonAttribute& getShutdownReasonAttribute(); - virtual WakeUpReasonAttribute& getWakeUpReasonAttribute(); - - virtual NodeApplicationModeEvent& getNodeApplicationModeEvent(); - virtual SessionStateChangedEvent& getSessionStateChangedEvent(); - virtual NodeStateEvent& getNodeStateEvent(); - - - virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count); - virtual std::future GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback); - - virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback); - - virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version); - virtual std::future GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback); - - virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId); - virtual std::future GetApplicationModeAsync(GetApplicationModeAsyncCallback callback); - - virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback); - - virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback); - - virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback); - - virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback); - - virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId); - virtual std::future GetNodeStateAsync(GetNodeStateAsyncCallback callback); - - virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode); - virtual std::future GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback); - - virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - virtual std::future SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback); - - virtual void getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const; - - private: - CommonAPI::DBus::DBusFreedesktopReadonlyAttribute bootMode_; - CommonAPI::DBus::DBusFreedesktopReadonlyAttribute restartReason_; - CommonAPI::DBus::DBusFreedesktopReadonlyAttribute shutdownReason_; - CommonAPI::DBus::DBusFreedesktopReadonlyAttribute wakeUpReason_; - - CommonAPI::DBus::DBusEvent nodeApplicationMode_; - CommonAPI::DBus::DBusEvent sessionStateChanged_; - CommonAPI::DBus::DBusEvent nodeState_; -}; - -} // namespace NodeStateManager -} // namespace genivi -} // namespace org - -#endif // ORG_GENIVI_NODESTATEMANAGER_Consumer_DBUS_PROXY_H_ diff --git a/src-gen/org/genivi/NodeStateManager/ConsumerProxy.h b/src-gen/org/genivi/NodeStateManager/ConsumerProxy.h deleted file mode 100644 index e0aab4d..0000000 --- a/src-gen/org/genivi/NodeStateManager/ConsumerProxy.h +++ /dev/null @@ -1,604 +0,0 @@ -/* -* This file was generated by the CommonAPI Generators. -* - * Copyright (C) 2013, BMW AG - * - * \author Christian Linke, christian.linke@bmw.de BMW 2012,2013 -*/ -#ifndef ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_H_ -#define ORG_GENIVI_NODESTATEMANAGER_Consumer_PROXY_H_ - -#include "ConsumerProxyBase.h" - -#define COMMONAPI_INTERNAL_COMPILATION - -#include -#include - -#undef COMMONAPI_INTERNAL_COMPILATION - -namespace org { -namespace genivi { -namespace NodeStateManager { - -template -class ConsumerProxy: virtual public Consumer, virtual public ConsumerProxyBase, public _AttributeExtensions... { - public: - ConsumerProxy(std::shared_ptr delegate); - ~ConsumerProxy(); - - /// Returns the wrapper class that provides access to the attribute BootMode. - virtual BootModeAttribute& getBootModeAttribute() { - return delegate_->getBootModeAttribute(); - } - - /// Returns the wrapper class that provides access to the attribute RestartReason. - virtual RestartReasonAttribute& getRestartReasonAttribute() { - return delegate_->getRestartReasonAttribute(); - } - - /// Returns the wrapper class that provides access to the attribute ShutdownReason. - virtual ShutdownReasonAttribute& getShutdownReasonAttribute() { - return delegate_->getShutdownReasonAttribute(); - } - - /// Returns the wrapper class that provides access to the attribute WakeUpReason. - virtual WakeUpReasonAttribute& getWakeUpReasonAttribute() { - return delegate_->getWakeUpReasonAttribute(); - } - - - /// Returns the wrapper class that provides access to the broadcast NodeApplicationMode. - virtual NodeApplicationModeEvent& getNodeApplicationModeEvent() { - return delegate_->getNodeApplicationModeEvent(); - } - - /// Returns the wrapper class that provides access to the broadcast SessionStateChanged. - virtual SessionStateChangedEvent& getSessionStateChangedEvent() { - return delegate_->getSessionStateChangedEvent(); - } - - /// Returns the wrapper class that provides access to the broadcast NodeState. - virtual NodeStateEvent& getNodeStateEvent() { - return delegate_->getNodeStateEvent(); - } - - - - /** - * Calls GetAppHealthCount with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void GetAppHealthCount(CommonAPI::CallStatus& callStatus, uint32_t& Count); - /** - * Calls GetAppHealthCount with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future GetAppHealthCountAsync(GetAppHealthCountAsyncCallback callback); - - /** - * Calls LifecycleRequestComplete with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void LifecycleRequestComplete(const uint32_t& RequestId, const int32_t& Status, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls LifecycleRequestComplete with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future LifecycleRequestCompleteAsync(const uint32_t& RequestId, const int32_t& Status, LifecycleRequestCompleteAsyncCallback callback); - - /** - * Calls GetInterfaceVersion with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void GetInterfaceVersion(CommonAPI::CallStatus& callStatus, uint32_t& Version); - /** - * Calls GetInterfaceVersion with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future GetInterfaceVersionAsync(GetInterfaceVersionAsyncCallback callback); - - /** - * Calls GetApplicationMode with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void GetApplicationMode(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& ApplicationModeId); - /** - * Calls GetApplicationMode with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future GetApplicationModeAsync(GetApplicationModeAsyncCallback callback); - - /** - * Calls UnRegisterSession with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void UnRegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls UnRegisterSession with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future UnRegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, UnRegisterSessionAsyncCallback callback); - - /** - * Calls RegisterSession with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void RegisterSession(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls RegisterSession with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future RegisterSessionAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SeatID, const int32_t& SessionState, RegisterSessionAsyncCallback callback); - - /** - * Calls UnRegisterShutdownClient with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void UnRegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls UnRegisterShutdownClient with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future UnRegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, UnRegisterShutdownClientAsyncCallback callback); - - /** - * Calls RegisterShutdownClient with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void RegisterShutdownClient(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls RegisterShutdownClient with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future RegisterShutdownClientAsync(const std::string& BusName, const std::string& ObjName, const uint32_t& ShutdownMode, const uint32_t& TimeoutMs, RegisterShutdownClientAsyncCallback callback); - - /** - * Calls GetNodeState with synchronous semantics. - * - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void GetNodeState(CommonAPI::CallStatus& callStatus, int32_t& ErrorCode, int32_t& NodeStateId); - /** - * Calls GetNodeState with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future GetNodeStateAsync(GetNodeStateAsyncCallback callback); - - /** - * Calls GetSessionState with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void GetSessionState(const std::string& SessionName, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& SessionState, int32_t& ErrorCode); - /** - * Calls GetSessionState with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future GetSessionStateAsync(const std::string& SessionName, const int32_t& SeatID, GetSessionStateAsyncCallback callback); - - /** - * Calls SetSessionState with synchronous semantics. - * - * All const parameters are input parameters to this method. - * All non-const parameters will be filled with the returned values. - * The CallStatus will be filled when the method returns and indicate either - * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus - * will be set. - * Synchronous calls are not supported (will block indefinitely) when mainloop integration is used. - */ - virtual void SetSessionState(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, CommonAPI::CallStatus& callStatus, int32_t& ErrorCode); - /** - * Calls SetSessionState with asynchronous semantics. - * - * The provided callback will be called when the reply to this call arrives or - * an error occurs during the call. The CallStatus will indicate either "SUCCESS" - * or which type of error has occurred. In case of any error, ONLY the CallStatus - * will have a defined value. - * The std::future returned by this method will be fulfilled at arrival of the reply. - * It will provide the same value for CallStatus as will be handed to the callback. - */ - virtual std::future SetSessionStateAsync(const std::string& SessionName, const std::string& SessionOwner, const int32_t& SessionState, const int32_t& SeatID, SetSessionStateAsyncCallback callback); - - /// Returns the CommonAPI address of the remote partner this proxy communicates with. - virtual std::string getAddress() const; - - /// Returns the domain of the remote partner this proxy communicates with. - virtual const std::string& getDomain() const; - - /// Returns the service ID of the remote partner this proxy communicates with. - virtual const std::string& getServiceId() const; - - /// Returns the instance ID of the remote partner this proxy communicates with. - virtual const std::string& getInstanceId() const; - - /// Returns true if the remote partner for this proxy is available. - virtual bool isAvailable() const; - - /** - * Returns the wrapper class that is used to (de-)register for notifications about - * the availability of the remote partner of this proxy. - */ - virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent(); - - /** - * Returns the wrapper class that is used to access version information of the remote - * partner of this proxy. - */ - virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute(); - - private: - std::shared_ptr delegate_; -}; - -namespace ConsumerExtensions { - template