From 57874cab33b0ed96b8a3f5a12f68d69cfeded699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Smoczy=C5=84ski?= Date: Thu, 23 Sep 2021 16:32:33 +0200 Subject: [PATCH] [BH-912] Improve sys module structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve structure of the module sys. Problems within this module prevents from linking others. Signed-off-by: Marcin Smoczyński --- .../ApplicationDesktop.cpp | 2 +- module-apps/apps-common/ApplicationCommon.hpp | 2 +- .../popups/TetheringConfirmationPopup.cpp | 2 +- .../apps-common/popups/TetheringOffPopup.cpp | 2 +- .../popups/presenter/PowerOffPresenter.cpp | 2 +- .../linux/watchdog/software_watchdog.cpp | 2 +- module-cellular/modem/mux/CellularMux.cpp | 4 +- module-gui/CMakeLists.txt | 6 +-- module-gui/test/test-google/CMakeLists.txt | 1 - .../model/ApplicationManagerCommon.hpp | 2 +- .../model/ApplicationManagerCommon.cpp | 2 +- .../service-audio/AudioServiceAPI.cpp | 2 +- .../service-audio/ServiceAudio.cpp | 2 +- .../service-bluetooth/ServiceBluetooth.cpp | 2 +- .../service-bluetooth/ServiceBluetooth.hpp | 4 +- .../service-cellular/CellularServiceAPI.cpp | 2 +- .../service-cellular/ServiceCellular.cpp | 2 +- .../service-cellular/CellularCall.hpp | 6 +-- .../service-cellular/ServiceCellular.hpp | 4 +- module-services/service-db/DBServiceAPI.cpp | 2 +- .../include/service-db/DBContactMessage.hpp | 2 +- .../test-service-db-settings-messages.cpp | 20 +++++----- .../service-desktop/ServiceDesktop.cpp | 4 +- .../service-desktop/WorkerDesktop.cpp | 2 +- .../service-desktop/WorkerDesktop.hpp | 2 +- .../endpoints/contacts/ContactHelper.cpp | 2 +- .../developerMode/DeveloperModeHelper.cpp | 4 +- .../endpoints/backup/BackupEndpoint.hpp | 2 +- .../endpoints/bluetooth/BluetoothHelper.hpp | 2 +- .../endpoints/contacts/ContactHelper.hpp | 2 +- .../endpoints/filesystem/FileContext.hpp | 2 +- .../endpoints/messages/MessageHelper.cpp | 2 +- .../service-desktop/ServiceDesktop.hpp | 2 +- module-services/service-eink/EinkSentinel.hpp | 2 +- module-services/service-eink/ServiceEink.cpp | 6 +-- module-services/service-eink/ServiceEink.hpp | 2 +- .../service-evtmgr/EventManager.cpp | 4 +- .../service-evtmgr/WorkerEventCommon.cpp | 2 +- .../api/EventManagerServiceAPI.cpp | 2 +- .../BatteryBrownoutDetector.cpp | 2 +- .../battery-level-check/BatteryLevelCheck.cpp | 2 +- .../service-evtmgr/EventManagerCommon.hpp | 4 +- .../service-evtmgr/WorkerEventCommon.hpp | 2 +- .../service-evtmgr/vibra/Vibra.cpp | 2 +- .../service-gui/service-gui/ServiceGUI.hpp | 2 +- module-services/service-time/ServiceTime.hpp | 2 +- module-sys/CMakeLists.txt | 4 +- module-sys/Service/CMakeLists.txt | 38 +++++++++---------- module-sys/Service/Service.cpp | 3 +- .../{Timers => Service}/SystemTimer.cpp | 0 .../{Timers => Service}/TimerFactory.cpp | 0 .../{Timers => Service}/TimerHandle.cpp | 0 module-sys/Service/details/bus/Bus.hpp | 2 +- .../Service/include/Service/BusProxy.hpp | 2 +- .../Service/include/Service/Message.hpp | 2 +- .../include/Service/MessageForward.hpp | 2 +- .../Service/include/Service/Service.hpp | 4 +- .../include/Timers/SystemTimer.hpp | 0 .../include/Timers/Timer.hpp | 0 .../include/Timers/TimerFactory.hpp | 0 .../include/Timers/TimerHandle.hpp | 0 .../include/Timers/TimerMessage.hpp | 0 module-sys/SystemManager/CMakeLists.txt | 16 ++++---- .../CpuSentinel.cpp | 6 +-- .../SystemManager/SystemManagerCommon.cpp | 6 +-- .../include/SystemManager/CpuGovernor.hpp | 2 +- .../include/SystemManager}/CpuSentinel.hpp | 5 ++- .../SystemManager/SystemManagerCommon.hpp | 2 +- .../tests/unittest_CpuSentinelsGovernor.cpp | 2 +- module-sys/SystemWatchdog/CMakeLists.txt | 3 +- module-sys/SystemWatchdog/SystemWatchdog.cpp | 2 +- .../include/SystemWatchdog/SystemWatchdog.hpp | 2 +- .../include/SystemWatchdog}/Watchdog.hpp | 0 module-sys/Timers/CMakeLists.txt | 26 ------------- module-sys/common/CMakeLists.txt | 19 ++++++++++ .../include/system}/Common.hpp | 2 +- .../include/system}/Constants.hpp | 0 .../include/system}/SystemReturnCodes.hpp | 0 .../messages/DeviceRegistrationMessage.hpp | 0 .../messages/RequestCpuFrequencyMessage.hpp | 0 .../messages/SentinelRegistrationMessage.hpp | 2 +- .../system}/messages/SystemManagerMessage.hpp | 2 +- .../messages/TetheringQuestionRequest.hpp | 0 .../messages/TetheringStateRequest.hpp | 0 .../services/evtmgr/EventManager.cpp | 2 +- .../services/appmgr/ApplicationManager.cpp | 2 +- products/PurePhone/sys/SystemManager.cpp | 6 +-- 87 files changed, 144 insertions(+), 155 deletions(-) rename module-sys/{Timers => Service}/SystemTimer.cpp (100%) rename module-sys/{Timers => Service}/TimerFactory.cpp (100%) rename module-sys/{Timers => Service}/TimerHandle.cpp (100%) rename module-sys/{Timers => Service}/include/Timers/SystemTimer.hpp (100%) rename module-sys/{Timers => Service}/include/Timers/Timer.hpp (100%) rename module-sys/{Timers => Service}/include/Timers/TimerFactory.hpp (100%) rename module-sys/{Timers => Service}/include/Timers/TimerHandle.hpp (100%) rename module-sys/{Timers => Service}/include/Timers/TimerMessage.hpp (100%) rename module-sys/{Service => SystemManager}/CpuSentinel.cpp (91%) rename module-sys/{Service/include/Service => SystemManager/include/SystemManager}/CpuSentinel.hpp (98%) rename module-sys/{Service/include/Service => SystemWatchdog/include/SystemWatchdog}/Watchdog.hpp (100%) delete mode 100644 module-sys/Timers/CMakeLists.txt create mode 100644 module-sys/common/CMakeLists.txt rename module-sys/{Service/include/Service => common/include/system}/Common.hpp (98%) rename module-sys/{SystemManager/include/SystemManager => common/include/system}/Constants.hpp (100%) rename module-sys/{Service/include/Service => common/include/system}/SystemReturnCodes.hpp (100%) rename module-sys/{SystemManager/include/SystemManager => common/include/system}/messages/DeviceRegistrationMessage.hpp (100%) rename module-sys/{SystemManager/include/SystemManager => common/include/system}/messages/RequestCpuFrequencyMessage.hpp (100%) rename module-sys/{SystemManager/include/SystemManager => common/include/system}/messages/SentinelRegistrationMessage.hpp (94%) rename module-sys/{SystemManager/include/SystemManager => common/include/system}/messages/SystemManagerMessage.hpp (97%) rename module-sys/{SystemManager/include/SystemManager => common/include/system}/messages/TetheringQuestionRequest.hpp (100%) rename module-sys/{SystemManager/include/SystemManager => common/include/system}/messages/TetheringStateRequest.hpp (100%) diff --git a/module-apps/application-desktop/ApplicationDesktop.cpp b/module-apps/application-desktop/ApplicationDesktop.cpp index cff3b7c03..4cb370bc6 100644 --- a/module-apps/application-desktop/ApplicationDesktop.cpp +++ b/module-apps/application-desktop/ApplicationDesktop.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include diff --git a/module-apps/apps-common/ApplicationCommon.hpp b/module-apps/apps-common/ApplicationCommon.hpp index 6642581a4..39a8792ca 100644 --- a/module-apps/apps-common/ApplicationCommon.hpp +++ b/module-apps/apps-common/ApplicationCommon.hpp @@ -8,7 +8,7 @@ #include "Audio/Profiles/Profile.hpp" // for Profile, Pro... #include "CallbackStorage.hpp" -#include "Service/Common.hpp" // for ReturnCodes +#include "system/Common.hpp" // for ReturnCodes #include "Service/Message.hpp" // for MessagePointer #include "Service/Service.hpp" // for Service #include "Timers/TimerHandle.hpp" diff --git a/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp b/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp index 148df7a56..29baf6574 100644 --- a/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp +++ b/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp @@ -5,7 +5,7 @@ #include "DialogMetadataMessage.hpp" #include "ApplicationCommon.hpp" -#include +#include #include namespace gui diff --git a/module-apps/apps-common/popups/TetheringOffPopup.cpp b/module-apps/apps-common/popups/TetheringOffPopup.cpp index c57abaef6..95f744124 100644 --- a/module-apps/apps-common/popups/TetheringOffPopup.cpp +++ b/module-apps/apps-common/popups/TetheringOffPopup.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include namespace gui diff --git a/module-apps/apps-common/popups/presenter/PowerOffPresenter.cpp b/module-apps/apps-common/popups/presenter/PowerOffPresenter.cpp index 226dd52b9..b5a25b785 100644 --- a/module-apps/apps-common/popups/presenter/PowerOffPresenter.cpp +++ b/module-apps/apps-common/popups/presenter/PowerOffPresenter.cpp @@ -3,7 +3,7 @@ #include "PowerOffPresenter.hpp" #include -#include +#include namespace gui { diff --git a/module-bsp/board/linux/watchdog/software_watchdog.cpp b/module-bsp/board/linux/watchdog/software_watchdog.cpp index 17e8ac2fc..00a8f57a4 100644 --- a/module-bsp/board/linux/watchdog/software_watchdog.cpp +++ b/module-bsp/board/linux/watchdog/software_watchdog.cpp @@ -4,7 +4,7 @@ #include "software_watchdog.hpp" #include #include -#include +#include #include #include diff --git a/module-cellular/modem/mux/CellularMux.cpp b/module-cellular/modem/mux/CellularMux.cpp index 9df9a0eb7..cb7f5d720 100644 --- a/module-cellular/modem/mux/CellularMux.cpp +++ b/module-cellular/modem/mux/CellularMux.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include