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