• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-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 TestKit
19 */
20
21import { AbilityDelegator as _AbilityDelegator } from './application/AbilityDelegator';
22import { AbilityDelegatorArgs as _AbilityDelegatorArgs } from './application/abilityDelegatorArgs';
23import { AbilityMonitor as _AbilityMonitor } from './application/AbilityMonitor';
24import { AbilityStageMonitor as _AbilityStageMonitor } from './application/AbilityStageMonitor';
25import { ShellCmdResult as _ShellCmdResult } from './application/shellCmdResult';
26
27/**
28 * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered
29 * during application startup.
30 *
31 * @namespace abilityDelegatorRegistry
32 * @syscap SystemCapability.Ability.AbilityRuntime.Core
33 * @since 9
34 */
35/**
36 * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered
37 * during application startup.
38 *
39 * @namespace abilityDelegatorRegistry
40 * @syscap SystemCapability.Ability.AbilityRuntime.Core
41 * @crossplatform
42 * @since 10
43 */
44/**
45 * A global register used to store the AbilityDelegator and AbilityDelegatorArgs objects registered
46 * during application startup.
47 *
48 * @namespace abilityDelegatorRegistry
49 * @syscap SystemCapability.Ability.AbilityRuntime.Core
50 * @crossplatform
51 * @atomicservice
52 * @since arkts {'1.1':'11', '1.2':'20'}
53 * @arkts 1.1&1.2
54 */
55declare namespace abilityDelegatorRegistry {
56  /**
57   * Get the AbilityDelegator object of the application.
58   *
59   * @returns { AbilityDelegator } Return the AbilityDelegator object initialized when the application is started.
60   * @syscap SystemCapability.Ability.AbilityRuntime.Core
61   * @since 9
62   */
63  /**
64   * Get the AbilityDelegator object of the application.
65   *
66   * @returns { AbilityDelegator } Return the AbilityDelegator object initialized when the application is started.
67   * @syscap SystemCapability.Ability.AbilityRuntime.Core
68   * @crossplatform
69   * @since 10
70   */
71  /**
72   * Get the AbilityDelegator object of the application.
73   *
74   * @returns { AbilityDelegator } Return the AbilityDelegator object initialized when the application is started.
75   * @syscap SystemCapability.Ability.AbilityRuntime.Core
76   * @crossplatform
77   * @atomicservice
78   * @since arkts {'1.1':'11', '1.2':'20'}
79   * @arkts 1.1&1.2
80   */
81  function getAbilityDelegator(): AbilityDelegator;
82
83  /**
84   * Get unit test arguments stored in the AbilityDelegatorArgs object.
85   *
86   * @returns { AbilityDelegatorArgs } Return the previously registered AbilityDelegatorArgs object.
87   * @syscap SystemCapability.Ability.AbilityRuntime.Core
88   * @since 9
89   */
90  /**
91   * Get unit test arguments stored in the AbilityDelegatorArgs object.
92   *
93   * @returns { AbilityDelegatorArgs } Return the previously registered AbilityDelegatorArgs object.
94   * @syscap SystemCapability.Ability.AbilityRuntime.Core
95   * @crossplatform
96   * @since 10
97   */
98  /**
99   * Get unit test arguments stored in the AbilityDelegatorArgs object.
100   *
101   * @returns { AbilityDelegatorArgs } Return the previously registered AbilityDelegatorArgs object.
102   * @syscap SystemCapability.Ability.AbilityRuntime.Core
103   * @crossplatform
104   * @atomicservice
105   * @since arkts {'1.1':'11', '1.2':'20'}
106   * @arkts 1.1&1.2
107   */
108  function getArguments(): AbilityDelegatorArgs;
109
110  /**
111   * Describes all lifecycle states of an ability.
112   *
113   * @enum { number }
114   * @syscap SystemCapability.Ability.AbilityRuntime.Core
115   * @since 9
116   */
117  /**
118   * Describes all lifecycle states of an ability.
119   *
120   * @enum { number }
121   * @syscap SystemCapability.Ability.AbilityRuntime.Core
122   * @crossplatform
123   * @since 10
124   */
125  /**
126   * Describes all lifecycle states of an ability.
127   *
128   * @enum { number }
129   * @syscap SystemCapability.Ability.AbilityRuntime.Core
130   * @crossplatform
131   * @atomicservice
132   * @since arkts {'1.1':'11', '1.2':'20'}
133   * @arkts 1.1&1.2
134   */
135  export enum AbilityLifecycleState {
136    /**
137     * Ability is in invalid state.
138     *
139     * @syscap SystemCapability.Ability.AbilityRuntime.Core
140     * @since 9
141     */
142    /**
143     * Ability is in invalid state.
144     *
145     * @syscap SystemCapability.Ability.AbilityRuntime.Core
146     * @crossplatform
147     * @since 10
148     */
149    /**
150     * Ability is in invalid state.
151     *
152     * @syscap SystemCapability.Ability.AbilityRuntime.Core
153     * @crossplatform
154     * @atomicservice
155     * @since arkts {'1.1':'11', '1.2':'20'}
156     * @arkts 1.1&1.2
157     */
158    UNINITIALIZED,
159
160    /**
161     * Ability is in the created state.
162     *
163     * @syscap SystemCapability.Ability.AbilityRuntime.Core
164     * @since 9
165     */
166    /**
167     * Ability is in the created state.
168     *
169     * @syscap SystemCapability.Ability.AbilityRuntime.Core
170     * @crossplatform
171     * @since 10
172     */
173    /**
174     * Ability is in the created state.
175     *
176     * @syscap SystemCapability.Ability.AbilityRuntime.Core
177     * @crossplatform
178     * @atomicservice
179     * @since arkts {'1.1':'11', '1.2':'20'}
180     * @arkts 1.1&1.2
181     */
182    CREATE,
183
184    /**
185     * Ability is in the foreground state.
186     *
187     * @syscap SystemCapability.Ability.AbilityRuntime.Core
188     * @since 9
189     */
190    /**
191     * Ability is in the foreground state.
192     *
193     * @syscap SystemCapability.Ability.AbilityRuntime.Core
194     * @crossplatform
195     * @since 10
196     */
197    /**
198     * Ability is in the foreground state.
199     *
200     * @syscap SystemCapability.Ability.AbilityRuntime.Core
201     * @crossplatform
202     * @atomicservice
203     * @since arkts {'1.1':'11', '1.2':'20'}
204     * @arkts 1.1&1.2
205     */
206    FOREGROUND,
207
208    /**
209     * Ability is in the background state.
210     *
211     * @syscap SystemCapability.Ability.AbilityRuntime.Core
212     * @since 9
213     */
214    /**
215     * Ability is in the background state.
216     *
217     * @syscap SystemCapability.Ability.AbilityRuntime.Core
218     * @crossplatform
219     * @since 10
220     */
221    /**
222     * Ability is in the background state.
223     *
224     * @syscap SystemCapability.Ability.AbilityRuntime.Core
225     * @crossplatform
226     * @atomicservice
227     * @since arkts {'1.1':'11', '1.2':'20'}
228     * @arkts 1.1&1.2
229     */
230    BACKGROUND,
231
232    /**
233     * Ability is in a destroyed state.
234     *
235     * @syscap SystemCapability.Ability.AbilityRuntime.Core
236     * @since 9
237     */
238    /**
239     * Ability is in a destroyed state.
240     *
241     * @syscap SystemCapability.Ability.AbilityRuntime.Core
242     * @crossplatform
243     * @since 10
244     */
245    /**
246     * Ability is in a destroyed state.
247     *
248     * @syscap SystemCapability.Ability.AbilityRuntime.Core
249     * @crossplatform
250     * @atomicservice
251     * @since arkts {'1.1':'11', '1.2':'20'}
252     * @arkts 1.1&1.2
253     */
254    DESTROY
255  }
256
257  /**
258   * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities.
259   *
260   * @syscap SystemCapability.Ability.AbilityRuntime.Core
261   * @since 9
262   */
263  /**
264   * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities.
265   *
266   * @syscap SystemCapability.Ability.AbilityRuntime.Core
267   * @crossplatform
268   * @since 10
269   */
270  /**
271   * A global test utility interface used for adding AbilityMonitor objects and control lifecycle states of abilities.
272   *
273   * @typedef { _AbilityDelegator }
274   * @syscap SystemCapability.Ability.AbilityRuntime.Core
275   * @crossplatform
276   * @atomicservice
277   * @since arkts {'1.1':'11', '1.2':'20'}
278   * @arkts 1.1&1.2
279   */
280  export type AbilityDelegator = _AbilityDelegator;
281
282  /**
283   * Store unit testing-related parameters, including test case names, and test runner name.
284   *
285   * @syscap SystemCapability.Ability.AbilityRuntime.Core
286   * @since 9
287   */
288  /**
289   * Store unit testing-related parameters, including test case names, and test runner name.
290   *
291   * @syscap SystemCapability.Ability.AbilityRuntime.Core
292   * @crossplatform
293   * @since 10
294   */
295  /**
296   * Store unit testing-related parameters, including test case names, and test runner name.
297   *
298   * @typedef { _AbilityDelegatorArgs }
299   * @syscap SystemCapability.Ability.AbilityRuntime.Core
300   * @crossplatform
301   * @atomicservice
302   * @since arkts {'1.1':'11', '1.2':'20'}
303   * @arkts 1.1&1.2
304   */
305  export type AbilityDelegatorArgs = _AbilityDelegatorArgs;
306
307  /**
308   * Provide methods for matching monitored Ability objects that meet specified conditions.
309   * The most recently matched Ability objects will be saved in the AbilityMonitor object.
310   *
311   * @syscap SystemCapability.Ability.AbilityRuntime.Core
312   * @since 9
313   */
314  /**
315   * Provide methods for matching monitored Ability objects that meet specified conditions.
316   * The most recently matched Ability objects will be saved in the AbilityMonitor object.
317   *
318   * @syscap SystemCapability.Ability.AbilityRuntime.Core
319   * @crossplatform
320   * @since 10
321   */
322  /**
323   * Provide methods for matching monitored Ability objects that meet specified conditions.
324   * The most recently matched Ability objects will be saved in the AbilityMonitor object.
325   *
326   * @typedef { _AbilityMonitor }
327   * @syscap SystemCapability.Ability.AbilityRuntime.Core
328   * @crossplatform
329   * @atomicservice
330   * @since arkts {'1.1':'11', '1.2':'20'}
331   * @arkts 1.1&1.2
332   */
333  export type AbilityMonitor = _AbilityMonitor;
334
335  /**
336   * A object that records the result of shell command executes.
337   *
338   * @syscap SystemCapability.Ability.AbilityRuntime.Core
339   * @since 9
340   */
341  /**
342   * A object that records the result of shell command executes.
343   *
344   * @typedef { _ShellCmdResult }
345   * @syscap SystemCapability.Ability.AbilityRuntime.Core
346   * @atomicservice
347   * @since arkts {'1.1':'11', '1.2':'20'}
348   * @arkts 1.1&1.2
349   */
350  export type ShellCmdResult = _ShellCmdResult;
351
352  /**
353   * Provide methods for matching monitored AbilityStage objects that meet specified conditions.
354   * The most recently matched AbilityStage objects will be saved in the AbilityStageMonitor object.
355   *
356   * @typedef { _AbilityStageMonitor }
357   * @syscap SystemCapability.Ability.AbilityRuntime.Core
358   * @crossplatform
359   * @atomicservice
360   * @since arkts {'1.1':'14', '1.2':'20'}
361   * @arkts 1.1&1.2
362   */
363  export type AbilityStageMonitor = _AbilityStageMonitor;
364}
365
366export default abilityDelegatorRegistry;
367