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 abilityManager from '../@ohos.app.ability.abilityManager';
23
24/**
25 * The class of an ability running information.
26 *
27 * @typedef AbilityRunningInfo
28 * @syscap SystemCapability.Ability.AbilityRuntime.Core
29 * @systemapi
30 * @since 8
31 */
32export interface AbilityRunningInfo {
33  /**
34   * Ability matching information.
35   *
36   * @type { ElementName }
37   * @default ability element name
38   * @syscap SystemCapability.Ability.AbilityRuntime.Core
39   * @systemapi
40   * @since 8
41   */
42  /**
43   * Ability matching information.
44   *
45   * @type { ElementName }
46   * @default the ohos.bundleManager.ElementName object of the ability.
47   * @syscap SystemCapability.Ability.AbilityRuntime.Core
48   * @systemapi
49   * @since 12
50   */
51  ability: ElementName;
52
53  /**
54   * Process ID.
55   *
56   * @type { number }
57   * @default process id
58   * @syscap SystemCapability.Ability.AbilityRuntime.Core
59   * @systemapi
60   * @since 8
61   */
62  pid: number;
63
64  /**
65   * User ID.
66   *
67   * @type { number }
68   * @default user id
69   * @syscap SystemCapability.Ability.AbilityRuntime.Core
70   * @systemapi
71   * @since 8
72   */
73  uid: number;
74
75  /**
76   * Process name.
77   *
78   * @type { string }
79   * @default the name of the process
80   * @syscap SystemCapability.Ability.AbilityRuntime.Core
81   * @systemapi
82   * @since 8
83   */
84  processName: string;
85
86  /**
87   * Ability startup time.
88   *
89   * @type { number }
90   * @default ability start time
91   * @syscap SystemCapability.Ability.AbilityRuntime.Core
92   * @systemapi
93   * @since 8
94   */
95  startTime: number;
96
97  /**
98   * Ability status.
99   *
100   * @type { abilityManager.AbilityState }
101   * @default Enumerates state of the ability state info
102   * @syscap SystemCapability.Ability.AbilityRuntime.Core
103   * @systemapi
104   * @since 8
105   */
106  abilityState: abilityManager.AbilityState;
107}
108