Merge pull request #9 from jcwenger/feature/directory-structure

Feature/directory structure
This commit is contained in:
Jason Wenger 2020-07-11 23:34:05 -05:00 committed by GitHub
commit c3f9c29ce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
108 changed files with 538 additions and 931 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@
lib/ lib/
bin/ bin/
CMakeLists.txt.user CMakeLists.txt.user
cmake-build-*/
.idea/

View File

@ -10,21 +10,12 @@ project(openauto CXX)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC 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_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${base_directory}/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 ${base_directory}/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${base_directory}/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_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake_modules/")
SET(CMAKE_CXX_STANDARD 14) SET(CMAKE_CXX_STANDARD 14)
@ -33,34 +24,30 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT} -Wall -pedantic")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-g -O3") 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") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")
endif() endif()
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
add_definitions(-DBOOST_ALL_DYN_LINK) add_definitions(-DBOOST_ALL_DYN_LINK)
find_package(Boost REQUIRED COMPONENTS system log OPTIONAL_COMPONENTS unit_test_framework) find_package(Boost REQUIRED COMPONENTS system log OPTIONAL_COMPONENTS unit_test_framework)
find_package(libusb-1.0 REQUIRED) find_package(libusb-1.0 REQUIRED)
find_package(Qt5 COMPONENTS Multimedia MultimediaWidgets Bluetooth Qml Quick QuickWidgets REQUIRED) find_package(Qt5 COMPONENTS Multimedia MultimediaWidgets Bluetooth Qml Quick QuickWidgets REQUIRED)
find_package(Protobuf REQUIRED) find_package(Protobuf REQUIRED)
find_package(OpenSSL REQUIRED) find_package(OpenSSL REQUIRED)
find_package(rtaudio REQUIRED) find_package(rtaudio REQUIRED)
find_package(aasdk REQUIRED) find_package(aasdk REQUIRED)
find_package(ZLIB REQUIRED) find_package(Threads)
find_package(GObject)
if(WIN32) if(RPI_BUILD)
set(WINSOCK2_LIBRARIES "ws2_32") find_package(libomx)
endif(WIN32) endif()
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) if(GST_BUILD)
find_package(GObject)
find_package(Qt5GStreamer) find_package(Qt5GStreamer)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(GST REQUIRED pkg_check_modules(GST REQUIRED
@ -71,76 +58,16 @@ if(GST_BUILD)
add_definitions(-DUSE_GST) add_definitions(-DUSE_GST)
if(RPI_BUILD) if(RPI_BUILD)
add_definitions(-DRPI) add_definitions(-DRPI)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/functions.cmake)
findRpiRevision( RPI_REVISION ) findRpiRevision( RPI_REVISION )
if(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111") if(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111")
message("Raspberry Pi 4 Found") message("Raspberry Pi 4 Found")
add_definitions(-DPI4) add_definitions(-DPI4)
endif(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111") endif(RPI_REVISION MATCHES "a03111" OR RPI_REVISION MATCHES "b03111" OR RPI_REVISION MATCHES "a03111")
endif(RPI_BUILD) endif(RPI_BUILD)
message(STATUS "${GST_LIBRARIES}")
endif(GST_BUILD) endif(GST_BUILD)
include_directories(${CMAKE_CURRENT_BINARY_DIR} add_subdirectory(openauto)
${Qt5Multimedia_INCLUDE_DIRS} add_subdirectory(btservice)
${Qt5MultimediaWidgets_INCLUDE_DIRS} add_subdirectory(autoapp)
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Bluetooth_INCLUDE_DIRS}
${QTGSTREAMER_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${PROTOBUF_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
${RTAUDIO_INCLUDE_DIRS}
${BCM_HOST_INCLUDE_DIRS}
${ILCLIENT_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}")
target_link_libraries(autoapp aasdk libusb
${GST_LIBRARIES}
${Boost_LIBRARIES}
${Qt5Multimedia_LIBRARIES}
${Qt5MultimediaWidgets_LIBRARIES}
${Qt5QuickWidgets_LIBRARIES}
${Qt5Bluetooth_LIBRARIES}
${PROTOBUF_LIBRARIES}
${ZLIB_LIBRARIES}
${BCM_HOST_LIBRARIES}
${ILCLIENT_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}
)
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)

32
autoapp/CMakeLists.txt Normal file
View File

@ -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)

View File

@ -1,17 +1,13 @@
#include <QMessageBox> #include <QMessageBox>
#include <f1x/openauto/autoapp/UI/ConnectDialog.hpp> #include "autoapp/UI/ConnectDialog.hpp"
#include "ui_connectdialog.h" #include "ui_connectdialog.h"
namespace f1x
{
namespace openauto
{
namespace autoapp namespace autoapp
{ {
namespace ui 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) : QDialog(parent)
, ioService_(ioService) , ioService_(ioService)
, tcpWrapper_(tcpWrapper) , tcpWrapper_(tcpWrapper)
@ -121,5 +117,3 @@ void ConnectDialog::insertIpAddress(const std::string& ipAddress)
} }
} }
}
}

View File

@ -17,13 +17,9 @@
*/ */
#include <QApplication> #include <QApplication>
#include <f1x/openauto/autoapp/UI/MainWindow.hpp> #include "autoapp/UI/MainWindow.hpp"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
namespace f1x
{
namespace openauto
{
namespace autoapp namespace autoapp
{ {
namespace ui namespace ui
@ -47,5 +43,3 @@ MainWindow::~MainWindow()
} }
} }
}
}

View File

