161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit AbilityKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ci/**
2261847f8eSopenharmony_ci * The context of an application. It allows access to application-specific resources.
2361847f8eSopenharmony_ci *
2461847f8eSopenharmony_ci * @namespace contextConstant
2561847f8eSopenharmony_ci * @syscap SystemCapability.Ability.AbilityRuntime.Core
2661847f8eSopenharmony_ci * @StageModelOnly
2761847f8eSopenharmony_ci * @since 9
2861847f8eSopenharmony_ci */
2961847f8eSopenharmony_ci/**
3061847f8eSopenharmony_ci * The context of an application. It allows access to application-specific resources.
3161847f8eSopenharmony_ci *
3261847f8eSopenharmony_ci * @namespace contextConstant
3361847f8eSopenharmony_ci * @syscap SystemCapability.Ability.AbilityRuntime.Core
3461847f8eSopenharmony_ci * @StageModelOnly
3561847f8eSopenharmony_ci * @atomicservice
3661847f8eSopenharmony_ci * @since 11
3761847f8eSopenharmony_ci */
3861847f8eSopenharmony_cideclare namespace contextConstant {
3961847f8eSopenharmony_ci  /**
4061847f8eSopenharmony_ci   * File area mode
4161847f8eSopenharmony_ci   *
4261847f8eSopenharmony_ci   * @enum { number }
4361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4461847f8eSopenharmony_ci   * @StageModelOnly
4561847f8eSopenharmony_ci   * @since 9
4661847f8eSopenharmony_ci   */
4761847f8eSopenharmony_ci  /**
4861847f8eSopenharmony_ci   * File area mode
4961847f8eSopenharmony_ci   *
5061847f8eSopenharmony_ci   * @enum { number }
5161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
5261847f8eSopenharmony_ci   * @StageModelOnly
5361847f8eSopenharmony_ci   * @atomicservice
5461847f8eSopenharmony_ci   * @since 11
5561847f8eSopenharmony_ci   */
5661847f8eSopenharmony_ci  export enum AreaMode {
5761847f8eSopenharmony_ci    /**
5861847f8eSopenharmony_ci     * System level device encryption area
5961847f8eSopenharmony_ci     *
6061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
6161847f8eSopenharmony_ci     * @StageModelOnly
6261847f8eSopenharmony_ci     * @since 9
6361847f8eSopenharmony_ci     */
6461847f8eSopenharmony_ci    /**
6561847f8eSopenharmony_ci     * System level device encryption area
6661847f8eSopenharmony_ci     *
6761847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
6861847f8eSopenharmony_ci     * @StageModelOnly
6961847f8eSopenharmony_ci     * @atomicservice
7061847f8eSopenharmony_ci     * @since 11
7161847f8eSopenharmony_ci     */
7261847f8eSopenharmony_ci    EL1 = 0,
7361847f8eSopenharmony_ci
7461847f8eSopenharmony_ci    /**
7561847f8eSopenharmony_ci     * User credential encryption area
7661847f8eSopenharmony_ci     *
7761847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
7861847f8eSopenharmony_ci     * @StageModelOnly
7961847f8eSopenharmony_ci     * @since 9
8061847f8eSopenharmony_ci     */
8161847f8eSopenharmony_ci    /**
8261847f8eSopenharmony_ci     * User credential encryption area
8361847f8eSopenharmony_ci     *
8461847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
8561847f8eSopenharmony_ci     * @StageModelOnly
8661847f8eSopenharmony_ci     * @atomicservice
8761847f8eSopenharmony_ci     * @since 11
8861847f8eSopenharmony_ci     */
8961847f8eSopenharmony_ci    EL2 = 1,
9061847f8eSopenharmony_ci
9161847f8eSopenharmony_ci    /**
9261847f8eSopenharmony_ci     * User credential encryption area
9361847f8eSopenharmony_ci     * when screen locked, can read/write, and create file
9461847f8eSopenharmony_ci     *
9561847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
9661847f8eSopenharmony_ci     * @stagemodelonly
9761847f8eSopenharmony_ci     * @atomicservice
9861847f8eSopenharmony_ci     * @since 11
9961847f8eSopenharmony_ci     */
10061847f8eSopenharmony_ci    EL3 = 2,
10161847f8eSopenharmony_ci
10261847f8eSopenharmony_ci    /**
10361847f8eSopenharmony_ci     * User credential encryption area
10461847f8eSopenharmony_ci     * when screen locked, FEB2.0 can read/write, FEB3.0 can't
10561847f8eSopenharmony_ci     * read/write, and all can't create file
10661847f8eSopenharmony_ci     *
10761847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
10861847f8eSopenharmony_ci     * @stagemodelonly
10961847f8eSopenharmony_ci     * @atomicservice
11061847f8eSopenharmony_ci     * @since 11
11161847f8eSopenharmony_ci     */
11261847f8eSopenharmony_ci    EL4 = 3,
11361847f8eSopenharmony_ci
11461847f8eSopenharmony_ci    /**
11561847f8eSopenharmony_ci     * User privacy sensitive encryption area
11661847f8eSopenharmony_ci     * when the screen locked, a closed file cannot be opened, read, or written,
11761847f8eSopenharmony_ci     * a file can be created and then opened, read, or written.
11861847f8eSopenharmony_ci     *
11961847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
12061847f8eSopenharmony_ci     * @stagemodelonly
12161847f8eSopenharmony_ci     * @atomicservice
12261847f8eSopenharmony_ci     * @since 12
12361847f8eSopenharmony_ci     */
12461847f8eSopenharmony_ci    EL5 = 4
12561847f8eSopenharmony_ci  }
12661847f8eSopenharmony_ci
12761847f8eSopenharmony_ci  /**
12861847f8eSopenharmony_ci   * Process mode
12961847f8eSopenharmony_ci   *
13061847f8eSopenharmony_ci   * @enum { number }
13161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
13261847f8eSopenharmony_ci   * @stagemodelonly
13361847f8eSopenharmony_ci   * @since 12
13461847f8eSopenharmony_ci   */
13561847f8eSopenharmony_ci  export enum ProcessMode {
13661847f8eSopenharmony_ci    /**
13761847f8eSopenharmony_ci     * Indicates the ability started in a new process, and the process lifecycle follows the parent process.
13861847f8eSopenharmony_ci     * When using this mode, the target ability needs to have the same bundle name as the caller.
13961847f8eSopenharmony_ci     *
14061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
14161847f8eSopenharmony_ci     * @stagemodelonly
14261847f8eSopenharmony_ci     * @since 12
14361847f8eSopenharmony_ci     */
14461847f8eSopenharmony_ci    NEW_PROCESS_ATTACH_TO_PARENT = 1,
14561847f8eSopenharmony_ci
14661847f8eSopenharmony_ci    /**
14761847f8eSopenharmony_ci     * Indicates the ability started in a new process.
14861847f8eSopenharmony_ci     * When using this mode, the caller needs to add item to status bar first,
14961847f8eSopenharmony_ci     * and the target ability needs to have the same bundle name as the caller.
15061847f8eSopenharmony_ci     *
15161847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
15261847f8eSopenharmony_ci     * @stagemodelonly
15361847f8eSopenharmony_ci     * @since 12
15461847f8eSopenharmony_ci     */
15561847f8eSopenharmony_ci    NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM = 2,
15661847f8eSopenharmony_ci
15761847f8eSopenharmony_ci    /**
15861847f8eSopenharmony_ci     * Indicates the ability started without forcing the creation of a new process.
15961847f8eSopenharmony_ci     * When using this mode, the caller needs to add item to status bar first,
16061847f8eSopenharmony_ci     * and the target ability needs to have the same bundle name as the caller.
16161847f8eSopenharmony_ci     *
16261847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
16361847f8eSopenharmony_ci     * @stagemodelonly
16461847f8eSopenharmony_ci     * @since 12
16561847f8eSopenharmony_ci     */
16661847f8eSopenharmony_ci    ATTACH_TO_STATUS_BAR_ITEM = 3
16761847f8eSopenharmony_ci  }
16861847f8eSopenharmony_ci
16961847f8eSopenharmony_ci  /**
17061847f8eSopenharmony_ci   * Startup visibility
17161847f8eSopenharmony_ci   *
17261847f8eSopenharmony_ci   * @enum { number }
17361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
17461847f8eSopenharmony_ci   * @stagemodelonly
17561847f8eSopenharmony_ci   * @since 12
17661847f8eSopenharmony_ci   */
17761847f8eSopenharmony_ci  export enum StartupVisibility {
17861847f8eSopenharmony_ci    /**
17961847f8eSopenharmony_ci     * Indicates that the ability will hide after process startup.
18061847f8eSopenharmony_ci     *
18161847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
18261847f8eSopenharmony_ci     * @stagemodelonly
18361847f8eSopenharmony_ci     * @since 12
18461847f8eSopenharmony_ci     */
18561847f8eSopenharmony_ci    STARTUP_HIDE = 0,
18661847f8eSopenharmony_ci
18761847f8eSopenharmony_ci    /**
18861847f8eSopenharmony_ci     * Indicates that the ability will show after process startup.
18961847f8eSopenharmony_ci     *
19061847f8eSopenharmony_ci     * @syscap SystemCapability.Ability.AbilityRuntime.Core
19161847f8eSopenharmony_ci     * @stagemodelonly
19261847f8eSopenharmony_ci     * @since 12
19361847f8eSopenharmony_ci     */
19461847f8eSopenharmony_ci    STARTUP_SHOW = 1
19561847f8eSopenharmony_ci  }
19661847f8eSopenharmony_ci}
19761847f8eSopenharmony_ci
19861847f8eSopenharmony_ciexport default contextConstant;
199