Android-cuttlefish cvd tool
oemlock.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#pragma once
19
22
23namespace cuttlefish {
24namespace oemlock {
25
32class OemLock {
33 public:
35
42 // TODO(b/286558252): add ConfirmationUI token to the signature
43 Result<void> SetOemLocked(bool locked);
44
45 private:
47};
48
49} // namespace oemlock
50} // namespace cuttlefish
Definition: oemlock.h:32
secure_env::Storage & storage_
Definition: oemlock.h:46
Result< bool > IsOemUnlockAllowed() const
Definition: oemlock.cpp:81
Result< bool > IsOemUnlockAllowedByDevice() const
Definition: oemlock.cpp:77
OemLock(secure_env::Storage &storage)
Definition: oemlock.cpp:65
Result< void > SetOemUnlockAllowedByDevice(bool allowed)
Definition: oemlock.cpp:98
Result< bool > IsOemUnlockAllowedByCarrier() const
Definition: oemlock.cpp:73
Result< bool > IsOemLocked() const
Definition: oemlock.cpp:89
Result< void > SetOemLocked(bool locked)
Definition: oemlock.cpp:103
Result< void > SetOemUnlockAllowedByCarrier(bool allowed)
Definition: oemlock.cpp:93
Definition: storage.h:59
Definition: alloc_driver.h:20
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30