@ -17,19 +17,15 @@
*/ */
#include <QMessageBox> #include <QMessageBox>
#include <f1x/openauto/autoapp/UI/SettingsWindow.hpp> #include "autoapp/UI/SettingsWindow.hpp"
#include "ui_settingswindow.h" #include "ui_settingswindow.h"
namespace f1x
{
namespace openauto
{
namespace autoapp namespace autoapp
{ {
namespace ui namespace ui
{ {
SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configuration, QWidget *parent) SettingsWindow::SettingsWindow(openauto::configuration::IConfiguration::Pointer configuration, QWidget *parent)
: QWidget(parent) : QWidget(parent)
, ui_(new Ui::SettingsWindow) , ui_(new Ui::SettingsWindow)
, configuration_(std::move(configuration)) , configuration_(std::move(configuration))
@ -54,7 +50,7 @@ SettingsWindow::~SettingsWindow()
void SettingsWindow::onSave() 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_->showClock(ui_->checkBoxShowClock->isChecked());
configuration_->setVideoFPS(ui_->radioButton30FPS->isChecked() ? aasdk::proto::enums::VideoFPS::_30 : aasdk::proto::enums::VideoFPS::_60); 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()) if(ui_->radioButtonDisableBluetooth->isChecked())
{ {
configuration_->setBluetoothAdapterType(configuration::BluetoothAdapterType::NONE); configuration_->setBluetoothAdapterType(openauto::configuration::BluetoothAdapterType::NONE);
} }
else if(ui_->radioButtonUseLocalBluetoothAdapter->isChecked()) else if(ui_->radioButtonUseLocalBluetoothAdapter->isChecked())
{ {
configuration_->setBluetoothAdapterType(configuration::BluetoothAdapterType::LOCAL); configuration_->setBluetoothAdapterType(openauto::configuration::BluetoothAdapterType::LOCAL);
} }
else if(ui_->radioButtonUseExternalBluetoothAdapter->isChecked()) else if(ui_->radioButtonUseExternalBluetoothAdapter->isChecked())
{ {
configuration_->setBluetoothAdapterType(configuration::BluetoothAdapterType::REMOTE); configuration_->setBluetoothAdapterType(openauto::configuration::BluetoothAdapterType::REMOTE);
} }
configuration_->setBluetoothRemoteAdapterAddress(ui_->lineEditExternalBluetoothAdapterAddress->text().toStdString()); configuration_->setBluetoothRemoteAdapterAddress(ui_->lineEditExternalBluetoothAdapterAddress->text().toStdString());
configuration_->setMusicAudioChannelEnabled(ui_->checkBoxMusicAudioChannel->isChecked()); configuration_->setMusicAudioChannelEnabled(ui_->checkBoxMusicAudioChannel->isChecked());
configuration_->setSpeechAudioChannelEnabled(ui_->checkBoxSpeechAudioChannel->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(); configuration_->save();
this->close(); this->close();
@ -122,8 +118,8 @@ void SettingsWindow::showEvent(QShowEvent* event)
void SettingsWindow::load() void SettingsWindow::load()
{ {
ui_->radioButtonLeftHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE); ui_->radioButtonLeftHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == openauto::configuration::HandednessOfTrafficType::LEFT_HAND_DRIVE);
ui_->radioButtonRightHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE); ui_->radioButtonRightHandDrive->setChecked(configuration_->getHandednessOfTrafficType() == openauto::configuration::HandednessOfTrafficType::RIGHT_HAND_DRIVE);
ui_->checkBoxShowClock->setChecked(configuration_->showClock()); ui_->checkBoxShowClock->setChecked(configuration_->showClock());
ui_->radioButton30FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_30); ui_->radioButton30FPS->setChecked(configuration_->getVideoFPS() == aasdk::proto::enums::VideoFPS::_30);
@ -142,18 +138,18 @@ void SettingsWindow::load()
ui_->checkBoxEnableTouchscreen->setChecked(configuration_->getTouchscreenEnabled()); ui_->checkBoxEnableTouchscreen->setChecked(configuration_->getTouchscreenEnabled());
this->loadButtonCheckBoxes(); this->loadButtonCheckBoxes();
ui_->radioButtonDisableBluetooth->setChecked(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::NONE); ui_->radioButtonDisableBluetooth->setChecked(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::NONE);
ui_->radioButtonUseLocalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::LOCAL); ui_->radioButtonUseLocalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::LOCAL);
ui_->radioButtonUseExternalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::REMOTE); ui_->radioButtonUseExternalBluetoothAdapter->setChecked(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::REMOTE);
ui_->lineEditExternalBluetoothAdapterAddress->setEnabled(configuration_->getBluetoothAdapterType() == configuration::BluetoothAdapterType::REMOTE); ui_->lineEditExternalBluetoothAdapterAddress->setEnabled(configuration_->getBluetoothAdapterType() == openauto::configuration::BluetoothAdapterType::REMOTE);
ui_->lineEditExternalBluetoothAdapterAddress->setText(QString::fromStdString(configuration_->getBluetoothRemoteAdapterAddress())); ui_->lineEditExternalBluetoothAdapterAddress->setText(QString::fromStdString(configuration_->getBluetoothRemoteAdapterAddress()));
ui_->checkBoxMusicAudioChannel->setChecked(configuration_->musicAudioChannelEnabled()); ui_->checkBoxMusicAudioChannel->setChecked(configuration_->musicAudioChannelEnabled());
ui_->checkBoxSpeechAudioChannel->setChecked(configuration_->speechAudioChannelEnabled()); ui_->checkBoxSpeechAudioChannel->setChecked(configuration_->speechAudioChannelEnabled());
const auto& audioOutputBackendType = configuration_->getAudioOutputBackendType(); const auto& audioOutputBackendType = configuration_->getAudioOutputBackendType();
ui_->radioButtonRtAudio->setChecked(audioOutputBackendType == configuration::AudioOutputBackendType::RTAUDIO); ui_->radioButtonRtAudio->setChecked(audioOutputBackendType == openauto::configuration::AudioOutputBackendType::RTAUDIO);
ui_->radioButtonQtAudio->setChecked(audioOutputBackendType == configuration::AudioOutputBackendType::QT); ui_->radioButtonQtAudio->setChecked(audioOutputBackendType == openauto::configuration::AudioOutputBackendType::QT);
} }
void SettingsWindow::loadButtonCheckBoxes() void SettingsWindow::loadButtonCheckBoxes()
@ -199,7 +195,7 @@ void SettingsWindow::setButtonCheckBoxes(bool value)
void SettingsWindow::saveButtonCheckBoxes() 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_->checkBoxPlayButton, buttonCodes, aasdk::proto::enums::ButtonCode::PLAY);
this->saveButtonCheckBox(ui_->checkBoxPauseButton, buttonCodes, aasdk::proto::enums::ButtonCode::PAUSE); this->saveButtonCheckBox(ui_->checkBoxPauseButton, buttonCodes, aasdk::proto::enums::ButtonCode::PAUSE);
this->saveButtonCheckBox(ui_->checkBoxTogglePlayButton, buttonCodes, aasdk::proto::enums::ButtonCode::TOGGLE_PLAY); this->saveButtonCheckBox(ui_->checkBoxTogglePlayButton, buttonCodes, aasdk::proto::enums::ButtonCode::TOGGLE_PLAY);
@ -219,7 +215,7 @@ void SettingsWindow::saveButtonCheckBoxes()
configuration_->setButtonCodes(buttonCodes); 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()) if(checkBox->isChecked())
{ {
@ -259,5 +255,3 @@ void SettingsWindow::onShowBindings()
} }
} }
}
}

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 438 B

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 751 B

View File

