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 { ElementName } from '../bundleManager/ElementName'; 22import bundle from '../@ohos.bundle.bundleManager'; 23 24/** 25 * The class of an extension running information. 26 * 27 * @typedef ExtensionRunningInfo 28 * @syscap SystemCapability.Ability.AbilityRuntime.Core 29 * @systemapi 30 * @since 9 31 */ 32export interface ExtensionRunningInfo { 33 /** 34 * @type { ElementName } 35 * @default Indicates the extension of the extension info 36 * @syscap SystemCapability.Ability.AbilityRuntime.Core 37 * @systemapi 38 * @since 9 39 */ 40 extension: ElementName; 41 42 /** 43 * @type { number } 44 * @default process id 45 * @syscap SystemCapability.Ability.AbilityRuntime.Core 46 * @systemapi 47 * @since 9 48 */ 49 pid: number; 50 51 /** 52 * @type { number } 53 * @default user id 54 * @syscap SystemCapability.Ability.AbilityRuntime.Core 55 * @systemapi 56 * @since 9 57 */ 58 uid: number; 59 60 /** 61 * @type { string } 62 * @default the name of the process 63 * @syscap SystemCapability.Ability.AbilityRuntime.Core 64 * @systemapi 65 * @since 9 66 */ 67 processName: string; 68 69 /** 70 * @type { number } 71 * @default ability start time 72 * @syscap SystemCapability.Ability.AbilityRuntime.Core 73 * @systemapi 74 * @since 9 75 */ 76 startTime: number; 77 78 /** 79 * @type { Array<String> } 80 * @default All package names under the current process 81 * @syscap SystemCapability.Ability.AbilityRuntime.Core 82 * @systemapi 83 * @since 9 84 */ 85 clientPackage: Array<String>; 86 87 /** 88 * @type { bundle.ExtensionAbilityType } 89 * @default Enumerates types of the extension info 90 * @syscap SystemCapability.Ability.AbilityRuntime.Core 91 * @systemapi 92 * @since 9 93 */ 94 type: bundle.ExtensionAbilityType; 95} 96