summaryrefslogtreecommitdiff
path: root/src/appMain
diff options
context:
space:
mode:
Diffstat (limited to 'src/appMain')
-rw-r--r--src/appMain/CMakeLists.txt113
-rw-r--r--src/appMain/life_cycle.cc17
-rw-r--r--src/appMain/life_cycle.h3
3 files changed, 58 insertions, 75 deletions
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index a6774ec6f3..1382a07d2f 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, Ford Motor Company
+# Copyright (c) 2016, Ford Motor Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,12 +28,44 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
-IF (HMIADAPTER STREQUAL "messagebroker")
-set (BROKER_LIBRARIES
- MessageBrokerClient
- MessageBrokerServer
+include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
+
+find_package(SDLOpenSSL REQUIRED)
+
+include_directories(
+ ${COMPONENTS_DIR}/protocol_handler/include
+ ${COMPONENTS_DIR}/application_manager/include
+ ${COMPONENTS_DIR}/formatters/include
+ ${COMPONENTS_DIR}/transport_manager/include
+ ${COMPONENTS_DIR}/security_manager/include
+ ${COMPONENTS_DIR}/security_manager/include
+ ${COMPONENTS_DIR}/config_profile/include
+ ${COMPONENTS_DIR}/utils/include
+ ${COMPONENTS_DIR}/connection_handler/include
+ ${COMPONENTS_DIR}/hmi_message_handler/include
+ ${COMPONENTS_DIR}/request_watchdog/include
+ ${COMPONENTS_DIR}/smart_objects/include
+ ${COMPONENTS_DIR}/media_manager/include
+ ${COMPONENTS_DIR}/telemetry_monitor/include
+ ${POLICY_PATH}/include/
+ ${POLICY_GLOBAL_INCLUDE_PATH}/
+ ${COMPONENTS_DIR}/resumption/include
+ ${COMPONENTS_DIR}/dbus/include
+ ${CMAKE_BINARY_DIR}/src/components
+ ${JSONCPP_INCLUDE_DIRECTORY}
+ ${LOG4CXX_INCLUDE_DIRECTORY}
+ ${OPENSSL_INCLUDE_DIRECTORY}
+ ${MESSAGE_BROKER_INCLUDE_DIRECTORY}
)
-ENDIF ()
+
+collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}")
+
+if (HMIADAPTER STREQUAL "messagebroker")
+ set (BROKER_LIBRARIES
+ message_broker_client
+ message_broker_server
+ )
+endif()
cmake_policy(PUSH)
# make link_directories() treat paths relative to the source dir
@@ -43,18 +75,18 @@ link_directories(${LIBUSB_LIBS_DIRECTORY})
cmake_policy(POP)
if (EXTENDED_MEDIA_MODE)
-set(default_media_inc
-${GSTREAMER_gst_INCLUDE_DIR}
-${GSTREAMER_gstconfig_INCLUDE_DIR}
-)
+ set(default_media_inc
+ ${GSTREAMER_gst_INCLUDE_DIR}
+ ${GSTREAMER_gstconfig_INCLUDE_DIR}
+ )
else(EXTENDED_MEDIA_MODE)
-set(default_media_inc
-)
+ set(default_media_inc)
endif()
if (TELEMETRY_MONITOR)
- set(TELEMETRY_MONITOR_LIB
- TelemetryMonitor)
+ set(TELEMETRY_MONITOR_LIB
+ TelemetryMonitor
+ )
endif()
set(LIBRARIES
@@ -73,7 +105,7 @@ set(LIBRARIES
TransportManager
${SecurityManagerLibrary}
HMIMessageHandler
- MessageBroker
+ message_broker
${BROKER_LIBRARIES}
Utils
jsoncpp
@@ -87,12 +119,15 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
if (BUILD_BT_SUPPORT)
- list(APPEND LIBRARIES bluetooth)
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ list(APPEND LIBRARIES bluetooth)
+ endif()
endif()
+
if (BUILD_USB_SUPPORT)
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list(APPEND LIBRARIES Libusb-1.0.16)
-endif()
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ list(APPEND LIBRARIES Libusb-1.0.16)
+ endif()
endif()
if(ENABLE_LOG)
@@ -102,45 +137,6 @@ if(ENABLE_LOG)
list(APPEND LIBRARIES expat -L${EXPAT_LIBS_DIRECTORY})
endif()
-include_directories (
- ./
- ${COMPONENTS_DIR}/protocol_handler/include/
- ${JSONCPP_INCLUDE_DIRECTORY}
- ${COMPONENTS_DIR}/application_manager/include
- ${COMPONENTS_DIR}/formatters/include
- ${COMPONENTS_DIR}/transport_manager/include
- ${COMPONENTS_DIR}/security_manager/include
- ${SecurityManagerIncludeDir}
- ${COMPONENTS_DIR}/security_manager/include
- ${COMPONENTS_DIR}/config_profile/include
- ${COMPONENTS_DIR}/utils/include/
- ${COMPONENTS_DIR}/connection_handler/include/
- ${COMPONENTS_DIR}/hmi_message_handler/include
- ${COMPONENTS_DIR}/request_watchdog/include
- ${COMPONENTS_DIR}/smart_objects/include/
- ${COMPONENTS_DIR}/media_manager/include/
- ${COMPONENTS_DIR}/telemetry_monitor/include
- ${POLICY_PATH}/include/
- ${POLICY_GLOBAL_INCLUDE_PATH}/
- ${COMPONENTS_DIR}/resumption/include/
- ${MESSAGE_BROKER_INCLUDE_DIRECTORY}
- ${ENCRYPTION_INCLUDE_DIRECTORY}
- ${COMPONENTS_DIR}
- ${CMAKE_BINARY_DIR}/src/components/
- ${COMPONENTS_DIR}/dbus/include/
- ${CMAKE_SOURCE_DIR}
- ${default_media_inc}
- ${LOG4CXX_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/3rd_party/dbus-1.7.8
- ${CMAKE_SOURCE_DIR}/src/3rd_party/dbus-1.7.8/dbus/
-)
-
-set (SOURCES
- main.cc
- life_cycle.cc
- signal_handlers.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()
@@ -148,7 +144,6 @@ 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})
diff --git a/src/appMain/life_cycle.cc b/src/appMain/life_cycle.cc
index 3c3895d02f..9b4910585f 100644
--- a/src/appMain/life_cycle.cc
+++ b/src/appMain/life_cycle.cc
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2016, Ford Motor Company
+* Copyright (c) 2017, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
#include "utils/signals.h"
#include "utils/make_shared.h"
#include "config_profile/profile.h"
-#include "resumption/last_state.h"
+#include "resumption/last_state_impl.h"
#ifdef ENABLE_SECURITY
#include "security_manager/security_manager_impl.h"
@@ -102,8 +102,8 @@ LifeCycle::LifeCycle(const profile::Profile& profile)
bool LifeCycle::StartComponents() {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK(!last_state_);
- last_state_ = new resumption::LastState(profile_.app_storage_folder(),
- profile_.app_info_storage());
+ last_state_ = new resumption::LastStateImpl(profile_.app_storage_folder(),
+ profile_.app_info_storage());
DCHECK(!transport_manager_);
transport_manager_ = new transport_manager::TransportManagerDefault(profile_);
@@ -292,15 +292,6 @@ bool LifeCycle::InitMessageSystem() {
}
#endif // DBUS_HMIADAPTER
-#ifdef MQUEUE_HMIADAPTER
-bool LifeCycle::InitMessageSystem() {
- hmi_message_adapter_ = new hmi_message_handler::MqueueAdapter(hmi_handler_);
- hmi_handler.AddHMIMessageAdapter(hmi_message_adapter_);
- return true;
-}
-
-#endif // MQUEUE_HMIADAPTER
-
namespace {
void sig_handler(int sig) {
switch (sig) {
diff --git a/src/appMain/life_cycle.h b/src/appMain/life_cycle.h
index 2d6e0b938e..f1b3800254 100644
--- a/src/appMain/life_cycle.h
+++ b/src/appMain/life_cycle.h
@@ -43,9 +43,6 @@
#if (defined(MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI))
#include "hmi_message_handler/messagebroker_adapter.h"
#endif // #if ( defined (MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI) )
-#ifdef MQUEUE_HMIADAPTER
-#include "hmi_message_handler/mqueue_adapter.h"
-#endif // MQUEUE_HMIADAPTER
#include "application_manager/application_manager_impl.h"
#include "connection_handler/connection_handler_impl.h"
#include "protocol_handler/protocol_handler_impl.h"