@ -18,25 +18,24 @@
#include <thread> #include <thread>
#include <QApplication> #include <QApplication>
#include <f1x/aasdk/USB/USBHub.hpp> #include "aasdk/USB/USBHub.hpp"
#include <f1x/aasdk/USB/ConnectedAccessoriesEnumerator.hpp> #include "aasdk/USB/ConnectedAccessoriesEnumerator.hpp"
#include <f1x/aasdk/USB/AccessoryModeQueryChain.hpp> #include "aasdk/USB/AccessoryModeQueryChain.hpp"
#include <f1x/aasdk/USB/AccessoryModeQueryChainFactory.hpp> #include "aasdk/USB/AccessoryModeQueryChainFactory.hpp"
#include <f1x/aasdk/USB/AccessoryModeQueryFactory.hpp> #include "aasdk/USB/AccessoryModeQueryFactory.hpp"
#include <f1x/aasdk/TCP/TCPWrapper.hpp> #include "aasdk/TCP/TCPWrapper.hpp"
#include <f1x/openauto/autoapp/App.hpp> #include "openauto/App.hpp"
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "openauto/Configuration/IConfiguration.hpp"
#include <f1x/openauto/autoapp/Configuration/RecentAddressesList.hpp> #include "openauto/Configuration/RecentAddressesList.hpp"
#include <f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp> #include "openauto/Service/AndroidAutoEntityFactory.hpp"
#include <f1x/openauto/autoapp/Service/ServiceFactory.hpp> #include "openauto/Service/ServiceFactory.hpp"
#include <f1x/openauto/autoapp/Configuration/Configuration.hpp> #include "openauto/Configuration/Configuration.hpp"
#include <f1x/openauto/autoapp/UI/MainWindow.hpp> #include "autoapp/UI/MainWindow.hpp"
#include <f1x/openauto/autoapp/UI/SettingsWindow.hpp> #include "autoapp/UI/SettingsWindow.hpp"
#include <f1x/openauto/autoapp/UI/ConnectDialog.hpp> #include "autoapp/UI/ConnectDialog.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace aasdk = f1x::aasdk; using namespace openauto;
namespace autoapp = f1x::openauto::autoapp;
using ThreadPool = std::vector<std::thread>; using ThreadPool = std::vector<std::thread>;
void startUSBWorkers(boost::asio::io_service& ioService, libusb_context* usbContext, ThreadPool& threadPool) 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; autoapp::ui::MainWindow mainWindow;
mainWindow.setWindowFlags(Qt::WindowStaysOnTopHint); mainWindow.setWindowFlags(Qt::WindowStaysOnTopHint);
auto configuration = std::make_shared<autoapp::configuration::Configuration>(); auto configuration = std::make_shared<openauto::configuration::Configuration>();
autoapp::ui::SettingsWindow settingsWindow(configuration); autoapp::ui::SettingsWindow settingsWindow(configuration);
settingsWindow.setWindowFlags(Qt::WindowStaysOnTopHint); settingsWindow.setWindowFlags(Qt::WindowStaysOnTopHint);
autoapp::configuration::RecentAddressesList recentAddressesList(7); openauto::configuration::RecentAddressesList recentAddressesList(7);
recentAddressesList.read(); recentAddressesList.read();
aasdk::tcp::TCPWrapper tcpWrapper; aasdk::tcp::TCPWrapper tcpWrapper;
@ -113,12 +112,12 @@ int main(int argc, char* argv[])
aasdk::usb::USBWrapper usbWrapper(usbContext); aasdk::usb::USBWrapper usbWrapper(usbContext);
aasdk::usb::AccessoryModeQueryFactory queryFactory(usbWrapper, ioService); aasdk::usb::AccessoryModeQueryFactory queryFactory(usbWrapper, ioService);
aasdk::usb::AccessoryModeQueryChainFactory queryChainFactory(usbWrapper, ioService, queryFactory); aasdk::usb::AccessoryModeQueryChainFactory queryChainFactory(usbWrapper, ioService, queryFactory);
autoapp::service::ServiceFactory serviceFactory(ioService, configuration); openauto::service::ServiceFactory serviceFactory(ioService, configuration);
autoapp::service::AndroidAutoEntityFactory androidAutoEntityFactory(ioService, configuration, serviceFactory); openauto::service::AndroidAutoEntityFactory androidAutoEntityFactory(ioService, configuration, serviceFactory);
auto usbHub(std::make_shared<aasdk::usb::USBHub>(usbWrapper, ioService, queryChainFactory)); auto usbHub(std::make_shared<aasdk::usb::USBHub>(usbWrapper, ioService, queryChainFactory));
auto connectedAccessoriesEnumerator(std::make_shared<aasdk::usb::ConnectedAccessoriesEnumerator>(usbWrapper, ioService, queryChainFactory)); auto connectedAccessoriesEnumerator(std::make_shared<aasdk::usb::ConnectedAccessoriesEnumerator>(usbWrapper, ioService, queryChainFactory));
auto app = std::make_shared<autoapp::App>(ioService, usbWrapper, tcpWrapper, androidAutoEntityFactory, std::move(usbHub), std::move(connectedAccessoriesEnumerator)); auto app = std::make_shared<openauto::App>(ioService, usbWrapper, tcpWrapper, androidAutoEntityFactory, std::move(usbHub), std::move(connectedAccessoriesEnumerator));
QObject::connect(&connectDialog, &autoapp::ui::ConnectDialog::connectionSucceed, [&app](auto socket) { QObject::connect(&connectDialog, &autoapp::ui::ConnectDialog::connectionSucceed, [&app](auto socket) {
app->start(std::move(socket)); app->start(std::move(socket));

View File

@ -16,11 +16,9 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/btservice/AndroidBluetoothServer.hpp> #include "btservice/AndroidBluetoothServer.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace btservice namespace btservice
@ -53,4 +51,3 @@ void AndroidBluetoothServer::onClientConnected()
} }
} }
}

View File

@ -16,10 +16,8 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/btservice/AndroidBluetoothService.hpp> #include "btservice/AndroidBluetoothService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace btservice namespace btservice
@ -68,4 +66,3 @@ bool AndroidBluetoothService::unregisterService()
} }
} }
}

25
btservice/CMakeLists.txt Normal file
View File

@ -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)

View File

@ -17,11 +17,11 @@
*/ */
#include <QApplication> #include <QApplication>
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/btservice/AndroidBluetoothService.hpp> #include "btservice/AndroidBluetoothService.hpp"
#include <f1x/openauto/btservice/AndroidBluetoothServer.hpp> #include "btservice/AndroidBluetoothServer.hpp"
namespace btservice = f1x::openauto::btservice; namespace btservice = openauto::btservice;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {

View File

@ -1,7 +1,7 @@
set (AASDK_DIR ~/aasdk) set (AASDK_DIR ~/aasdk)
find_path(AASDK_INCLUDE_DIR find_path(AASDK_INCLUDE_DIR
f1x/aasdk/Version.hpp aasdk/Version.hpp
PATHS ${AASDK_DIR} PATHS ${AASDK_DIR}
PATH_SUFFIXES include PATH_SUFFIXES include
) )
@ -25,11 +25,13 @@ if (AASDK_FOUND)
if (NOT aasdk_FIND_QUIETLY) if (NOT aasdk_FIND_QUIETLY)
message(STATUS "Found aasdk:") message(STATUS "Found aasdk:")
message(STATUS " - Includes: ${AASDK_INCLUDE_DIR}") 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() endif()
add_library(aasdk INTERFACE) add_library(aasdk INTERFACE)
target_include_directories(aasdk INTERFACE ${AASDK_INCLUDE_DIR} ${AASDK_PROTO_INCLUDE_DIR}) 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() else()
if (aasdk_FIND_REQUIRED) if (aasdk_FIND_REQUIRED)
if(AASDK_INCLUDE_DIR AND NOT AASDK_PROTO_INCLUDE_DIR) if(AASDK_INCLUDE_DIR AND NOT AASDK_PROTO_INCLUDE_DIR)

View File

@ -2,18 +2,14 @@
#include <QDialog> #include <QDialog>
#include <QStringListModel> #include <QStringListModel>
#include <f1x/aasdk/TCP/ITCPEndpoint.hpp> #include "aasdk/TCP/ITCPEndpoint.hpp"
#include <f1x/aasdk/TCP/ITCPWrapper.hpp> #include "aasdk/TCP/ITCPWrapper.hpp"
#include <f1x/openauto/autoapp/Configuration/IRecentAddressesList.hpp> #include "openauto/Configuration/IRecentAddressesList.hpp"
namespace Ui { namespace Ui {
class ConnectDialog; class ConnectDialog;
} }
namespace f1x
{
namespace openauto
{
namespace autoapp namespace autoapp
{ {
namespace ui namespace ui
@ -24,7 +20,7 @@ class ConnectDialog : public QDialog
Q_OBJECT Q_OBJECT
public: 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; ~ConnectDialog() override;
signals: signals:
@ -46,12 +42,10 @@ private:
boost::asio::io_service& ioService_; boost::asio::io_service& ioService_;
aasdk::tcp::ITCPWrapper& tcpWrapper_; aasdk::tcp::ITCPWrapper& tcpWrapper_;
openauto::autoapp::configuration::IRecentAddressesList& recentAddressesList_; openauto::configuration::IRecentAddressesList& recentAddressesList_;
Ui::ConnectDialog *ui_; Ui::ConnectDialog *ui_;
QStringListModel recentAddressesModel_; QStringListModel recentAddressesModel_;
}; };
} }
} }
}
}

