1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup AbilityRuntime 18 * @{ 19 * 20 * @brief Describe the constant of context. 21 * 22 * @syscap SystemCapability.Ability.AbilityRuntime.Core 23 * @since 13 24 */ 25 26 /** 27 * @file context_constant.h 28 * 29 * @brief Defines the constant of context. 30 * 31 * @library libability_runtime.so 32 * @kit AbilityKit 33 * @syscap SystemCapability.Ability.AbilityRuntime.Core 34 * @since 13 35 */ 36 37 #ifndef ABILITY_RUNTIME_CONTEXT_CONSTANT_H 38 #define ABILITY_RUNTIME_CONTEXT_CONSTANT_H 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif 43 44 /** 45 * @brief File area mode. 46 * 47 * @since 13 48 */ 49 typedef enum { 50 /** 51 * System level device encryption area. 52 */ 53 ABILITY_RUNTIME_AREA_MODE_EL1 = 0, 54 /** 55 * User credential encryption area. 56 */ 57 ABILITY_RUNTIME_AREA_MODE_EL2 = 1, 58 /** 59 * User credential encryption area. 60 * when screen locked, can read/write, and create file. 61 */ 62 ABILITY_RUNTIME_AREA_MODE_EL3 = 2, 63 /** 64 * User credential encryption area. 65 * when screen locked, FEB2.0 can read/write, FEB3.0 can't 66 * read/write, and all can't create file. 67 */ 68 ABILITY_RUNTIME_AREA_MODE_EL4 = 3, 69 /** 70 * User privacy-sensitive encryption area. 71 * when the screen locked, a closed file cannot be opened, read, or written, 72 * a file can be created and then opened, read, or written. 73 */ 74 ABILITY_RUNTIME_AREA_MODE_EL5 = 4, 75 } AbilityRuntime_AreaMode; 76 77 #ifdef __cplusplus 78 } // extern "C" 79 #endif 80 81 /** @} */ 82 #endif // ABILITY_RUNTIME_CONTEXT_CONSTANT_H 83