From e541a042f1c51ab6e6e310a09946e57c897ee090 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Thu, 9 Jul 2020 20:49:35 -0500 Subject: [PATCH 1/8] Restore "Add OMX as a module" This reverts commit 8bbef14efa4a30578654cfb4116f5a70b80c1d8f. --- CMakeLists.txt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c177ac4..de74cc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,18 +48,12 @@ find_package(rtaudio REQUIRED) find_package(aasdk REQUIRED) find_package(ZLIB REQUIRED) find_package(GObject) +find_package(libomx) if(WIN32) set(WINSOCK2_LIBRARIES "ws2_32") endif(WIN32) -if(RPI_BUILD AND NOT GST_BUILD) - add_definitions(-DUSE_OMX -DOMX_SKIP64BIT) - set(BCM_HOST_LIBRARIES "/opt/vc/lib/libbcm_host.so") - set(BCM_HOST_INCLUDE_DIRS "/opt/vc/include") - set(ILCLIENT_INCLUDE_DIRS "/opt/vc/src/hello_pi/libs/ilclient") - set(ILCLIENT_LIBRARIES "/opt/vc/src/hello_pi/libs/ilclient/libilclient.a;/opt/vc/lib/libvcos.so;/opt/vc/lib/libvcilcs.a;/opt/vc/lib/libvchiq_arm.so") -endif(RPI_BUILD AND NOT GST_BUILD) if(GST_BUILD) find_package(Qt5GStreamer) find_package(PkgConfig REQUIRED) @@ -89,8 +83,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${PROTOBUF_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${RTAUDIO_INCLUDE_DIRS} - ${BCM_HOST_INCLUDE_DIRS} - ${ILCLIENT_INCLUDE_DIRS} ${GST_INCLUDE_DIRS} ${include_directory}) @@ -105,6 +97,7 @@ file(GLOB_RECURSE autoapp_source_files ${autoapp_sources_directory}/*.ui ${autoa add_executable(autoapp ${autoapp_source_files}) message(STATUS "${GST_LIBRARIES}") + target_link_libraries(autoapp aasdk libusb ${GST_LIBRARIES} ${Boost_LIBRARIES} @@ -114,8 +107,6 @@ target_link_libraries(autoapp aasdk libusb ${Qt5Bluetooth_LIBRARIES} ${PROTOBUF_LIBRARIES} ${ZLIB_LIBRARIES} - ${BCM_HOST_LIBRARIES} - ${ILCLIENT_LIBRARIES} ${WINSOCK2_LIBRARIES} ${RTAUDIO_LIBRARIES} ${QTGLIB_LIBRARY} @@ -129,6 +120,10 @@ target_link_libraries(autoapp aasdk libusb ${GOBJECT_LIBRARIES} ) +if(libomx_FOUND AND NOT GST_BUILD) + target_link_libraries(autoapp omx) +endif() + set(btservice_sources_directory ${sources_directory}/btservice) set(btservice_include_directory ${include_directory}/f1x/openauto/btservice) file(GLOB_RECURSE btservice_source_files ${btservice_sources_directory}/*.cpp ${btservice_include_directory}/*.hpp ${common_include_directory}/*.hpp) From 234ba0b22ac3031cbb1fb5bbe82d7500acbe14f7 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Thu, 9 Jul 2020 21:19:21 -0500 Subject: [PATCH 2/8] CMakeLists cleanup --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de74cc8..1be3dac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,17 +10,17 @@ project(openauto CXX) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) -set(base_directory ${CMAKE_CURRENT_SOURCE_DIR}) -set(resources_directory ${base_directory}/assets) -set(sources_directory ${base_directory}/src) -set(include_directory ${base_directory}/include) -include(${base_directory}/cmake_modules/functions.cmake) -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${base_directory}/lib) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${base_directory}/lib) +set(resources_directory ${CMAKE_CURRENT_SOURCE_DIR}/assets) +set(sources_directory ${CMAKE_CURRENT_SOURCE_DIR}/src) +set(include_directory ${CMAKE_CURRENT_SOURCE_DIR}/include) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/functions.cmake) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${base_directory}/bin) -set(EXECUTABLE_OUTPUT_PATH ${base_directory}/bin) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin) +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) From aef4b99cdf3c7694bd412796da65fc291e30fe7a Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Fri, 10 Jul 2020 11:18:54 -0500 Subject: [PATCH 3/8] Hide psabi warnings regardless of GCC version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1be3dac..2873b27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -pedantic") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_RELEASE "-g -O3") -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.3) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi") endif() From 6cc5a320166315f442505a82bb58c56056581574 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sat, 6 Jun 2020 20:36:10 -0500 Subject: [PATCH 4/8] Rearrange directory structure, namespaces, CMakeLists. --- .gitignore | 2 + CMakeLists.txt | 98 +++------------ autoapp/CMakeLists.txt | 32 +++++ {src/autoapp => autoapp}/UI/ConnectDialog.cpp | 10 +- {src/autoapp => autoapp}/UI/MainWindow.cpp | 8 +- .../autoapp => autoapp}/UI/SettingsWindow.cpp | 40 +++--- {src/autoapp => autoapp}/UI/connectdialog.ui | 0 {src/autoapp => autoapp}/UI/mainwindow.ui | 0 {src/autoapp => autoapp}/UI/settingswindow.ui | 0 {assets => autoapp/assets}/aa_video.qml | 0 .../assets}/ico_androidauto.png | Bin {assets => autoapp/assets}/ico_info.png | Bin {assets => autoapp/assets}/ico_setting.png | Bin {assets => autoapp/assets}/ico_warning.png | Bin {assets => autoapp/assets}/resources.qrc | 0 {src/autoapp => autoapp}/autoapp.cpp | 45 ++++--- .../AndroidBluetoothServer.cpp | 7 +- .../AndroidBluetoothService.cpp | 5 +- btservice/CMakeLists.txt | 25 ++++ {src/btservice => btservice}/btservice.cpp | 16 +-- cmake_modules/Findaasdk.cmake | 2 +- .../Common/Log.hpp => OpenautoLog.hpp} | 0 .../autoapp/UI/ConnectDialog.hpp | 16 +-- .../openauto => }/autoapp/UI/MainWindow.hpp | 6 - .../autoapp/UI/SettingsWindow.hpp | 14 +-- .../btservice/AndroidBluetoothServer.hpp | 5 +- .../btservice/AndroidBluetoothService.hpp | 5 +- .../btservice/IAndroidBluetoothServer.hpp | 3 - .../btservice/IAndroidBluetoothService.hpp | 3 - .../openauto/autoapp => openauto}/App.hpp | 28 ++--- .../Configuration/AudioOutputBackendType.hpp | 6 - .../Configuration/BluetootAdapterType.hpp | 6 - .../Configuration/Configuration.hpp | 8 +- .../Configuration/HandednessOfTrafficType.hpp | 6 - .../Configuration/IConfiguration.hpp | 18 +-- .../Configuration/IRecentAddressesList.hpp | 6 - .../Configuration/RecentAddressesList.hpp | 8 +- .../Projection/DummyBluetoothDevice.hpp | 8 +- .../Projection/GSTVideoOutput.hpp | 8 +- .../Projection/IAudioInput.hpp | 10 +- .../Projection/IAudioOutput.hpp | 10 +- .../Projection/IBluetoothDevice.hpp | 8 +- .../Projection/IInputDevice.hpp | 10 +- .../Projection/IInputDeviceEventHandler.hpp | 8 +- .../Projection/IVideoOutput.hpp | 12 +- .../Projection/InputDevice.hpp | 10 +- .../Projection/InputEvent.hpp | 12 +- .../Projection/LocalBluetoothDevice.hpp | 8 +- .../Projection/OMXVideoOutput.hpp | 8 +- .../Projection/QtAudioInput.hpp | 8 +- .../Projection/QtAudioOutput.hpp | 10 +- .../Projection/QtVideoOutput.hpp | 10 +- .../Projection/RemoteBluetoothDevice.hpp | 8 +- .../Projection/RtAudioOutput.hpp | 10 +- .../Projection/SequentialBuffer.hpp | 8 +- .../Projection/VideoOutput.hpp | 10 +- .../Service/AndroidAutoEntity.hpp | 22 ++-- .../Service/AndroidAutoEntityFactory.hpp | 14 +-- .../Service/AudioInputService.hpp | 12 +- .../Service/AudioService.hpp | 14 +-- .../Service/BluetoothService.hpp | 12 +- .../Service/IAndroidAutoEntity.hpp | 8 +- .../IAndroidAutoEntityEventHandler.hpp | 8 +- .../Service/IAndroidAutoEntityFactory.hpp | 12 +- .../autoapp => openauto}/Service/IPinger.hpp | 8 +- .../autoapp => openauto}/Service/IService.hpp | 8 +- .../Service/IServiceFactory.hpp | 10 +- .../Service/InputService.hpp | 16 +-- .../Service/MediaAudioService.hpp | 10 +- .../autoapp => openauto}/Service/Pinger.hpp | 8 +- .../Service/SensorService.hpp | 10 +- .../Service/ServiceFactory.hpp | 22 ++-- .../Service/SpeechAudioService.hpp | 10 +- .../Service/SystemAudioService.hpp | 10 +- .../Service/VideoService.hpp | 14 +-- {src/autoapp => openauto}/App.cpp | 16 +-- openauto/CMakeLists.txt | 114 ++++++++++++++++++ .../Configuration/Configuration.cpp | 10 +- .../Configuration/RecentAddressesList.cpp | 10 +- .../Projection/DummyBluetoothDevice.cpp | 8 +- .../Projection/GSTVideoOutput.cpp | 12 +- .../Projection/InputDevice.cpp | 12 +- .../Projection/LocalBluetoothDevice.cpp | 10 +- .../Projection/OMXVideoOutput.cpp | 12 +- .../Projection/QtAudioInput.cpp | 10 +- .../Projection/QtAudioOutput.cpp | 11 +- .../Projection/QtVideoOutput.cpp | 10 +- .../Projection/RemoteBluetoothDevice.cpp | 8 +- .../Projection/RtAudioOutput.cpp | 10 +- .../Projection/SequentialBuffer.cpp | 8 +- .../Projection/VideoOutput.cpp | 8 +- .../Service/AndroidAutoEntity.cpp | 12 +- .../Service/AndroidAutoEntityFactory.cpp | 28 ++--- .../Service/AudioInputService.cpp | 10 +- .../Service/AudioService.cpp | 10 +- .../Service/BluetoothService.cpp | 10 +- .../Service/InputService.cpp | 12 +- .../Service/MediaAudioService.cpp | 10 +- {src/autoapp => openauto}/Service/Pinger.cpp | 8 +- .../Service/SensorService.cpp | 12 +- .../Service/ServiceFactory.cpp | 50 ++++---- .../Service/SpeechAudioService.cpp | 10 +- .../Service/SystemAudioService.cpp | 10 +- .../Service/VideoService.cpp | 10 +- 104 files changed, 450 insertions(+), 843 deletions(-) create mode 100644 autoapp/CMakeLists.txt rename {src/autoapp => autoapp}/UI/ConnectDialog.cpp (93%) rename {src/autoapp => autoapp}/UI/MainWindow.cpp (93%) rename {src/autoapp => autoapp}/UI/SettingsWindow.cpp (89%) rename {src/autoapp => autoapp}/UI/connectdialog.ui (100%) rename {src/autoapp => autoapp}/UI/mainwindow.ui (100%) rename {src/autoapp => autoapp}/UI/settingswindow.ui (100%) rename {assets => autoapp/assets}/aa_video.qml (100%) rename {assets => autoapp/assets}/ico_androidauto.png (100%) rename {assets => autoapp/assets}/ico_info.png (100%) rename {assets => autoapp/assets}/ico_setting.png (100%) rename {assets => autoapp/assets}/ico_warning.png (100%) rename {assets => autoapp/assets}/resources.qrc (100%) rename {src/autoapp => autoapp}/autoapp.cpp (74%) rename {src/btservice => btservice}/AndroidBluetoothServer.cpp (93%) rename {src/btservice => btservice}/AndroidBluetoothService.cpp (97%) create mode 100644 btservice/CMakeLists.txt rename {src/btservice => btservice}/btservice.cpp (71%) rename include/{f1x/openauto/Common/Log.hpp => OpenautoLog.hpp} (100%) rename include/{f1x/openauto => }/autoapp/UI/ConnectDialog.hpp (74%) rename include/{f1x/openauto => }/autoapp/UI/MainWindow.hpp (96%) rename include/{f1x/openauto => }/autoapp/UI/SettingsWindow.hpp (74%) rename include/{f1x/openauto => }/btservice/AndroidBluetoothServer.hpp (93%) rename include/{f1x/openauto => }/btservice/AndroidBluetoothService.hpp (93%) rename include/{f1x/openauto => }/btservice/IAndroidBluetoothServer.hpp (98%) rename include/{f1x/openauto => }/btservice/IAndroidBluetoothService.hpp (98%) rename include/{f1x/openauto/autoapp => openauto}/App.hpp (69%) rename include/{f1x/openauto/autoapp => openauto}/Configuration/AudioOutputBackendType.hpp (95%) rename include/{f1x/openauto/autoapp => openauto}/Configuration/BluetootAdapterType.hpp (95%) rename include/{f1x/openauto/autoapp => openauto}/Configuration/Configuration.hpp (98%) rename include/{f1x/openauto/autoapp => openauto}/Configuration/HandednessOfTrafficType.hpp (95%) rename include/{f1x/openauto/autoapp => openauto}/Configuration/IConfiguration.hpp (88%) rename include/{f1x/openauto/autoapp => openauto}/Configuration/IRecentAddressesList.hpp (96%) rename include/{f1x/openauto/autoapp => openauto}/Configuration/RecentAddressesList.hpp (92%) rename include/{f1x/openauto/autoapp => openauto}/Projection/DummyBluetoothDevice.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Projection/GSTVideoOutput.hpp (96%) rename include/{f1x/openauto/autoapp => openauto}/Projection/IAudioInput.hpp (92%) rename include/{f1x/openauto/autoapp => openauto}/Projection/IAudioOutput.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Projection/IBluetoothDevice.hpp (94%) rename include/{f1x/openauto/autoapp => openauto}/Projection/IInputDevice.hpp (90%) rename include/{f1x/openauto/autoapp => openauto}/Projection/IInputDeviceEventHandler.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Projection/IVideoOutput.hpp (89%) rename include/{f1x/openauto/autoapp => openauto}/Projection/InputDevice.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Projection/InputEvent.hpp (87%) rename include/{f1x/openauto/autoapp => openauto}/Projection/LocalBluetoothDevice.hpp (95%) rename include/{f1x/openauto/autoapp => openauto}/Projection/OMXVideoOutput.hpp (95%) rename include/{f1x/openauto/autoapp => openauto}/Projection/QtAudioInput.hpp (94%) rename include/{f1x/openauto/autoapp => openauto}/Projection/QtAudioOutput.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Projection/QtVideoOutput.hpp (90%) rename include/{f1x/openauto/autoapp => openauto}/Projection/RemoteBluetoothDevice.hpp (92%) rename include/{f1x/openauto/autoapp => openauto}/Projection/RtAudioOutput.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Projection/SequentialBuffer.hpp (95%) rename include/{f1x/openauto/autoapp => openauto}/Projection/VideoOutput.hpp (88%) rename include/{f1x/openauto/autoapp => openauto}/Service/AndroidAutoEntity.hpp (85%) rename include/{f1x/openauto/autoapp => openauto}/Service/AndroidAutoEntityFactory.hpp (84%) rename include/{f1x/openauto/autoapp => openauto}/Service/AudioInputService.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Service/AudioService.hpp (89%) rename include/{f1x/openauto/autoapp => openauto}/Service/BluetoothService.hpp (89%) rename include/{f1x/openauto/autoapp => openauto}/Service/IAndroidAutoEntity.hpp (90%) rename include/{f1x/openauto/autoapp => openauto}/Service/IAndroidAutoEntityEventHandler.hpp (92%) rename include/{f1x/openauto/autoapp => openauto}/Service/IAndroidAutoEntityFactory.hpp (85%) rename include/{f1x/openauto/autoapp => openauto}/Service/IPinger.hpp (93%) rename include/{f1x/openauto/autoapp => openauto}/Service/IService.hpp (91%) rename include/{f1x/openauto/autoapp => openauto}/Service/IServiceFactory.hpp (87%) rename include/{f1x/openauto/autoapp => openauto}/Service/InputService.hpp (85%) rename include/{f1x/openauto/autoapp => openauto}/Service/MediaAudioService.hpp (87%) rename include/{f1x/openauto/autoapp => openauto}/Service/Pinger.hpp (93%) rename include/{f1x/openauto/autoapp => openauto}/Service/SensorService.hpp (92%) rename include/{f1x/openauto/autoapp => openauto}/Service/ServiceFactory.hpp (82%) rename include/{f1x/openauto/autoapp => openauto}/Service/SpeechAudioService.hpp (87%) rename include/{f1x/openauto/autoapp => openauto}/Service/SystemAudioService.hpp (87%) rename include/{f1x/openauto/autoapp => openauto}/Service/VideoService.hpp (89%) rename {src/autoapp => openauto}/App.cpp (94%) create mode 100644 openauto/CMakeLists.txt rename {src/autoapp => openauto}/Configuration/Configuration.cpp (99%) rename {src/autoapp => openauto}/Configuration/RecentAddressesList.cpp (95%) rename {src/autoapp => openauto}/Projection/DummyBluetoothDevice.cpp (91%) rename {src/autoapp => openauto}/Projection/GSTVideoOutput.cpp (97%) rename {src/autoapp => openauto}/Projection/InputDevice.cpp (96%) rename {src/autoapp => openauto}/Projection/LocalBluetoothDevice.cpp (97%) rename {src/autoapp => openauto}/Projection/OMXVideoOutput.cpp (98%) rename {src/autoapp => openauto}/Projection/QtAudioInput.cpp (96%) rename {src/autoapp => openauto}/Projection/QtAudioOutput.cpp (95%) rename {src/autoapp => openauto}/Projection/QtVideoOutput.cpp (95%) rename {src/autoapp => openauto}/Projection/RemoteBluetoothDevice.cpp (92%) rename {src/autoapp => openauto}/Projection/RtAudioOutput.cpp (96%) rename {src/autoapp => openauto}/Projection/SequentialBuffer.cpp (95%) rename {src/autoapp => openauto}/Projection/VideoOutput.cpp (93%) rename {src/autoapp => openauto}/Service/AndroidAutoEntity.cpp (98%) rename {src/autoapp => openauto}/Service/AndroidAutoEntityFactory.cpp (81%) rename {src/autoapp => openauto}/Service/AudioInputService.cpp (98%) rename {src/autoapp => openauto}/Service/AudioService.cpp (98%) rename {src/autoapp => openauto}/Service/BluetoothService.cpp (96%) rename {src/autoapp => openauto}/Service/InputService.cpp (97%) rename {src/autoapp => openauto}/Service/MediaAudioService.cpp (87%) rename {src/autoapp => openauto}/Service/Pinger.cpp (96%) rename {src/autoapp => openauto}/Service/SensorService.cpp (96%) rename {src/autoapp => openauto}/Service/ServiceFactory.cpp (86%) rename {src/autoapp => openauto}/Service/SpeechAudioService.cpp (86%) rename {src/autoapp => openauto}/Service/SystemAudioService.cpp (86%) rename {src/autoapp => openauto}/Service/VideoService.cpp (98%) diff --git a/.gitignore b/.gitignore index 30e72b9..4e46436 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ lib/ bin/ CMakeLists.txt.user +cmake-build-*/ +.idea/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 2873b27..a8277a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,21 +11,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) -set(resources_directory ${CMAKE_CURRENT_SOURCE_DIR}/assets) -set(sources_directory ${CMAKE_CURRENT_SOURCE_DIR}/src) -set(include_directory ${CMAKE_CURRENT_SOURCE_DIR}/include) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/functions.cmake) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin) -set(Boost_USE_STATIC_LIBS OFF) -set(Boost_USE_MULTITHREADED ON) -set(Boost_USE_STATIC_RUNTIME OFF) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake_modules/") SET(CMAKE_CXX_STANDARD 14) @@ -37,24 +27,26 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi") endif() +set(Boost_USE_STATIC_LIBS OFF) +set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_RUNTIME OFF) add_definitions(-DBOOST_ALL_DYN_LINK) - find_package(Boost REQUIRED COMPONENTS system log OPTIONAL_COMPONENTS unit_test_framework) + find_package(libusb-1.0 REQUIRED) find_package(Qt5 COMPONENTS Multimedia MultimediaWidgets Bluetooth Qml Quick QuickWidgets REQUIRED) find_package(Protobuf REQUIRED) find_package(OpenSSL REQUIRED) find_package(rtaudio REQUIRED) find_package(aasdk REQUIRED) -find_package(ZLIB REQUIRED) -find_package(GObject) -find_package(libomx) +find_package(Threads) -if(WIN32) - set(WINSOCK2_LIBRARIES "ws2_32") -endif(WIN32) +if(RPI_BUILD) + find_package(libomx) +endif() if(GST_BUILD) + find_package(GObject) find_package(Qt5GStreamer) find_package(PkgConfig REQUIRED) pkg_check_modules(GST REQUIRED @@ -65,77 +57,17 @@ if(GST_BUILD) add_definitions(-DUSE_GST) if(RPI_BUILD) add_definitions(-DRPI) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/functions.cmake) findRpiRevision( RPI_REVISION ) if(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111") message("Raspberry Pi 4 Found") add_definitions(-DPI4) endif(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111") endif(RPI_BUILD) -endif(GST_BUILD) - -include_directories(${CMAKE_CURRENT_BINARY_DIR} - ${Qt5Multimedia_INCLUDE_DIRS} - ${Qt5MultimediaWidgets_INCLUDE_DIRS} - ${Qt5Widgets_INCLUDE_DIRS} - ${Qt5Bluetooth_INCLUDE_DIRS} - ${QTGSTREAMER_INCLUDE_DIR} - ${Boost_INCLUDE_DIRS} - ${PROTOBUF_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} - ${RTAUDIO_INCLUDE_DIRS} - ${GST_INCLUDE_DIRS} - ${include_directory}) - -link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) - -set(common_include_directory ${include_directory}/f1x/openauto/Common) - -set(autoapp_sources_directory ${sources_directory}/autoapp) -set(autoapp_include_directory ${include_directory}/f1x/openauto/autoapp) -file(GLOB_RECURSE autoapp_source_files ${autoapp_sources_directory}/*.ui ${autoapp_sources_directory}/*.cpp ${autoapp_include_directory}/*.hpp ${common_include_directory}/*.hpp ${resources_directory}/*.qrc) - -add_executable(autoapp ${autoapp_source_files}) - message(STATUS "${GST_LIBRARIES}") +endif(GST_BUILD) + -target_link_libraries(autoapp aasdk libusb - ${GST_LIBRARIES} - ${Boost_LIBRARIES} - ${Qt5Multimedia_LIBRARIES} - ${Qt5MultimediaWidgets_LIBRARIES} - ${Qt5QuickWidgets_LIBRARIES} - ${Qt5Bluetooth_LIBRARIES} - ${PROTOBUF_LIBRARIES} - ${ZLIB_LIBRARIES} - ${WINSOCK2_LIBRARIES} - ${RTAUDIO_LIBRARIES} - ${QTGLIB_LIBRARY} - ${QTGLIB_LIBRARIES} - ${QTGSTREAMER_LIBRARY} - ${QTGSTREAMER_LIBRARIES} - ${QTGSTREAMER_UI_LIBRARY} - ${QTGSTREAMER_UI_LIBRARIES} - ${QTGSTREAMER_QUICK_LIBRARIES} - ${QTGSTREAMER_QUICK_LIBRARY} - ${GOBJECT_LIBRARIES} - ) - -if(libomx_FOUND AND NOT GST_BUILD) - target_link_libraries(autoapp omx) -endif() - -set(btservice_sources_directory ${sources_directory}/btservice) -set(btservice_include_directory ${include_directory}/f1x/openauto/btservice) -file(GLOB_RECURSE btservice_source_files ${btservice_sources_directory}/*.cpp ${btservice_include_directory}/*.hpp ${common_include_directory}/*.hpp) - -add_executable(btservice ${btservice_source_files}) - -target_link_libraries(btservice - ${Boost_LIBRARIES} - ${Qt5Bluetooth_LIBRARIES} - ${Qt5MultimediaWidgets_LIBRARIES} - ${PROTOBUF_LIBRARIES} -) - -install(TARGETS autoapp btservice - RUNTIME DESTINATION bin) +add_subdirectory(openauto) +add_subdirectory(btservice) +add_subdirectory(autoapp) diff --git a/autoapp/CMakeLists.txt b/autoapp/CMakeLists.txt new file mode 100644 index 0000000..19385e7 --- /dev/null +++ b/autoapp/CMakeLists.txt @@ -0,0 +1,32 @@ +add_executable(autoapp + autoapp.cpp + UI/connectdialog.ui + UI/ConnectDialog.cpp + UI/mainwindow.ui + UI/MainWindow.cpp + UI/settingswindow.ui + UI/SettingsWindow.cpp + assets/resources.qrc + ${CMAKE_SOURCE_DIR}/include/autoapp/UI/ConnectDialog.hpp + ${CMAKE_SOURCE_DIR}/include/autoapp/UI/MainWindow.hpp + ${CMAKE_SOURCE_DIR}/include/autoapp/UI/SettingsWindow.hpp + ) + +target_include_directories(autoapp PRIVATE + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_CURRENT_BINARY_DIR} + ) + +target_link_libraries(autoapp + openauto + ) + +if(RPI_BUILD) + target_link_libraries(autoapp omx) +endif() + +set_target_properties(autoapp + PROPERTIES INSTALL_RPATH_USE_LINK_PATH 1) + +install(TARGETS autoapp + RUNTIME DESTINATION bin) diff --git a/src/autoapp/UI/ConnectDialog.cpp b/autoapp/UI/ConnectDialog.cpp similarity index 93% rename from src/autoapp/UI/ConnectDialog.cpp rename to autoapp/UI/ConnectDialog.cpp index 127e216..479db07 100644 --- a/src/autoapp/UI/ConnectDialog.cpp +++ b/autoapp/UI/ConnectDialog.cpp @@ -1,17 +1,13 @@ #include -#include +#include "autoapp/UI/ConnectDialog.hpp" #include "ui_connectdialog.h" -namespace f1x -{ -namespace openauto -{ namespace autoapp { namespace ui { -ConnectDialog::ConnectDialog(boost::asio::io_service& ioService, aasdk::tcp::ITCPWrapper& tcpWrapper, openauto::autoapp::configuration::IRecentAddressesList& recentAddressesList, QWidget *parent) +ConnectDialog::ConnectDialog(boost::asio::io_service& ioService, aasdk::tcp::ITCPWrapper& tcpWrapper, openauto::configuration::IRecentAddressesList& recentAddressesList, QWidget *parent) : QDialog(parent) , ioService_(ioService) , tcpWrapper_(tcpWrapper) @@ -121,5 +117,3 @@ void ConnectDialog::insertIpAddress(const std::string& ipAddress) } } -} -} diff --git a/src/autoapp/UI/MainWindow.cpp b/autoapp/UI/MainWindow.cpp similarity index 93% rename from src/autoapp/UI/MainWindow.cpp rename to autoapp/UI/MainWindow.cpp index 49954f8..44bd961 100644 --- a/src/autoapp/UI/MainWindow.cpp +++ b/autoapp/UI/MainWindow.cpp @@ -17,13 +17,9 @@ */ #include -#include +#include "autoapp/UI/MainWindow.hpp" #include "ui_mainwindow.h" -namespace f1x -{ -namespace openauto -{ namespace autoapp { namespace ui @@ -47,5 +43,3 @@ MainWindow::~MainWindow() } } -} -} diff --git a/src/autoapp/UI/SettingsWindow.cpp b/autoapp/UI/SettingsWindow.cpp similarity index 89% rename from src/autoapp/UI/SettingsWindow.cpp rename to autoapp/UI/SettingsWindow.cpp index 5f64b3e..16f32e3 100644 --- a/src/autoapp/UI/SettingsWindow.cpp +++ b/autoapp/UI/SettingsWindow.cpp @@ -17,19 +17,15 @@ */ #include -#include +#include "autoapp/UI/SettingsWindow.hpp" #include "ui_settingswindow.h" -namespace f1x -{ -namespace openauto -{ namespace autoapp { namespace ui { -SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configuration, QWidget *parent) +SettingsWindow::SettingsWindow(openauto::configuration::IConfiguration::Pointer configuration, QWidget *parent) : QWidget(parent) , ui_(new Ui::SettingsWindow) , configuration_(std::move(configuration)) @@ -54,7 +50,7 @@ SettingsWindow::~SettingsWindow() void SettingsWindow::onSave() { - configuration_->setHandednessOfTrafficType(ui_->radioButtonLeftHandDrive->isChecked() ? configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE : configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE); + configuration_->setHandednessOfTrafficType(ui_->radioButtonLeftHandDrive->isChecked() ? openauto::configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE : openauto::configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE); configuration_->showClock(ui_->checkBoxShowClock->isChecked()); configuration_->setVideoFPS(ui_->radioButton30FPS->isChecked() ? aasdk::proto::enums::VideoFPS::_30 : aasdk::proto::enums::VideoFPS::_60); @@ -82,22 +78,22 @@ void SettingsWindow::onSave() if(ui_->radioButtonDisableBluetooth->isChecked()) { - configuration_->setBluetoothAdapterType(configuration::BluetoothAdapterType::NONE); + configuration_->setBluetoothAdapterType(openauto::configuration::BluetoothAdapterType::NONE); } else if(ui_->radioButtonUseLocalBluetoothAdapter->isChecked()) { - configuration_->setBluetoothAdapterType(configuration::BluetoothAdapterType::LOCAL); + configuration_->setBluetoothAdapterType(openauto::configuration::BluetoothAdapterType::LOCAL); } else if(ui_->radioButtonUseExternalBluetoothAdapter->isChecked()) { - configuration_->setBluetoothAdapterType(configuration::BluetoothAdapterType::REMOTE); + configuration_->setBluetoothAdapterType(openauto::configuration::BluetoothAdapterType::REMOTE); } configuration_->setBluetoothRemoteAdapterAddress(ui_->lineEditExternalBluetoothAdapterAddress->text().toStdString()); configuration_->setMusicAudioChannelEnabled(ui_->checkBoxMusicAudioChannel->isChecked()); configuration_->setSpeechAudioChannelEnabled(ui_->checkBoxSpeechAudioChannel->isChecked()); - configuration_->setAudioOutputBackendType(ui_->radioButtonRtAudio->isChecked() ? configuration::AudioOutputBackendType::RTAUDIO : configuration::AudioOutputBackendType::QT); + configuration_->setAudioOutputBackendType(ui_->radioButtonRtAudio->isChecked() ? openauto::configuration::AudioOutputBackendType::RTAUDIO : openauto::configuration::AudioOutputBackendType::QT); configuration_->save(); this->close(); @@ -122,8 +118,8 @@ void SettingsWindow::showEvent(QShowEvent* event) void SettingsWindow::load() { - ui_->radioButtonLeftHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE); - ui_->radioButtonRightHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE); + ui_->radioButtonLeftHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == openauto::configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE); + ui_->radioButtonRightHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == openauto::configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE); ui_->checkBoxShowClock->setChecked(configuration_->showClock()); ui_->radioButton30FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_30); @@ -142,18 +138,18 @@ void SettingsWindow::load() ui_->checkBoxEnableTouchscreen->setChecked(configuration_->getTouchscreenEnabled()); this->loadButtonCheckBoxes(); - ui_->radioButtonDisableBluetooth->setChecked(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::NONE); - ui_->radioButtonUseLocalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::LOCAL); - ui_->radioButtonUseExternalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::REMOTE); - ui_->lineEditExternalBluetoothAdapterAddress->setEnabled(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::REMOTE); + ui_->radioButtonDisableBluetooth->setChecked(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::NONE); + ui_->radioButtonUseLocalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::LOCAL); + ui_->radioButtonUseExternalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::REMOTE); + ui_->lineEditExternalBluetoothAdapterAddress->setEnabled(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::REMOTE); ui_->lineEditExternalBluetoothAdapterAddress->setText(QString::fromStdString(configuration_->getBluetoothRemoteAdapterAddress())); ui_->checkBoxMusicAudioChannel->setChecked(configuration_->musicAudioChannelEnabled()); ui_->checkBoxSpeechAudioChannel->setChecked(configuration_->speechAudioChannelEnabled()); const auto& audioOutputBackendType = configuration_->getAudioOutputBackendType(); - ui_->radioButtonRtAudio->setChecked(audioOutputBackendType == configuration::AudioOutputBackendType::RTAUDIO); - ui_->radioButtonQtAudio->setChecked(audioOutputBackendType == configuration::AudioOutputBackendType::QT); + ui_->radioButtonRtAudio->setChecked(audioOutputBackendType == openauto::configuration::AudioOutputBackendType::RTAUDIO); + ui_->radioButtonQtAudio->setChecked(audioOutputBackendType == openauto::configuration::AudioOutputBackendType::QT); } void SettingsWindow::loadButtonCheckBoxes() @@ -199,7 +195,7 @@ void SettingsWindow::setButtonCheckBoxes(bool value) void SettingsWindow::saveButtonCheckBoxes() { - configuration::IConfiguration::ButtonCodes buttonCodes; + openauto::configuration::IConfiguration::ButtonCodes buttonCodes; this->saveButtonCheckBox(ui_->checkBoxPlayButton, buttonCodes, aasdk::proto::enums::ButtonCode::PLAY); this->saveButtonCheckBox(ui_->checkBoxPauseButton, buttonCodes, aasdk::proto::enums::ButtonCode::PAUSE); this->saveButtonCheckBox(ui_->checkBoxTogglePlayButton, buttonCodes, aasdk::proto::enums::ButtonCode::TOGGLE_PLAY); @@ -219,7 +215,7 @@ void SettingsWindow::saveButtonCheckBoxes() configuration_->setButtonCodes(buttonCodes); } -void SettingsWindow::saveButtonCheckBox(const QCheckBox* checkBox, configuration::IConfiguration::ButtonCodes& buttonCodes, aasdk::proto::enums::ButtonCode::Enum buttonCode) +void SettingsWindow::saveButtonCheckBox(const QCheckBox* checkBox, openauto::configuration::IConfiguration::ButtonCodes& buttonCodes, aasdk::proto::enums::ButtonCode::Enum buttonCode) { if(checkBox->isChecked()) { @@ -259,5 +255,3 @@ void SettingsWindow::onShowBindings() } } -} -} diff --git a/src/autoapp/UI/connectdialog.ui b/autoapp/UI/connectdialog.ui similarity index 100% rename from src/autoapp/UI/connectdialog.ui rename to autoapp/UI/connectdialog.ui diff --git a/src/autoapp/UI/mainwindow.ui b/autoapp/UI/mainwindow.ui similarity index 100% rename from src/autoapp/UI/mainwindow.ui rename to autoapp/UI/mainwindow.ui diff --git a/src/autoapp/UI/settingswindow.ui b/autoapp/UI/settingswindow.ui similarity index 100% rename from src/autoapp/UI/settingswindow.ui rename to autoapp/UI/settingswindow.ui diff --git a/assets/aa_video.qml b/autoapp/assets/aa_video.qml similarity index 100% rename from assets/aa_video.qml rename to autoapp/assets/aa_video.qml diff --git a/assets/ico_androidauto.png b/autoapp/assets/ico_androidauto.png similarity index 100% rename from assets/ico_androidauto.png rename to autoapp/assets/ico_androidauto.png diff --git a/assets/ico_info.png b/autoapp/assets/ico_info.png similarity index 100% rename from assets/ico_info.png rename to autoapp/assets/ico_info.png diff --git a/assets/ico_setting.png b/autoapp/assets/ico_setting.png similarity index 100% rename from assets/ico_setting.png rename to autoapp/assets/ico_setting.png diff --git a/assets/ico_warning.png b/autoapp/assets/ico_warning.png similarity index 100% rename from assets/ico_warning.png rename to autoapp/assets/ico_warning.png diff --git a/assets/resources.qrc b/autoapp/assets/resources.qrc similarity index 100% rename from assets/resources.qrc rename to autoapp/assets/resources.qrc diff --git a/src/autoapp/autoapp.cpp b/autoapp/autoapp.cpp similarity index 74% rename from src/autoapp/autoapp.cpp rename to autoapp/autoapp.cpp index 2aa9dcb..68c5acb 100644 --- a/src/autoapp/autoapp.cpp +++ b/autoapp/autoapp.cpp @@ -18,25 +18,24 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "aasdk/USB/USBHub.hpp" +#include "aasdk/USB/ConnectedAccessoriesEnumerator.hpp" +#include "aasdk/USB/AccessoryModeQueryChain.hpp" +#include "aasdk/USB/AccessoryModeQueryChainFactory.hpp" +#include "aasdk/USB/AccessoryModeQueryFactory.hpp" +#include "aasdk/TCP/TCPWrapper.hpp" +#include "openauto/App.hpp" +#include "openauto/Configuration/IConfiguration.hpp" +#include "openauto/Configuration/RecentAddressesList.hpp" +#include "openauto/Service/AndroidAutoEntityFactory.hpp" +#include "openauto/Service/ServiceFactory.hpp" +#include "openauto/Configuration/Configuration.hpp" +#include "autoapp/UI/MainWindow.hpp" +#include "autoapp/UI/SettingsWindow.hpp" +#include "autoapp/UI/ConnectDialog.hpp" +#include "OpenautoLog.hpp" -namespace aasdk = f1x::aasdk; -namespace autoapp = f1x::openauto::autoapp; +using namespace openauto; using ThreadPool = std::vector; void startUSBWorkers(boost::asio::io_service& ioService, libusb_context* usbContext, ThreadPool& threadPool) @@ -87,11 +86,11 @@ int main(int argc, char* argv[]) autoapp::ui::MainWindow mainWindow; mainWindow.setWindowFlags(Qt::WindowStaysOnTopHint); - auto configuration = std::make_shared(); + auto configuration = std::make_shared(); autoapp::ui::SettingsWindow settingsWindow(configuration); settingsWindow.setWindowFlags(Qt::WindowStaysOnTopHint); - autoapp::configuration::RecentAddressesList recentAddressesList(7); + openauto::configuration::RecentAddressesList recentAddressesList(7); recentAddressesList.read(); aasdk::tcp::TCPWrapper tcpWrapper; @@ -113,12 +112,12 @@ int main(int argc, char* argv[]) aasdk::usb::USBWrapper usbWrapper(usbContext); aasdk::usb::AccessoryModeQueryFactory queryFactory(usbWrapper, ioService); aasdk::usb::AccessoryModeQueryChainFactory queryChainFactory(usbWrapper, ioService, queryFactory); - autoapp::service::ServiceFactory serviceFactory(ioService, configuration); - autoapp::service::AndroidAutoEntityFactory androidAutoEntityFactory(ioService, configuration, serviceFactory); + openauto::service::ServiceFactory serviceFactory(ioService, configuration); + openauto::service::AndroidAutoEntityFactory androidAutoEntityFactory(ioService, configuration, serviceFactory); auto usbHub(std::make_shared(usbWrapper, ioService, queryChainFactory)); auto connectedAccessoriesEnumerator(std::make_shared(usbWrapper, ioService, queryChainFactory)); - auto app = std::make_shared(ioService, usbWrapper, tcpWrapper, androidAutoEntityFactory, std::move(usbHub), std::move(connectedAccessoriesEnumerator)); + auto app = std::make_shared(ioService, usbWrapper, tcpWrapper, androidAutoEntityFactory, std::move(usbHub), std::move(connectedAccessoriesEnumerator)); QObject::connect(&connectDialog, &autoapp::ui::ConnectDialog::connectionSucceed, [&app](auto socket) { app->start(std::move(socket)); diff --git a/src/btservice/AndroidBluetoothServer.cpp b/btservice/AndroidBluetoothServer.cpp similarity index 93% rename from src/btservice/AndroidBluetoothServer.cpp rename to btservice/AndroidBluetoothServer.cpp index c827e2b..d6d48a3 100644 --- a/src/btservice/AndroidBluetoothServer.cpp +++ b/btservice/AndroidBluetoothServer.cpp @@ -16,11 +16,9 @@ * along with openauto. If not, see . */ -#include -#include +#include "OpenautoLog.hpp" +#include "btservice/AndroidBluetoothServer.hpp" -namespace f1x -{ namespace openauto { namespace btservice @@ -53,4 +51,3 @@ void AndroidBluetoothServer::onClientConnected() } } -} diff --git a/src/btservice/AndroidBluetoothService.cpp b/btservice/AndroidBluetoothService.cpp similarity index 97% rename from src/btservice/AndroidBluetoothService.cpp rename to btservice/AndroidBluetoothService.cpp index f178662..7b1ea9a 100644 --- a/src/btservice/AndroidBluetoothService.cpp +++ b/btservice/AndroidBluetoothService.cpp @@ -16,10 +16,8 @@ * along with openauto. If not, see . */ -#include +#include "btservice/AndroidBluetoothService.hpp" -namespace f1x -{ namespace openauto { namespace btservice @@ -68,4 +66,3 @@ bool AndroidBluetoothService::unregisterService() } } -} diff --git a/btservice/CMakeLists.txt b/btservice/CMakeLists.txt new file mode 100644 index 0000000..2321ed7 --- /dev/null +++ b/btservice/CMakeLists.txt @@ -0,0 +1,25 @@ +add_executable(btservice + AndroidBluetoothServer.cpp + AndroidBluetoothService.cpp + btservice.cpp + ${CMAKE_SOURCE_DIR}/include/btservice/AndroidBluetoothServer.hpp + ${CMAKE_SOURCE_DIR}/include/btservice/AndroidBluetoothService.hpp + ${CMAKE_SOURCE_DIR}/include/btservice/IAndroidBluetoothServer.hpp + ${CMAKE_SOURCE_DIR}/include/btservice/IAndroidBluetoothService.hpp + ) + +target_include_directories(btservice PRIVATE + ${CMAKE_SOURCE_DIR}/include + ) + +target_link_libraries(btservice + Threads::Threads + ${Boost_LIBRARIES} + openauto + ) + +set_target_properties(btservice + PROPERTIES INSTALL_RPATH_USE_LINK_PATH 1) + +install(TARGETS btservice + RUNTIME DESTINATION bin) diff --git a/src/btservice/btservice.cpp b/btservice/btservice.cpp similarity index 71% rename from src/btservice/btservice.cpp rename to btservice/btservice.cpp index e759c81..8fb059f 100644 --- a/src/btservice/btservice.cpp +++ b/btservice/btservice.cpp @@ -17,11 +17,11 @@ */ #include -#include -#include -#include +#include "OpenautoLog.hpp" +#include "btservice/AndroidBluetoothService.hpp" +#include "btservice/AndroidBluetoothServer.hpp" -namespace btservice = f1x::openauto::btservice; +namespace btservice = openauto::btservice; int main(int argc, char* argv[]) { @@ -33,22 +33,22 @@ int main(int argc, char* argv[]) btservice::AndroidBluetoothServer androidBluetoothServer; if(!androidBluetoothServer.start(address, portNumber)) { - OPENAUTO_LOG(error) << "[btservice] Server start failed."; + OPENAUTO_LOG(error) << "[src] Server start failed."; return 2; } - OPENAUTO_LOG(info) << "[btservice] Listening for connections, address: " << address.toString().toStdString() + OPENAUTO_LOG(info) << "[src] Listening for connections, address: " << address.toString().toStdString() << ", port: " << portNumber; btservice::AndroidBluetoothService androidBluetoothService(portNumber); if(!androidBluetoothService.registerService(address)) { - OPENAUTO_LOG(error) << "[btservice] Service registration failed."; + OPENAUTO_LOG(error) << "[src] Service registration failed."; return 1; } else { - OPENAUTO_LOG(info) << "[btservice] Service registered, port: " << portNumber; + OPENAUTO_LOG(info) << "[src] Service registered, port: " << portNumber; } qApplication.exec(); diff --git a/cmake_modules/Findaasdk.cmake b/cmake_modules/Findaasdk.cmake index e254703..cb3721f 100644 --- a/cmake_modules/Findaasdk.cmake +++ b/cmake_modules/Findaasdk.cmake @@ -1,7 +1,7 @@ set (AASDK_DIR ~/aasdk) find_path(AASDK_INCLUDE_DIR - f1x/aasdk/Version.hpp + aasdk/Version.hpp PATHS ${AASDK_DIR} PATH_SUFFIXES include ) diff --git a/include/f1x/openauto/Common/Log.hpp b/include/OpenautoLog.hpp similarity index 100% rename from include/f1x/openauto/Common/Log.hpp rename to include/OpenautoLog.hpp diff --git a/include/f1x/openauto/autoapp/UI/ConnectDialog.hpp b/include/autoapp/UI/ConnectDialog.hpp similarity index 74% rename from include/f1x/openauto/autoapp/UI/ConnectDialog.hpp rename to include/autoapp/UI/ConnectDialog.hpp index 9e944aa..f9fcb9f 100644 --- a/include/f1x/openauto/autoapp/UI/ConnectDialog.hpp +++ b/include/autoapp/UI/ConnectDialog.hpp @@ -2,18 +2,14 @@ #include #include -#include -#include -#include +#include "aasdk/TCP/ITCPEndpoint.hpp" +#include "aasdk/TCP/ITCPWrapper.hpp" +#include "openauto/Configuration/IRecentAddressesList.hpp" namespace Ui { class ConnectDialog; } -namespace f1x -{ -namespace openauto -{ namespace autoapp { namespace ui @@ -24,7 +20,7 @@ class ConnectDialog : public QDialog Q_OBJECT public: - explicit ConnectDialog(boost::asio::io_service& ioService, aasdk::tcp::ITCPWrapper& tcpWrapper, openauto::autoapp::configuration::IRecentAddressesList& recentAddressesList, QWidget *parent = nullptr); + explicit ConnectDialog(boost::asio::io_service& ioService, aasdk::tcp::ITCPWrapper& tcpWrapper, openauto::configuration::IRecentAddressesList& recentAddressesList, QWidget *parent = nullptr); ~ConnectDialog() override; signals: @@ -46,12 +42,10 @@ private: boost::asio::io_service& ioService_; aasdk::tcp::ITCPWrapper& tcpWrapper_; - openauto::autoapp::configuration::IRecentAddressesList& recentAddressesList_; + openauto::configuration::IRecentAddressesList& recentAddressesList_; Ui::ConnectDialog *ui_; QStringListModel recentAddressesModel_; }; } } -} -} diff --git a/include/f1x/openauto/autoapp/UI/MainWindow.hpp b/include/autoapp/UI/MainWindow.hpp similarity index 96% rename from include/f1x/openauto/autoapp/UI/MainWindow.hpp rename to include/autoapp/UI/MainWindow.hpp index b7e2354..52e3c62 100644 --- a/include/f1x/openauto/autoapp/UI/MainWindow.hpp +++ b/include/autoapp/UI/MainWindow.hpp @@ -26,10 +26,6 @@ namespace Ui class MainWindow; } -namespace f1x -{ -namespace openauto -{ namespace autoapp { namespace ui @@ -54,5 +50,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/UI/SettingsWindow.hpp b/include/autoapp/UI/SettingsWindow.hpp similarity index 74% rename from include/f1x/openauto/autoapp/UI/SettingsWindow.hpp rename to include/autoapp/UI/SettingsWindow.hpp index 058b1de..8abe059 100644 --- a/include/f1x/openauto/autoapp/UI/SettingsWindow.hpp +++ b/include/autoapp/UI/SettingsWindow.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include "openauto/Configuration/IConfiguration.hpp" class QCheckBox; @@ -29,10 +29,6 @@ namespace Ui class SettingsWindow; } -namespace f1x -{ -namespace openauto -{ namespace autoapp { namespace ui @@ -42,7 +38,7 @@ class SettingsWindow : public QWidget { Q_OBJECT public: - explicit SettingsWindow(configuration::IConfiguration::Pointer configuration, QWidget *parent = nullptr); + explicit SettingsWindow(openauto::configuration::IConfiguration::Pointer configuration, QWidget *parent = nullptr); ~SettingsWindow() override; private slots: @@ -56,14 +52,12 @@ private: void load(); void loadButtonCheckBoxes(); void saveButtonCheckBoxes(); - void saveButtonCheckBox(const QCheckBox* checkBox, configuration::IConfiguration::ButtonCodes& buttonCodes, aasdk::proto::enums::ButtonCode::Enum buttonCode); + void saveButtonCheckBox(const QCheckBox* checkBox, openauto::configuration::IConfiguration::ButtonCodes& buttonCodes, aasdk::proto::enums::ButtonCode::Enum buttonCode); void setButtonCheckBoxes(bool value); Ui::SettingsWindow* ui_; - configuration::IConfiguration::Pointer configuration_; + openauto::configuration::IConfiguration::Pointer configuration_; }; } } -} -} diff --git a/include/f1x/openauto/btservice/AndroidBluetoothServer.hpp b/include/btservice/AndroidBluetoothServer.hpp similarity index 93% rename from include/f1x/openauto/btservice/AndroidBluetoothServer.hpp rename to include/btservice/AndroidBluetoothServer.hpp index 4e159bc..068481f 100644 --- a/include/f1x/openauto/btservice/AndroidBluetoothServer.hpp +++ b/include/btservice/AndroidBluetoothServer.hpp @@ -21,10 +21,8 @@ #include #include #include -#include +#include "IAndroidBluetoothServer.hpp" -namespace f1x -{ namespace openauto { namespace btservice @@ -48,4 +46,3 @@ private: } } -} diff --git a/include/f1x/openauto/btservice/AndroidBluetoothService.hpp b/include/btservice/AndroidBluetoothService.hpp similarity index 93% rename from include/f1x/openauto/btservice/AndroidBluetoothService.hpp rename to include/btservice/AndroidBluetoothService.hpp index ebbb860..e9a0549 100644 --- a/include/f1x/openauto/btservice/AndroidBluetoothService.hpp +++ b/include/btservice/AndroidBluetoothService.hpp @@ -19,10 +19,8 @@ #pragma once #include -#include +#include "IAndroidBluetoothService.hpp" -namespace f1x -{ namespace openauto { namespace btservice @@ -42,4 +40,3 @@ private: } } -} diff --git a/include/f1x/openauto/btservice/IAndroidBluetoothServer.hpp b/include/btservice/IAndroidBluetoothServer.hpp similarity index 98% rename from include/f1x/openauto/btservice/IAndroidBluetoothServer.hpp rename to include/btservice/IAndroidBluetoothServer.hpp index fb109ed..6daf94c 100644 --- a/include/f1x/openauto/btservice/IAndroidBluetoothServer.hpp +++ b/include/btservice/IAndroidBluetoothServer.hpp @@ -20,8 +20,6 @@ #include -namespace f1x -{ namespace openauto { namespace btservice @@ -37,4 +35,3 @@ public: } } -} diff --git a/include/f1x/openauto/btservice/IAndroidBluetoothService.hpp b/include/btservice/IAndroidBluetoothService.hpp similarity index 98% rename from include/f1x/openauto/btservice/IAndroidBluetoothService.hpp rename to include/btservice/IAndroidBluetoothService.hpp index 71352c9..562c99b 100644 --- a/include/f1x/openauto/btservice/IAndroidBluetoothService.hpp +++ b/include/btservice/IAndroidBluetoothService.hpp @@ -20,8 +20,6 @@ #include -namespace f1x -{ namespace openauto { namespace btservice @@ -38,4 +36,3 @@ public: } } -} diff --git a/include/f1x/openauto/autoapp/App.hpp b/include/openauto/App.hpp similarity index 69% rename from include/f1x/openauto/autoapp/App.hpp rename to include/openauto/App.hpp index 3dbcab2..3311faf 100644 --- a/include/f1x/openauto/autoapp/App.hpp +++ b/include/openauto/App.hpp @@ -18,27 +18,23 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include +#include "aasdk/USB/IUSBHub.hpp" +#include "aasdk/USB/IConnectedAccessoriesEnumerator.hpp" +#include "aasdk/USB/USBWrapper.hpp" +#include "aasdk/TCP/ITCPWrapper.hpp" +#include "aasdk/TCP/ITCPEndpoint.hpp" +#include "openauto/Service/IAndroidAutoEntityEventHandler.hpp" +#include "openauto/Service/IAndroidAutoEntityFactory.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ -class App: public service::IAndroidAutoEntityEventHandler, public std::enable_shared_from_this +class App: public openauto::service::IAndroidAutoEntityEventHandler, public std::enable_shared_from_this { public: typedef std::shared_ptr Pointer; - App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper, aasdk::tcp::ITCPWrapper& tcpWrapper, service::IAndroidAutoEntityFactory& androidAutoEntityFactory, + App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper, aasdk::tcp::ITCPWrapper& tcpWrapper, openauto::service::IAndroidAutoEntityFactory& androidAutoEntityFactory, aasdk::usb::IUSBHub::Pointer usbHub, aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator); void waitForUSBDevice(); @@ -57,13 +53,11 @@ private: aasdk::usb::USBWrapper& usbWrapper_; aasdk::tcp::ITCPWrapper& tcpWrapper_; boost::asio::io_service::strand strand_; - service::IAndroidAutoEntityFactory& androidAutoEntityFactory_; + openauto::service::IAndroidAutoEntityFactory& androidAutoEntityFactory_; aasdk::usb::IUSBHub::Pointer usbHub_; aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator_; - service::IAndroidAutoEntity::Pointer androidAutoEntity_; + openauto::service::IAndroidAutoEntity::Pointer androidAutoEntity_; bool isStopped_; }; } -} -} diff --git a/include/f1x/openauto/autoapp/Configuration/AudioOutputBackendType.hpp b/include/openauto/Configuration/AudioOutputBackendType.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Configuration/AudioOutputBackendType.hpp rename to include/openauto/Configuration/AudioOutputBackendType.hpp index e954874..531ec96 100644 --- a/include/f1x/openauto/autoapp/Configuration/AudioOutputBackendType.hpp +++ b/include/openauto/Configuration/AudioOutputBackendType.hpp @@ -18,12 +18,8 @@ #pragma once -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -35,5 +31,3 @@ enum class AudioOutputBackendType } } -} -} diff --git a/include/f1x/openauto/autoapp/Configuration/BluetootAdapterType.hpp b/include/openauto/Configuration/BluetootAdapterType.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Configuration/BluetootAdapterType.hpp rename to include/openauto/Configuration/BluetootAdapterType.hpp index 8185411..97d753d 100644 --- a/include/f1x/openauto/autoapp/Configuration/BluetootAdapterType.hpp +++ b/include/openauto/Configuration/BluetootAdapterType.hpp @@ -18,12 +18,8 @@ #pragma once -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -36,5 +32,3 @@ enum class BluetoothAdapterType } } -} -} diff --git a/include/f1x/openauto/autoapp/Configuration/Configuration.hpp b/include/openauto/Configuration/Configuration.hpp similarity index 98% rename from include/f1x/openauto/autoapp/Configuration/Configuration.hpp rename to include/openauto/Configuration/Configuration.hpp index f4a0649..82584a6 100644 --- a/include/f1x/openauto/autoapp/Configuration/Configuration.hpp +++ b/include/openauto/Configuration/Configuration.hpp @@ -19,14 +19,10 @@ #pragma once #include -#include +#include "IConfiguration.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -132,5 +128,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Configuration/HandednessOfTrafficType.hpp b/include/openauto/Configuration/HandednessOfTrafficType.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Configuration/HandednessOfTrafficType.hpp rename to include/openauto/Configuration/HandednessOfTrafficType.hpp index e71c6c5..fa8cb46 100644 --- a/include/f1x/openauto/autoapp/Configuration/HandednessOfTrafficType.hpp +++ b/include/openauto/Configuration/HandednessOfTrafficType.hpp @@ -18,12 +18,8 @@ #pragma once -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -35,5 +31,3 @@ enum class HandednessOfTrafficType } } -} -} diff --git a/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp b/include/openauto/Configuration/IConfiguration.hpp similarity index 88% rename from include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp rename to include/openauto/Configuration/IConfiguration.hpp index 2165a68..e134559 100644 --- a/include/f1x/openauto/autoapp/Configuration/IConfiguration.hpp +++ b/include/openauto/Configuration/IConfiguration.hpp @@ -20,19 +20,15 @@ #include #include -#include -#include -#include -#include -#include -#include +#include "aasdk_proto/VideoFPSEnum.pb.h" +#include "aasdk_proto/VideoResolutionEnum.pb.h" +#include "aasdk_proto/ButtonCodeEnum.pb.h" +#include "BluetootAdapterType.hpp" +#include "HandednessOfTrafficType.hpp" +#include "AudioOutputBackendType.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -84,5 +80,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Configuration/IRecentAddressesList.hpp b/include/openauto/Configuration/IRecentAddressesList.hpp similarity index 96% rename from include/f1x/openauto/autoapp/Configuration/IRecentAddressesList.hpp rename to include/openauto/Configuration/IRecentAddressesList.hpp index 88213de..e423bf7 100644 --- a/include/f1x/openauto/autoapp/Configuration/IRecentAddressesList.hpp +++ b/include/openauto/Configuration/IRecentAddressesList.hpp @@ -21,12 +21,8 @@ #include #include -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -42,5 +38,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Configuration/RecentAddressesList.hpp b/include/openauto/Configuration/RecentAddressesList.hpp similarity index 92% rename from include/f1x/openauto/autoapp/Configuration/RecentAddressesList.hpp rename to include/openauto/Configuration/RecentAddressesList.hpp index 3c12591..d1b745f 100644 --- a/include/f1x/openauto/autoapp/Configuration/RecentAddressesList.hpp +++ b/include/openauto/Configuration/RecentAddressesList.hpp @@ -19,14 +19,10 @@ #pragma once #include -#include +#include "IRecentAddressesList.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -53,5 +49,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/DummyBluetoothDevice.hpp b/include/openauto/Projection/DummyBluetoothDevice.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/DummyBluetoothDevice.hpp rename to include/openauto/Projection/DummyBluetoothDevice.hpp index 7dd8717..e697c17 100644 --- a/include/f1x/openauto/autoapp/Projection/DummyBluetoothDevice.hpp +++ b/include/openauto/Projection/DummyBluetoothDevice.hpp @@ -18,14 +18,10 @@ #pragma once -#include +#include "IBluetoothDevice.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -41,5 +37,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/GSTVideoOutput.hpp b/include/openauto/Projection/GSTVideoOutput.hpp similarity index 96% rename from include/f1x/openauto/autoapp/Projection/GSTVideoOutput.hpp rename to include/openauto/Projection/GSTVideoOutput.hpp index 8be352c..440eb0c 100644 --- a/include/f1x/openauto/autoapp/Projection/GSTVideoOutput.hpp +++ b/include/openauto/Projection/GSTVideoOutput.hpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include "openauto/Projection/VideoOutput.hpp" #include #include #include @@ -46,12 +46,8 @@ #include #include -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -89,8 +85,6 @@ private: std::function activeCallback_; }; -} -} } } diff --git a/include/f1x/openauto/autoapp/Projection/IAudioInput.hpp b/include/openauto/Projection/IAudioInput.hpp similarity index 92% rename from include/f1x/openauto/autoapp/Projection/IAudioInput.hpp rename to include/openauto/Projection/IAudioInput.hpp index 67c3373..337936c 100644 --- a/include/f1x/openauto/autoapp/Projection/IAudioInput.hpp +++ b/include/openauto/Projection/IAudioInput.hpp @@ -19,15 +19,11 @@ #pragma once #include -#include -#include +#include "aasdk/IO/Promise.hpp" +#include "aasdk/Common/Data.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -52,5 +48,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/IAudioOutput.hpp b/include/openauto/Projection/IAudioOutput.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/IAudioOutput.hpp rename to include/openauto/Projection/IAudioOutput.hpp index c41de31..17d5650 100644 --- a/include/f1x/openauto/autoapp/Projection/IAudioOutput.hpp +++ b/include/openauto/Projection/IAudioOutput.hpp @@ -19,15 +19,11 @@ #pragma once #include -#include -#include +#include "aasdk/Messenger/Timestamp.hpp" +#include "aasdk/Common/Data.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -51,5 +47,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp b/include/openauto/Projection/IBluetoothDevice.hpp similarity index 94% rename from include/f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp rename to include/openauto/Projection/IBluetoothDevice.hpp index 2d151fd..a7fd76d 100644 --- a/include/f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp +++ b/include/openauto/Projection/IBluetoothDevice.hpp @@ -16,16 +16,12 @@ * along with openauto. If not, see . */ -#include +#include "aasdk/IO/Promise.hpp" #pragma once -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -44,5 +40,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/IInputDevice.hpp b/include/openauto/Projection/IInputDevice.hpp similarity index 90% rename from include/f1x/openauto/autoapp/Projection/IInputDevice.hpp rename to include/openauto/Projection/IInputDevice.hpp index 663fbbd..44c28f2 100644 --- a/include/f1x/openauto/autoapp/Projection/IInputDevice.hpp +++ b/include/openauto/Projection/IInputDevice.hpp @@ -19,15 +19,11 @@ #pragma once #include -#include -#include +#include "aasdk/IO/Promise.hpp" +#include "InputEvent.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -49,5 +45,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/IInputDeviceEventHandler.hpp b/include/openauto/Projection/IInputDeviceEventHandler.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/IInputDeviceEventHandler.hpp rename to include/openauto/Projection/IInputDeviceEventHandler.hpp index 9521253..bfb1d09 100644 --- a/include/f1x/openauto/autoapp/Projection/IInputDeviceEventHandler.hpp +++ b/include/openauto/Projection/IInputDeviceEventHandler.hpp @@ -18,14 +18,10 @@ #pragma once -#include +#include "InputEvent.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -40,5 +36,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/IVideoOutput.hpp b/include/openauto/Projection/IVideoOutput.hpp similarity index 89% rename from include/f1x/openauto/autoapp/Projection/IVideoOutput.hpp rename to include/openauto/Projection/IVideoOutput.hpp index 1c483bc..58d44ea 100644 --- a/include/f1x/openauto/autoapp/Projection/IVideoOutput.hpp +++ b/include/openauto/Projection/IVideoOutput.hpp @@ -20,16 +20,12 @@ #include #include -#include -#include -#include +#include "aasdk_proto/VideoFPSEnum.pb.h" +#include "aasdk_proto/VideoResolutionEnum.pb.h" +#include "aasdk/Common/Data.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -53,5 +49,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/InputDevice.hpp b/include/openauto/Projection/InputDevice.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/InputDevice.hpp rename to include/openauto/Projection/InputDevice.hpp index 7d119bb..18b9f60 100644 --- a/include/f1x/openauto/autoapp/Projection/InputDevice.hpp +++ b/include/openauto/Projection/InputDevice.hpp @@ -20,15 +20,11 @@ #include #include -#include -#include +#include "IInputDevice.hpp" +#include "../Configuration/IConfiguration.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -63,5 +59,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/InputEvent.hpp b/include/openauto/Projection/InputEvent.hpp similarity index 87% rename from include/f1x/openauto/autoapp/Projection/InputEvent.hpp rename to include/openauto/Projection/InputEvent.hpp index fe22064..bc93d94 100644 --- a/include/f1x/openauto/autoapp/Projection/InputEvent.hpp +++ b/include/openauto/Projection/InputEvent.hpp @@ -18,16 +18,12 @@ #pragma once -#include -#include -#include +#include "aasdk_proto/ButtonCodeEnum.pb.h" +#include "aasdk_proto/TouchActionEnum.pb.h" +#include "aasdk/IO/Promise.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -62,5 +58,3 @@ struct TouchEvent } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/LocalBluetoothDevice.hpp b/include/openauto/Projection/LocalBluetoothDevice.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Projection/LocalBluetoothDevice.hpp rename to include/openauto/Projection/LocalBluetoothDevice.hpp index ed62749..c4222a3 100644 --- a/include/f1x/openauto/autoapp/Projection/LocalBluetoothDevice.hpp +++ b/include/openauto/Projection/LocalBluetoothDevice.hpp @@ -17,16 +17,12 @@ */ #include -#include +#include "IBluetoothDevice.hpp" #pragma once -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -64,5 +60,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/OMXVideoOutput.hpp b/include/openauto/Projection/OMXVideoOutput.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Projection/OMXVideoOutput.hpp rename to include/openauto/Projection/OMXVideoOutput.hpp index 028f7ee..841427a 100644 --- a/include/f1x/openauto/autoapp/Projection/OMXVideoOutput.hpp +++ b/include/openauto/Projection/OMXVideoOutput.hpp @@ -29,14 +29,10 @@ extern "C" #include #include #include -#include +#include "VideoOutput.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -82,8 +78,6 @@ private: std::function activeCallback_; }; -} -} } } diff --git a/include/f1x/openauto/autoapp/Projection/QtAudioInput.hpp b/include/openauto/Projection/QtAudioInput.hpp similarity index 94% rename from include/f1x/openauto/autoapp/Projection/QtAudioInput.hpp rename to include/openauto/Projection/QtAudioInput.hpp index 97816ea..b36aa27 100644 --- a/include/f1x/openauto/autoapp/Projection/QtAudioInput.hpp +++ b/include/openauto/Projection/QtAudioInput.hpp @@ -21,14 +21,10 @@ #include #include #include -#include +#include "IAudioInput.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -69,5 +65,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/QtAudioOutput.hpp b/include/openauto/Projection/QtAudioOutput.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/QtAudioOutput.hpp rename to include/openauto/Projection/QtAudioOutput.hpp index 742dbf8..1cca946 100644 --- a/include/f1x/openauto/autoapp/Projection/QtAudioOutput.hpp +++ b/include/openauto/Projection/QtAudioOutput.hpp @@ -20,15 +20,11 @@ #include #include -#include -#include +#include "IAudioOutput.hpp" +#include "SequentialBuffer.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -67,5 +63,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/QtVideoOutput.hpp b/include/openauto/Projection/QtVideoOutput.hpp similarity index 90% rename from include/f1x/openauto/autoapp/Projection/QtVideoOutput.hpp rename to include/openauto/Projection/QtVideoOutput.hpp index 4a18319..7e0d5ed 100644 --- a/include/f1x/openauto/autoapp/Projection/QtVideoOutput.hpp +++ b/include/openauto/Projection/QtVideoOutput.hpp @@ -21,15 +21,11 @@ #include #include #include -#include -#include +#include "VideoOutput.hpp" +#include "SequentialBuffer.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -63,5 +59,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/RemoteBluetoothDevice.hpp b/include/openauto/Projection/RemoteBluetoothDevice.hpp similarity index 92% rename from include/f1x/openauto/autoapp/Projection/RemoteBluetoothDevice.hpp rename to include/openauto/Projection/RemoteBluetoothDevice.hpp index 692241c..2399f2f 100644 --- a/include/f1x/openauto/autoapp/Projection/RemoteBluetoothDevice.hpp +++ b/include/openauto/Projection/RemoteBluetoothDevice.hpp @@ -18,14 +18,10 @@ #pragma once -#include +#include "IBluetoothDevice.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -46,5 +42,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/RtAudioOutput.hpp b/include/openauto/Projection/RtAudioOutput.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/RtAudioOutput.hpp rename to include/openauto/Projection/RtAudioOutput.hpp index 063d5b3..2cca63d 100644 --- a/include/f1x/openauto/autoapp/Projection/RtAudioOutput.hpp +++ b/include/openauto/Projection/RtAudioOutput.hpp @@ -19,15 +19,11 @@ #pragma once #include -#include -#include +#include "IAudioOutput.hpp" +#include "SequentialBuffer.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -59,5 +55,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/SequentialBuffer.hpp b/include/openauto/Projection/SequentialBuffer.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Projection/SequentialBuffer.hpp rename to include/openauto/Projection/SequentialBuffer.hpp index 153b687..95d8780 100644 --- a/include/f1x/openauto/autoapp/Projection/SequentialBuffer.hpp +++ b/include/openauto/Projection/SequentialBuffer.hpp @@ -21,14 +21,10 @@ #include #include #include -#include +#include "aasdk/Common/Data.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -57,5 +53,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Projection/VideoOutput.hpp b/include/openauto/Projection/VideoOutput.hpp similarity index 88% rename from include/f1x/openauto/autoapp/Projection/VideoOutput.hpp rename to include/openauto/Projection/VideoOutput.hpp index 3c67cf6..094e2dc 100644 --- a/include/f1x/openauto/autoapp/Projection/VideoOutput.hpp +++ b/include/openauto/Projection/VideoOutput.hpp @@ -18,15 +18,11 @@ #pragma once -#include -#include +#include "../Configuration/IConfiguration.hpp" +#include "IVideoOutput.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -46,5 +42,3 @@ protected: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp b/include/openauto/Service/AndroidAutoEntity.hpp similarity index 85% rename from include/f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp rename to include/openauto/Service/AndroidAutoEntity.hpp index 7f80039..741de57 100644 --- a/include/f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp +++ b/include/openauto/Service/AndroidAutoEntity.hpp @@ -19,21 +19,17 @@ #pragma once #include -#include -#include -#include -#include -#include -#include -#include -#include +#include "aasdk/Transport/ITransport.hpp" +#include "aasdk/Channel/Control/IControlServiceChannel.hpp" +#include "aasdk/Channel/Control/IControlServiceChannelEventHandler.hpp" +#include "aasdk/Channel/AV/VideoServiceChannel.hpp" +#include "../Configuration/IConfiguration.hpp" +#include "IAndroidAutoEntity.hpp" +#include "IService.hpp" +#include "IPinger.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -80,5 +76,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp b/include/openauto/Service/AndroidAutoEntityFactory.hpp similarity index 84% rename from include/f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp rename to include/openauto/Service/AndroidAutoEntityFactory.hpp index b9fed4f..17085e8 100644 --- a/include/f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp +++ b/include/openauto/Service/AndroidAutoEntityFactory.hpp @@ -19,17 +19,13 @@ #pragma once #include -#include -#include -#include -#include +#include "aasdk/Transport/ITransport.hpp" +#include "../Configuration/IConfiguration.hpp" +#include "IAndroidAutoEntityFactory.hpp" +#include "IServiceFactory.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -53,5 +49,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/AudioInputService.hpp b/include/openauto/Service/AudioInputService.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Service/AudioInputService.hpp rename to include/openauto/Service/AudioInputService.hpp index a568b1d..81d3651 100644 --- a/include/f1x/openauto/autoapp/Service/AudioInputService.hpp +++ b/include/openauto/Service/AudioInputService.hpp @@ -18,16 +18,12 @@ #pragma once -#include -#include -#include +#include "aasdk/Channel/AV/AVInputServiceChannel.hpp" +#include "IService.hpp" +#include "../Projection/IAudioInput.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -61,5 +57,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/AudioService.hpp b/include/openauto/Service/AudioService.hpp similarity index 89% rename from include/f1x/openauto/autoapp/Service/AudioService.hpp rename to include/openauto/Service/AudioService.hpp index 21a0785..f02ee86 100644 --- a/include/f1x/openauto/autoapp/Service/AudioService.hpp +++ b/include/openauto/Service/AudioService.hpp @@ -18,17 +18,13 @@ #pragma once -#include -#include -#include -#include +#include "aasdk/Channel/AV/IAudioServiceChannel.hpp" +#include "aasdk/Channel/AV/IAudioServiceChannelEventHandler.hpp" +#include "../Projection/IAudioOutput.hpp" +#include "IService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -61,5 +57,3 @@ protected: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/BluetoothService.hpp b/include/openauto/Service/BluetoothService.hpp similarity index 89% rename from include/f1x/openauto/autoapp/Service/BluetoothService.hpp rename to include/openauto/Service/BluetoothService.hpp index 86e4dba..4652180 100644 --- a/include/f1x/openauto/autoapp/Service/BluetoothService.hpp +++ b/include/openauto/Service/BluetoothService.hpp @@ -18,16 +18,12 @@ #pragma once -#include -#include -#include +#include "aasdk/Channel/Bluetooth/BluetoothServiceChannel.hpp" +#include "../Projection/IBluetoothDevice.hpp" +#include "IService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -52,5 +48,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp b/include/openauto/Service/IAndroidAutoEntity.hpp similarity index 90% rename from include/f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp rename to include/openauto/Service/IAndroidAutoEntity.hpp index fc1cb38..3a88a08 100644 --- a/include/f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp +++ b/include/openauto/Service/IAndroidAutoEntity.hpp @@ -19,14 +19,10 @@ #pragma once #include -#include +#include "IAndroidAutoEntityEventHandler.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -43,5 +39,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp b/include/openauto/Service/IAndroidAutoEntityEventHandler.hpp similarity index 92% rename from include/f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp rename to include/openauto/Service/IAndroidAutoEntityEventHandler.hpp index 648d125..0243b2c 100644 --- a/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp +++ b/include/openauto/Service/IAndroidAutoEntityEventHandler.hpp @@ -18,14 +18,10 @@ #pragma once -#include +#include "aasdk/Error/Error.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -38,5 +34,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp b/include/openauto/Service/IAndroidAutoEntityFactory.hpp similarity index 85% rename from include/f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp rename to include/openauto/Service/IAndroidAutoEntityFactory.hpp index 97b958b..27f31e9 100644 --- a/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp +++ b/include/openauto/Service/IAndroidAutoEntityFactory.hpp @@ -18,16 +18,12 @@ #pragma once -#include -#include -#include +#include "aasdk/TCP/ITCPEndpoint.hpp" +#include "aasdk/USB/IAOAPDevice.hpp" +#include "IAndroidAutoEntity.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -42,5 +38,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/IPinger.hpp b/include/openauto/Service/IPinger.hpp similarity index 93% rename from include/f1x/openauto/autoapp/Service/IPinger.hpp rename to include/openauto/Service/IPinger.hpp index d345ed3..645968a 100644 --- a/include/f1x/openauto/autoapp/Service/IPinger.hpp +++ b/include/openauto/Service/IPinger.hpp @@ -18,14 +18,10 @@ #pragma once -#include +#include "aasdk/IO/Promise.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -43,5 +39,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/IService.hpp b/include/openauto/Service/IService.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Service/IService.hpp rename to include/openauto/Service/IService.hpp index a676cb7..87ba2c7 100644 --- a/include/f1x/openauto/autoapp/Service/IService.hpp +++ b/include/openauto/Service/IService.hpp @@ -20,14 +20,10 @@ #include #include -#include +#include "aasdk_proto/ServiceDiscoveryResponseMessage.pb.h" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -47,5 +43,3 @@ typedef std::vector ServiceList; } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/IServiceFactory.hpp b/include/openauto/Service/IServiceFactory.hpp similarity index 87% rename from include/f1x/openauto/autoapp/Service/IServiceFactory.hpp rename to include/openauto/Service/IServiceFactory.hpp index 6049d9d..d772d65 100644 --- a/include/f1x/openauto/autoapp/Service/IServiceFactory.hpp +++ b/include/openauto/Service/IServiceFactory.hpp @@ -18,15 +18,11 @@ #pragma once -#include -#include +#include "aasdk/Messenger/IMessenger.hpp" +#include "IService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -40,5 +36,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/InputService.hpp b/include/openauto/Service/InputService.hpp similarity index 85% rename from include/f1x/openauto/autoapp/Service/InputService.hpp rename to include/openauto/Service/InputService.hpp index 6a64bc1..b8d57c9 100644 --- a/include/f1x/openauto/autoapp/Service/InputService.hpp +++ b/include/openauto/Service/InputService.hpp @@ -18,18 +18,14 @@ #pragma once -#include -#include -#include -#include -#include +#include "aasdk_proto/ButtonCodeEnum.pb.h" +#include "aasdk/Channel/Input/InputServiceChannel.hpp" +#include "IService.hpp" +#include "../Projection/IInputDevice.hpp" +#include "../Projection/IInputDeviceEventHandler.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -61,5 +57,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/MediaAudioService.hpp b/include/openauto/Service/MediaAudioService.hpp similarity index 87% rename from include/f1x/openauto/autoapp/Service/MediaAudioService.hpp rename to include/openauto/Service/MediaAudioService.hpp index bbd1414..a7255ad 100644 --- a/include/f1x/openauto/autoapp/Service/MediaAudioService.hpp +++ b/include/openauto/Service/MediaAudioService.hpp @@ -18,15 +18,11 @@ #pragma once -#include -#include +#include "aasdk/Messenger/IMessenger.hpp" +#include "AudioService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -38,5 +34,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/Pinger.hpp b/include/openauto/Service/Pinger.hpp similarity index 93% rename from include/f1x/openauto/autoapp/Service/Pinger.hpp rename to include/openauto/Service/Pinger.hpp index 2c226ca..45e1280 100644 --- a/include/f1x/openauto/autoapp/Service/Pinger.hpp +++ b/include/openauto/Service/Pinger.hpp @@ -18,14 +18,10 @@ #pragma once -#include +#include "IPinger.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -54,5 +50,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/SensorService.hpp b/include/openauto/Service/SensorService.hpp similarity index 92% rename from include/f1x/openauto/autoapp/Service/SensorService.hpp rename to include/openauto/Service/SensorService.hpp index 8601693..ba10f80 100644 --- a/include/f1x/openauto/autoapp/Service/SensorService.hpp +++ b/include/openauto/Service/SensorService.hpp @@ -18,15 +18,11 @@ #pragma once -#include -#include +#include "aasdk/Channel/Sensor/SensorServiceChannel.hpp" +#include "IService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -55,5 +51,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/ServiceFactory.hpp b/include/openauto/Service/ServiceFactory.hpp similarity index 82% rename from include/f1x/openauto/autoapp/Service/ServiceFactory.hpp rename to include/openauto/Service/ServiceFactory.hpp index eb364d0..815b13e 100644 --- a/include/f1x/openauto/autoapp/Service/ServiceFactory.hpp +++ b/include/openauto/Service/ServiceFactory.hpp @@ -18,24 +18,20 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include +#include "openauto/Service/IServiceFactory.hpp" +#include "openauto/Configuration/IConfiguration.hpp" +#include "openauto/Projection/InputDevice.hpp" +#include "openauto/Projection/OMXVideoOutput.hpp" +#include "openauto/Projection/GSTVideoOutput.hpp" +#include "openauto/Projection/QtVideoOutput.hpp" +#include "openauto/Service/SensorService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { -class ServiceFactory: public IServiceFactory +class ServiceFactory : public IServiceFactory { public: ServiceFactory(boost::asio::io_service& ioService, configuration::IConfiguration::Pointer configuration, QWidget* activeArea=nullptr, std::function activeCallback=nullptr, bool nightMode=false); @@ -74,5 +70,3 @@ private: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/SpeechAudioService.hpp b/include/openauto/Service/SpeechAudioService.hpp similarity index 87% rename from include/f1x/openauto/autoapp/Service/SpeechAudioService.hpp rename to include/openauto/Service/SpeechAudioService.hpp index d71f1a9..e115442 100644 --- a/include/f1x/openauto/autoapp/Service/SpeechAudioService.hpp +++ b/include/openauto/Service/SpeechAudioService.hpp @@ -18,15 +18,11 @@ #pragma once -#include -#include +#include "aasdk/Messenger/IMessenger.hpp" +#include "AudioService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -38,5 +34,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/SystemAudioService.hpp b/include/openauto/Service/SystemAudioService.hpp similarity index 87% rename from include/f1x/openauto/autoapp/Service/SystemAudioService.hpp rename to include/openauto/Service/SystemAudioService.hpp index af775b2..1c52be0 100644 --- a/include/f1x/openauto/autoapp/Service/SystemAudioService.hpp +++ b/include/openauto/Service/SystemAudioService.hpp @@ -18,15 +18,11 @@ #pragma once -#include -#include +#include "aasdk/Messenger/IMessenger.hpp" +#include "AudioService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -38,5 +34,3 @@ public: } } -} -} diff --git a/include/f1x/openauto/autoapp/Service/VideoService.hpp b/include/openauto/Service/VideoService.hpp similarity index 89% rename from include/f1x/openauto/autoapp/Service/VideoService.hpp rename to include/openauto/Service/VideoService.hpp index 0b484bf..56c5cb7 100644 --- a/include/f1x/openauto/autoapp/Service/VideoService.hpp +++ b/include/openauto/Service/VideoService.hpp @@ -19,17 +19,13 @@ #pragma once #include -#include -#include -#include -#include +#include "aasdk/Channel/AV/VideoServiceChannel.hpp" +#include "aasdk/Channel/AV/IVideoServiceChannelEventHandler.hpp" +#include "../Projection/IVideoOutput.hpp" +#include "IService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -64,5 +60,3 @@ private: } } -} -} diff --git a/src/autoapp/App.cpp b/openauto/App.cpp similarity index 94% rename from src/autoapp/App.cpp rename to openauto/App.cpp index a49c3d8..7878e2b 100644 --- a/src/autoapp/App.cpp +++ b/openauto/App.cpp @@ -17,19 +17,15 @@ */ #include -#include -#include -#include -#include +#include "aasdk/USB/AOAPDevice.hpp" +#include "aasdk/TCP/TCPEndpoint.hpp" +#include "openauto/App.hpp" +#include "OpenautoLog.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ -App::App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper, aasdk::tcp::ITCPWrapper& tcpWrapper, service::IAndroidAutoEntityFactory& androidAutoEntityFactory, +App::App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper, aasdk::tcp::ITCPWrapper& tcpWrapper, openauto::service::IAndroidAutoEntityFactory& androidAutoEntityFactory, aasdk::usb::IUSBHub::Pointer usbHub, aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator) : ioService_(ioService) , usbWrapper_(usbWrapper) @@ -172,5 +168,3 @@ void App::onUSBHubError(const aasdk::error::Error& error) } } -} -} diff --git a/openauto/CMakeLists.txt b/openauto/CMakeLists.txt new file mode 100644 index 0000000..880e430 --- /dev/null +++ b/openauto/CMakeLists.txt @@ -0,0 +1,114 @@ +add_library(openauto SHARED + App.cpp + Service/BluetoothService.cpp + Service/InputService.cpp + Service/MediaAudioService.cpp + Service/ServiceFactory.cpp + Service/AudioInputService.cpp + Service/SystemAudioService.cpp + Service/AndroidAutoEntityFactory.cpp + Service/AudioService.cpp + Service/SensorService.cpp + Service/SpeechAudioService.cpp + Service/Pinger.cpp + Service/AndroidAutoEntity.cpp + Service/VideoService.cpp + Configuration/RecentAddressesList.cpp + Configuration/Configuration.cpp + Projection/RemoteBluetoothDevice.cpp + Projection/OMXVideoOutput.cpp + Projection/LocalBluetoothDevice.cpp + Projection/VideoOutput.cpp + Projection/InputDevice.cpp + Projection/SequentialBuffer.cpp + Projection/DummyBluetoothDevice.cpp + Projection/QtVideoOutput.cpp + Projection/GSTVideoOutput.cpp + Projection/QtAudioInput.cpp + Projection/RtAudioOutput.cpp + Projection/QtAudioOutput.cpp + ${CMAKE_SOURCE_DIR}/include/openauto/App.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Configuration/Configuration.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Configuration/RecentAddressesList.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Configuration/AudioOutputBackendType.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Configuration/IConfiguration.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Configuration/IRecentAddressesList.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Configuration/HandednessOfTrafficType.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Configuration/BluetootAdapterType.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/MediaAudioService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/SensorService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/IPinger.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/IAndroidAutoEntity.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/SystemAudioService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/IAndroidAutoEntityEventHandler.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/AudioInputService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/VideoService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/IAndroidAutoEntityFactory.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/AudioService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/IServiceFactory.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/BluetoothService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/AndroidAutoEntity.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/ServiceFactory.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/SpeechAudioService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/AndroidAutoEntityFactory.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/IService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/Pinger.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Service/InputService.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/IInputDeviceEventHandler.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/IVideoOutput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/RtAudioOutput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/LocalBluetoothDevice.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/IAudioOutput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/QtAudioInput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/VideoOutput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/IBluetoothDevice.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/OMXVideoOutput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/IAudioInput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/DummyBluetoothDevice.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/IInputDevice.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/InputDevice.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/QtAudioOutput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/RemoteBluetoothDevice.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/QtVideoOutput.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/SequentialBuffer.hpp + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/InputEvent.hpp + ) + +if(GST_BUILD) +target_sources(openauto PRIVATE + ${CMAKE_SOURCE_DIR}/include/openauto/Projection/GSTVideoOutput.hpp + ) + +target_include_directories(openauto SYSTEM PUBLIC + ${QTGSTREAMER_INCLUDE_DIR} + ${GST_INCLUDE_DIRS} + ) + +target_link_libraries(openauto PRIVATE + ${QTGSTREAMER_LIBRARY} + ${GST_LIBRARIES} + ${Qt5QuickWidgets_LIBRARIES} + ${QTGSTREAMER_QUICK_LIBRARY} + ) +endif() + +target_include_directories(openauto PRIVATE + ${CMAKE_SOURCE_DIR}/include + ${RTAUDIO_INCLUDE_DIRS} + ) + +target_link_libraries(openauto PUBLIC + libusb + Threads::Threads + ${Boost_LIBRARIES} + aasdk + rtaudio + Qt5::Bluetooth + Qt5::MultimediaWidgets + ) + +install(TARGETS openauto + LIBRARY DESTINATION lib) + +install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/openauto DESTINATION include) +install(FILES ${CMAKE_SOURCE_DIR}/include/OpenautoLog.hpp DESTINATION include) diff --git a/src/autoapp/Configuration/Configuration.cpp b/openauto/Configuration/Configuration.cpp similarity index 99% rename from src/autoapp/Configuration/Configuration.cpp rename to openauto/Configuration/Configuration.cpp index 0e79129..1d45ac6 100644 --- a/src/autoapp/Configuration/Configuration.cpp +++ b/openauto/Configuration/Configuration.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "openauto/Configuration/Configuration.hpp" +#include "OpenautoLog.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -346,5 +342,3 @@ void Configuration::writeButtonCodes(boost::property_tree::ptree& iniConfig) } } -} -} diff --git a/src/autoapp/Configuration/RecentAddressesList.cpp b/openauto/Configuration/RecentAddressesList.cpp similarity index 95% rename from src/autoapp/Configuration/RecentAddressesList.cpp rename to openauto/Configuration/RecentAddressesList.cpp index c29fdcf..9f519b3 100644 --- a/src/autoapp/Configuration/RecentAddressesList.cpp +++ b/openauto/Configuration/RecentAddressesList.cpp @@ -17,15 +17,11 @@ */ #include -#include -#include +#include "OpenautoLog.hpp" +#include "openauto/Configuration/RecentAddressesList.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace configuration { @@ -112,5 +108,3 @@ void RecentAddressesList::save() } } -} -} diff --git a/src/autoapp/Projection/DummyBluetoothDevice.cpp b/openauto/Projection/DummyBluetoothDevice.cpp similarity index 91% rename from src/autoapp/Projection/DummyBluetoothDevice.cpp rename to openauto/Projection/DummyBluetoothDevice.cpp index cf45ac4..5412d63 100644 --- a/src/autoapp/Projection/DummyBluetoothDevice.cpp +++ b/openauto/Projection/DummyBluetoothDevice.cpp @@ -16,14 +16,10 @@ * along with openauto. If not, see . */ -#include +#include "openauto/Projection/DummyBluetoothDevice.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -54,5 +50,3 @@ bool DummyBluetoothDevice::isAvailable() const } } -} -} diff --git a/src/autoapp/Projection/GSTVideoOutput.cpp b/openauto/Projection/GSTVideoOutput.cpp similarity index 97% rename from src/autoapp/Projection/GSTVideoOutput.cpp rename to openauto/Projection/GSTVideoOutput.cpp index d1df573..b0d7c7f 100644 --- a/src/autoapp/Projection/GSTVideoOutput.cpp +++ b/openauto/Projection/GSTVideoOutput.cpp @@ -18,16 +18,12 @@ #ifdef USE_GST -#include -#include -#include +#include "aasdk/Common/Data.hpp" +#include "openauto/Projection/GSTVideoOutput.hpp" +#include "OpenautoLog.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -228,8 +224,6 @@ void GSTVideoOutput::resize() } } -} -} } } diff --git a/src/autoapp/Projection/InputDevice.cpp b/openauto/Projection/InputDevice.cpp similarity index 96% rename from src/autoapp/Projection/InputDevice.cpp rename to openauto/Projection/InputDevice.cpp index ec7c3a9..503a0a4 100644 --- a/src/autoapp/Projection/InputDevice.cpp +++ b/openauto/Projection/InputDevice.cpp @@ -16,16 +16,12 @@ * along with openauto. If not, see . */ -#include -#include -#include +#include "OpenautoLog.hpp" +#include "openauto/Projection/IInputDeviceEventHandler.hpp" +#include "openauto/Projection/InputDevice.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -237,5 +233,3 @@ IInputDevice::ButtonCodes InputDevice::getSupportedButtonCodes() const } } -} -} diff --git a/src/autoapp/Projection/LocalBluetoothDevice.cpp b/openauto/Projection/LocalBluetoothDevice.cpp similarity index 97% rename from src/autoapp/Projection/LocalBluetoothDevice.cpp rename to openauto/Projection/LocalBluetoothDevice.cpp index 5c7060e..0dc2e3e 100644 --- a/src/autoapp/Projection/LocalBluetoothDevice.cpp +++ b/openauto/Projection/LocalBluetoothDevice.cpp @@ -17,15 +17,11 @@ */ #include -#include -#include +#include "OpenautoLog.hpp" +#include "openauto/Projection/LocalBluetoothDevice.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -180,5 +176,3 @@ void LocalBluetoothDevice::onHostModeStateChanged(QBluetoothLocalDevice::HostMod } } -} -} diff --git a/src/autoapp/Projection/OMXVideoOutput.cpp b/openauto/Projection/OMXVideoOutput.cpp similarity index 98% rename from src/autoapp/Projection/OMXVideoOutput.cpp rename to openauto/Projection/OMXVideoOutput.cpp index 6be68e7..c2c239a 100644 --- a/src/autoapp/Projection/OMXVideoOutput.cpp +++ b/openauto/Projection/OMXVideoOutput.cpp @@ -23,16 +23,12 @@ extern "C" #include } -#include -#include -#include +#include "aasdk/Common/Data.hpp" +#include "openauto/Projection/OMXVideoOutput.hpp" +#include "Log.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -336,8 +332,6 @@ bool OMXVideoOutput::enablePortBuffers() ilclient_enable_port_buffers(components_[VideoComponent::DECODER], 130, NULL, NULL, NULL) == 0; } -} -} } } diff --git a/src/autoapp/Projection/QtAudioInput.cpp b/openauto/Projection/QtAudioInput.cpp similarity index 96% rename from src/autoapp/Projection/QtAudioInput.cpp rename to openauto/Projection/QtAudioInput.cpp index 1558430..5796c18 100644 --- a/src/autoapp/Projection/QtAudioInput.cpp +++ b/openauto/Projection/QtAudioInput.cpp @@ -17,15 +17,11 @@ */ #include -#include -#include +#include "openauto/Projection/QtAudioInput.hpp" +#include "OpenautoLog.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -175,5 +171,3 @@ void QtAudioInput::onReadyRead() } } -} -} diff --git a/src/autoapp/Projection/QtAudioOutput.cpp b/openauto/Projection/QtAudioOutput.cpp similarity index 95% rename from src/autoapp/Projection/QtAudioOutput.cpp rename to openauto/Projection/QtAudioOutput.cpp index dff8049..347e5f3 100644 --- a/src/autoapp/Projection/QtAudioOutput.cpp +++ b/openauto/Projection/QtAudioOutput.cpp @@ -17,15 +17,12 @@ */ #include -#include -#include +#include "openauto/Projection/QtAudioOutput.hpp" +#include "OpenautoLog.hpp" + -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -122,5 +119,3 @@ void QtAudioOutput::onStopPlayback() } } -} -} diff --git a/src/autoapp/Projection/QtVideoOutput.cpp b/openauto/Projection/QtVideoOutput.cpp similarity index 95% rename from src/autoapp/Projection/QtVideoOutput.cpp rename to openauto/Projection/QtVideoOutput.cpp index 22d61fa..6c42393 100644 --- a/src/autoapp/Projection/QtVideoOutput.cpp +++ b/openauto/Projection/QtVideoOutput.cpp @@ -17,15 +17,11 @@ */ #include -#include -#include +#include "openauto/Projection/QtVideoOutput.hpp" +#include "OpenautoLog.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -105,5 +101,3 @@ void QtVideoOutput::onStopPlayback() } } -} -} diff --git a/src/autoapp/Projection/RemoteBluetoothDevice.cpp b/openauto/Projection/RemoteBluetoothDevice.cpp similarity index 92% rename from src/autoapp/Projection/RemoteBluetoothDevice.cpp rename to openauto/Projection/RemoteBluetoothDevice.cpp index b86c96f..29706ed 100644 --- a/src/autoapp/Projection/RemoteBluetoothDevice.cpp +++ b/openauto/Projection/RemoteBluetoothDevice.cpp @@ -16,14 +16,10 @@ * along with openauto. If not, see . */ -#include +#include "openauto/Projection/RemoteBluetoothDevice.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -60,5 +56,3 @@ bool RemoteBluetoothDevice::isAvailable() const } } -} -} diff --git a/src/autoapp/Projection/RtAudioOutput.cpp b/openauto/Projection/RtAudioOutput.cpp similarity index 96% rename from src/autoapp/Projection/RtAudioOutput.cpp rename to openauto/Projection/RtAudioOutput.cpp index 139cd51..962fad2 100644 --- a/src/autoapp/Projection/RtAudioOutput.cpp +++ b/openauto/Projection/RtAudioOutput.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "openauto/Projection/RtAudioOutput.hpp" +#include "OpenautoLog.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -152,5 +148,3 @@ int RtAudioOutput::audioBufferReadHandler(void* outputBuffer, void* inputBuffer, } } -} -} diff --git a/src/autoapp/Projection/SequentialBuffer.cpp b/openauto/Projection/SequentialBuffer.cpp similarity index 95% rename from src/autoapp/Projection/SequentialBuffer.cpp rename to openauto/Projection/SequentialBuffer.cpp index a0a5632..bfe8a2b 100644 --- a/src/autoapp/Projection/SequentialBuffer.cpp +++ b/openauto/Projection/SequentialBuffer.cpp @@ -16,14 +16,10 @@ * along with openauto. If not, see . */ -#include +#include "openauto/Projection/SequentialBuffer.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -110,5 +106,3 @@ bool SequentialBuffer::canReadLine() const } } -} -} diff --git a/src/autoapp/Projection/VideoOutput.cpp b/openauto/Projection/VideoOutput.cpp similarity index 93% rename from src/autoapp/Projection/VideoOutput.cpp rename to openauto/Projection/VideoOutput.cpp index dca398d..1fd66f1 100644 --- a/src/autoapp/Projection/VideoOutput.cpp +++ b/openauto/Projection/VideoOutput.cpp @@ -16,14 +16,10 @@ * along with openauto. If not, see . */ -#include +#include "openauto/Projection/VideoOutput.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace projection { @@ -55,5 +51,3 @@ QRect VideoOutput::getVideoMargins() const } } -} -} diff --git a/src/autoapp/Service/AndroidAutoEntity.cpp b/openauto/Service/AndroidAutoEntity.cpp similarity index 98% rename from src/autoapp/Service/AndroidAutoEntity.cpp rename to openauto/Service/AndroidAutoEntity.cpp index 0e89b57..6a97cb8 100644 --- a/src/autoapp/Service/AndroidAutoEntity.cpp +++ b/openauto/Service/AndroidAutoEntity.cpp @@ -16,16 +16,12 @@ * along with openauto. If not, see . */ -#include -#include -#include +#include "aasdk/Channel/Control/ControlServiceChannel.hpp" +#include "openauto/Service/AndroidAutoEntity.hpp" +#include "OpenautoLog.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -279,5 +275,3 @@ void AndroidAutoEntity::sendPing() } } -} -} diff --git a/src/autoapp/Service/AndroidAutoEntityFactory.cpp b/openauto/Service/AndroidAutoEntityFactory.cpp similarity index 81% rename from src/autoapp/Service/AndroidAutoEntityFactory.cpp rename to openauto/Service/AndroidAutoEntityFactory.cpp index d833250..5a2ce1b 100644 --- a/src/autoapp/Service/AndroidAutoEntityFactory.cpp +++ b/openauto/Service/AndroidAutoEntityFactory.cpp @@ -16,24 +16,20 @@ * along with openauto. If not, see . */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "aasdk/USB/AOAPDevice.hpp" +#include "aasdk/Transport/SSLWrapper.hpp" +#include "aasdk/Transport/USBTransport.hpp" +#include "aasdk/Transport/TCPTransport.hpp" +#include "aasdk/Messenger/Cryptor.hpp" +#include "aasdk/Messenger/MessageInStream.hpp" +#include "aasdk/Messenger/MessageOutStream.hpp" +#include "aasdk/Messenger/Messenger.hpp" +#include "openauto/Service/AndroidAutoEntityFactory.hpp" +#include "openauto/Service/AndroidAutoEntity.hpp" +#include "openauto/Service/Pinger.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -76,5 +72,3 @@ IAndroidAutoEntity::Pointer AndroidAutoEntityFactory::create(aasdk::transport::I } } -} -} diff --git a/src/autoapp/Service/AudioInputService.cpp b/openauto/Service/AudioInputService.cpp similarity index 98% rename from src/autoapp/Service/AudioInputService.cpp rename to openauto/Service/AudioInputService.cpp index 78b2666..a73255d 100644 --- a/src/autoapp/Service/AudioInputService.cpp +++ b/openauto/Service/AudioInputService.cpp @@ -17,15 +17,11 @@ */ #include -#include -#include +#include "OpenautoLog.hpp" +#include "openauto/Service/AudioInputService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -197,5 +193,3 @@ void AudioInputService::readAudioInput() } } -} -} diff --git a/src/autoapp/Service/AudioService.cpp b/openauto/Service/AudioService.cpp similarity index 98% rename from src/autoapp/Service/AudioService.cpp rename to openauto/Service/AudioService.cpp index 5ddafce..577dd60 100644 --- a/src/autoapp/Service/AudioService.cpp +++ b/openauto/Service/AudioService.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "OpenautoLog.hpp" +#include "openauto/Service/AudioService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -178,5 +174,3 @@ void AudioService::onChannelError(const aasdk::error::Error& e) } } -} -} diff --git a/src/autoapp/Service/BluetoothService.cpp b/openauto/Service/BluetoothService.cpp similarity index 96% rename from src/autoapp/Service/BluetoothService.cpp rename to openauto/Service/BluetoothService.cpp index b6ae545..170b561 100644 --- a/src/autoapp/Service/BluetoothService.cpp +++ b/openauto/Service/BluetoothService.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "OpenautoLog.hpp" +#include "openauto/Service/BluetoothService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -107,5 +103,3 @@ void BluetoothService::onChannelError(const aasdk::error::Error& e) } } -} -} diff --git a/src/autoapp/Service/InputService.cpp b/openauto/Service/InputService.cpp similarity index 97% rename from src/autoapp/Service/InputService.cpp rename to openauto/Service/InputService.cpp index b5e22fc..26ff20b 100644 --- a/src/autoapp/Service/InputService.cpp +++ b/openauto/Service/InputService.cpp @@ -16,16 +16,12 @@ * along with openauto. If not, see . */ -#include -#include -#include +#include "aasdk_proto/InputEventIndicationMessage.pb.h" +#include "OpenautoLog.hpp" +#include "openauto/Service/InputService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -187,5 +183,3 @@ void InputService::onTouchEvent(const projection::TouchEvent& event) } } -} -} diff --git a/src/autoapp/Service/MediaAudioService.cpp b/openauto/Service/MediaAudioService.cpp similarity index 87% rename from src/autoapp/Service/MediaAudioService.cpp rename to openauto/Service/MediaAudioService.cpp index b754d21..24aa78b 100644 --- a/src/autoapp/Service/MediaAudioService.cpp +++ b/openauto/Service/MediaAudioService.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "aasdk/Channel/AV/MediaAudioServiceChannel.hpp" +#include "openauto/Service/MediaAudioService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -36,5 +32,3 @@ MediaAudioService::MediaAudioService(boost::asio::io_service& ioService, aasdk:: } } -} -} diff --git a/src/autoapp/Service/Pinger.cpp b/openauto/Service/Pinger.cpp similarity index 96% rename from src/autoapp/Service/Pinger.cpp rename to openauto/Service/Pinger.cpp index fd0b45d..c10a239 100644 --- a/src/autoapp/Service/Pinger.cpp +++ b/openauto/Service/Pinger.cpp @@ -16,14 +16,10 @@ * along with openauto. If not, see . */ -#include +#include "openauto/Service/Pinger.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -97,5 +93,3 @@ void Pinger::cancel() } } -} -} diff --git a/src/autoapp/Service/SensorService.cpp b/openauto/Service/SensorService.cpp similarity index 96% rename from src/autoapp/Service/SensorService.cpp rename to openauto/Service/SensorService.cpp index c2b4ada..8638413 100644 --- a/src/autoapp/Service/SensorService.cpp +++ b/openauto/Service/SensorService.cpp @@ -16,16 +16,12 @@ * along with openauto. If not, see . */ -#include -#include -#include +#include "aasdk_proto/DrivingStatusEnum.pb.h" +#include "OpenautoLog.hpp" +#include "openauto/Service/SensorService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -142,5 +138,3 @@ void SensorService::setNightMode(bool nightMode) } } -} -} diff --git a/src/autoapp/Service/ServiceFactory.cpp b/openauto/Service/ServiceFactory.cpp similarity index 86% rename from src/autoapp/Service/ServiceFactory.cpp rename to openauto/Service/ServiceFactory.cpp index d6bd867..e90113b 100644 --- a/src/autoapp/Service/ServiceFactory.cpp +++ b/openauto/Service/ServiceFactory.cpp @@ -18,35 +18,31 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "aasdk/Channel/AV/MediaAudioServiceChannel.hpp" +#include "aasdk/Channel/AV/SystemAudioServiceChannel.hpp" +#include "aasdk/Channel/AV/SpeechAudioServiceChannel.hpp" +#include "openauto/Service/ServiceFactory.hpp" +#include "openauto/Service/VideoService.hpp" +#include "openauto/Service/MediaAudioService.hpp" +#include "openauto/Service/SpeechAudioService.hpp" +#include "openauto/Service/SystemAudioService.hpp" +#include "openauto/Service/AudioInputService.hpp" +#include "openauto/Service/SensorService.hpp" +#include "openauto/Service/BluetoothService.hpp" +#include "openauto/Service/InputService.hpp" +#include "openauto/Projection/QtVideoOutput.hpp" +#include "openauto/Projection/GSTVideoOutput.hpp" +#include "openauto/Projection/OMXVideoOutput.hpp" +#include "openauto/Projection/RtAudioOutput.hpp" +#include "openauto/Projection/QtAudioOutput.hpp" +#include "openauto/Projection/QtAudioInput.hpp" +#include "openauto/Projection/InputDevice.hpp" +#include "openauto/Projection/LocalBluetoothDevice.hpp" +#include "openauto/Projection/RemoteBluetoothDevice.hpp" +#include "openauto/Projection/DummyBluetoothDevice.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -256,5 +252,3 @@ projection::DestRect ServiceFactory::QRectToDestRect(QRect rect) } } -} -} diff --git a/src/autoapp/Service/SpeechAudioService.cpp b/openauto/Service/SpeechAudioService.cpp similarity index 86% rename from src/autoapp/Service/SpeechAudioService.cpp rename to openauto/Service/SpeechAudioService.cpp index 5930095..d7106d0 100644 --- a/src/autoapp/Service/SpeechAudioService.cpp +++ b/openauto/Service/SpeechAudioService.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "aasdk/Channel/AV/SpeechAudioServiceChannel.hpp" +#include "openauto/Service/SpeechAudioService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -36,5 +32,3 @@ SpeechAudioService::SpeechAudioService(boost::asio::io_service& ioService, aasdk } } -} -} diff --git a/src/autoapp/Service/SystemAudioService.cpp b/openauto/Service/SystemAudioService.cpp similarity index 86% rename from src/autoapp/Service/SystemAudioService.cpp rename to openauto/Service/SystemAudioService.cpp index 0998615..0bd8088 100644 --- a/src/autoapp/Service/SystemAudioService.cpp +++ b/openauto/Service/SystemAudioService.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "aasdk/Channel/AV/SystemAudioServiceChannel.hpp" +#include "openauto/Service/SystemAudioService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -36,5 +32,3 @@ SystemAudioService::SystemAudioService(boost::asio::io_service& ioService, aasdk } } -} -} diff --git a/src/autoapp/Service/VideoService.cpp b/openauto/Service/VideoService.cpp similarity index 98% rename from src/autoapp/Service/VideoService.cpp rename to openauto/Service/VideoService.cpp index bd5dc67..b04da46 100644 --- a/src/autoapp/Service/VideoService.cpp +++ b/openauto/Service/VideoService.cpp @@ -16,15 +16,11 @@ * along with openauto. If not, see . */ -#include -#include +#include "OpenautoLog.hpp" +#include "openauto/Service/VideoService.hpp" -namespace f1x -{ namespace openauto { -namespace autoapp -{ namespace service { @@ -183,5 +179,3 @@ void VideoService::sendVideoFocusIndication() } } -} -} From f49b04b4e0778679ab6ae3db7d4f91ed8658ad13 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Tue, 26 May 2020 03:13:21 -0500 Subject: [PATCH 5/8] Correct linker paths after install. --- CMakeLists.txt | 1 + cmake_modules/Findaasdk.cmake | 6 ++++-- openauto/CMakeLists.txt | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8277a7..7ecad26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) +set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin) diff --git a/cmake_modules/Findaasdk.cmake b/cmake_modules/Findaasdk.cmake index cb3721f..4fb8614 100644 --- a/cmake_modules/Findaasdk.cmake +++ b/cmake_modules/Findaasdk.cmake @@ -25,11 +25,13 @@ if (AASDK_FOUND) if (NOT aasdk_FIND_QUIETLY) message(STATUS "Found aasdk:") message(STATUS " - Includes: ${AASDK_INCLUDE_DIR}") - message(STATUS " - Libraries: ${AASDK_LIBRARIES}") + message(STATUS " - Includes: ${AASDK_PROTO_INCLUDE_DIR}") + message(STATUS " - Libraries: ${AASDK_LIB_DIR}") endif() add_library(aasdk INTERFACE) target_include_directories(aasdk INTERFACE ${AASDK_INCLUDE_DIR} ${AASDK_PROTO_INCLUDE_DIR}) - target_link_libraries(aasdk INTERFACE ${AASDK_LIB_DIR}/libaasdk.so ${AASDK_LIB_DIR}/libaasdk_proto.so) + set_target_properties(aasdk PROPERTIES INTERFACE_LINK_DIRECTORIES ${AASDK_LIB_DIR}) + target_link_libraries(aasdk INTERFACE libaasdk.so libaasdk_proto.so) else() if (aasdk_FIND_REQUIRED) if(AASDK_INCLUDE_DIR AND NOT AASDK_PROTO_INCLUDE_DIR) diff --git a/openauto/CMakeLists.txt b/openauto/CMakeLists.txt index 880e430..cca1b1b 100644 --- a/openauto/CMakeLists.txt +++ b/openauto/CMakeLists.txt @@ -110,5 +110,8 @@ target_link_libraries(openauto PUBLIC install(TARGETS openauto LIBRARY DESTINATION lib) +set_target_properties(openauto + PROPERTIES INSTALL_RPATH_USE_LINK_PATH 1) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/openauto DESTINATION include) install(FILES ${CMAKE_SOURCE_DIR}/include/OpenautoLog.hpp DESTINATION include) From 323c231d36a70c659c70c6a1b5597b6e121b3df0 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sat, 11 Jul 2020 22:00:57 -0500 Subject: [PATCH 6/8] Convert tabs to spaces --- CMakeLists.txt | 3 +- cmake_modules/Findaasdk.cmake | 52 +++++++++--------- cmake_modules/Findlibomx.cmake | 86 +++++++++++++++--------------- cmake_modules/Findlibusb-1.0.cmake | 6 +-- cmake_modules/Findrtaudio.cmake | 4 +- cmake_modules/functions.cmake | 20 +++---- 6 files changed, 85 insertions(+), 86 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ecad26..9320287 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_RELEASE "-g -O3") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi") endif() set(Boost_USE_STATIC_LIBS OFF) @@ -67,7 +67,6 @@ if(GST_BUILD) endif(RPI_BUILD) message(STATUS "${GST_LIBRARIES}") endif(GST_BUILD) - add_subdirectory(openauto) add_subdirectory(btservice) diff --git a/cmake_modules/Findaasdk.cmake b/cmake_modules/Findaasdk.cmake index 4fb8614..8489e3b 100644 --- a/cmake_modules/Findaasdk.cmake +++ b/cmake_modules/Findaasdk.cmake @@ -1,45 +1,45 @@ set (AASDK_DIR ~/aasdk) find_path(AASDK_INCLUDE_DIR - aasdk/Version.hpp - PATHS ${AASDK_DIR} - PATH_SUFFIXES include + aasdk/Version.hpp + PATHS ${AASDK_DIR} + PATH_SUFFIXES include ) find_path(AASDK_PROTO_INCLUDE_DIR - aasdk_proto/AbsoluteInputEventData.pb.h - PATHS ${AASDK_DIR} + aasdk_proto/AbsoluteInputEventData.pb.h + PATHS ${AASDK_DIR} ) find_path(AASDK_LIB_DIR - libaasdk.so - PATHS ${AASDK_DIR} - PATH_SUFFIXES lib + libaasdk.so + PATHS ${AASDK_DIR} + PATH_SUFFIXES lib ) if (AASDK_INCLUDE_DIR AND AASDK_PROTO_INCLUDE_DIR AND AASDK_LIB_DIR) - set(AASDK_FOUND TRUE) + set(AASDK_FOUND TRUE) endif() if (AASDK_FOUND) - if (NOT aasdk_FIND_QUIETLY) - message(STATUS "Found aasdk:") - message(STATUS " - Includes: ${AASDK_INCLUDE_DIR}") - message(STATUS " - Includes: ${AASDK_PROTO_INCLUDE_DIR}") - message(STATUS " - Libraries: ${AASDK_LIB_DIR}") - endif() - add_library(aasdk INTERFACE) - target_include_directories(aasdk INTERFACE ${AASDK_INCLUDE_DIR} ${AASDK_PROTO_INCLUDE_DIR}) - set_target_properties(aasdk PROPERTIES INTERFACE_LINK_DIRECTORIES ${AASDK_LIB_DIR}) - target_link_libraries(aasdk INTERFACE libaasdk.so libaasdk_proto.so) + if (NOT aasdk_FIND_QUIETLY) + message(STATUS "Found aasdk:") + message(STATUS " - Includes: ${AASDK_INCLUDE_DIR}") + message(STATUS " - Includes: ${AASDK_PROTO_INCLUDE_DIR}") + message(STATUS " - Libraries: ${AASDK_LIB_DIR}") + endif() + add_library(aasdk INTERFACE) + target_include_directories(aasdk INTERFACE ${AASDK_INCLUDE_DIR} ${AASDK_PROTO_INCLUDE_DIR}) + set_target_properties(aasdk PROPERTIES INTERFACE_LINK_DIRECTORIES ${AASDK_LIB_DIR}) + target_link_libraries(aasdk INTERFACE libaasdk.so libaasdk_proto.so) else() - if (aasdk_FIND_REQUIRED) - if(AASDK_INCLUDE_DIR AND NOT AASDK_PROTO_INCLUDE_DIR) - message(FATAL_ERROR "aasdk was found but not built. Perform an in-source build.") - else() - message(FATAL_ERROR "Could not find aasdk") - endif() - endif() + if (aasdk_FIND_REQUIRED) + if(AASDK_INCLUDE_DIR AND NOT AASDK_PROTO_INCLUDE_DIR) + message(FATAL_ERROR "aasdk was found but not built. Perform an in-source build.") + else() + message(FATAL_ERROR "Could not find aasdk") + endif() + endif() endif() mark_as_advanced(AASDK_INCLUDE_DIRS AASDK_LIBRARIES) diff --git a/cmake_modules/Findlibomx.cmake b/cmake_modules/Findlibomx.cmake index 278831e..e561ecd 100644 --- a/cmake_modules/Findlibomx.cmake +++ b/cmake_modules/Findlibomx.cmake @@ -1,67 +1,67 @@ set (OMX_DIR /opt/vc/) find_path(BCM_HOST_INCLUDE_DIR - bcm_host.h - PATHS - ${OMX_DIR} - PATH_SUFFIXES - include + bcm_host.h + PATHS + ${OMX_DIR} + PATH_SUFFIXES + include ) find_path(BCM_HOST_LIB_DIR - libbcm_host.so - PATHS - ${OMX_DIR} - PATH_SUFFIXES - lib + libbcm_host.so + PATHS + ${OMX_DIR} + PATH_SUFFIXES + lib ) find_path(ILCLIENT_INCLUDE_DIR - ilclient.h - PATHS - ${OMX_DIR} - PATH_SUFFIXES - src/hello_pi/libs/ilclient + ilclient.h + PATHS + ${OMX_DIR} + PATH_SUFFIXES + src/hello_pi/libs/ilclient ) find_path(ILCLIENT_LIB_DIR - libilclient.a - PATHS - ${OMX_DIR} - PATH_SUFFIXES - src/hello_pi/libs/ilclient + libilclient.a + PATHS + ${OMX_DIR} + PATH_SUFFIXES + src/hello_pi/libs/ilclient ) if (BCM_HOST_INCLUDE_DIR AND ILCLIENT_INCLUDE_DIR AND BCM_HOST_LIB_DIR AND ILCLIENT_LIB_DIR) - set(libomx_FOUND TRUE) + set(libomx_FOUND TRUE) endif() if (libomx_FOUND) - if (NOT libomx_FIND_QUIETLY) - message(STATUS "Found omx:") - message(STATUS " - Bcm Host: ${BCM_HOST_INCLUDE_DIR}") - message(STATUS " - ilclient: ${ILCLIENT_INCLUDE_DIR}") - endif() + if (NOT libomx_FIND_QUIETLY) + message(STATUS "Found omx:") + message(STATUS " - Bcm Host: ${BCM_HOST_INCLUDE_DIR}") + message(STATUS " - ilclient: ${ILCLIENT_INCLUDE_DIR}") + endif() - add_library(omx INTERFACE) + add_library(omx INTERFACE) - target_include_directories(omx SYSTEM INTERFACE - ${BCM_HOST_INCLUDE_DIR} - ${ILCLIENT_INCLUDE_DIR} - ) + target_include_directories(omx SYSTEM INTERFACE + ${BCM_HOST_INCLUDE_DIR} + ${ILCLIENT_INCLUDE_DIR} + ) - target_link_libraries(omx INTERFACE - ${BCM_HOST_LIB_DIR}/libbcm_host.so - ${ILCLIENT_LIB_DIR}/libilclient.a - ${BCM_HOST_LIB_DIR}/libvcos.so - ${BCM_HOST_LIB_DIR}/libvcilcs.a - ${BCM_HOST_LIB_DIR}/libvchiq_arm.so - ) + target_link_libraries(omx INTERFACE + ${BCM_HOST_LIB_DIR}/libbcm_host.so + ${ILCLIENT_LIB_DIR}/libilclient.a + ${BCM_HOST_LIB_DIR}/libvcos.so + ${BCM_HOST_LIB_DIR}/libvcilcs.a + ${BCM_HOST_LIB_DIR}/libvchiq_arm.so + ) - target_compile_definitions(omx INTERFACE - -DUSE_OMX - -DOMX_SKIP64BIT - -DRASPBERRYPI3 - ) + target_compile_definitions(omx INTERFACE + -DUSE_OMX + -DOMX_SKIP64BIT + -DRASPBERRYPI3 + ) endif() diff --git a/cmake_modules/Findlibusb-1.0.cmake b/cmake_modules/Findlibusb-1.0.cmake index 8c52b20..4893e89 100644 --- a/cmake_modules/Findlibusb-1.0.cmake +++ b/cmake_modules/Findlibusb-1.0.cmake @@ -49,14 +49,14 @@ if (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) find_path(LIBUSB_1_INCLUDE_DIR NAMES - libusb.h + libusb.h PATHS /usr/include /usr/local/include /opt/local/include /sw/include - PATH_SUFFIXES - libusb-1.0 + PATH_SUFFIXES + libusb-1.0 ) find_library(LIBUSB_1_LIBRARY diff --git a/cmake_modules/Findrtaudio.cmake b/cmake_modules/Findrtaudio.cmake index 60b9384..d12818a 100644 --- a/cmake_modules/Findrtaudio.cmake +++ b/cmake_modules/Findrtaudio.cmake @@ -28,8 +28,8 @@ else (RTAUDIO_LIBRARIES AND RTAUDIO_INCLUDE_DIRS) /usr/local/include /opt/local/include /sw/include - PATH_SUFFIXES - rtaudio + PATH_SUFFIXES + rtaudio ) find_library(RTAUDIO_LIBRARY diff --git a/cmake_modules/functions.cmake b/cmake_modules/functions.cmake index b01988e..18f5864 100644 --- a/cmake_modules/functions.cmake +++ b/cmake_modules/functions.cmake @@ -1,15 +1,15 @@ function( findRpiRevision OUTPUT ) - # Find it with an automated script - execute_process( COMMAND grep -Po "^Revision\\s*:\\s*\\K[[:xdigit:]]+" /proc/cpuinfo OUTPUT_VARIABLE TMP ) + # Find it with an automated script + execute_process( COMMAND grep -Po "^Revision\\s*:\\s*\\K[[:xdigit:]]+" /proc/cpuinfo OUTPUT_VARIABLE TMP ) - # If have not found the Revision number, use the last version - if ( TMP ) - message( "-- Detecting Raspberry Pi Revision Number: ${TMP}" ) - else() - set( TMP "0006" ) - message( WARNING "-- Could NOT find Raspberry Pi revision!" ) - endif() + # If have not found the Revision number, use the last version + if ( TMP ) + message( "-- Detecting Raspberry Pi Revision Number: ${TMP}" ) + else() + set( TMP "0006" ) + message( WARNING "-- Could NOT find Raspberry Pi revision!" ) + endif() - set( ${OUTPUT} "${TMP}" PARENT_SCOPE ) + set( ${OUTPUT} "${TMP}" PARENT_SCOPE ) endfunction() From bb0881e827294a96ba2fe4bb69e02e9d9f8a2f6c Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sat, 11 Jul 2020 22:01:08 -0500 Subject: [PATCH 7/8] Correct relative paths --- include/openauto/Projection/InputDevice.hpp | 2 +- include/openauto/Projection/VideoOutput.hpp | 2 +- include/openauto/Service/AndroidAutoEntity.hpp | 2 +- include/openauto/Service/AndroidAutoEntityFactory.hpp | 2 +- include/openauto/Service/AudioInputService.hpp | 2 +- include/openauto/Service/AudioService.hpp | 2 +- include/openauto/Service/BluetoothService.hpp | 2 +- include/openauto/Service/InputService.hpp | 4 ++-- include/openauto/Service/VideoService.hpp | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/openauto/Projection/InputDevice.hpp b/include/openauto/Projection/InputDevice.hpp index 18b9f60..4514d4c 100644 --- a/include/openauto/Projection/InputDevice.hpp +++ b/include/openauto/Projection/InputDevice.hpp @@ -21,7 +21,7 @@ #include #include #include "IInputDevice.hpp" -#include "../Configuration/IConfiguration.hpp" +#include "openauto/Configuration/IConfiguration.hpp" namespace openauto { diff --git a/include/openauto/Projection/VideoOutput.hpp b/include/openauto/Projection/VideoOutput.hpp index 094e2dc..d039157 100644 --- a/include/openauto/Projection/VideoOutput.hpp +++ b/include/openauto/Projection/VideoOutput.hpp @@ -18,7 +18,7 @@ #pragma once -#include "../Configuration/IConfiguration.hpp" +#include "openauto/Configuration/IConfiguration.hpp" #include "IVideoOutput.hpp" namespace openauto diff --git a/include/openauto/Service/AndroidAutoEntity.hpp b/include/openauto/Service/AndroidAutoEntity.hpp index 741de57..c4447c0 100644 --- a/include/openauto/Service/AndroidAutoEntity.hpp +++ b/include/openauto/Service/AndroidAutoEntity.hpp @@ -23,7 +23,7 @@ #include "aasdk/Channel/Control/IControlServiceChannel.hpp" #include "aasdk/Channel/Control/IControlServiceChannelEventHandler.hpp" #include "aasdk/Channel/AV/VideoServiceChannel.hpp" -#include "../Configuration/IConfiguration.hpp" +#include "openauto/Configuration/IConfiguration.hpp" #include "IAndroidAutoEntity.hpp" #include "IService.hpp" #include "IPinger.hpp" diff --git a/include/openauto/Service/AndroidAutoEntityFactory.hpp b/include/openauto/Service/AndroidAutoEntityFactory.hpp index 17085e8..bab504d 100644 --- a/include/openauto/Service/AndroidAutoEntityFactory.hpp +++ b/include/openauto/Service/AndroidAutoEntityFactory.hpp @@ -20,7 +20,7 @@ #include #include "aasdk/Transport/ITransport.hpp" -#include "../Configuration/IConfiguration.hpp" +#include "openauto/Configuration/IConfiguration.hpp" #include "IAndroidAutoEntityFactory.hpp" #include "IServiceFactory.hpp" diff --git a/include/openauto/Service/AudioInputService.hpp b/include/openauto/Service/AudioInputService.hpp index 81d3651..5083629 100644 --- a/include/openauto/Service/AudioInputService.hpp +++ b/include/openauto/Service/AudioInputService.hpp @@ -20,7 +20,7 @@ #include "aasdk/Channel/AV/AVInputServiceChannel.hpp" #include "IService.hpp" -#include "../Projection/IAudioInput.hpp" +#include "openauto/Projection/IAudioInput.hpp" namespace openauto { diff --git a/include/openauto/Service/AudioService.hpp b/include/openauto/Service/AudioService.hpp index f02ee86..cdbd6ea 100644 --- a/include/openauto/Service/AudioService.hpp +++ b/include/openauto/Service/AudioService.hpp @@ -20,7 +20,7 @@ #include "aasdk/Channel/AV/IAudioServiceChannel.hpp" #include "aasdk/Channel/AV/IAudioServiceChannelEventHandler.hpp" -#include "../Projection/IAudioOutput.hpp" +#include "openauto/Projection/IAudioOutput.hpp" #include "IService.hpp" namespace openauto diff --git a/include/openauto/Service/BluetoothService.hpp b/include/openauto/Service/BluetoothService.hpp index 4652180..2d6b37f 100644 --- a/include/openauto/Service/BluetoothService.hpp +++ b/include/openauto/Service/BluetoothService.hpp @@ -19,7 +19,7 @@ #pragma once #include "aasdk/Channel/Bluetooth/BluetoothServiceChannel.hpp" -#include "../Projection/IBluetoothDevice.hpp" +#include "openauto/Projection/IBluetoothDevice.hpp" #include "IService.hpp" namespace openauto diff --git a/include/openauto/Service/InputService.hpp b/include/openauto/Service/InputService.hpp index b8d57c9..3f66e36 100644 --- a/include/openauto/Service/InputService.hpp +++ b/include/openauto/Service/InputService.hpp @@ -21,8 +21,8 @@ #include "aasdk_proto/ButtonCodeEnum.pb.h" #include "aasdk/Channel/Input/InputServiceChannel.hpp" #include "IService.hpp" -#include "../Projection/IInputDevice.hpp" -#include "../Projection/IInputDeviceEventHandler.hpp" +#include "openauto/Projection/IInputDevice.hpp" +#include "openauto/Projection/IInputDeviceEventHandler.hpp" namespace openauto { diff --git a/include/openauto/Service/VideoService.hpp b/include/openauto/Service/VideoService.hpp index 56c5cb7..0b70b04 100644 --- a/include/openauto/Service/VideoService.hpp +++ b/include/openauto/Service/VideoService.hpp @@ -21,7 +21,7 @@ #include #include "aasdk/Channel/AV/VideoServiceChannel.hpp" #include "aasdk/Channel/AV/IVideoServiceChannelEventHandler.hpp" -#include "../Projection/IVideoOutput.hpp" +#include "openauto/Projection/IVideoOutput.hpp" #include "IService.hpp" namespace openauto From 35140352a63b8767cf5ea2332db49c52cb7e9910 Mon Sep 17 00:00:00 2001 From: "Jason C. Wenger" Date: Sat, 11 Jul 2020 22:23:35 -0500 Subject: [PATCH 8/8] Correct mistaken search/replace --- btservice/btservice.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/btservice/btservice.cpp b/btservice/btservice.cpp index 8fb059f..3eee52a 100644 --- a/btservice/btservice.cpp +++ b/btservice/btservice.cpp @@ -33,22 +33,22 @@ int main(int argc, char* argv[]) btservice::AndroidBluetoothServer androidBluetoothServer; if(!androidBluetoothServer.start(address, portNumber)) { - OPENAUTO_LOG(error) << "[src] Server start failed."; + OPENAUTO_LOG(error) << "[btservice] Server start failed."; return 2; } - OPENAUTO_LOG(info) << "[src] Listening for connections, address: " << address.toString().toStdString() + OPENAUTO_LOG(info) << "[btservice] Listening for connections, address: " << address.toString().toStdString() << ", port: " << portNumber; btservice::AndroidBluetoothService androidBluetoothService(portNumber); if(!androidBluetoothService.registerService(address)) { - OPENAUTO_LOG(error) << "[src] Service registration failed."; + OPENAUTO_LOG(error) << "[btservice] Service registration failed."; return 1; } else { - OPENAUTO_LOG(info) << "[src] Service registered, port: " << portNumber; + OPENAUTO_LOG(info) << "[btservice] Service registered, port: " << portNumber; } qApplication.exec();