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