Files
MuditaOS/module-apps/application-settings-new/data/AutoLockData.hpp
Michał Kamoń 0f3fb7c152 [EGD-6736] Add app's state dependent autoLock mechanism
This PR provides the implementation of the auto-locking mechanism that
is dependent on an application's current auto-locking policy. Three
auto-lock policies have been introduced:

* DetermineByWindow
* DetermineByAppState
* PreventPermanently

Also changed the AutoLockWindow set/get auto-lock time value to the
message-based approach.
2021-05-26 08:31:33 +02:00

26 lines
565 B
C++

// 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 <SwitchData.hpp>
#include <service-appmgr/messages/AutoLockRequests.hpp>
namespace gui
{
class AutoLockData : public gui::SwitchData
{
std::chrono::seconds value;
public:
explicit AutoLockData(std::chrono::seconds value) : value{value}
{}
[[nodiscard]] auto getValue() const noexcept
{
return value;
}
};
} // namespace gui