1/* 2 * Copyright (c) 2021-2023 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 * @file 18 * @kit AbilityKit 19 */ 20 21import { HapModuleInfo } from '../bundleManager/HapModuleInfo'; 22import { Configuration } from '../@ohos.app.ability.Configuration'; 23import Context from './Context'; 24import { ExtensionAbilityInfo } from '../bundleManager/ExtensionAbilityInfo'; 25 26/** 27 * The context of an extension. It allows access to extension-specific resources. 28 * 29 * @extends Context 30 * @syscap SystemCapability.Ability.AbilityRuntime.Core 31 * @StageModelOnly 32 * @since 9 33 */ 34/** 35 * The context of an extension. It allows access to extension-specific resources. 36 * 37 * @extends Context 38 * @syscap SystemCapability.Ability.AbilityRuntime.Core 39 * @StageModelOnly 40 * @atomicservice 41 * @since 11 42 */ 43export default class ExtensionContext extends Context { 44 /** 45 * Indicates configuration information about an module. 46 * 47 * @type { HapModuleInfo } 48 * @syscap SystemCapability.Ability.AbilityRuntime.Core 49 * @StageModelOnly 50 * @since 9 51 */ 52 /** 53 * Indicates configuration information about an module. 54 * 55 * @type { HapModuleInfo } 56 * @syscap SystemCapability.Ability.AbilityRuntime.Core 57 * @StageModelOnly 58 * @atomicservice 59 * @since 11 60 */ 61 currentHapModuleInfo: HapModuleInfo; 62 63 /** 64 * Indicates configuration information. 65 * 66 * @type { Configuration } 67 * @syscap SystemCapability.Ability.AbilityRuntime.Core 68 * @StageModelOnly 69 * @since 9 70 */ 71 /** 72 * Indicates configuration information. 73 * 74 * @type { Configuration } 75 * @syscap SystemCapability.Ability.AbilityRuntime.Core 76 * @StageModelOnly 77 * @atomicservice 78 * @since 11 79 */ 80 config: Configuration; 81 82 /** 83 * Extension information. 84 * 85 * @type { ExtensionAbilityInfo } 86 * @syscap SystemCapability.Ability.AbilityRuntime.Core 87 * @StageModelOnly 88 * @since 9 89 */ 90 /** 91 * Extension information. 92 * 93 * @type { ExtensionAbilityInfo } 94 * @syscap SystemCapability.Ability.AbilityRuntime.Core 95 * @StageModelOnly 96 * @atomicservice 97 * @since 11 98 */ 99 extensionAbilityInfo: ExtensionAbilityInfo; 100} 101