View File

@ -26,10 +26,6 @@ namespace Ui
class MainWindow; class MainWindow;
} }
namespace f1x
{
namespace openauto
{
namespace autoapp namespace autoapp
{ {
namespace ui namespace ui
@ -54,5 +50,3 @@ private:
} }
} }
}
}

View File

@ -20,7 +20,7 @@
#include <memory> #include <memory>
#include <QWidget> #include <QWidget>
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "openauto/Configuration/IConfiguration.hpp"
class QCheckBox; class QCheckBox;
@ -29,10 +29,6 @@ namespace Ui
class SettingsWindow; class SettingsWindow;
} }
namespace f1x
{
namespace openauto
{
namespace autoapp namespace autoapp
{ {
namespace ui namespace ui
@ -42,7 +38,7 @@ class SettingsWindow : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit SettingsWindow(configuration::IConfiguration::Pointer configuration, QWidget *parent = nullptr); explicit SettingsWindow(openauto::configuration::IConfiguration::Pointer configuration, QWidget *parent = nullptr);
~SettingsWindow() override; ~SettingsWindow() override;
private slots: private slots:
@ -56,14 +52,12 @@ private:
void load(); void load();
void loadButtonCheckBoxes(); void loadButtonCheckBoxes();
void saveButtonCheckBoxes(); 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); void setButtonCheckBoxes(bool value);
Ui::SettingsWindow* ui_; Ui::SettingsWindow* ui_;
configuration::IConfiguration::Pointer configuration_; openauto::configuration::IConfiguration::Pointer configuration_;
}; };
} }
} }
}
}

View File

@ -21,10 +21,8 @@
#include <stdint.h> #include <stdint.h>
#include <memory> #include <memory>
#include <QBluetoothServer> #include <QBluetoothServer>
#include <f1x/openauto/btservice/IAndroidBluetoothServer.hpp> #include "IAndroidBluetoothServer.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace btservice namespace btservice
@ -48,4 +46,3 @@ private:
} }
} }
}

View File

@ -19,10 +19,8 @@
#pragma once #pragma once
#include <QBluetoothServiceInfo> #include <QBluetoothServiceInfo>
#include <f1x/openauto/btservice/IAndroidBluetoothService.hpp> #include "IAndroidBluetoothService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace btservice namespace btservice
@ -42,4 +40,3 @@ private:
} }
} }
}

View File

@ -20,8 +20,6 @@
#include <QBluetoothAddress> #include <QBluetoothAddress>
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace btservice namespace btservice
@ -37,4 +35,3 @@ public:
} }
} }
}

View File

@ -20,8 +20,6 @@
#include <QBluetoothAddress> #include <QBluetoothAddress>
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace btservice namespace btservice
@ -38,4 +36,3 @@ public:
} }
} }
}

View File

@ -18,27 +18,23 @@
#pragma once #pragma once
#include <f1x/aasdk/USB/IUSBHub.hpp> #include "aasdk/USB/IUSBHub.hpp"
#include <f1x/aasdk/USB/IConnectedAccessoriesEnumerator.hpp> #include "aasdk/USB/IConnectedAccessoriesEnumerator.hpp"
#include <f1x/aasdk/USB/USBWrapper.hpp> #include "aasdk/USB/USBWrapper.hpp"
#include <f1x/aasdk/TCP/ITCPWrapper.hpp> #include "aasdk/TCP/ITCPWrapper.hpp"
#include <f1x/aasdk/TCP/ITCPEndpoint.hpp> #include "aasdk/TCP/ITCPEndpoint.hpp"
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp> #include "openauto/Service/IAndroidAutoEntityEventHandler.hpp"
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp> #include "openauto/Service/IAndroidAutoEntityFactory.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
class App: public service::IAndroidAutoEntityEventHandler, public std::enable_shared_from_this<App> class App: public openauto::service::IAndroidAutoEntityEventHandler, public std::enable_shared_from_this<App>
{ {
public: public:
typedef std::shared_ptr<App> Pointer; typedef std::shared_ptr<App> 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); aasdk::usb::IUSBHub::Pointer usbHub, aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator);
void waitForUSBDevice(); void waitForUSBDevice();
@ -57,13 +53,11 @@ private:
aasdk::usb::USBWrapper& usbWrapper_; aasdk::usb::USBWrapper& usbWrapper_;
aasdk::tcp::ITCPWrapper& tcpWrapper_; aasdk::tcp::ITCPWrapper& tcpWrapper_;
boost::asio::io_service::strand strand_; boost::asio::io_service::strand strand_;
service::IAndroidAutoEntityFactory& androidAutoEntityFactory_; openauto::service::IAndroidAutoEntityFactory& androidAutoEntityFactory_;
aasdk::usb::IUSBHub::Pointer usbHub_; aasdk::usb::IUSBHub::Pointer usbHub_;
aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator_; aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator_;
service::IAndroidAutoEntity::Pointer androidAutoEntity_; openauto::service::IAndroidAutoEntity::Pointer androidAutoEntity_;
bool isStopped_; bool isStopped_;
}; };
} }
}
}

View File

@ -18,12 +18,8 @@
#pragma once #pragma once
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -35,5 +31,3 @@ enum class AudioOutputBackendType
} }
} }
}
}

View File

@ -18,12 +18,8 @@
#pragma once #pragma once
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -36,5 +32,3 @@ enum class BluetoothAdapterType
} }
} }
}
}

