1/* 2 * Copyright (c) 2022-2024 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 21/*** if arkts 1.1 */ 22import type appManager from '../@ohos.app.ability.appManager'; 23/*** endif */ 24/*** if arkts 1.2 */ 25import appManager from '../@ohos.app.ability.appManager'; 26/*** endif */ 27import bundleManager from '../@ohos.bundle.bundleManager'; 28 29/** 30 * The class of an process information. 31 * 32 * @typedef ProcessInformation 33 * @syscap SystemCapability.Ability.AbilityRuntime.Core 34 * @since 9 35 */ 36/** 37 * The class of an process information. 38 * 39 * @typedef ProcessInformation 40 * @syscap SystemCapability.Ability.AbilityRuntime.Core 41 * @crossplatform 42 * @since 10 43 */ 44/** 45 * The class of an process information. 46 * 47 * @typedef ProcessInformation 48 * @syscap SystemCapability.Ability.AbilityRuntime.Core 49 * @crossplatform 50 * @atomicservice 51 * @since arkts {'1.1':'11', '1.2':'20'} 52 * @arkts 1.1&1.2 53 */ 54export interface ProcessInformation { 55 /** 56 * @type { number } 57 * @default process id 58 * @syscap SystemCapability.Ability.AbilityRuntime.Core 59 * @crossplatform 60 * @since 9 61 */ 62 /** 63 * @type { number } 64 * @default process id 65 * @syscap SystemCapability.Ability.AbilityRuntime.Core 66 * @crossplatform 67 * @since 10 68 */ 69 /** 70 * @type { number } 71 * @default process id 72 * @syscap SystemCapability.Ability.AbilityRuntime.Core 73 * @crossplatform 74 * @atomicservice 75 * @since arkts {'1.1':'11', '1.2':'20'} 76 * @arkts 1.1&1.2 77 */ 78 pid: number; 79 80 /** 81 * @type { number } 82 * @default user id 83 * @syscap SystemCapability.Ability.AbilityRuntime.Core 84 * @since 9 85 */ 86 /** 87 * @type { number } 88 * @default user id 89 * @syscap SystemCapability.Ability.AbilityRuntime.Core 90 * @atomicservice 91 * @since arkts {'1.1':'11', '1.2':'20'} 92 * @arkts 1.1&1.2 93 */ 94 uid: number; 95 96 /** 97 * @type { string } 98 * @default the name of the process 99 * @syscap SystemCapability.Ability.AbilityRuntime.Core 100 * @crossplatform 101 * @since 9 102 */ 103 /** 104 * @type { string } 105 * @default the name of the process 106 * @syscap SystemCapability.Ability.AbilityRuntime.Core 107 * @crossplatform 108 * @since 10 109 */ 110 /** 111 * @type { string } 112 * @default the name of the process 113 * @syscap SystemCapability.Ability.AbilityRuntime.Core 114 * @crossplatform 115 * @atomicservice 116 * @since arkts {'1.1':'11', '1.2':'20'} 117 * @arkts 1.1&1.2 118 */ 119 processName: string; 120 121 /** 122 * @type { Array<string> } 123 * @default an array of the bundleNames running in the process 124 * @syscap SystemCapability.Ability.AbilityRuntime.Core 125 * @crossplatform 126 * @since 9 127 */ 128 /** 129 * @type { Array<string> } 130 * @default an array of the bundleNames running in the process 131 * @syscap SystemCapability.Ability.AbilityRuntime.Core 132 * @crossplatform 133 * @since 10 134 */ 135 /** 136 * @type { Array<string> } 137 * @default an array of the bundleNames running in the process 138 * @syscap SystemCapability.Ability.AbilityRuntime.Core 139 * @crossplatform 140 * @atomicservice 141 * @since arkts {'1.1':'11', '1.2':'20'} 142 * @arkts 1.1&1.2 143 */ 144 bundleNames: Array<string>; 145 146 /** 147 * The process state. 148 * 149 * @type { appManager.ProcessState } 150 * @syscap SystemCapability.Ability.AbilityRuntime.Core 151 * @since 10 152 */ 153 /** 154 * The process state. 155 * 156 * @type { appManager.ProcessState } 157 * @syscap SystemCapability.Ability.AbilityRuntime.Core 158 * @atomicservice 159 * @since arkts {'1.1':'11', '1.2':'20'} 160 * @arkts 1.1&1.2 161 */ 162 state: appManager.ProcessState; 163 164 /** 165 * The bundle type of the process. 166 * 167 * @type { bundleManager.BundleType } 168 * @syscap SystemCapability.Ability.AbilityRuntime.Core 169 * @atomicservice 170 * @since arkts {'1.1':'12', '1.2':'20'} 171 * @arkts 1.1&1.2 172 */ 173 bundleType: bundleManager.BundleType; 174 175 /** 176 * The app clone index of current process if app is multi app mode. 177 * @type { ?number } 178 * @syscap SystemCapability.Ability.AbilityRuntime.Core 179 * @atomicservice 180 * @since arkts {'1.1':'12', '1.2':'20'} 181 * @arkts 1.1&1.2 182 */ 183 appCloneIndex?: number; 184} 185