// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once #include #include #include "system/Constants.hpp" #include "SystemManager/data/SystemManagerActionsParams.hpp" #include namespace sys { class SystemManagerMessage : public sys::DataMessage { public: SystemManagerMessage() : sys::DataMessage(MessageType::PMChangePowerMode){}; }; class CriticalBatteryLevelNotification : public sys::DataMessage, public app::manager::actions::ConvertibleToAction { public: explicit CriticalBatteryLevelNotification(bool isActive, bool isCharging = false) : isActive(isActive), isCharging(isCharging) {} [[nodiscard]] auto toAction() const -> std::unique_ptr { return std::make_unique( service::name::system_manager, app::manager::actions::DisplayLowBatteryScreen, std::make_unique(isActive, isCharging)); } private: bool isActive; bool isCharging; }; } // namespace sys