View File

@ -19,14 +19,10 @@
#pragma once #pragma once
#include <boost/property_tree/ini_parser.hpp> #include <boost/property_tree/ini_parser.hpp>
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "IConfiguration.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -132,5 +128,3 @@ private:
} }
} }
}
}

View File

@ -18,12 +18,8 @@
#pragma once #pragma once
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -35,5 +31,3 @@ enum class HandednessOfTrafficType
} }
} }
}
}

View File

@ -20,19 +20,15 @@
#include <string> #include <string>
#include <QRect> #include <QRect>
#include <aasdk_proto/VideoFPSEnum.pb.h> #include "aasdk_proto/VideoFPSEnum.pb.h"
#include <aasdk_proto/VideoResolutionEnum.pb.h> #include "aasdk_proto/VideoResolutionEnum.pb.h"
#include <aasdk_proto/ButtonCodeEnum.pb.h> #include "aasdk_proto/ButtonCodeEnum.pb.h"
#include <f1x/openauto/autoapp/Configuration/BluetootAdapterType.hpp> #include "BluetootAdapterType.hpp"
#include <f1x/openauto/autoapp/Configuration/HandednessOfTrafficType.hpp> #include "HandednessOfTrafficType.hpp"
#include <f1x/openauto/autoapp/Configuration/AudioOutputBackendType.hpp> #include "AudioOutputBackendType.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -84,5 +80,3 @@ public:
} }
} }
}
}

View File

@ -21,12 +21,8 @@
#include <deque> #include <deque>
#include <string> #include <string>
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -42,5 +38,3 @@ public:
} }
} }
}
}

View File

@ -19,14 +19,10 @@
#pragma once #pragma once
#include <deque> #include <deque>
#include <f1x/openauto/autoapp/Configuration/IRecentAddressesList.hpp> #include "IRecentAddressesList.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -53,5 +49,3 @@ private:
} }
} }
}
}

View File

@ -18,14 +18,10 @@
#pragma once #pragma once
#include <f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp> #include "IBluetoothDevice.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -41,5 +37,3 @@ public:
} }
} }
}
}

View File

@ -25,7 +25,7 @@
#include <thread> #include <thread>
#include <boost/circular_buffer.hpp> #include <boost/circular_buffer.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <f1x/openauto/autoapp/Projection/VideoOutput.hpp> #include "openauto/Projection/VideoOutput.hpp"
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/app/gstappsrc.h> #include <gst/app/gstappsrc.h>
#include <gst/app/gstappsink.h> #include <gst/app/gstappsink.h>
@ -46,12 +46,8 @@
#include <QtQuickWidgets/QQuickWidget> #include <QtQuickWidgets/QQuickWidget>
#include <QApplication> #include <QApplication>
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -89,8 +85,6 @@ private:
std::function<void(bool)> activeCallback_; std::function<void(bool)> activeCallback_;
}; };
}
}
} }
} }

View File

@ -19,15 +19,11 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <f1x/aasdk/IO/Promise.hpp> #include "aasdk/IO/Promise.hpp"
#include <f1x/aasdk/Common/Data.hpp> #include "aasdk/Common/Data.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -52,5 +48,3 @@ public:
} }
} }
}
}

View File

@ -19,15 +19,11 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <f1x/aasdk/Messenger/Timestamp.hpp> #include "aasdk/Messenger/Timestamp.hpp"
#include <f1x/aasdk/Common/Data.hpp> #include "aasdk/Common/Data.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -51,5 +47,3 @@ public:
} }
} }
}
}

View File

@ -16,16 +16,12 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/aasdk/IO/Promise.hpp> #include "aasdk/IO/Promise.hpp"
#pragma once #pragma once
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -44,5 +40,3 @@ public:
} }
} }
}
}

View File

@ -19,15 +19,11 @@
#pragma once #pragma once
#include <QRect> #include <QRect>
#include <f1x/aasdk/IO/Promise.hpp> #include "aasdk/IO/Promise.hpp"
#include <f1x/openauto/autoapp/Projection/InputEvent.hpp> #include "InputEvent.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -49,5 +45,3 @@ public:
} }
} }
}
}

View File

@ -18,14 +18,10 @@
#pragma once #pragma once
#include <f1x/openauto/autoapp/Projection/InputEvent.hpp> #include "InputEvent.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -40,5 +36,3 @@ public:
} }
} }
}
}

View File

@ -20,16 +20,12 @@
#include <memory> #include <memory>
#include <QRect> #include <QRect>
#include <aasdk_proto/VideoFPSEnum.pb.h> #include "aasdk_proto/VideoFPSEnum.pb.h"
#include <aasdk_proto/VideoResolutionEnum.pb.h> #include "aasdk_proto/VideoResolutionEnum.pb.h"
#include <f1x/aasdk/Common/Data.hpp> #include "aasdk/Common/Data.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -53,5 +49,3 @@ public:
} }
} }
}
}

View File

@ -20,15 +20,11 @@
#include <QObject> #include <QObject>
#include <QKeyEvent> #include <QKeyEvent>
#include <f1x/openauto/autoapp/Projection/IInputDevice.hpp> #include "IInputDevice.hpp"
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "openauto/Configuration/IConfiguration.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -63,5 +59,3 @@ private:
} }
} }
}
}

View File

@ -18,16 +18,12 @@
#pragma once #pragma once
#include <aasdk_proto/ButtonCodeEnum.pb.h> #include "aasdk_proto/ButtonCodeEnum.pb.h"
#include <aasdk_proto/TouchActionEnum.pb.h> #include "aasdk_proto/TouchActionEnum.pb.h"
#include <f1x/aasdk/IO/Promise.hpp> #include "aasdk/IO/Promise.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -62,5 +58,3 @@ struct TouchEvent
} }
} }
}
}

View File

@ -17,16 +17,12 @@
*/ */
#include <QBluetoothLocalDevice> #include <QBluetoothLocalDevice>
#include <f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp> #include "IBluetoothDevice.hpp"
#pragma once #pragma once
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -64,5 +60,3 @@ private:
} }
} }
}
}

View File

@ -29,14 +29,10 @@ extern "C"
#include <functional> #include <functional>
#include <thread> #include <thread>
#include <boost/circular_buffer.hpp> #include <boost/circular_buffer.hpp>
#include <f1x/openauto/autoapp/Projection/VideoOutput.hpp> #include "VideoOutput.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -82,8 +78,6 @@ private:
std::function<void(bool)> activeCallback_; std::function<void(bool)> activeCallback_;
}; };
}
}
} }
} }

View File

@ -21,14 +21,10 @@
#include <mutex> #include <mutex>
#include <QAudioInput> #include <QAudioInput>
#include <QAudioFormat> #include <QAudioFormat>
#include <f1x/openauto/autoapp/Projection/IAudioInput.hpp> #include "IAudioInput.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -69,5 +65,3 @@ private:
} }
} }
}
}

View File

