summaryrefslogtreecommitdiff
path: root/SDL_Core/src/appMain
diff options
context:
space:
mode:
Diffstat (limited to 'SDL_Core/src/appMain')
-rw-r--r--SDL_Core/src/appMain/CMakeLists.txt151
-rw-r--r--SDL_Core/src/appMain/audio.8bit.wavbin88244 -> 0 bytes
-rw-r--r--SDL_Core/src/appMain/btinclude.h45
-rw-r--r--SDL_Core/src/appMain/hmi_capabilities.json174
-rw-r--r--SDL_Core/src/appMain/life_cycle.cc321
-rw-r--r--SDL_Core/src/appMain/life_cycle.h109
-rw-r--r--SDL_Core/src/appMain/log4cxx.properties62
-rw-r--r--SDL_Core/src/appMain/main.cc277
-rw-r--r--SDL_Core/src/appMain/policy_table.json393
-rw-r--r--SDL_Core/src/appMain/smartDeviceLink.ini77
-rwxr-xr-xSDL_Core/src/appMain/start-qml.sh33
-rw-r--r--SDL_Core/src/appMain/test.txt3
-rw-r--r--SDL_Core/src/appMain/wp1_policy_table.json198
13 files changed, 0 insertions, 1843 deletions
diff --git a/SDL_Core/src/appMain/CMakeLists.txt b/SDL_Core/src/appMain/CMakeLists.txt
deleted file mode 100644
index 61a5f4eda..000000000
--- a/SDL_Core/src/appMain/CMakeLists.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-IF (${WEB_HMI})
-set (BROKER_LIBRARIES
- MessageBrokerClient
- MessageBrokerServer
-)
-ENDIF (${WEB_HMI})
-
-
-if (EXTENDED_MEDIA_MODE)
-set(default_media_inc
-${GSTREAMER_gst_INCLUDE_DIR}
-)
-else(EXTENDED_MEDIA_MODE)
-set(default_media_inc
-)
-endif()
-
-set(LIBRARIES
- ApplicationManager
- HMI_API
- MOBILE_API
- v4_protocol_v1_2_no_extra
- SmartObjects
- formatters
- ProtocolHandler
- connectionHandler
- TransportManager
- HMIMessageHandler
- MessageBroker
- ${BROKER_LIBRARIES}
- Utils
- encryption
- jsoncpp
- ConfigProfile
- RequestWatchdog
- MediaManager
- Resumption
- policies
- apr-1
- aprutil-1
-)
-
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list(APPEND LIBRARIES pthread)
-endif()
-
-if (BUILD_BT_SUPPORT)
- list(APPEND LIBRARIES bluetooth)
-endif()
-if (BUILD_AVAHI_SUPPORT)
- list(APPEND LIBRARIES avahi-client avahi-common)
-endif()
-if (BUILD_USB_SUPPORT)
- cmake_policy(PUSH)
- # make link_directories() treat paths relative to the source dir
- # info: cmake --help-policy CMP0015
- cmake_policy(SET CMP0015 NEW)
- link_directories(../thirdPartyLibs/libusbx)
- cmake_policy(POP)
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list(APPEND LIBRARIES Libusb-1.0.16)
-endif()
-endif()
-
-include_directories (
- ./
- ../components/protocol_handler/include/
- ../thirdPartyLibs/jsoncpp/include/
- ../components/application_manager/include
- ../components/formatters/include
- ../components/transport_manager/include
- ../components/config_profile/include
- ../components/utils/include/
- ../components/connection_handler/include/
- ../components/hmi_message_handler/include
- ../components/request_watchdog/include
- ../components/smart_objects/include/
- ../components/media_manager/include/
- ../components/policies/include/
- ../thirdPartyLibs/MessageBroker/include
- ../thirdPartyLibs/encryption/include
- ${CMAKE_SOURCE_DIR}/src/components/
- ${CMAKE_BINARY_DIR}/src/components/
- ${CMAKE_SOURCE_DIR}/src/components/dbus/include/
- ${CMAKE_SOURCE_DIR}
- ${default_media_inc}
-)
-
-set (SOURCES
- main.cc
- life_cycle.cc
-)
-
-if( NOT CMAKE_BUILD_TYPE )
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build. Options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
-endif()
-
-add_executable(${PROJECT} ${SOURCES})
-target_link_libraries(${PROJECT} ${LIBRARIES})
-
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/policy_table.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/wp1_policy_table.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-
-if (${QT_HMI})
- set(main_qml "hmi/MainWindow.qml")
- set(plugins_dir "hmi/plugins")
-
- if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- set(start_command "./start-qml.sh")
- set(command_arguments "${main_qml} ${plugins_dir}")
- else ()
- execute_process(
- COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} -b qmlscene
- OUTPUT_VARIABLE start_command
- )
- set(command_arguments "${main_qml} -I ${plugins_dir}")
- endif ()
-
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh
- "#!/bin/sh\n${start_command} ${command_arguments}\n")
-elseif (${WEB_HMI})
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/hmi_link
- "${CMAKE_HOME_DIRECTORY}/src/components/HMI/index.html")
-endif ()
-
-# Install rules
-install(TARGETS ${PROJECT} DESTINATION bin)
-install(
- FILES log4cxx.properties audio.8bit.wav test.txt smartDeviceLink.ini policy_table.json
- hmi_capabilities.json wp1_policy_table.json
- DESTINATION bin
-)
-if (${WEB_HMI})
- if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hmi_link DESTINATION bin)
- endif ()
-elseif (${QT_HMI})
- if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- install(FILES start-qml.sh DESTINATION bin
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
- GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
- endif ()
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh DESTINATION bin
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
- GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
-endif ()
diff --git a/SDL_Core/src/appMain/audio.8bit.wav b/SDL_Core/src/appMain/audio.8bit.wav
deleted file mode 100644
index cebf6cc0e..000000000
--- a/SDL_Core/src/appMain/audio.8bit.wav
+++ /dev/null
Binary files differ
diff --git a/SDL_Core/src/appMain/btinclude.h b/SDL_Core/src/appMain/btinclude.h
deleted file mode 100644
index 3cefdd4ee..000000000
--- a/SDL_Core/src/appMain/btinclude.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// Copyright (c) 2013, Ford Motor Company
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided with the
-// distribution.
-//
-// Neither the name of the Ford Motor Company nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/rfcomm.h>
-
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-
-#include <bluetooth/sco.h>
-
-#include <sys/socket.h>
-
-#include <unistd.h>
diff --git a/SDL_Core/src/appMain/hmi_capabilities.json b/SDL_Core/src/appMain/hmi_capabilities.json
deleted file mode 100644
index f1139176b..000000000
--- a/SDL_Core/src/appMain/hmi_capabilities.json
+++ /dev/null
@@ -1,174 +0,0 @@
-{
- "UI":
- {
- "language":"EN-US",
- "languages":
- [
- "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL","FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR","PT-BR","CS-CZ","DA-DK","NO-NO"
- ],
- "displayCapabilities":
- {
- "displayType":"GEN2_8_DMA",
- "textFields":
- [
- "mainField1","mainField2","mainField3","mainField4","statusBar","mediaClock","mediaTrack","alertText1","alertText2","alertText3",
- "scrollableMessageBody","initialInteractionText","navigationText1","navigationText2","ETA","totalDistance",
- "audioPassThruDisplayText1","audioPassThruDisplayText2","sliderHeader","sliderFooter","notificationText","menuName",
- "secondaryText","tertiaryText","timeToDestination","turnText"
- ],
- "mediaClockFormats":
- [
- "CLOCK1","CLOCK2","CLOCK3","CLOCKTEXT1","CLOCKTEXT2","CLOCKTEXT3","CLOCKTEXT4"
- ],
- "graphicSupported":true,
- "imageCapabilities":
- [
- "DYNAMIC"
- ]
- },
- "audioPassThruCapabilities":
- {
- "samplingRate" : "44KHZ",
- "bitsPerSample" : "8_BIT",
- "audioType" : "PCM"
- },
- "hmiZoneCapabilities":"FRONT",
- "softButtonCapabilities":
- {
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true,
- "imageSupported" :true
- }
- },
- "VR":
- {
- "capabilities":["TEXT"],
- "language":"EN-US",
- "languages":
- [
- "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL","FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR","PT-BR","CS-CZ","DA-DK","NO-NO"
- ]
- },
- "TTS":
- {
- "capabilities":"TEXT",
- "language":"EN-US",
- "languages":
- [
- "EN-US","ES-MX","FR-CA","DE-DE","ES-ES","EN-GB","RU-RU","TR-TR","PL-PL","FR-FR","IT-IT","SV-SE","PT-PT","NL-NL","ZH-TW","JA-JP","AR-SA","KO-KR","PT-BR","CS-CZ","DA-DK","NO-NO"
- ]
- },
- "Buttons":
- {
- "capabilities":
- [
- {
- "name":"PRESET_0",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_1",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_2",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_3",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_4",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_5",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_6",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_7",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_8",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"PRESET_9",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"OK",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"SEEKLEFT",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"SEEKRIGHT",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"TUNEUP",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- },
- {
- "name":"TUNEDOWN",
- "shortPressAvailable":true,
- "longPressAvailable" :true,
- "upDownAvailable" :true
- }
- ],
- "presetBankCapabilities":
- {
- "onScreenPresetsAvailable":true
- }
- },
- "VehicleInfo":
- {
- "make" :"Ford",
- "model" :"Fiesta",
- "modelYear" :"2013",
- "trim" :"SE"
- },
- "SyncMessageVersion":
- {
- "majorVersion": 3,
- "minorVersion": 0
- }
-}
diff --git a/SDL_Core/src/appMain/life_cycle.cc b/SDL_Core/src/appMain/life_cycle.cc
deleted file mode 100644
index 687cc331e..000000000
--- a/SDL_Core/src/appMain/life_cycle.cc
+++ /dev/null
@@ -1,321 +0,0 @@
-/**
-* \file signals.cc
-* \brief Signal (i.e. SIGINT) handling.
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "./life_cycle.h"
-#include "utils/signals.h"
-#include "config_profile/profile.h"
-
-using threads::Thread;
-
-namespace main_namespace {
-log4cxx::LoggerPtr LifeCycle::logger_ = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
-
-namespace {
-
-void NameMessageBrokerThread(const System::Thread& thread,
- const std::string& name) {
- Thread::SetNameForId(Thread::Id(thread.GetId()), name);
-}
-
-} // namespace
-
-LifeCycle::LifeCycle()
- : transport_manager_(NULL)
- , protocol_handler_(NULL)
- , connection_handler_(NULL)
- , app_manager_(NULL)
- , hmi_handler_(NULL)
- , media_manager_(NULL)
- , policy_manager_(NULL)
-#ifdef QT_HMI
- , dbus_adapter_(NULL)
- , dbus_adapter_thread_(NULL) {
-#endif // QT_HMI
-#ifdef WEB_HMI
- , mb_adapter_(NULL)
- , message_broker_(NULL)
- , message_broker_server_(NULL)
- , mb_thread_(NULL)
- , mb_server_thread_(NULL)
- , mb_adapter_thread_(NULL) {
-#endif // WEB_HMI
-}
-
-bool LifeCycle::StartComponents() {
- LOG4CXX_INFO(logger_, "LifeCycle::StartComponents()");
- transport_manager_ =
- transport_manager::TransportManagerDefault::instance();
- DCHECK(transport_manager_ != NULL);
-
- protocol_handler_ =
- new protocol_handler::ProtocolHandlerImpl(transport_manager_);
- DCHECK(protocol_handler_ != NULL);
-
- connection_handler_ =
- connection_handler::ConnectionHandlerImpl::instance();
- DCHECK(connection_handler_ != NULL);
-
- app_manager_ =
- application_manager::ApplicationManagerImpl::instance();
- DCHECK(app_manager_ != NULL);
-
- hmi_handler_ =
- hmi_message_handler::HMIMessageHandlerImpl::instance();
- DCHECK(hmi_handler_ != NULL)
-
- transport_manager_->AddEventListener(protocol_handler_);
- transport_manager_->AddEventListener(connection_handler_);
-
- hmi_handler_->set_message_observer(app_manager_);
-
- media_manager_ = media_manager::MediaManagerImpl::instance();
-
- protocol_handler_->set_session_observer(connection_handler_);
- protocol_handler_->AddProtocolObserver(media_manager_);
- protocol_handler_->AddProtocolObserver(app_manager_);
- media_manager_->SetProtocolHandler(protocol_handler_);
-
- connection_handler_->set_transport_manager(transport_manager_);
- connection_handler_->set_connection_handler_observer(app_manager_);
-
- // It's important to initialise TM after setting up listener chain
- // [TM -> CH -> AM], otherwise some events from TM could arrive at nowhere
- transport_manager_->Init();
-
- policy_manager_ = policies::PolicyManagerImpl::instance();
- DCHECK(policy_manager_);
-
- policies::PolicyConfiguration policy_config;
- policy_config.set_pt_file_name("wp1_policy_table.json");
- policy_manager_->Init(policy_config);
-
- app_manager_->set_protocol_handler(protocol_handler_);
- app_manager_->set_connection_handler(connection_handler_);
- app_manager_->set_hmi_message_handler(hmi_handler_);
- app_manager_->set_policy_manager(policy_manager_);
-
- return true;
-}
-
-#ifdef WEB_HMI
-bool LifeCycle::InitMessageSystem() {
- message_broker_ =
- NsMessageBroker::CMessageBroker::getInstance();
- if (!message_broker_) {
- LOG4CXX_INFO(logger_, " Wrong pMessageBroker pointer!");
- return false;
- }
-
- message_broker_server_ =
- new NsMessageBroker::TcpServer(
- profile::Profile::instance()->server_address(),
- profile::Profile::instance()->server_port(),
- message_broker_);
- if (!message_broker_server_) {
- LOG4CXX_INFO(logger_, " Wrong pJSONRPC20Server pointer!");
- return false;
- }
- message_broker_->startMessageBroker(message_broker_server_);
- if (!networking::init()) {
- LOG4CXX_INFO(logger_, " Networking initialization failed!");
- return false;
- }
-
- if (!message_broker_server_->Bind()) {
- LOG4CXX_FATAL(logger_, "Bind failed!");
- return false;
- } else {
- LOG4CXX_INFO(logger_, "Bind successful!");
- }
-
- if (!message_broker_server_->Listen()) {
- LOG4CXX_FATAL(logger_, "Listen failed!");
- return false;
- } else {
- LOG4CXX_INFO(logger_, " Listen successful!");
- }
-
- mb_adapter_ =
- new hmi_message_handler::MessageBrokerAdapter(
- hmi_message_handler::HMIMessageHandlerImpl::instance(),
- profile::Profile::instance()->server_address(),
- profile::Profile::instance()->server_port());
-
- hmi_message_handler::HMIMessageHandlerImpl::instance()->AddHMIMessageAdapter(
- mb_adapter_);
- if (!mb_adapter_->Connect()) {
- LOG4CXX_INFO(logger_, "Cannot connect to remote peer!");
- return false;
- }
-
- LOG4CXX_INFO(logger_, "Start CMessageBroker thread!");
- mb_thread_ = new System::Thread(
- new System::ThreadArgImpl<NsMessageBroker::CMessageBroker>(
- *message_broker_, &NsMessageBroker::CMessageBroker::MethodForThread,
- NULL));
- mb_thread_->Start(false);
- // Thread can be named only when started because before that point
- // thread doesn't have valid Id to associate name with
- NameMessageBrokerThread(*mb_thread_, "MessageBrokerThread");
-
- LOG4CXX_INFO(logger_, "Start MessageBroker TCP server thread!");
- mb_server_thread_ = new System::Thread(
- new System::ThreadArgImpl<NsMessageBroker::TcpServer>(
- *message_broker_server_, &NsMessageBroker::TcpServer::MethodForThread,
- NULL));
- mb_server_thread_->Start(false);
- NameMessageBrokerThread(*mb_server_thread_, "MessageBrokerTCPServerThread");
-
- LOG4CXX_INFO(logger_, "StartAppMgr JSONRPC 2.0 controller receiver thread!");
- mb_adapter_thread_ = new System::Thread(
- new System::ThreadArgImpl<hmi_message_handler::MessageBrokerAdapter>(
- *mb_adapter_,
- &hmi_message_handler::MessageBrokerAdapter::SubscribeAndBeginReceiverThread,
- NULL));
- mb_adapter_thread_->Start(false);
- NameMessageBrokerThread(*mb_adapter_thread_, "MessageBrokerAdapterThread");
-
- return true;
-}
-#endif // WEB_HMI
-
-#ifdef QT_HMI
-/**
- * Initialize DBus component
- * @return true if success otherwise false.
- */
-bool LifeCycle::InitMessageSystem() {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
-
- dbus_adapter_ = new hmi_message_handler::DBusMessageAdapter(
- hmi_message_handler::HMIMessageHandlerImpl::instance());
-
- hmi_message_handler::HMIMessageHandlerImpl::instance()->AddHMIMessageAdapter(
- dbus_adapter_);
- if (!dbus_adapter_->Init()) {
- LOG4CXX_INFO(logger, "Cannot init DBus service!");
- return false;
- }
-
- dbus_adapter_->SubscribeTo();
-
- LOG4CXX_INFO(logger, "Start DBusMessageAdapter thread!");
- dbus_adapter_thread_ = new System::Thread(
- new System::ThreadArgImpl<hmi_message_handler::DBusMessageAdapter>(
- *dbus_adapter_,
- &hmi_message_handler::DBusMessageAdapter::MethodForReceiverThread,
- NULL));
- dbus_adapter_thread_->Start(false);
-
- return true;
-}
-#endif // QT_HMI
-
-void LifeCycle::StopComponents() {
- hmi_handler_->set_message_observer(NULL);
- connection_handler_->set_connection_handler_observer(NULL);
- protocol_handler_->RemoveProtocolObserver(app_manager_);
-
- LOG4CXX_INFO(logger_, "Destroying Application Manager.");
- app_manager_->Stop();
- application_manager::ApplicationManagerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Policy Manager.");
- policies::PolicyManagerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Transport Manager.");
- transport_manager_->Stop();
- transport_manager::TransportManagerDefault::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Media Manager");
- protocol_handler_->RemoveProtocolObserver(media_manager_);
- media_manager_->SetProtocolHandler(NULL);
- media_manager::MediaManagerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Connection Handler.");
- protocol_handler_->set_session_observer(NULL);
- connection_handler::ConnectionHandlerImpl::destroy();
-
- LOG4CXX_INFO(logger_, "Destroying Protocol Handler");
- delete protocol_handler_;
-
- LOG4CXX_INFO(logger_, "Destroying HMI Message Handler and MB adapter.");
-#ifdef QT_HMI
- if (dbus_adapter_) {
- if (hmi_handler_) {
- hmi_handler_->RemoveHMIMessageAdapter(dbus_adapter_);
- hmi_message_handler::HMIMessageHandlerImpl::destroy();
- }
- if (dbus_adapter_thread_) {
- dbus_adapter_thread_->Stop();
- dbus_adapter_thread_->Join();
- delete dbus_adapter_thread_;
- }
- delete dbus_adapter_;
- }
-#endif // QT_HMI
-#ifdef WEB_HMI
- hmi_handler_->RemoveHMIMessageAdapter(mb_adapter_);
- hmi_message_handler::HMIMessageHandlerImpl::destroy();
- mb_adapter_->unregisterController();
- mb_adapter_thread_->Stop();
- mb_adapter_thread_->Join();
- delete mb_adapter_thread_;
- mb_adapter_->Close();
- delete mb_adapter_;
-#endif // WEB_HMI
-
-#ifdef WEB_HMI
- LOG4CXX_INFO(logger_, "Destroying Message Broker");
- mb_server_thread_->Stop();
- mb_server_thread_->Join();
- mb_thread_->Stop();
- mb_thread_->Join();
- message_broker_server_->Close();
- message_broker_->stopMessageBroker();
- delete mb_server_thread_;
-
- networking::cleanup();
-#endif // WEB_HMI
-}
-
-void LifeCycle::StopComponentsOnSignal(int32_t params) {
- utils::ResetSubscribeToTerminateSignal();
- instance()->StopComponents();
- utils::ForwardSignal();
-}
-
-} // namespace main_namespace
diff --git a/SDL_Core/src/appMain/life_cycle.h b/SDL_Core/src/appMain/life_cycle.h
deleted file mode 100644
index e91606531..000000000
--- a/SDL_Core/src/appMain/life_cycle.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
-* \file signals.cc
-* \brief Signal (i.e. SIGINT) handling.
-* Copyright (c) 2013, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef SRC_APPMAIN_LIFE_CYCLE_H_
-#define SRC_APPMAIN_LIFE_CYCLE_H_
-
-#include "hmi_message_handler/hmi_message_handler_impl.h"
-#ifdef QT_HMI
-# include "hmi_message_handler/dbus_message_adapter.h"
-#endif // QT_HMI
-#ifdef WEB_HMI
-# include "hmi_message_handler/messagebroker_adapter.h"
-#endif // WEB_HMI
-#include "application_manager/application_manager_impl.h"
-#include "connection_handler/connection_handler_impl.h"
-#include "protocol_handler/protocol_handler_impl.h"
-#include "transport_manager/transport_manager.h"
-#include "transport_manager/transport_manager_default.h"
-#include "media_manager/media_manager_impl.h"
-#include "policies/policy_manager_impl.h"
-#include "utils/singleton.h"
-
-#ifdef WEB_HMI
-# include "CMessageBroker.hpp"
-# include "mb_tcpserver.hpp"
-# include "networking.h" // cpplint: Include the directory when naming .h files
-#endif // WEB_HMI
-#include "system.h" // cpplint: Include the directory when naming .h files
-
-namespace main_namespace {
-class LifeCycle : public utils::Singleton<LifeCycle> {
- public:
- bool StartComponents();
-
- /**
- * Initialize MessageBroker component
- * @return true if success otherwise false.
- */
- bool InitMessageSystem();
- void StopComponents();
- static void StopComponentsOnSignal(int32_t params);
-
- private:
- LifeCycle();
- transport_manager::TransportManager* transport_manager_;
- protocol_handler::ProtocolHandlerImpl* protocol_handler_;
- connection_handler::ConnectionHandlerImpl* connection_handler_;
- application_manager::ApplicationManagerImpl* app_manager_;
- hmi_message_handler::HMIMessageHandlerImpl* hmi_handler_;
-#ifdef QT_HMI
- hmi_message_handler::DBusMessageAdapter* dbus_adapter_;
-#endif // QT_HMI
-#ifdef WEB_HMI
- hmi_message_handler::MessageBrokerAdapter* mb_adapter_;
-#endif // WEB_HMI
- media_manager::MediaManagerImpl* media_manager_;
- policies::PolicyManagerImpl* policy_manager_;
-
-#ifdef WEB_HMI
- NsMessageBroker::CMessageBroker* message_broker_;
- NsMessageBroker::TcpServer* message_broker_server_;
- System::Thread* mb_thread_;
- System::Thread* mb_server_thread_;
- System::Thread* mb_adapter_thread_;
-#endif // WEB_HMI
-#ifdef QT_HMI
- System::Thread* dbus_adapter_thread_;
-#endif // QT_HMI
-
- static log4cxx::LoggerPtr logger_;
-
- DISALLOW_COPY_AND_ASSIGN(LifeCycle);
-
- FRIEND_BASE_SINGLETON_CLASS(LifeCycle);
-};
-} // namespace main_namespace
-
-#endif // SRC_APPMAIN_LIFE_CYCLE_H_
diff --git a/SDL_Core/src/appMain/log4cxx.properties b/SDL_Core/src/appMain/log4cxx.properties
deleted file mode 100644
index 5301ba3fb..000000000
--- a/SDL_Core/src/appMain/log4cxx.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-# Log for all SmartDeviceLinkCoreSocketHub messages
-log4j.appender.SmartDeviceLinkCoreSocketHub=org.apache.log4j.net.SocketHubAppender
-log4j.appender.SmartDeviceLinkCoreSocketHub.port=4555
-log4j.appender.SmartDeviceLinkCoreSocketHub.locationInfo=true
-
-# Only ERROR and FATAL messages are logged to console
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.ImmediateFlush=true
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %m%n
-log4j.appender.Console.Threshold=ALL
-
-# Log for all SmartDeviceLinkCore messages
-log4j.appender.SmartDeviceLinkCoreLogFile=org.apache.log4j.FileAppender
-log4j.appender.SmartDeviceLinkCoreLogFile.File=SmartDeviceLinkCore.log
-log4j.appender.SmartDeviceLinkCoreLogFile.append=false
-log4j.appender.SmartDeviceLinkCoreLogFile.DatePattern='.' yyyy-MM-dd HH-mm
-log4j.appender.SmartDeviceLinkCoreLogFile.ImmediateFlush=true
-log4j.appender.SmartDeviceLinkCoreLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.SmartDeviceLinkCoreLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all TransportManager messages
-log4j.appender.TransportManagerLogFile=org.apache.log4j.FileAppender
-log4j.appender.TransportManagerLogFile.File=TransportManager.log
-log4j.appender.TransportManagerLogFile.append=false
-log4j.appender.TransportManagerLogFile.DatePattern='.' yyyy-MM-dd HH-mm
-log4j.appender.TransportManagerLogFile.ImmediateFlush=true
-log4j.appender.TransportManagerLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.TransportManagerLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all DBus plugin messages
-log4j.appender.DBusPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.DBusPluginLogFile.File=DBusPlugin.log
-log4j.appender.DBusPluginLogFile.append=false
-log4j.appender.DBusPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.DBusPluginLogFile.ImmediateFlush=true
-log4j.appender.DBusPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.DBusPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# Log for all HMI Framework plugin
-log4j.appender.HmiFrameworkPluginLogFile=org.apache.log4j.FileAppender
-log4j.appender.HmiFrameworkPluginLogFile.File=HmiFrameworkPlugin.log
-log4j.appender.HmiFrameworkPluginLogFile.append=false
-log4j.appender.HmiFrameworkPluginLogFile.DatePattern='.' yyyy-MM-dd
-log4j.appender.HmiFrameworkPluginLogFile.ImmediateFlush=true
-log4j.appender.HmiFrameworkPluginLogFile.layout=org.apache.log4j.PatternLayout
-log4j.appender.HmiFrameworkPluginLogFile.layout.ConversionPattern=%-5p [%d{dd MMM yyyy HH:mm:ss,SSS}][%c] %F:%L %M: %m%n
-
-# All SmartDeviceLinkCore logs
-log4j.rootLogger=ALL, SmartDeviceLinkCoreLogFile, SmartDeviceLinkCoreSocketHub
-
-# TransportManager logs
-log4j.logger.TransportManager=ALL, TransportManagerLogFile
-
-# Log for DBus plugin QtHMI
-log4j.logger.DBusPlugin=ALL, DBusPluginLogFile
-
-# Log for HMI Framework plugin
-log4j.logger.HmiFrameworkPlugin=ALL, HmiFrameworkPluginLogFile
-
-# Log by log4cxx plugin
-log4j.logger.Log4cxxPlugin=ALL, HmiFrameworkPluginLogFile
diff --git a/SDL_Core/src/appMain/main.cc b/SDL_Core/src/appMain/main.cc
deleted file mode 100644
index 465f18d28..000000000
--- a/SDL_Core/src/appMain/main.cc
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * \file appMain.cc
- * \brief SmartDeviceLink main application sources
- * Copyright (c) 2013, Ford Motor Company
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Ford Motor Company nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/stat.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <cstdio>
-#include <cstdlib>
-#include <vector>
-#include <string>
-#include <iostream> // cpplint: Streams are highly discouraged.
-#include <fstream> // cpplint: Streams are highly discouraged.
-
-// ----------------------------------------------------------------------------
-
-#include "./life_cycle.h"
-
-#include "utils/signals.h"
-#include "config_profile/profile.h"
-
-#if defined(EXTENDED_MEDIA)
-#include <gst/gst.h>
-#endif
-
-#include "media_manager/media_manager_impl.h"
-// ----------------------------------------------------------------------------
-// Third-Party includes
-#include "networking.h" // cpplint: Include the directory when naming .h files
-
-// ----------------------------------------------------------------------------
-
-namespace {
-
-const char kBrowser[] = "/usr/bin/chromium-browser";
-const char kBrowserName[] = "chromium-browser";
-const char kBrowserParams[] = "--auth-schemes=basic,digest,ntlm";
-const char kLocalHostAddress[] = "127.0.0.1";
-const char kApplicationVersion[] = "SDL_RB_B3.2";
-
-#ifdef __QNX__
-bool Execute(std::string command, const char * const *) {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- if (system(command.c_str()) == -1) {
- LOG4CXX_INFO(logger, "Can't start HMI!");
- return false;
- }
- return true;
-}
-#else
-bool Execute(std::string file, const char * const * argv) {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- // Create a child process.
- pid_t pid_hmi = fork();
-
- switch (pid_hmi) {
- case -1: { // Error
- LOG4CXX_INFO(logger, "fork() failed!");
- return false;
- }
- case 0: { // Child process
- int32_t fd_dev0 = open("/dev/null", O_RDWR, S_IWRITE);
- if (0 > fd_dev0) {
- LOG4CXX_WARN(logger, "Open dev0 failed!");
- return false;
- }
- // close input/output file descriptors.
- close(STDIN_FILENO);
- close(STDOUT_FILENO);
- close(STDERR_FILENO);
-
- // move input/output to /dev/null.
- dup2(fd_dev0, STDIN_FILENO);
- dup2(fd_dev0, STDOUT_FILENO);
- dup2(fd_dev0, STDERR_FILENO);
-
- // Execute the program.
- if (execvp(file.c_str(), const_cast<char* const *>(argv)) == -1) {
- LOG4CXX_ERROR_WITH_ERRNO(logger, "execvp() failed! Can't start HMI!");
- _exit(EXIT_FAILURE);
- }
-
- return true;
- }
- default: { /* Parent process */
- LOG4CXX_INFO(logger, "Process created with pid " << pid_hmi);
- return true;
- }
- }
-}
-#endif
-
-#ifdef WEB_HMI
-/**
- * Initialize HTML based HMI.
- * @return true if success otherwise false.
- */
-bool InitHmi() {
-log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
-
-struct stat sb;
-if (stat("hmi_link", &sb) == -1) {
- LOG4CXX_INFO(logger, "File with HMI link doesn't exist!");
- return false;
-}
-
-std::ifstream file_str;
-file_str.open("hmi_link");
-
-if (!file_str.is_open()) {
- LOG4CXX_INFO(logger, "File with HMI link was not opened!");
- return false;
-}
-
-file_str.seekg(0, std::ios::end);
-int32_t length = file_str.tellg();
-file_str.seekg(0, std::ios::beg);
-
-std::string hmi_link;
-std::getline(file_str, hmi_link);
-
-
-LOG4CXX_INFO(logger,
- "Input string:" << hmi_link << " length = " << hmi_link.size());
-file_str.close();
-
-if (stat(hmi_link.c_str(), &sb) == -1) {
- LOG4CXX_INFO(logger, "HMI index.html doesn't exist!");
- return false;
-}
-
-#ifdef OS_MACOSX
- // On Mac, use system() to call osascript to start Chrome
- const char kCommand[] = "osascript -e 'tell application \"Google Chrome\" to open \"%s\"'";
- char *cmd;
-
- asprintf(&cmd, kCommand, hmi_link.c_str());
-
- int ret = system(cmd);
-
- free(cmd);
-
- if (ret != 0)
- LOG4CXX_ERROR(logger, "Error launching HTML5 HMI: is Google Chrome installed?");
-
- return (ret ? false : true);
-#elif OS_LINUX
- // On Linux, use Execute() to start the browser
- std::string kBin = kBrowser;
- const char* const kParams[4] = {kBrowserName, kBrowserParams,
- hmi_link.c_str(), NULL};
-
- return Execute(kBin, kParams);
-#else
-#error "Add a way to launch the web HMI on your platform"
-#endif
-}
-#endif // WEB_HMI
-
-#ifdef QT_HMI
-/**
- * Initialize HTML based HMI.
- * @return true if success otherwise false.
- */
-bool InitHmi() {
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- std::string kStartHmi = "./start_hmi.sh";
- struct stat sb;
- if (stat(kStartHmi.c_str(), &sb) == -1) {
- LOG4CXX_INFO(logger, "HMI start script doesn't exist!");
- return false;
- }
-
- return Execute(kStartHmi, NULL);
-}
-#endif // QT_HMI
-}
-
-/**
- * \brief Entry point of the program.
- * \param argc number of argument
- * \param argv array of arguments
- * \return EXIT_SUCCESS or EXIT_FAILURE
- */
-int32_t main(int32_t argc, char** argv) {
-
- // --------------------------------------------------------------------------
- // Logger initialization
-
- log4cxx::LoggerPtr logger = log4cxx::LoggerPtr(
- log4cxx::Logger::getLogger("appMain"));
- log4cxx::PropertyConfigurator::configure("log4cxx.properties");
-
- threads::Thread::SetNameForId(threads::Thread::CurrentId(), "MainThread");
-
- LOG4CXX_INFO(logger, "Application started!");
- LOG4CXX_INFO(logger, "Application version " << kApplicationVersion);
-
- // Initialize gstreamer. Needed to activate debug from the command line.
-#if defined(EXTENDED_MEDIA_MODE)
- gst_init(&argc, &argv);
-#endif
-
- // --------------------------------------------------------------------------
- // Components initialization
-
- profile::Profile::instance()->config_file_name("smartDeviceLink.ini");
-
- main_namespace::LifeCycle::instance()->StartComponents();
-
- // --------------------------------------------------------------------------
- // Third-Party components initialization.
-
- if (!main_namespace::LifeCycle::instance()->InitMessageSystem()) {
- main_namespace::LifeCycle::instance()->StopComponents();
-// without this line log4cxx threads continue using some instances destroyed by exit()
- log4cxx::Logger::getRootLogger()->closeNestedAppenders();
- exit(EXIT_FAILURE);
- }
- LOG4CXX_INFO(logger, "InitMessageBroker successful");
-
- if (profile::Profile::instance()->launch_hmi()) {
- if (profile::Profile::instance()->server_address() ==
- std::string(kLocalHostAddress)) {
- LOG4CXX_INFO(logger, "Start HMI on localhost");
-
- if (!InitHmi()) {
- main_namespace::LifeCycle::instance()->StopComponents();
-// without this line log4cxx threads continue using some instances destroyed by exit()
- log4cxx::Logger::getRootLogger()->closeNestedAppenders();
- exit(EXIT_FAILURE);
- }
- LOG4CXX_INFO(logger, "InitHmi successful");
- }
- }
- // --------------------------------------------------------------------------
-
- utils::SubscribeToTerminateSignal(
- &main_namespace::LifeCycle::StopComponentsOnSignal);
-
- pause();
-}
diff --git a/SDL_Core/src/appMain/policy_table.json b/SDL_Core/src/appMain/policy_table.json
deleted file mode 100644
index 60a8f9746..000000000
--- a/SDL_Core/src/appMain/policy_table.json
+++ /dev/null
@@ -1,393 +0,0 @@
-{
- "rpcs":{
- "GetDTCs":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DiagnosticMessage":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequest":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ReadDID":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AlertManeuver":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ShowConstantTBT":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UpdateTurnList":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UnsubscribeVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SubscribeVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GetVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnVehicleData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "GenericResponse":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteCommand":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformInteraction":{
- "hmi_levels":[
- "FULL"
- ]
- },
- "Speak":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "OnAppInterfaceUnregistered":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnButtonPress":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "OnEncodedSyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetMediaClockTimer":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "AddSubMenu":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "RegisterAppInterface":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "UnregisterAppInterface":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "DeleteSubMenu":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Alert":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "OnButtonEvent":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "DeleteInteractionChoiceSet":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnPermissionsChange":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetGlobalProperties":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnCommand":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "Show":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "AddCommand":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ChangeRegistration":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "CreateInteractionChoiceSet":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "Slider":{
- "hmi_levels":[
- "FULL"
- ]
- },
- "ResetGlobalProperties":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnDriverDistraction":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnHMIStatus":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SubscribeButton":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "UnsubscribeButton":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnTBTClientState":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "OnAudioPassThru":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "PerformAudioPassThru":{
- "hmi_levels":[
- "FULL",
- "LIMITED"
- ]
- },
- "EndAudioPassThru":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "ScrollableMessage":{
- "hmi_levels":[
- "FULL"
- ]
- },
- "OnLanguageChange":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SetDisplayLayout":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
- "SyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-"DialNumber":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"PutFile":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"DeleteFile":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"ListFiles":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-"SetAppIcon":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- },
-
-
- "OnSyncPData":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED",
- "NONE"
- ]
- }
- }
- }
diff --git a/SDL_Core/src/appMain/smartDeviceLink.ini b/SDL_Core/src/appMain/smartDeviceLink.ini
deleted file mode 100644
index c7bdc5f33..000000000
--- a/SDL_Core/src/appMain/smartDeviceLink.ini
+++ /dev/null
@@ -1,77 +0,0 @@
- ; The INI-file consists of different chapters.
-; Each chapter begins with the line containing
-; the name in square brackets. Syntax:
-; [chapter]
-; The chapters consists of a set of items with a
-; assinged value. The syntax is:
-; item=value
-; All white spaces an second encounters of chapters
-; or items will be ignored.
-; Remarks start with semicolon or star as first character.
-; It is alowed for names of chapters and items to
-; contain semicolon and star. Possible syntax is:
-; [ chapter ] ;Remark
-; item = value ;Remark
-
-[HMI]
-LaunchHMI = true
-ServerAddress = 127.0.0.1
-ServerPort = 8087
-VideoStreamingPort = 5050
-AudioStreamingPort = 5080
-
-[MAIN]
-; Stanrart min stack size
-; in Ubuntu : PTHREAD_STACK_MIN = 16384
-; in QNX : PTHREAD_STACK_MIN = 256
-;The value of a variable ThreadStackSize used only if its realy needed, other way stack size will be PTHREAD_STACK_MIN
-ThreadStackSize = 16384
-MixingAudioSupported = true
-PoliciesTable = policy_table.json
-HMICapabilities = hmi_capabilities.json
-MaxCmdID = 2000000000
-DefaultTimeout = 10000
-AppDirectoryQuota = 104857600
-AppHMILevelNoneTimeScaleMaxRequests = 100
-AppHMILevelNoneRequestsTimeScale = 10
-AppTimeScaleMaxRequests = 100
-AppRequestsTimeScale = 10
-PendingRequestsAmount = 1000
-HeartBeatTimeout = 0
-SupportedDiagModes = 0x01, 0x02, 0x03, 0x05, 0x06, 0x07, 0x09, 0x0A, 0x18, 0x19, 0x22, 0x3E
-
-[MEDIA MANAGER]
-EnableRedecoding = false
-;VideoStreamConsumer = socket
-;AudioStreamConsumer = socket
-;VideoStreamConsumer = file
-;AudioStreamConsumer = file
-VideoStreamConsumer = pipe
-AudioStreamConsumer = pipe
-;Temp solution: if you change NamedPipePath also change path to pipe in src/components/qt_hmi/qml_model_qtXX/views/SDLNavi.qml
-NamedVideoPipePath = /tmp/video_stream_pipe
-NamedAudioPipePath = /tmp/audio_stream_pipe
-VideoStreamFile = video_stream_file
-AudioStreamFile = audio_stream_file
-
-
-; HelpPromt and TimeOutPrompt is a vector of strings separated by comma
-[GLOBAL PROPERTIES]
-HelpPromt = Please speak one of the following commands, Please say a command
-TimeOutPromt = Please speak one of the following commands, Please say a command
-HelpTitle = Available Vr Commands List
-
-[FILESYSTEM RESTRICTIONS]
-; Max allowed number of PutFile requests for one application in NONE
-PutFileRequest = 5
-; Max allowed number of DeleteFile requests for one application in NONE
-DeleteFileRequest = 5
-; Max allowed number of ListFiles requests for one application in NONE
-ListFilesRequest = 5
-
-[VR COMMANDS]
-HelpCommand = Help
-
-
-[AppInfo]
-AppInfoStorage = app_info.dat
diff --git a/SDL_Core/src/appMain/start-qml.sh b/SDL_Core/src/appMain/start-qml.sh
deleted file mode 100755
index 1665b2689..000000000
--- a/SDL_Core/src/appMain/start-qml.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-#
-# This script start qml on QNX
-#
-
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib:
-QWS_DISPLAY=qnx
-QWS_MOUSE_PROTO=qnx
-QWS_KEYBOARD=qnx
-export QWS_DISPLAY QWS_MOUSE_PROTO QWS_KEYBOARD
-
-if [ ` pidin | grep devi-hid | wc -l` -eq 0 ]
-then
- slay -f devi-hid
-fi
-
-filename=$1
-pluginpath=$2
-
-if [ -z "$filename" ]
-then
- echo "Usage: start-qml.sh <filename> [<pluginpath>]"
- exit 1
-fi
-if [ -n "$pluginpath" ]
-then
- path="-I $pluginpath"
-fi
-
-/usr/photon/bin/devi-hid -Pr kbd mouse
-qmlviewer -fullscreen -stayontop -qws $filename $path
-slay devi-hid
diff --git a/SDL_Core/src/appMain/test.txt b/SDL_Core/src/appMain/test.txt
deleted file mode 100644
index 0e4b93615..000000000
--- a/SDL_Core/src/appMain/test.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-{'request': {'parameters': {'vrSynonyms': ['Stitcher'], 'appName': 'Stitcher', 'languageDesired': 'EN-US', 'syncMsgVersion': {'majorVersion': 1, 'minorVersion': 1}, 'isMediaApplication': True, 'autoActivateID': '', 'ngnMediaScreenAppName': 'Stitc'}, 'correlationID': 1, 'name': 'RegisterAppInterface'}}
-{'request': {'parameters': {}, 'name':'Show'}}
-{'request': {'parameters': {'mediaTrack': 'Stitcher', 'mainField1': 'Stitcher Radio', 'alignment': 'CENTERED', 'mainField2': ''}, 'correlationID': 3000, 'name': 'Show'}}
diff --git a/SDL_Core/src/appMain/wp1_policy_table.json b/SDL_Core/src/appMain/wp1_policy_table.json
deleted file mode 100644
index 767ba098d..000000000
--- a/SDL_Core/src/appMain/wp1_policy_table.json
+++ /dev/null
@@ -1,198 +0,0 @@
-{
- "policy_table" : {
- "app_policies" : {
- "789" : {
- "groups" : [ "Notifications", "Base-4" ],
- "nicknames" : [ "Music App" ],
- "priority" : 1
- },
- "default" : {
- "groups" : [ "Base-4" ],
- "priority" : 1
- }
- },
- "functional_groupings" : {
- "Base-4" : {
- "rpcs" : {
- "AddCommandID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AddSubMenuID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AlertID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "AlertManeuverID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ChangeRegistrationID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "CreateInteractionChoiceSetID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteCommandID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteFileID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DeleteInteractionChoiceSetID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DeleteSubMenuID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "DialNumberID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "DiagnosticMessageID":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "SystemRequestID":{
- "hmi_levels":[
- "BACKGROUND",
- "FULL",
- "LIMITED"
- ]
- },
- "EncodedSyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "EndAudioPassThruID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GenericResponseID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetDTCsID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "GetVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ListFilesID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAppInterfaceUnregisteredID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnAudioPassThruID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnButtonEventID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnButtonPressID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnCommandID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "OnDriverDistractionID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnEncodedSyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnHMIStatusID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnLanguageChangeID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnPermissionsChangeID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnSyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "OnTBTClientStateID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "OnVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "PerformAudioPassThruID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "PerformInteractionID" : {
- "hmi_levels" : [ "FULL" ]
- },
- "PutFileID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ReadDIDID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "RegisterAppInterfaceID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "ResetGlobalPropertiesID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ScrollableMessageID" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SetAppIconID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetDisplayLayoutID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "SetGlobalPropertiesID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SetMediaClockTimerID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "ShowConstantTBTID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "ShowID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SliderID" : {
- "hmi_levels" : [ "FULL" ]
- },
- "SpeakID" : {
- "hmi_levels" : [ "FULL", "LIMITED" ]
- },
- "SubscribeButtonID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SubscribeVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "SyncPDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnregisterAppInterfaceID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED", "NONE" ]
- },
- "UnsubscribeButtonID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UnsubscribeVehicleDataID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- },
- "UpdateTurnListID" : {
- "hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ]
- }
- }
- }
- },
- "module_config" : {
- "endpoints" : {
- "0x07" : {
- "default" : [ "http://applinkqa.trafficmanager.net/api/policies" ]
- }
- }
- }
- }
-}