Files
MuditaOS/module-services/service-evtmgr/screen-light-control/ScreenLightControl.hpp
Lefucjusz 181feb4f40 cleanup
2024-08-20 15:40:34 +02:00

37 lines
1.2 KiB
C++

// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include "ScreenLightControlParameters.hpp"
#include <Timers/TimerHandle.hpp>
namespace settings
{
class Settings;
} // namespace settings
namespace sys
{
class Service;
} // namespace sys
/// Screen light control algorithm. Automatic/Manual mode of operation.
/// Processing of ambient light sensor input to screen brightness output.
namespace screen_light_control
{
class ScreenLightController
{
public:
virtual ~ScreenLightController() noexcept = default;
virtual void processRequest(Action action) = 0;
virtual void processRequest(Action action, const Parameters &params) = 0;
[[nodiscard]] virtual auto isLightOn() const noexcept -> bool = 0;
[[nodiscard]] virtual auto isAutoModeOn() const noexcept -> bool = 0;
[[nodiscard]] virtual auto getBrightnessValue() const noexcept
-> bsp::eink_frontlight::BrightnessPercentage = 0;
[[nodiscard]] virtual auto isFadeOutOngoing() -> bool = 0;
};
} // namespace screen_light_control