@ -20,15 +20,11 @@
#include <QAudioOutput> #include <QAudioOutput>
#include <QAudioFormat> #include <QAudioFormat>
#include <f1x/openauto/autoapp/Projection/IAudioOutput.hpp> #include "IAudioOutput.hpp"
#include <f1x/openauto/autoapp/Projection/SequentialBuffer.hpp> #include "SequentialBuffer.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -67,5 +63,3 @@ private:
} }
} }
}
}

View File

@ -21,15 +21,11 @@
#include <QMediaPlayer> #include <QMediaPlayer>
#include <QVideoWidget> #include <QVideoWidget>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <f1x/openauto/autoapp/Projection/VideoOutput.hpp> #include "VideoOutput.hpp"
#include <f1x/openauto/autoapp/Projection/SequentialBuffer.hpp> #include "SequentialBuffer.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -63,5 +59,3 @@ private:
} }
} }
}
}

View File

@ -18,14 +18,10 @@
#pragma once #pragma once
#include <f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp> #include "IBluetoothDevice.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -46,5 +42,3 @@ private:
} }
} }
}
}

View File

@ -19,15 +19,11 @@
#pragma once #pragma once
#include <RtAudio.h> #include <RtAudio.h>
#include <f1x/openauto/autoapp/Projection/IAudioOutput.hpp> #include "IAudioOutput.hpp"
#include <f1x/openauto/autoapp/Projection/SequentialBuffer.hpp> #include "SequentialBuffer.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -59,5 +55,3 @@ private:
} }
} }
}
}

View File

@ -21,14 +21,10 @@
#include <QIODevice> #include <QIODevice>
#include <mutex> #include <mutex>
#include <boost/circular_buffer.hpp> #include <boost/circular_buffer.hpp>
#include <f1x/aasdk/Common/Data.hpp> #include "aasdk/Common/Data.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -57,5 +53,3 @@ private:
} }
} }
}
}

View File

@ -18,15 +18,11 @@
#pragma once #pragma once
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "openauto/Configuration/IConfiguration.hpp"
#include <f1x/openauto/autoapp/Projection/IVideoOutput.hpp> #include "IVideoOutput.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -46,5 +42,3 @@ protected:
} }
} }
}
}

View File

@ -19,21 +19,17 @@
#pragma once #pragma once
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <f1x/aasdk/Transport/ITransport.hpp> #include "aasdk/Transport/ITransport.hpp"
#include <f1x/aasdk/Channel/Control/IControlServiceChannel.hpp> #include "aasdk/Channel/Control/IControlServiceChannel.hpp"
#include <f1x/aasdk/Channel/Control/IControlServiceChannelEventHandler.hpp> #include "aasdk/Channel/Control/IControlServiceChannelEventHandler.hpp"
#include <f1x/aasdk/Channel/AV/VideoServiceChannel.hpp> #include "aasdk/Channel/AV/VideoServiceChannel.hpp"
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "openauto/Configuration/IConfiguration.hpp"
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp> #include "IAndroidAutoEntity.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
#include <f1x/openauto/autoapp/Service/IPinger.hpp> #include "IPinger.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -80,5 +76,3 @@ private:
} }
} }
}
}

View File

@ -19,17 +19,13 @@
#pragma once #pragma once
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <f1x/aasdk/Transport/ITransport.hpp> #include "aasdk/Transport/ITransport.hpp"
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "openauto/Configuration/IConfiguration.hpp"
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp> #include "IAndroidAutoEntityFactory.hpp"
#include <f1x/openauto/autoapp/Service/IServiceFactory.hpp> #include "IServiceFactory.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -53,5 +49,3 @@ private:
} }
} }
}
}

View File

@ -18,16 +18,12 @@
#pragma once #pragma once
#include <f1x/aasdk/Channel/AV/AVInputServiceChannel.hpp> #include "aasdk/Channel/AV/AVInputServiceChannel.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
#include <f1x/openauto/autoapp/Projection/IAudioInput.hpp> #include "openauto/Projection/IAudioInput.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -61,5 +57,3 @@ private:
} }
} }
}
}

View File

@ -18,17 +18,13 @@
#pragma once #pragma once
#include <f1x/aasdk/Channel/AV/IAudioServiceChannel.hpp> #include "aasdk/Channel/AV/IAudioServiceChannel.hpp"
#include <f1x/aasdk/Channel/AV/IAudioServiceChannelEventHandler.hpp> #include "aasdk/Channel/AV/IAudioServiceChannelEventHandler.hpp"
#include <f1x/openauto/autoapp/Projection/IAudioOutput.hpp> #include "openauto/Projection/IAudioOutput.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -61,5 +57,3 @@ protected:
} }
} }
}
}

View File

@ -18,16 +18,12 @@
#pragma once #pragma once
#include <f1x/aasdk/Channel/Bluetooth/BluetoothServiceChannel.hpp> #include "aasdk/Channel/Bluetooth/BluetoothServiceChannel.hpp"
#include <f1x/openauto/autoapp/Projection/IBluetoothDevice.hpp> #include "openauto/Projection/IBluetoothDevice.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -52,5 +48,3 @@ private:
} }
} }
}
}

View File

@ -19,14 +19,10 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp> #include "IAndroidAutoEntityEventHandler.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -43,5 +39,3 @@ public:
} }
} }
}
}

View File

@ -18,14 +18,10 @@
#pragma once #pragma once
#include <f1x/aasdk/Error/Error.hpp> #include "aasdk/Error/Error.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -38,5 +34,3 @@ public:
} }
} }
}
}

View File

@ -18,16 +18,12 @@
#pragma once #pragma once
#include <f1x/aasdk/TCP/ITCPEndpoint.hpp> #include "aasdk/TCP/ITCPEndpoint.hpp"
#include <f1x/aasdk/USB/IAOAPDevice.hpp> #include "aasdk/USB/IAOAPDevice.hpp"
#include <f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp> #include "IAndroidAutoEntity.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -42,5 +38,3 @@ public:
} }
} }
}
}

View File

@ -18,14 +18,10 @@
#pragma once #pragma once
#include <f1x/aasdk/IO/Promise.hpp> #include "aasdk/IO/Promise.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -43,5 +39,3 @@ public:
} }
} }
}
}

View File

@ -20,14 +20,10 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include <aasdk_proto/ServiceDiscoveryResponseMessage.pb.h> #include "aasdk_proto/ServiceDiscoveryResponseMessage.pb.h"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -47,5 +43,3 @@ typedef std::vector<IService::Pointer> ServiceList;
} }
} }
}
}

View File

@ -18,15 +18,11 @@
#pragma once #pragma once
#include <f1x/aasdk/Messenger/IMessenger.hpp> #include "aasdk/Messenger/IMessenger.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -40,5 +36,3 @@ public:
} }
} }
}
}

View File

@ -18,18 +18,14 @@
#pragma once #pragma once
#include <aasdk_proto/ButtonCodeEnum.pb.h> #include "aasdk_proto/ButtonCodeEnum.pb.h"
#include <f1x/aasdk/Channel/Input/InputServiceChannel.hpp> #include "aasdk/Channel/Input/InputServiceChannel.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
#include <f1x/openauto/autoapp/Projection/IInputDevice.hpp> #include "openauto/Projection/IInputDevice.hpp"
#include <f1x/openauto/autoapp/Projection/IInputDeviceEventHandler.hpp> #include "openauto/Projection/IInputDeviceEventHandler.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -61,5 +57,3 @@ private:
} }
} }
}
}

