mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-10-24 07:28:29 -04:00
Availability and Change in phoneLock handled by PhoneLockHandler. Removed old implementation from onBoarding and Settings. Cleared language assets.
49 lines
1.2 KiB
C++
49 lines
1.2 KiB
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 <memory>
|
|
#include <utility>
|
|
#include "gui/SwitchData.hpp"
|
|
#include "locks/widgets/Lock.hpp"
|
|
|
|
namespace locks
|
|
{
|
|
enum class PhoneLockInputTypeAction
|
|
{
|
|
Unlock,
|
|
Enable,
|
|
Disable,
|
|
ConfirmCurrent,
|
|
Change,
|
|
Set
|
|
};
|
|
|
|
// class template that stores information that was sent along with switch message
|
|
class LockData : public gui::SwitchData
|
|
{
|
|
Lock lock;
|
|
PhoneLockInputTypeAction phoneLockInputTypeAction;
|
|
|
|
public:
|
|
explicit LockData(Lock lock,
|
|
PhoneLockInputTypeAction phoneLockInputTypeAction = PhoneLockInputTypeAction::Unlock)
|
|
: SwitchData(), lock(std::move(lock)), phoneLockInputTypeAction(phoneLockInputTypeAction)
|
|
{
|
|
description = "LockPhoneData";
|
|
}
|
|
|
|
[[nodiscard]] auto getLock() const noexcept
|
|
{
|
|
return lock;
|
|
}
|
|
|
|
[[nodiscard]] auto getPhoneLockInputTypeAction() const noexcept
|
|
{
|
|
return phoneLockInputTypeAction;
|
|
}
|
|
};
|
|
|
|
} // namespace locks
|