From 478caf07675b813302708acf020d0355cb161a72 Mon Sep 17 00:00:00 2001 From: "michal.szwaj" Date: Sat, 7 Apr 2018 00:38:43 +0200 Subject: [PATCH] Create service package --- include/f1x/openauto/autoapp/App.hpp | 12 ++--- .../Projection/ServiceFinishPromise.hpp | 37 -------------- .../AndroidAutoEntity.hpp | 8 ++-- .../AndroidAutoEntityFactory.hpp | 6 +-- .../AudioInputService.hpp | 8 ++-- .../{Projection => Service}/AudioService.hpp | 8 ++-- .../BluetoothService.hpp | 8 ++-- .../IAndroidAutoEntity.hpp | 4 +- .../IAndroidAutoEntityEventHandler.hpp | 2 +- .../IAndroidAutoEntityFactory.hpp | 4 +- .../{Projection => Service}/IPinger.hpp | 2 +- .../{Projection => Service}/IService.hpp | 2 +- .../IServiceFactory.hpp | 4 +- .../{Projection => Service}/InputService.hpp | 14 +++--- .../MediaAudioService.hpp | 6 +-- .../{Projection => Service}/Pinger.hpp | 4 +- .../{Projection => Service}/SensorService.hpp | 4 +- .../ServiceFactory.hpp | 4 +- .../SpeechAudioService.hpp | 6 +-- .../SystemAudioService.hpp | 6 +-- .../{Projection => Service}/VideoService.hpp | 9 ++-- src/autoapp/App.cpp | 2 +- .../AndroidAutoEntity.cpp | 4 +- .../AndroidAutoEntityFactory.cpp | 8 ++-- .../AudioInputService.cpp | 10 ++-- .../{Projection => Service}/AudioService.cpp | 6 +-- .../BluetoothService.cpp | 6 +-- .../{Projection => Service}/InputService.cpp | 14 +++--- .../MediaAudioService.cpp | 6 +-- .../{Projection => Service}/Pinger.cpp | 4 +- .../{Projection => Service}/SensorService.cpp | 4 +- .../ServiceFactory.cpp | 48 +++++++++---------- .../SpeechAudioService.cpp | 6 +-- .../SystemAudioService.cpp | 6 +-- .../{Projection => Service}/VideoService.cpp | 6 +-- src/autoapp/autoapp.cpp | 8 ++-- 36 files changed, 129 insertions(+), 167 deletions(-) delete mode 100644 include/f1x/openauto/autoapp/Projection/ServiceFinishPromise.hpp rename include/f1x/openauto/autoapp/{Projection => Service}/AndroidAutoEntity.hpp (94%) rename include/f1x/openauto/autoapp/{Projection => Service}/AndroidAutoEntityFactory.hpp (91%) rename include/f1x/openauto/autoapp/{Projection => Service}/AudioInputService.hpp (91%) rename include/f1x/openauto/autoapp/{Projection => Service}/AudioService.hpp (91%) rename include/f1x/openauto/autoapp/{Projection => Service}/BluetoothService.hpp (88%) rename include/f1x/openauto/autoapp/{Projection => Service}/IAndroidAutoEntity.hpp (91%) rename include/f1x/openauto/autoapp/{Projection => Service}/IAndroidAutoEntityEventHandler.hpp (97%) rename include/f1x/openauto/autoapp/{Projection => Service}/IAndroidAutoEntityFactory.hpp (93%) rename include/f1x/openauto/autoapp/{Projection => Service}/IPinger.hpp (98%) rename include/f1x/openauto/autoapp/{Projection => Service}/IService.hpp (98%) rename include/f1x/openauto/autoapp/{Projection => Service}/IServiceFactory.hpp (92%) rename include/f1x/openauto/autoapp/{Projection => Service}/InputService.hpp (82%) rename include/f1x/openauto/autoapp/{Projection => Service}/MediaAudioService.hpp (85%) rename include/f1x/openauto/autoapp/{Projection => Service}/Pinger.hpp (94%) rename include/f1x/openauto/autoapp/{Projection => Service}/SensorService.hpp (95%) rename include/f1x/openauto/autoapp/{Projection => Service}/ServiceFactory.hpp (95%) rename include/f1x/openauto/autoapp/{Projection => Service}/SpeechAudioService.hpp (85%) rename include/f1x/openauto/autoapp/{Projection => Service}/SystemAudioService.hpp (85%) rename include/f1x/openauto/autoapp/{Projection => Service}/VideoService.hpp (90%) rename src/autoapp/{Projection => Service}/AndroidAutoEntity.cpp (99%) rename src/autoapp/{Projection => Service}/AndroidAutoEntityFactory.cpp (93%) rename src/autoapp/{Projection => Service}/AudioInputService.cpp (95%) rename src/autoapp/{Projection => Service}/AudioService.cpp (97%) rename src/autoapp/{Projection => Service}/BluetoothService.cpp (95%) rename src/autoapp/{Projection => Service}/InputService.cpp (93%) rename src/autoapp/{Projection => Service}/MediaAudioService.cpp (85%) rename src/autoapp/{Projection => Service}/Pinger.cpp (97%) rename src/autoapp/{Projection => Service}/SensorService.cpp (98%) rename src/autoapp/{Projection => Service}/ServiceFactory.cpp (67%) rename src/autoapp/{Projection => Service}/SpeechAudioService.cpp (85%) rename src/autoapp/{Projection => Service}/SystemAudioService.cpp (85%) rename src/autoapp/{Projection => Service}/VideoService.cpp (97%) diff --git a/include/f1x/openauto/autoapp/App.hpp b/include/f1x/openauto/autoapp/App.hpp index 81c3f39..3dbcab2 100644 --- a/include/f1x/openauto/autoapp/App.hpp +++ b/include/f1x/openauto/autoapp/App.hpp @@ -23,8 +23,8 @@ #include #include #include -#include -#include +#include +#include namespace f1x { @@ -33,12 +33,12 @@ namespace openauto namespace autoapp { -class App: public projection::IAndroidAutoEntityEventHandler, public std::enable_shared_from_this +class App: public 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, projection::IAndroidAutoEntityFactory& androidAutoEntityFactory, + App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper, aasdk::tcp::ITCPWrapper& tcpWrapper, service::IAndroidAutoEntityFactory& androidAutoEntityFactory, aasdk::usb::IUSBHub::Pointer usbHub, aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator); void waitForUSBDevice(); @@ -57,10 +57,10 @@ private: aasdk::usb::USBWrapper& usbWrapper_; aasdk::tcp::ITCPWrapper& tcpWrapper_; boost::asio::io_service::strand strand_; - projection::IAndroidAutoEntityFactory& androidAutoEntityFactory_; + service::IAndroidAutoEntityFactory& androidAutoEntityFactory_; aasdk::usb::IUSBHub::Pointer usbHub_; aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator_; - projection::IAndroidAutoEntity::Pointer androidAutoEntity_; + service::IAndroidAutoEntity::Pointer androidAutoEntity_; bool isStopped_; }; diff --git a/include/f1x/openauto/autoapp/Projection/ServiceFinishPromise.hpp b/include/f1x/openauto/autoapp/Projection/ServiceFinishPromise.hpp deleted file mode 100644 index 6b09835..0000000 --- a/include/f1x/openauto/autoapp/Projection/ServiceFinishPromise.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* -* This file is part of openauto project. -* Copyright (C) 2018 f1x.studio (Michal Szwaj) -* -* openauto is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. - -* openauto is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with openauto. If not, see . -*/ - -#pragma once - -#include - -namespace f1x -{ -namespace openauto -{ -namespace autoapp -{ -namespace projection -{ - -typedef aasdk::io::Promise ServiceFinishPromise; - -} -} -} -} diff --git a/include/f1x/openauto/autoapp/Projection/AndroidAutoEntity.hpp b/include/f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp similarity index 94% rename from include/f1x/openauto/autoapp/Projection/AndroidAutoEntity.hpp rename to include/f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp index c33eab5..7f80039 100644 --- a/include/f1x/openauto/autoapp/Projection/AndroidAutoEntity.hpp +++ b/include/f1x/openauto/autoapp/Service/AndroidAutoEntity.hpp @@ -24,9 +24,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace f1x { @@ -34,7 +34,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class AndroidAutoEntity: public IAndroidAutoEntity, public aasdk::channel::control::IControlServiceChannelEventHandler, public std::enable_shared_from_this diff --git a/include/f1x/openauto/autoapp/Projection/AndroidAutoEntityFactory.hpp b/include/f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/AndroidAutoEntityFactory.hpp rename to include/f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp index 73b8696..b9fed4f 100644 --- a/include/f1x/openauto/autoapp/Projection/AndroidAutoEntityFactory.hpp +++ b/include/f1x/openauto/autoapp/Service/AndroidAutoEntityFactory.hpp @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include namespace f1x { @@ -30,7 +30,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class AndroidAutoEntityFactory: public IAndroidAutoEntityFactory diff --git a/include/f1x/openauto/autoapp/Projection/AudioInputService.hpp b/include/f1x/openauto/autoapp/Service/AudioInputService.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/AudioInputService.hpp rename to include/f1x/openauto/autoapp/Service/AudioInputService.hpp index 6fea293..a568b1d 100644 --- a/include/f1x/openauto/autoapp/Projection/AudioInputService.hpp +++ b/include/f1x/openauto/autoapp/Service/AudioInputService.hpp @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include namespace f1x @@ -28,7 +28,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class AudioInputService: public aasdk::channel::av::IAVInputServiceChannelEventHandler, public IService, public std::enable_shared_from_this @@ -36,7 +36,7 @@ class AudioInputService: public aasdk::channel::av::IAVInputServiceChannelEventH public: typedef std::shared_ptr Pointer; - AudioInputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioInput::Pointer audioInput); + AudioInputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioInput::Pointer audioInput); void start() override; void stop() override; @@ -55,7 +55,7 @@ private: boost::asio::io_service::strand strand_; aasdk::channel::av::AVInputServiceChannel::Pointer channel_; - IAudioInput::Pointer audioInput_; + projection::IAudioInput::Pointer audioInput_; int32_t session_; }; diff --git a/include/f1x/openauto/autoapp/Projection/AudioService.hpp b/include/f1x/openauto/autoapp/Service/AudioService.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/AudioService.hpp rename to include/f1x/openauto/autoapp/Service/AudioService.hpp index 82e1d5d..21a0785 100644 --- a/include/f1x/openauto/autoapp/Projection/AudioService.hpp +++ b/include/f1x/openauto/autoapp/Service/AudioService.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include namespace f1x { @@ -29,7 +29,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class AudioService: public aasdk::channel::av::IAudioServiceChannelEventHandler, public IService, public std::enable_shared_from_this @@ -37,7 +37,7 @@ class AudioService: public aasdk::channel::av::IAudioServiceChannelEventHandler, public: typedef std::shared_ptr Pointer; - AudioService(boost::asio::io_service& ioService, aasdk::channel::av::IAudioServiceChannel::Pointer channel, IAudioOutput::Pointer audioOutput); + AudioService(boost::asio::io_service& ioService, aasdk::channel::av::IAudioServiceChannel::Pointer channel, projection::IAudioOutput::Pointer audioOutput); void start() override; void stop() override; @@ -55,7 +55,7 @@ protected: boost::asio::io_service::strand strand_; aasdk::channel::av::IAudioServiceChannel::Pointer channel_; - IAudioOutput::Pointer audioOutput_; + projection::IAudioOutput::Pointer audioOutput_; int32_t session_; }; diff --git a/include/f1x/openauto/autoapp/Projection/BluetoothService.hpp b/include/f1x/openauto/autoapp/Service/BluetoothService.hpp similarity index 88% rename from include/f1x/openauto/autoapp/Projection/BluetoothService.hpp rename to include/f1x/openauto/autoapp/Service/BluetoothService.hpp index ddb1730..86e4dba 100644 --- a/include/f1x/openauto/autoapp/Projection/BluetoothService.hpp +++ b/include/f1x/openauto/autoapp/Service/BluetoothService.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace f1x { @@ -28,13 +28,13 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class BluetoothService: public aasdk::channel::bluetooth::IBluetoothServiceChannelEventHandler, public IService, public std::enable_shared_from_this { public: - BluetoothService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IBluetoothDevice::Pointer bluetoothDevice); + BluetoothService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IBluetoothDevice::Pointer bluetoothDevice); void start() override; void stop() override; void fillFeatures(aasdk::proto::messages::ServiceDiscoveryResponse& response) override; @@ -47,7 +47,7 @@ private: boost::asio::io_service::strand strand_; aasdk::channel::bluetooth::BluetoothServiceChannel::Pointer channel_; - IBluetoothDevice::Pointer bluetoothDevice_; + projection::IBluetoothDevice::Pointer bluetoothDevice_; }; } diff --git a/include/f1x/openauto/autoapp/Projection/IAndroidAutoEntity.hpp b/include/f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp similarity index 91% rename from include/f1x/openauto/autoapp/Projection/IAndroidAutoEntity.hpp rename to include/f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp index 1d249e7..fc1cb38 100644 --- a/include/f1x/openauto/autoapp/Projection/IAndroidAutoEntity.hpp +++ b/include/f1x/openauto/autoapp/Service/IAndroidAutoEntity.hpp @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace f1x { @@ -27,7 +27,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class IAndroidAutoEntity diff --git a/include/f1x/openauto/autoapp/Projection/IAndroidAutoEntityEventHandler.hpp b/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp similarity index 97% rename from include/f1x/openauto/autoapp/Projection/IAndroidAutoEntityEventHandler.hpp rename to include/f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp index 2a244c1..648d125 100644 --- a/include/f1x/openauto/autoapp/Projection/IAndroidAutoEntityEventHandler.hpp +++ b/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityEventHandler.hpp @@ -26,7 +26,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class IAndroidAutoEntityEventHandler diff --git a/include/f1x/openauto/autoapp/Projection/IAndroidAutoEntityFactory.hpp b/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp similarity index 93% rename from include/f1x/openauto/autoapp/Projection/IAndroidAutoEntityFactory.hpp rename to include/f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp index f9f37c3..97b958b 100644 --- a/include/f1x/openauto/autoapp/Projection/IAndroidAutoEntityFactory.hpp +++ b/include/f1x/openauto/autoapp/Service/IAndroidAutoEntityFactory.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace f1x { @@ -28,7 +28,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class IAndroidAutoEntityFactory diff --git a/include/f1x/openauto/autoapp/Projection/IPinger.hpp b/include/f1x/openauto/autoapp/Service/IPinger.hpp similarity index 98% rename from include/f1x/openauto/autoapp/Projection/IPinger.hpp rename to include/f1x/openauto/autoapp/Service/IPinger.hpp index 379462f..d345ed3 100644 --- a/include/f1x/openauto/autoapp/Projection/IPinger.hpp +++ b/include/f1x/openauto/autoapp/Service/IPinger.hpp @@ -26,7 +26,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class IPinger diff --git a/include/f1x/openauto/autoapp/Projection/IService.hpp b/include/f1x/openauto/autoapp/Service/IService.hpp similarity index 98% rename from include/f1x/openauto/autoapp/Projection/IService.hpp rename to include/f1x/openauto/autoapp/Service/IService.hpp index cd7c762..a676cb7 100644 --- a/include/f1x/openauto/autoapp/Projection/IService.hpp +++ b/include/f1x/openauto/autoapp/Service/IService.hpp @@ -28,7 +28,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class IService diff --git a/include/f1x/openauto/autoapp/Projection/IServiceFactory.hpp b/include/f1x/openauto/autoapp/Service/IServiceFactory.hpp similarity index 92% rename from include/f1x/openauto/autoapp/Projection/IServiceFactory.hpp rename to include/f1x/openauto/autoapp/Service/IServiceFactory.hpp index 4d1563c..6049d9d 100644 --- a/include/f1x/openauto/autoapp/Projection/IServiceFactory.hpp +++ b/include/f1x/openauto/autoapp/Service/IServiceFactory.hpp @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace f1x { @@ -27,7 +27,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class IServiceFactory diff --git a/include/f1x/openauto/autoapp/Projection/InputService.hpp b/include/f1x/openauto/autoapp/Service/InputService.hpp similarity index 82% rename from include/f1x/openauto/autoapp/Projection/InputService.hpp rename to include/f1x/openauto/autoapp/Service/InputService.hpp index cb6c5e4..6a64bc1 100644 --- a/include/f1x/openauto/autoapp/Projection/InputService.hpp +++ b/include/f1x/openauto/autoapp/Service/InputService.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -30,17 +30,17 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class InputService: public aasdk::channel::input::IInputServiceChannelEventHandler, public IService, - public IInputDeviceEventHandler, + public projection::IInputDeviceEventHandler, public std::enable_shared_from_this { public: - InputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IInputDevice::Pointer inputDevice); + InputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IInputDevice::Pointer inputDevice); void start() override; void stop() override; @@ -48,15 +48,15 @@ public: void onChannelOpenRequest(const aasdk::proto::messages::ChannelOpenRequest& request) override; void onBindingRequest(const aasdk::proto::messages::BindingRequest& request) override; void onChannelError(const aasdk::error::Error& e) override; - void onButtonEvent(const ButtonEvent& event) override; - void onTouchEvent(const TouchEvent& event) override; + void onButtonEvent(const projection::ButtonEvent& event) override; + void onTouchEvent(const projection::TouchEvent& event) override; private: using std::enable_shared_from_this::shared_from_this; boost::asio::io_service::strand strand_; aasdk::channel::input::InputServiceChannel::Pointer channel_; - IInputDevice::Pointer inputDevice_; + projection::IInputDevice::Pointer inputDevice_; }; } diff --git a/include/f1x/openauto/autoapp/Projection/MediaAudioService.hpp b/include/f1x/openauto/autoapp/Service/MediaAudioService.hpp similarity index 85% rename from include/f1x/openauto/autoapp/Projection/MediaAudioService.hpp rename to include/f1x/openauto/autoapp/Service/MediaAudioService.hpp index 447952f..bbd1414 100644 --- a/include/f1x/openauto/autoapp/Projection/MediaAudioService.hpp +++ b/include/f1x/openauto/autoapp/Service/MediaAudioService.hpp @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace f1x { @@ -27,13 +27,13 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class MediaAudioService: public AudioService { public: - MediaAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioOutput::Pointer audioOutput); + MediaAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioOutput::Pointer audioOutput); }; } diff --git a/include/f1x/openauto/autoapp/Projection/Pinger.hpp b/include/f1x/openauto/autoapp/Service/Pinger.hpp similarity index 94% rename from include/f1x/openauto/autoapp/Projection/Pinger.hpp rename to include/f1x/openauto/autoapp/Service/Pinger.hpp index bc7884f..2c226ca 100644 --- a/include/f1x/openauto/autoapp/Projection/Pinger.hpp +++ b/include/f1x/openauto/autoapp/Service/Pinger.hpp @@ -18,7 +18,7 @@ #pragma once -#include +#include namespace f1x { @@ -26,7 +26,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class Pinger: public IPinger, public std::enable_shared_from_this diff --git a/include/f1x/openauto/autoapp/Projection/SensorService.hpp b/include/f1x/openauto/autoapp/Service/SensorService.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Projection/SensorService.hpp rename to include/f1x/openauto/autoapp/Service/SensorService.hpp index a5b348d..5dfd8e5 100644 --- a/include/f1x/openauto/autoapp/Projection/SensorService.hpp +++ b/include/f1x/openauto/autoapp/Service/SensorService.hpp @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace f1x { @@ -27,7 +27,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class SensorService: public aasdk::channel::sensor::ISensorServiceChannelEventHandler, public IService, public std::enable_shared_from_this diff --git a/include/f1x/openauto/autoapp/Projection/ServiceFactory.hpp b/include/f1x/openauto/autoapp/Service/ServiceFactory.hpp similarity index 95% rename from include/f1x/openauto/autoapp/Projection/ServiceFactory.hpp rename to include/f1x/openauto/autoapp/Service/ServiceFactory.hpp index f7fdbd2..2ee9c6b 100644 --- a/include/f1x/openauto/autoapp/Projection/ServiceFactory.hpp +++ b/include/f1x/openauto/autoapp/Service/ServiceFactory.hpp @@ -18,7 +18,7 @@ #pragma once -#include +#include #include namespace f1x @@ -27,7 +27,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class ServiceFactory: public IServiceFactory diff --git a/include/f1x/openauto/autoapp/Projection/SpeechAudioService.hpp b/include/f1x/openauto/autoapp/Service/SpeechAudioService.hpp similarity index 85% rename from include/f1x/openauto/autoapp/Projection/SpeechAudioService.hpp rename to include/f1x/openauto/autoapp/Service/SpeechAudioService.hpp index 6d3cf0b..d71f1a9 100644 --- a/include/f1x/openauto/autoapp/Projection/SpeechAudioService.hpp +++ b/include/f1x/openauto/autoapp/Service/SpeechAudioService.hpp @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace f1x { @@ -27,13 +27,13 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class SpeechAudioService: public AudioService { public: - SpeechAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioOutput::Pointer audioOutput); + SpeechAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioOutput::Pointer audioOutput); }; } diff --git a/include/f1x/openauto/autoapp/Projection/SystemAudioService.hpp b/include/f1x/openauto/autoapp/Service/SystemAudioService.hpp similarity index 85% rename from include/f1x/openauto/autoapp/Projection/SystemAudioService.hpp rename to include/f1x/openauto/autoapp/Service/SystemAudioService.hpp index e33fdff..af775b2 100644 --- a/include/f1x/openauto/autoapp/Projection/SystemAudioService.hpp +++ b/include/f1x/openauto/autoapp/Service/SystemAudioService.hpp @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace f1x { @@ -27,13 +27,13 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class SystemAudioService: public AudioService { public: - SystemAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioOutput::Pointer audioOutput); + SystemAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioOutput::Pointer audioOutput); }; } diff --git a/include/f1x/openauto/autoapp/Projection/VideoService.hpp b/include/f1x/openauto/autoapp/Service/VideoService.hpp similarity index 90% rename from include/f1x/openauto/autoapp/Projection/VideoService.hpp rename to include/f1x/openauto/autoapp/Service/VideoService.hpp index 7896beb..a7bc52d 100644 --- a/include/f1x/openauto/autoapp/Projection/VideoService.hpp +++ b/include/f1x/openauto/autoapp/Service/VideoService.hpp @@ -21,9 +21,8 @@ #include #include #include -#include #include -#include +#include namespace f1x { @@ -31,7 +30,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { class VideoService: public aasdk::channel::av::IVideoServiceChannelEventHandler, public IService, public std::enable_shared_from_this @@ -39,7 +38,7 @@ class VideoService: public aasdk::channel::av::IVideoServiceChannelEventHandler, public: typedef std::shared_ptr Pointer; - VideoService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IVideoOutput::Pointer videoOutput); + VideoService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IVideoOutput::Pointer videoOutput); void start() override; void stop() override; @@ -58,7 +57,7 @@ private: boost::asio::io_service::strand strand_; aasdk::channel::av::VideoServiceChannel::Pointer channel_; - IVideoOutput::Pointer videoOutput_; + projection::IVideoOutput::Pointer videoOutput_; int32_t session_; }; diff --git a/src/autoapp/App.cpp b/src/autoapp/App.cpp index a58aad3..a49c3d8 100644 --- a/src/autoapp/App.cpp +++ b/src/autoapp/App.cpp @@ -29,7 +29,7 @@ namespace openauto namespace autoapp { -App::App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper, aasdk::tcp::ITCPWrapper& tcpWrapper, projection::IAndroidAutoEntityFactory& androidAutoEntityFactory, +App::App(boost::asio::io_service& ioService, aasdk::usb::USBWrapper& usbWrapper, aasdk::tcp::ITCPWrapper& tcpWrapper, service::IAndroidAutoEntityFactory& androidAutoEntityFactory, aasdk::usb::IUSBHub::Pointer usbHub, aasdk::usb::IConnectedAccessoriesEnumerator::Pointer connectedAccessoriesEnumerator) : ioService_(ioService) , usbWrapper_(usbWrapper) diff --git a/src/autoapp/Projection/AndroidAutoEntity.cpp b/src/autoapp/Service/AndroidAutoEntity.cpp similarity index 99% rename from src/autoapp/Projection/AndroidAutoEntity.cpp rename to src/autoapp/Service/AndroidAutoEntity.cpp index fbd9a7e..50aabf8 100644 --- a/src/autoapp/Projection/AndroidAutoEntity.cpp +++ b/src/autoapp/Service/AndroidAutoEntity.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include #include namespace f1x @@ -26,7 +26,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { AndroidAutoEntity::AndroidAutoEntity(boost::asio::io_service& ioService, diff --git a/src/autoapp/Projection/AndroidAutoEntityFactory.cpp b/src/autoapp/Service/AndroidAutoEntityFactory.cpp similarity index 93% rename from src/autoapp/Projection/AndroidAutoEntityFactory.cpp rename to src/autoapp/Service/AndroidAutoEntityFactory.cpp index c111f28..d833250 100644 --- a/src/autoapp/Projection/AndroidAutoEntityFactory.cpp +++ b/src/autoapp/Service/AndroidAutoEntityFactory.cpp @@ -24,9 +24,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include namespace f1x { @@ -34,7 +34,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { AndroidAutoEntityFactory::AndroidAutoEntityFactory(boost::asio::io_service& ioService, diff --git a/src/autoapp/Projection/AudioInputService.cpp b/src/autoapp/Service/AudioInputService.cpp similarity index 95% rename from src/autoapp/Projection/AudioInputService.cpp rename to src/autoapp/Service/AudioInputService.cpp index 755ddba..78b2666 100644 --- a/src/autoapp/Projection/AudioInputService.cpp +++ b/src/autoapp/Service/AudioInputService.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace f1x { @@ -26,10 +26,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -AudioInputService::AudioInputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioInput::Pointer audioInput) +AudioInputService::AudioInputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioInput::Pointer audioInput) : strand_(ioService) , channel_(std::make_shared(strand_, std::move(messenger))) , audioInput_(std::move(audioInput)) @@ -114,7 +114,7 @@ void AudioInputService::onAVInputOpenRequest(const aasdk::proto::messages::AVInp if(request.open()) { - auto startPromise = IAudioInput::StartPromise::defer(strand_); + auto startPromise = projection::IAudioInput::StartPromise::defer(strand_); startPromise->then(std::bind(&AudioInputService::onAudioInputOpenSucceed, this->shared_from_this()), [this, self = this->shared_from_this()]() { OPENAUTO_LOG(error) << "[AudioInputService] audio input open failed."; @@ -185,7 +185,7 @@ void AudioInputService::readAudioInput() { if(audioInput_->isActive()) { - auto readPromise = IAudioInput::ReadPromise::defer(strand_); + auto readPromise = projection::IAudioInput::ReadPromise::defer(strand_); readPromise->then(std::bind(&AudioInputService::onAudioInputDataReady, this->shared_from_this(), std::placeholders::_1), [this, self = this->shared_from_this()]() { OPENAUTO_LOG(info) << "[AudioInputService] audio input read rejected."; diff --git a/src/autoapp/Projection/AudioService.cpp b/src/autoapp/Service/AudioService.cpp similarity index 97% rename from src/autoapp/Projection/AudioService.cpp rename to src/autoapp/Service/AudioService.cpp index d09001f..5ddafce 100644 --- a/src/autoapp/Projection/AudioService.cpp +++ b/src/autoapp/Service/AudioService.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include namespace f1x { @@ -25,10 +25,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -AudioService::AudioService(boost::asio::io_service& ioService, aasdk::channel::av::IAudioServiceChannel::Pointer channel, IAudioOutput::Pointer audioOutput) +AudioService::AudioService(boost::asio::io_service& ioService, aasdk::channel::av::IAudioServiceChannel::Pointer channel, projection::IAudioOutput::Pointer audioOutput) : strand_(ioService) , channel_(std::move(channel)) , audioOutput_(std::move(audioOutput)) diff --git a/src/autoapp/Projection/BluetoothService.cpp b/src/autoapp/Service/BluetoothService.cpp similarity index 95% rename from src/autoapp/Projection/BluetoothService.cpp rename to src/autoapp/Service/BluetoothService.cpp index c8712a5..b6ae545 100644 --- a/src/autoapp/Projection/BluetoothService.cpp +++ b/src/autoapp/Service/BluetoothService.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include namespace f1x { @@ -25,10 +25,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -BluetoothService::BluetoothService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IBluetoothDevice::Pointer bluetoothDevice) +BluetoothService::BluetoothService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IBluetoothDevice::Pointer bluetoothDevice) : strand_(ioService) , channel_(std::make_shared(strand_, std::move(messenger))) , bluetoothDevice_(std::move(bluetoothDevice)) diff --git a/src/autoapp/Projection/InputService.cpp b/src/autoapp/Service/InputService.cpp similarity index 93% rename from src/autoapp/Projection/InputService.cpp rename to src/autoapp/Service/InputService.cpp index 7bc611c..b5e22fc 100644 --- a/src/autoapp/Projection/InputService.cpp +++ b/src/autoapp/Service/InputService.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace f1x { @@ -26,10 +26,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -InputService::InputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IInputDevice::Pointer inputDevice) +InputService::InputService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IInputDevice::Pointer inputDevice) : strand_(ioService) , channel_(std::make_shared(strand_, std::move(messenger))) , inputDevice_(std::move(inputDevice)) @@ -135,7 +135,7 @@ void InputService::onChannelError(const aasdk::error::Error& e) OPENAUTO_LOG(error) << "[SensorService] channel error: " << e.what(); } -void InputService::onButtonEvent(const ButtonEvent& event) +void InputService::onButtonEvent(const projection::ButtonEvent& event) { auto timestamp = std::chrono::duration_cast(std::chrono::high_resolution_clock::now().time_since_epoch()); @@ -146,14 +146,14 @@ void InputService::onButtonEvent(const ButtonEvent& event) if(event.code == aasdk::proto::enums::ButtonCode::SCROLL_WHEEL) { auto relativeEvent = inputEventIndication.mutable_relative_input_event()->add_relative_input_events(); - relativeEvent->set_delta(event.wheelDirection == WheelDirection::LEFT ? -1 : 1); + relativeEvent->set_delta(event.wheelDirection == projection::WheelDirection::LEFT ? -1 : 1); relativeEvent->set_scan_code(event.code); } else { auto buttonEvent = inputEventIndication.mutable_button_event()->add_button_events(); buttonEvent->set_meta(0); - buttonEvent->set_is_pressed(event.type == ButtonEventType::PRESS); + buttonEvent->set_is_pressed(event.type == projection::ButtonEventType::PRESS); buttonEvent->set_long_press(false); buttonEvent->set_scan_code(event.code); } @@ -164,7 +164,7 @@ void InputService::onButtonEvent(const ButtonEvent& event) }); } -void InputService::onTouchEvent(const TouchEvent& event) +void InputService::onTouchEvent(const projection::TouchEvent& event) { auto timestamp = std::chrono::duration_cast(std::chrono::high_resolution_clock::now().time_since_epoch()); diff --git a/src/autoapp/Projection/MediaAudioService.cpp b/src/autoapp/Service/MediaAudioService.cpp similarity index 85% rename from src/autoapp/Projection/MediaAudioService.cpp rename to src/autoapp/Service/MediaAudioService.cpp index be7e9f7..b754d21 100644 --- a/src/autoapp/Projection/MediaAudioService.cpp +++ b/src/autoapp/Service/MediaAudioService.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include namespace f1x { @@ -25,10 +25,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -MediaAudioService::MediaAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioOutput::Pointer audioOutput) +MediaAudioService::MediaAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioOutput::Pointer audioOutput) : AudioService(ioService, std::make_shared(strand_, std::move(messenger)), std::move(audioOutput)) { diff --git a/src/autoapp/Projection/Pinger.cpp b/src/autoapp/Service/Pinger.cpp similarity index 97% rename from src/autoapp/Projection/Pinger.cpp rename to src/autoapp/Service/Pinger.cpp index 8be0cde..fd0b45d 100644 --- a/src/autoapp/Projection/Pinger.cpp +++ b/src/autoapp/Service/Pinger.cpp @@ -16,7 +16,7 @@ * along with openauto. If not, see . */ -#include +#include namespace f1x { @@ -24,7 +24,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { Pinger::Pinger(boost::asio::io_service& ioService, time_t duration) diff --git a/src/autoapp/Projection/SensorService.cpp b/src/autoapp/Service/SensorService.cpp similarity index 98% rename from src/autoapp/Projection/SensorService.cpp rename to src/autoapp/Service/SensorService.cpp index 59a8bd0..f6c05ef 100644 --- a/src/autoapp/Projection/SensorService.cpp +++ b/src/autoapp/Service/SensorService.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include namespace f1x { @@ -26,7 +26,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { SensorService::SensorService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger) diff --git a/src/autoapp/Projection/ServiceFactory.cpp b/src/autoapp/Service/ServiceFactory.cpp similarity index 67% rename from src/autoapp/Projection/ServiceFactory.cpp rename to src/autoapp/Service/ServiceFactory.cpp index d10ddff..5f9d60e 100644 --- a/src/autoapp/Projection/ServiceFactory.cpp +++ b/src/autoapp/Service/ServiceFactory.cpp @@ -21,15 +21,15 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -46,7 +46,7 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { ServiceFactory::ServiceFactory(boost::asio::io_service& ioService, configuration::IConfiguration::Pointer configuration) @@ -60,7 +60,7 @@ ServiceList ServiceFactory::create(aasdk::messenger::IMessenger::Pointer messeng { ServiceList serviceList; - IAudioInput::Pointer audioInput(new QtAudioInput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1)); + projection::IAudioInput::Pointer audioInput(new projection::QtAudioInput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1)); serviceList.emplace_back(std::make_shared(ioService_, messenger, std::move(audioInput))); this->createAudioServices(serviceList, messenger); serviceList.emplace_back(std::make_shared(ioService_, messenger)); @@ -74,28 +74,28 @@ ServiceList ServiceFactory::create(aasdk::messenger::IMessenger::Pointer messeng IService::Pointer ServiceFactory::createVideoService(aasdk::messenger::IMessenger::Pointer messenger) { #ifdef USE_OMX - IVideoOutput::Pointer videoOutput(std::make_shared(configuration_)); + auto videoOutput(std::make_shared(configuration_)); #else - IVideoOutput::Pointer videoOutput(new QtVideoOutput(configuration_), std::bind(&QObject::deleteLater, std::placeholders::_1)); + projection::IVideoOutput::Pointer videoOutput(new projection::QtVideoOutput(configuration_), std::bind(&QObject::deleteLater, std::placeholders::_1)); #endif return std::make_shared(ioService_, messenger, std::move(videoOutput)); } IService::Pointer ServiceFactory::createBluetoothService(aasdk::messenger::IMessenger::Pointer messenger) { - IBluetoothDevice::Pointer bluetoothDevice; + projection::IBluetoothDevice::Pointer bluetoothDevice; switch(configuration_->getBluetoothAdapterType()) { case configuration::BluetoothAdapterType::LOCAL: - bluetoothDevice = IBluetoothDevice::Pointer(new LocalBluetoothDevice(), std::bind(&QObject::deleteLater, std::placeholders::_1)); + bluetoothDevice = projection::IBluetoothDevice::Pointer(new projection::LocalBluetoothDevice(), std::bind(&QObject::deleteLater, std::placeholders::_1)); break; case configuration::BluetoothAdapterType::REMOTE: - bluetoothDevice = std::make_shared(configuration_->getBluetoothRemoteAdapterAddress()); + bluetoothDevice = std::make_shared(configuration_->getBluetoothRemoteAdapterAddress()); break; default: - bluetoothDevice = std::make_shared(); + bluetoothDevice = std::make_shared(); break; } @@ -122,7 +122,7 @@ IService::Pointer ServiceFactory::createInputService(aasdk::messenger::IMessenge QScreen* screen = QGuiApplication::primaryScreen(); QRect screenGeometry = screen == nullptr ? QRect(0, 0, 1, 1) : screen->geometry(); - IInputDevice::Pointer inputDevice(std::make_shared(*QApplication::instance(), configuration_, std::move(screenGeometry), std::move(videoGeometry))); + projection::IInputDevice::Pointer inputDevice(std::make_shared(*QApplication::instance(), configuration_, std::move(screenGeometry), std::move(videoGeometry))); return std::make_shared(ioService_, messenger, std::move(inputDevice)); } @@ -132,8 +132,8 @@ void ServiceFactory::createAudioServices(ServiceList& serviceList, aasdk::messen if(configuration_->musicAudioChannelEnabled()) { auto mediaAudioOutput = configuration_->getAudioOutputBackendType() == configuration::AudioOutputBackendType::RTAUDIO ? - std::make_shared(2, 16, 48000) : - IAudioOutput::Pointer(new QtAudioOutput(2, 16, 48000), std::bind(&QObject::deleteLater, std::placeholders::_1)); + std::make_shared(2, 16, 48000) : + projection::IAudioOutput::Pointer(new projection::QtAudioOutput(2, 16, 48000), std::bind(&QObject::deleteLater, std::placeholders::_1)); serviceList.emplace_back(std::make_shared(ioService_, messenger, std::move(mediaAudioOutput))); } @@ -141,15 +141,15 @@ void ServiceFactory::createAudioServices(ServiceList& serviceList, aasdk::messen if(configuration_->speechAudioChannelEnabled()) { auto speechAudioOutput = configuration_->getAudioOutputBackendType() == configuration::AudioOutputBackendType::RTAUDIO ? - std::make_shared(1, 16, 16000) : - IAudioOutput::Pointer(new QtAudioOutput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1)); + std::make_shared(1, 16, 16000) : + projection::IAudioOutput::Pointer(new projection::QtAudioOutput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1)); serviceList.emplace_back(std::make_shared(ioService_, messenger, std::move(speechAudioOutput))); } auto systemAudioOutput = configuration_->getAudioOutputBackendType() == configuration::AudioOutputBackendType::RTAUDIO ? - std::make_shared(1, 16, 16000) : - IAudioOutput::Pointer(new QtAudioOutput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1)); + std::make_shared(1, 16, 16000) : + projection::IAudioOutput::Pointer(new projection::QtAudioOutput(1, 16, 16000), std::bind(&QObject::deleteLater, std::placeholders::_1)); serviceList.emplace_back(std::make_shared(ioService_, messenger, std::move(systemAudioOutput))); } diff --git a/src/autoapp/Projection/SpeechAudioService.cpp b/src/autoapp/Service/SpeechAudioService.cpp similarity index 85% rename from src/autoapp/Projection/SpeechAudioService.cpp rename to src/autoapp/Service/SpeechAudioService.cpp index f170346..5930095 100644 --- a/src/autoapp/Projection/SpeechAudioService.cpp +++ b/src/autoapp/Service/SpeechAudioService.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include namespace f1x { @@ -25,10 +25,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -SpeechAudioService::SpeechAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioOutput::Pointer audioOutput) +SpeechAudioService::SpeechAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioOutput::Pointer audioOutput) : AudioService(ioService, std::make_shared(strand_, std::move(messenger)), std::move(audioOutput)) { diff --git a/src/autoapp/Projection/SystemAudioService.cpp b/src/autoapp/Service/SystemAudioService.cpp similarity index 85% rename from src/autoapp/Projection/SystemAudioService.cpp rename to src/autoapp/Service/SystemAudioService.cpp index 1acedf6..0998615 100644 --- a/src/autoapp/Projection/SystemAudioService.cpp +++ b/src/autoapp/Service/SystemAudioService.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include namespace f1x { @@ -25,10 +25,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -SystemAudioService::SystemAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IAudioOutput::Pointer audioOutput) +SystemAudioService::SystemAudioService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IAudioOutput::Pointer audioOutput) : AudioService(ioService, std::make_shared(strand_, std::move(messenger)), std::move(audioOutput)) { diff --git a/src/autoapp/Projection/VideoService.cpp b/src/autoapp/Service/VideoService.cpp similarity index 97% rename from src/autoapp/Projection/VideoService.cpp rename to src/autoapp/Service/VideoService.cpp index b419d4a..1bb0aa1 100644 --- a/src/autoapp/Projection/VideoService.cpp +++ b/src/autoapp/Service/VideoService.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include namespace f1x { @@ -25,10 +25,10 @@ namespace openauto { namespace autoapp { -namespace projection +namespace service { -VideoService::VideoService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, IVideoOutput::Pointer videoOutput) +VideoService::VideoService(boost::asio::io_service& ioService, aasdk::messenger::IMessenger::Pointer messenger, projection::IVideoOutput::Pointer videoOutput) : strand_(ioService) , channel_(std::make_shared(strand_, std::move(messenger))) , videoOutput_(std::move(videoOutput)) diff --git a/src/autoapp/autoapp.cpp b/src/autoapp/autoapp.cpp index 8c2565c..2aa9dcb 100644 --- a/src/autoapp/autoapp.cpp +++ b/src/autoapp/autoapp.cpp @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -113,8 +113,8 @@ 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::projection::ServiceFactory serviceFactory(ioService, configuration); - autoapp::projection::AndroidAutoEntityFactory androidAutoEntityFactory(ioService, configuration, serviceFactory); + autoapp::service::ServiceFactory serviceFactory(ioService, configuration); + autoapp::service::AndroidAutoEntityFactory androidAutoEntityFactory(ioService, configuration, serviceFactory); auto usbHub(std::make_shared(usbWrapper, ioService, queryChainFactory)); auto connectedAccessoriesEnumerator(std::make_shared(usbWrapper, ioService, queryChainFactory));