View File

@ -18,15 +18,11 @@
#pragma once #pragma once
#include <f1x/aasdk/Messenger/IMessenger.hpp> #include "aasdk/Messenger/IMessenger.hpp"
#include <f1x/openauto/autoapp/Service/AudioService.hpp> #include "AudioService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -38,5 +34,3 @@ public:
} }
} }
}
}

View File

@ -18,14 +18,10 @@
#pragma once #pragma once
#include <f1x/openauto/autoapp/Service/IPinger.hpp> #include "IPinger.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -54,5 +50,3 @@ private:
} }
} }
}
}

View File

@ -18,15 +18,11 @@
#pragma once #pragma once
#include <f1x/aasdk/Channel/Sensor/SensorServiceChannel.hpp> #include "aasdk/Channel/Sensor/SensorServiceChannel.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -55,5 +51,3 @@ private:
} }
} }
}
}

View File

@ -18,20 +18,16 @@
#pragma once #pragma once
#include <f1x/openauto/autoapp/Service/IServiceFactory.hpp> #include "openauto/Service/IServiceFactory.hpp"
#include <f1x/openauto/autoapp/Configuration/IConfiguration.hpp> #include "openauto/Configuration/IConfiguration.hpp"
#include <f1x/openauto/autoapp/Projection/InputDevice.hpp> #include "openauto/Projection/InputDevice.hpp"
#include <f1x/openauto/autoapp/Projection/OMXVideoOutput.hpp> #include "openauto/Projection/OMXVideoOutput.hpp"
#include <f1x/openauto/autoapp/Projection/GSTVideoOutput.hpp> #include "openauto/Projection/GSTVideoOutput.hpp"
#include <f1x/openauto/autoapp/Projection/QtVideoOutput.hpp> #include "openauto/Projection/QtVideoOutput.hpp"
#include <f1x/openauto/autoapp/Service/SensorService.hpp> #include "openauto/Service/SensorService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -74,5 +70,3 @@ private:
} }
} }
}
}

View File

@ -18,15 +18,11 @@
#pragma once #pragma once
#include <f1x/aasdk/Messenger/IMessenger.hpp> #include "aasdk/Messenger/IMessenger.hpp"
#include <f1x/openauto/autoapp/Service/AudioService.hpp> #include "AudioService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -38,5 +34,3 @@ public:
} }
} }
}
}

View File

@ -18,15 +18,11 @@
#pragma once #pragma once
#include <f1x/aasdk/Messenger/IMessenger.hpp> #include "aasdk/Messenger/IMessenger.hpp"
#include <f1x/openauto/autoapp/Service/AudioService.hpp> #include "AudioService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -38,5 +34,3 @@ public:
} }
} }
}
}

View File

@ -19,17 +19,13 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <f1x/aasdk/Channel/AV/VideoServiceChannel.hpp> #include "aasdk/Channel/AV/VideoServiceChannel.hpp"
#include <f1x/aasdk/Channel/AV/IVideoServiceChannelEventHandler.hpp> #include "aasdk/Channel/AV/IVideoServiceChannelEventHandler.hpp"
#include <f1x/openauto/autoapp/Projection/IVideoOutput.hpp> #include "openauto/Projection/IVideoOutput.hpp"
#include <f1x/openauto/autoapp/Service/IService.hpp> #include "IService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -64,5 +60,3 @@ private:
} }
} }
}
}

View File

@ -17,19 +17,15 @@
*/ */
#include <thread> #include <thread>
#include <f1x/aasdk/USB/AOAPDevice.hpp> #include "aasdk/USB/AOAPDevice.hpp"
#include <f1x/aasdk/TCP/TCPEndpoint.hpp> #include "aasdk/TCP/TCPEndpoint.hpp"
#include <f1x/openauto/autoapp/App.hpp> #include "openauto/App.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto 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) aasdk::usb::IUSBHub::Pointer usbHub, aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator)
: ioService_(ioService) : ioService_(ioService)
, usbWrapper_(usbWrapper) , usbWrapper_(usbWrapper)
@ -172,5 +168,3 @@ void App::onUSBHubError(const aasdk::error::Error& error)
} }
} }
}
}

117
openauto/CMakeLists.txt Normal file
View File

@ -0,0 +1,117 @@
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)
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)

View File

@ -16,15 +16,11 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/autoapp/Configuration/Configuration.hpp> #include "openauto/Configuration/Configuration.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -346,5 +342,3 @@ void Configuration::writeButtonCodes(boost::property_tree::ptree& iniConfig)
} }
} }
}
}

View File

@ -17,15 +17,11 @@
*/ */
#include <boost/property_tree/ini_parser.hpp> #include <boost/property_tree/ini_parser.hpp>
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Configuration/RecentAddressesList.hpp> #include "openauto/Configuration/RecentAddressesList.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace configuration namespace configuration
{ {
@ -112,5 +108,3 @@ void RecentAddressesList::save()
} }
} }
}
}

View File

@ -16,14 +16,10 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/autoapp/Projection/DummyBluetoothDevice.hpp> #include "openauto/Projection/DummyBluetoothDevice.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -54,5 +50,3 @@ bool DummyBluetoothDevice::isAvailable() const
} }
} }
}
}

View File

@ -18,16 +18,12 @@
#ifdef USE_GST #ifdef USE_GST
#include <f1x/aasdk/Common/Data.hpp> #include "aasdk/Common/Data.hpp"
#include <f1x/openauto/autoapp/Projection/GSTVideoOutput.hpp> #include "openauto/Projection/GSTVideoOutput.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -228,8 +224,6 @@ void GSTVideoOutput::resize()
} }
} }
}
}
} }
} }

View File

@ -16,16 +16,12 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Projection/IInputDeviceEventHandler.hpp> #include "openauto/Projection/IInputDeviceEventHandler.hpp"
#include <f1x/openauto/autoapp/Projection/InputDevice.hpp> #include "openauto/Projection/InputDevice.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -237,5 +233,3 @@ IInputDevice::ButtonCodes InputDevice::getSupportedButtonCodes() const
} }
} }
}
}

View File

@ -17,15 +17,11 @@
*/ */
#include <QApplication> #include <QApplication>
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Projection/LocalBluetoothDevice.hpp> #include "openauto/Projection/LocalBluetoothDevice.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -180,5 +176,3 @@ void LocalBluetoothDevice::onHostModeStateChanged(QBluetoothLocalDevice::HostMod
} }
} }
}
}

View File

