1 /* 2 * Copyright (c) 2024-2025 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 /** 78 * @brief Start Visibility. 79 * 80 * @since 17 81 */ 82 typedef enum { 83 /** 84 * Indicates that the ability will hide after process startup. 85 */ 86 ABILITY_RUNTIME_HIDE_UPON_START = 0, 87 /** 88 * Indicates that the ability will show after process startup. 89 */ 90 ABILITY_RUNTIME_SHOW_UPON_START = 1, 91 } AbilityRuntime_StartVisibility; 92 93 /** 94 * @brief Window mode. 95 * 96 * @since 17 97 */ 98 typedef enum { 99 /** 100 * The window mode is not defined. 101 */ 102 ABILITY_RUNTIME_WINDOW_MODE_UNDEFINED = 0, 103 /** 104 * Full screen mode. 105 */ 106 ABILITY_RUNTIME_WINDOW_MODE_FULL_SCREEN = 1, 107 } AbilityRuntime_WindowMode; 108 109 /** 110 * Support window mode 111 * 112 * @since 17 113 */ 114 typedef enum { 115 /** 116 * Indicates supported window mode of full screen mode 117 */ 118 ABILITY_RUNTIME_SUPPORTED_WINDOW_MODE_FULL_SCREEN = 0, 119 /** 120 * Indicates supported window mode of split mode 121 */ 122 ABILITY_RUNTIME_SUPPORTED_WINDOW_MODE_SPLIT = 1, 123 /** 124 * Indicates supported window mode of floating mode 125 */ 126 ABILITY_RUNTIME_SUPPORTED_WINDOW_MODE_FLOATING = 2, 127 } AbilityRuntime_SupportedWindowMode; 128 129 #ifdef __cplusplus 130 } // extern "C" 131 #endif 132 133 /** @} */ 134 #endif // ABILITY_RUNTIME_CONTEXT_CONSTANT_H 135