• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 * @since 14
30 */
31export interface AbilityRunningInfo {
32  /**
33   * Ability matching information.
34   *
35   * @type { ElementName }
36   * @default ability element name
37   * @syscap SystemCapability.Ability.AbilityRuntime.Core
38   * @since 14
39   */
40  /**
41   * Ability matching information.
42   *
43   * @type { ElementName }
44   * @default the ohos.bundleManager.ElementName object of the ability.
45   * @syscap SystemCapability.Ability.AbilityRuntime.Core
46   * @since 14
47   */
48  ability: ElementName;
49
50  /**
51   * Process ID.
52   *
53   * @type { number }
54   * @default process id
55   * @syscap SystemCapability.Ability.AbilityRuntime.Core
56   * @since 14
57   */
58  pid: number;
59
60  /**
61   * User ID.
62   *
63   * @type { number }
64   * @default user id
65   * @syscap SystemCapability.Ability.AbilityRuntime.Core
66   * @since 14
67   */
68  uid: number;
69
70  /**
71   * Process name.
72   *
73   * @type { string }
74   * @default the name of the process
75   * @syscap SystemCapability.Ability.AbilityRuntime.Core
76   * @since 14
77   */
78  processName: string;
79
80  /**
81   * Ability startup time.
82   *
83   * @type { number }
84   * @default ability start time
85   * @syscap SystemCapability.Ability.AbilityRuntime.Core
86   * @since 14
87   */
88  startTime: number;
89
90  /**
91   * Ability status.
92   *
93   * @type { abilityManager.AbilityState }
94   * @default Enumerates state of the ability state info
95   * @syscap SystemCapability.Ability.AbilityRuntime.Core
96   * @since 14
97   */
98  abilityState: abilityManager.AbilityState;
99}
100