@ -23,16 +23,12 @@ extern "C"
#include <bcm_host.h> #include <bcm_host.h>
} }
#include <f1x/aasdk/Common/Data.hpp> #include "aasdk/Common/Data.hpp"
#include <f1x/openauto/autoapp/Projection/OMXVideoOutput.hpp> #include "openauto/Projection/OMXVideoOutput.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "Log.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -336,8 +332,6 @@ bool OMXVideoOutput::enablePortBuffers()
ilclient_enable_port_buffers(components_[VideoComponent::DECODER], 130, NULL, NULL, NULL) == 0; ilclient_enable_port_buffers(components_[VideoComponent::DECODER], 130, NULL, NULL, NULL) == 0;
} }
}
}
} }
} }

View File

@ -17,15 +17,11 @@
*/ */
#include <QApplication> #include <QApplication>
#include <f1x/openauto/autoapp/Projection/QtAudioInput.hpp> #include "openauto/Projection/QtAudioInput.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -175,5 +171,3 @@ void QtAudioInput::onReadyRead()
} }
} }
}
}

View File

@ -17,15 +17,12 @@
*/ */
#include <QApplication> #include <QApplication>
#include <f1x/openauto/autoapp/Projection/QtAudioOutput.hpp> #include "openauto/Projection/QtAudioOutput.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -122,5 +119,3 @@ void QtAudioOutput::onStopPlayback()
} }
} }
}
}

View File

@ -17,15 +17,11 @@
*/ */
#include <QApplication> #include <QApplication>
#include <f1x/openauto/autoapp/Projection/QtVideoOutput.hpp> #include "openauto/Projection/QtVideoOutput.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -105,5 +101,3 @@ void QtVideoOutput::onStopPlayback()
} }
} }
}
}

View File

@ -16,14 +16,10 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/autoapp/Projection/RemoteBluetoothDevice.hpp> #include "openauto/Projection/RemoteBluetoothDevice.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -60,5 +56,3 @@ bool RemoteBluetoothDevice::isAvailable() const
} }
} }
}
}

View File

@ -16,15 +16,11 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/autoapp/Projection/RtAudioOutput.hpp> #include "openauto/Projection/RtAudioOutput.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -152,5 +148,3 @@ int RtAudioOutput::audioBufferReadHandler(void* outputBuffer, void* inputBuffer,
} }
} }
}
}

View File

@ -16,14 +16,10 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/autoapp/Projection/SequentialBuffer.hpp> #include "openauto/Projection/SequentialBuffer.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -110,5 +106,3 @@ bool SequentialBuffer::canReadLine() const
} }
} }
}
}

View File

@ -16,14 +16,10 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/autoapp/Projection/VideoOutput.hpp> #include "openauto/Projection/VideoOutput.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace projection namespace projection
{ {
@ -55,5 +51,3 @@ QRect VideoOutput::getVideoMargins() const
} }
} }
}
}

View File

@ -16,16 +16,12 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/aasdk/Channel/Control/ControlServiceChannel.hpp> #include "aasdk/Channel/Control/ControlServiceChannel.hpp"
#include <f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp> #include "openauto/Service/AndroidAutoEntity.hpp"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -279,5 +275,3 @@ void AndroidAutoEntity::sendPing()
} }
} }
}
}

View File

@ -16,24 +16,20 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/aasdk/USB/AOAPDevice.hpp> #include "aasdk/USB/AOAPDevice.hpp"
#include <f1x/aasdk/Transport/SSLWrapper.hpp> #include "aasdk/Transport/SSLWrapper.hpp"
#include <f1x/aasdk/Transport/USBTransport.hpp> #include "aasdk/Transport/USBTransport.hpp"
#include <f1x/aasdk/Transport/TCPTransport.hpp> #include "aasdk/Transport/TCPTransport.hpp"
#include <f1x/aasdk/Messenger/Cryptor.hpp> #include "aasdk/Messenger/Cryptor.hpp"
#include <f1x/aasdk/Messenger/MessageInStream.hpp> #include "aasdk/Messenger/MessageInStream.hpp"
#include <f1x/aasdk/Messenger/MessageOutStream.hpp> #include "aasdk/Messenger/MessageOutStream.hpp"
#include <f1x/aasdk/Messenger/Messenger.hpp> #include "aasdk/Messenger/Messenger.hpp"
#include <f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp> #include "openauto/Service/AndroidAutoEntityFactory.hpp"
#include <f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp> #include "openauto/Service/AndroidAutoEntity.hpp"
#include <f1x/openauto/autoapp/Service/Pinger.hpp> #include "openauto/Service/Pinger.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -76,5 +72,3 @@ IAndroidAutoEntity::Pointer AndroidAutoEntityFactory::create(aasdk::transport::I
} }
} }
}
}

View File

@ -17,15 +17,11 @@
*/ */
#include <time.h> #include <time.h>
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Service/AudioInputService.hpp> #include "openauto/Service/AudioInputService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -197,5 +193,3 @@ void AudioInputService::readAudioInput()
} }
} }
}
}

View File

@ -16,15 +16,11 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Service/AudioService.hpp> #include "openauto/Service/AudioService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -178,5 +174,3 @@ void AudioService::onChannelError(const aasdk::error::Error& e)
} }
} }
}
}

View File

@ -16,15 +16,11 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Service/BluetoothService.hpp> #include "openauto/Service/BluetoothService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -107,5 +103,3 @@ void BluetoothService::onChannelError(const aasdk::error::Error& e)
} }
} }
}
}

View File

@ -16,16 +16,12 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <aasdk_proto/InputEventIndicationMessage.pb.h> #include "aasdk_proto/InputEventIndicationMessage.pb.h"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Service/InputService.hpp> #include "openauto/Service/InputService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -187,5 +183,3 @@ void InputService::onTouchEvent(const projection::TouchEvent& event)
} }
} }
}
}

View File

@ -16,15 +16,11 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/aasdk/Channel/AV/MediaAudioServiceChannel.hpp> #include "aasdk/Channel/AV/MediaAudioServiceChannel.hpp"
#include <f1x/openauto/autoapp/Service/MediaAudioService.hpp> #include "openauto/Service/MediaAudioService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -36,5 +32,3 @@ MediaAudioService::MediaAudioService(boost::asio::io_service& ioService, aasdk::
} }
} }
}
}

View File

@ -16,14 +16,10 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <f1x/openauto/autoapp/Service/Pinger.hpp> #include "openauto/Service/Pinger.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -97,5 +93,3 @@ void Pinger::cancel()
} }
} }
}
}

View File

@ -16,16 +16,12 @@
* along with openauto. If not, see <http://www.gnu.org/licenses/>. * along with openauto. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <aasdk_proto/DrivingStatusEnum.pb.h> #include "aasdk_proto/DrivingStatusEnum.pb.h"
#include <f1x/openauto/Common/Log.hpp> #include "OpenautoLog.hpp"
#include <f1x/openauto/autoapp/Service/SensorService.hpp> #include "openauto/Service/SensorService.hpp"
namespace f1x
{
namespace openauto namespace openauto
{ {
namespace autoapp
{
namespace service namespace service
{ {
@ -142,5 +138,3 @@ void SensorService::setNightMode(bool nightMode)
} }
} }
}
}

Some files were not shown because too many files have changed in this diff Show More