From 945e39df2119085e8af353612e5eca2e69cece79 Mon Sep 17 00:00:00 2001 From: Radoslaw Wicik Date: Tue, 10 Nov 2020 13:03:27 +0100 Subject: [PATCH] [EGD-4216] Convert service-cellular to library --- module-apps/Application.cpp | 2 +- module-apps/CMakeLists.txt | 1 + .../ApplicationAntenna.cpp | 4 +- .../ApplicationAntenna.hpp | 20 +-- .../application-antenna/CMakeLists.txt | 7 +- .../windows/AlgoParamsWindow.cpp | 4 +- .../windows/AntennaMainWindow.cpp | 2 +- .../windows/ScanModesWindow.cpp | 4 +- .../application-call/ApplicationCall.cpp | 2 +- .../application-call/ApplicationCall.hpp | 4 +- module-apps/application-call/CMakeLists.txt | 1 + .../application-call/windows/CallWindow.cpp | 2 +- .../windows/EnterNumberWindow.cpp | 4 +- .../ApplicationDesktop.cpp | 2 +- .../ApplicationDesktop.hpp | 4 +- .../application-desktop/CMakeLists.txt | 6 +- .../widgets/PinLockHandler.hpp | 4 +- .../application-settings/windows/Fota.cpp | 4 +- .../application-settings/windows/Info.cpp | 4 +- .../windows/USSDWindow.cpp | 2 +- module-cellular/CMakeLists.txt | 12 +- module-cellular/Modem/ATParser.cpp | 4 +- module-cellular/Modem/TS0710/TS0710.cpp | 8 +- .../service-antenna/CMakeLists.txt | 1 + .../service-antenna/ServiceAntenna.cpp | 4 +- module-services/service-appmgr/CMakeLists.txt | 1 + .../service-cellular/CMakeLists.txt | 37 +++-- .../service-cellular/CellularCall.cpp | 26 ++-- .../{api => }/CellularServiceAPI.cpp | 31 ++-- .../service-cellular/CellularUrcHandler.cpp | 10 +- .../service-cellular/CellularUrcHandler.hpp | 17 ++- .../service-cellular/ServiceCellular.cpp | 136 +++++++++--------- .../service-cellular/SignalStrength.cpp | 4 +- .../{ => service-cellular}/CellularCall.hpp | 28 ++-- .../CellularMessage.hpp | 22 ++- .../CellularServiceAPI.hpp | 18 +-- .../ServiceCellular.hpp | 42 +++--- .../{ => service-cellular}/SignalStrength.hpp | 7 +- .../{ => service-cellular}/State.hpp | 0 .../{ => service-cellular}/USSD.hpp | 0 .../service-desktop/CMakeLists.txt | 6 +- .../developerMode/DeveloperModeHelper.cpp | 6 +- module-services/service-evtmgr/CMakeLists.txt | 1 + .../service-evtmgr/EventManager.cpp | 2 +- module-services/service-fota/CMakeLists.txt | 6 +- module-services/service-fota/ServiceFota.cpp | 9 +- 46 files changed, 267 insertions(+), 254 deletions(-) rename module-services/service-cellular/{api => }/CellularServiceAPI.cpp (83%) rename module-services/service-cellular/{ => service-cellular}/CellularCall.hpp (82%) rename module-services/service-cellular/{messages => service-cellular}/CellularMessage.hpp (97%) rename module-services/service-cellular/{api => service-cellular}/CellularServiceAPI.hpp (83%) rename module-services/service-cellular/{ => service-cellular}/ServiceCellular.hpp (80%) rename module-services/service-cellular/{ => service-cellular}/SignalStrength.hpp (93%) rename module-services/service-cellular/{ => service-cellular}/State.hpp (100%) rename module-services/service-cellular/{ => service-cellular}/USSD.hpp (100%) diff --git a/module-apps/Application.cpp b/module-apps/Application.cpp index 10e63da22..50106ca5f 100644 --- a/module-apps/Application.cpp +++ b/module-apps/Application.cpp @@ -17,7 +17,7 @@ #include "log/log.hpp" // for LOG_INFO #include "messages/AppMessage.hpp" // for AppSwitchMe... #include "service-appmgr/Controller.hpp" // for Controller -#include "service-cellular/messages/CellularMessage.hpp" // for CellularNot... +#include #include "service-db/api/DBServiceAPI.hpp" // for DBServiceAPI #include "service-evtmgr/messages/BatteryMessages.hpp" // for BatteryLeve... #include "service-evtmgr/messages/EVMessages.hpp" // for RtcMinuteAl... diff --git a/module-apps/CMakeLists.txt b/module-apps/CMakeLists.txt index f00019d06..ff2b1e594 100644 --- a/module-apps/CMakeLists.txt +++ b/module-apps/CMakeLists.txt @@ -92,6 +92,7 @@ target_link_libraries(${PROJECT_NAME} service-appmgr service-antenna service-audio + service-cellular PUBLIC module-bsp module-os diff --git a/module-apps/application-antenna/ApplicationAntenna.cpp b/module-apps/application-antenna/ApplicationAntenna.cpp index 9cecc85ab..0f2dbdf71 100644 --- a/module-apps/application-antenna/ApplicationAntenna.cpp +++ b/module-apps/application-antenna/ApplicationAntenna.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md /* @@ -11,7 +11,7 @@ #include "ApplicationAntenna.hpp" #include "Service/Timer.hpp" #include "module-cellular/at/response.hpp" -#include "service-cellular/api/CellularServiceAPI.hpp" +#include #include "windows/AntennaMainWindow.hpp" #include "windows/ScanModesWindow.hpp" diff --git a/module-apps/application-antenna/ApplicationAntenna.hpp b/module-apps/application-antenna/ApplicationAntenna.hpp index 3af5d5e2d..f7b037206 100644 --- a/module-apps/application-antenna/ApplicationAntenna.hpp +++ b/module-apps/application-antenna/ApplicationAntenna.hpp @@ -1,19 +1,11 @@ -// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md -/* - * ApplicationAntenna.hpp - * - * Created on: 18 lut 2020 - * Author: kuba - */ +#pragma once -#ifndef MODULE_APPS_APPLICATION_ANTENNA_APPLICATIONANTENNA_HPP_ -#define MODULE_APPS_APPLICATION_ANTENNA_APPLICATIONANTENNA_HPP_ - -#include "Application.hpp" -#include "service-cellular/api/CellularServiceAPI.hpp" -#include "windows/AppWindow.hpp" +#include +#include +#include namespace app { @@ -84,5 +76,3 @@ namespace app } }; } /* namespace app */ - -#endif /* MODULE_APPS_APPLICATION_ANTENNA_APPLICATIONANTENNA_HPP_ */ diff --git a/module-apps/application-antenna/CMakeLists.txt b/module-apps/application-antenna/CMakeLists.txt index e00472816..6441fcc54 100644 --- a/module-apps/application-antenna/CMakeLists.txt +++ b/module-apps/application-antenna/CMakeLists.txt @@ -1,4 +1,4 @@ - + include_directories( ${CMAKE_PROJECT_NAME} PUBLIC @@ -22,3 +22,8 @@ target_sources( ${PROJECT_NAME} "${CMAKE_CURRENT_LIST_DIR}/ApplicationAntenna.hpp" ) +target_link_libraries(${PROJECT_NAME} + PRIVATE + service-cellular +) + diff --git a/module-apps/application-antenna/windows/AlgoParamsWindow.cpp b/module-apps/application-antenna/windows/AlgoParamsWindow.cpp index 5bfccf534..9721e971d 100644 --- a/module-apps/application-antenna/windows/AlgoParamsWindow.cpp +++ b/module-apps/application-antenna/windows/AlgoParamsWindow.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "AlgoParamsWindow.hpp" @@ -12,7 +12,7 @@ #include "gui/widgets/BoxLayout.hpp" #include "../AntennaAppStyle.hpp" #include "../ApplicationAntenna.hpp" -#include "service-cellular/api/CellularServiceAPI.hpp" +#include using StringList = std::list; diff --git a/module-apps/application-antenna/windows/AntennaMainWindow.cpp b/module-apps/application-antenna/windows/AntennaMainWindow.cpp index 98604d8ca..4fce5f6a0 100644 --- a/module-apps/application-antenna/windows/AntennaMainWindow.cpp +++ b/module-apps/application-antenna/windows/AntennaMainWindow.cpp @@ -20,7 +20,7 @@ #include "ScanModesWindow.hpp" #include "AlgoParamsWindow.hpp" #include "../ApplicationAntenna.hpp" -#include "service-cellular/api/CellularServiceAPI.hpp" +#include #include #include namespace gui diff --git a/module-apps/application-antenna/windows/ScanModesWindow.cpp b/module-apps/application-antenna/windows/ScanModesWindow.cpp index f15678737..98392607a 100644 --- a/module-apps/application-antenna/windows/ScanModesWindow.cpp +++ b/module-apps/application-antenna/windows/ScanModesWindow.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "ScanModesWindow.hpp" @@ -12,7 +12,7 @@ #include "../AntennaAppStyle.hpp" #include "../ApplicationAntenna.hpp" -#include "service-cellular/api/CellularServiceAPI.hpp" +#include namespace gui { diff --git a/module-apps/application-call/ApplicationCall.cpp b/module-apps/application-call/ApplicationCall.cpp index 9edbf6739..c4bda84a8 100644 --- a/module-apps/application-call/ApplicationCall.cpp +++ b/module-apps/application-call/ApplicationCall.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include