• 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 * as _UIAbilityContext from './application/UIAbilityContext';
22import type * as _UIExtensionContext from './application/UIExtensionContext';
23import type * as _AutoFillExtensionContext from './application/AutoFillExtensionContext';
24import * as _AbilityStageContext from './application/AbilityStageContext';
25import * as _ApplicationContext from './application/ApplicationContext';
26import * as _BaseContext from './application/BaseContext';
27import * as _Context from './application/Context';
28import * as _ExtensionContext from './application/ExtensionContext';
29import * as _FormExtensionContext from './application/FormExtensionContext';
30import * as _ServiceExtensionContext from './application/ServiceExtensionContext';
31import * as _EventHub from './application/EventHub';
32import { PacMap as _PacMap } from './ability/dataAbilityHelper';
33import { AbilityResult as _AbilityResult } from './ability/abilityResult';
34import type _AbilityStartCallback from './application/AbilityStartCallback';
35import { ConnectOptions as _ConnectOptions } from './ability/connectOptions';
36import type * as _VpnExtensionContext from './application/VpnExtensionContext';
37import type { AutoStartupCallback as _AutoStartupCallback } from './application/AutoStartupCallback';
38import type { AutoStartupInfo as _AutoStartupInfo } from './application/AutoStartupInfo';
39import type * as _EmbeddableUIAbilityContext from './application/EmbeddableUIAbilityContext';
40import type * as _PhotoEditorExtensionContext from './application/PhotoEditorExtensionContext';
41
42/**
43 * This module provides application context classes and common data structures.
44 *
45 * @namespace common
46 * @syscap SystemCapability.Ability.AbilityRuntime.Core
47 * @stagemodelonly
48 * @since 9
49 */
50/**
51 * This module provides application context classes and common data structures.
52 *
53 * @namespace common
54 * @syscap SystemCapability.Ability.AbilityRuntime.Core
55 * @stagemodelonly
56 * @crossplatform
57 * @since 10
58 */
59/**
60 * This module provides application context classes and common data structures.
61 *
62 * @namespace common
63 * @syscap SystemCapability.Ability.AbilityRuntime.Core
64 * @crossplatform
65 * @atomicservice
66 * @since 11
67 */
68declare namespace common {
69  /**
70   * The context of an ability. It allows access to ability-specific resources.
71   *
72   * @syscap SystemCapability.Ability.AbilityRuntime.Core
73   * @stagemodelonly
74   * @since 9
75   */
76  /**
77   * The context of an ability. It allows access to ability-specific resources.
78   *
79   * @syscap SystemCapability.Ability.AbilityRuntime.Core
80   * @stagemodelonly
81   * @crossplatform
82   * @since 10
83   */
84  /**
85   * The context of an ability. It allows access to ability-specific resources.
86   *
87   * @typedef { _UIAbilityContext.default }
88   * @syscap SystemCapability.Ability.AbilityRuntime.Core
89   * @stagemodelonly
90   * @crossplatform
91   * @atomicservice
92   * @since 11
93   */
94  export type UIAbilityContext = _UIAbilityContext.default;
95
96  /**
97   * The context of an abilityStage. It allows access to abilityStage-specific resources.
98   *
99   * @syscap SystemCapability.Ability.AbilityRuntime.Core
100   * @stagemodelonly
101   * @since 9
102   */
103  /**
104   * The context of an abilityStage. It allows access to abilityStage-specific resources.
105   *
106   * @syscap SystemCapability.Ability.AbilityRuntime.Core
107   * @stagemodelonly
108   * @crossplatform
109   * @since 10
110   */
111  /**
112   * The context of an abilityStage. It allows access to abilityStage-specific resources.
113   *
114   * @typedef { _AbilityStageContext.default }
115   * @syscap SystemCapability.Ability.AbilityRuntime.Core
116   * @stagemodelonly
117   * @crossplatform
118   * @atomicservice
119   * @since 11
120   */
121  export type AbilityStageContext = _AbilityStageContext.default;
122
123  /**
124   * The context of an application. It allows access to application-specific resources.
125   *
126   * @syscap SystemCapability.Ability.AbilityRuntime.Core
127   * @stagemodelonly
128   * @since 9
129   */
130  /**
131   * The context of an application. It allows access to application-specific resources.
132   *
133   * @syscap SystemCapability.Ability.AbilityRuntime.Core
134   * @stagemodelonly
135   * @crossplatform
136   * @since 10
137   */
138  /**
139   * The context of an application. It allows access to application-specific resources.
140   *
141   * @typedef { _ApplicationContext.default }
142   * @syscap SystemCapability.Ability.AbilityRuntime.Core
143   * @stagemodelonly
144   * @crossplatform
145   * @atomicservice
146   * @since 11
147   */
148  export type ApplicationContext = _ApplicationContext.default;
149
150  /**
151   * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode.
152   *
153   * @syscap SystemCapability.Ability.AbilityRuntime.Core
154   * @stagemodelonly
155   * @since 9
156   */
157  /**
158   * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode.
159   *
160   * @syscap SystemCapability.Ability.AbilityRuntime.Core
161   * @stagemodelonly
162   * @crossplatform
163   * @since 10
164   */
165  /**
166   * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode.
167   *
168   * @typedef { _BaseContext.default }
169   * @syscap SystemCapability.Ability.AbilityRuntime.Core
170   * @stagemodelonly
171   * @crossplatform
172   * @atomicservice
173   * @since 11
174   */
175  export type BaseContext = _BaseContext.default;
176
177  /**
178   * The base context of an ability or an application. It allows access to
179   * application-specific resources.
180   *
181   * @syscap SystemCapability.Ability.AbilityRuntime.Core
182   * @stagemodelonly
183   * @since 9
184   */
185  /**
186   * The base context of an ability or an application. It allows access to
187   * application-specific resources.
188   *
189   * @syscap SystemCapability.Ability.AbilityRuntime.Core
190   * @stagemodelonly
191   * @crossplatform
192   * @since 10
193   */
194  /**
195   * The base context of an ability or an application. It allows access to
196   * application-specific resources.
197   *
198   * @typedef { _Context.default }
199   * @syscap SystemCapability.Ability.AbilityRuntime.Core
200   * @stagemodelonly
201   * @crossplatform
202   * @atomicservice
203   * @since 11
204   */
205  export type Context = _Context.default;
206
207  /**
208   * The context of an extension. It allows access to extension-specific resources.
209   *
210   * @syscap SystemCapability.Ability.AbilityRuntime.Core
211   * @stagemodelonly
212   * @since 9
213   */
214  /**
215   * The context of an extension. It allows access to extension-specific resources.
216   *
217   * @typedef { _ExtensionContext.default }
218   * @syscap SystemCapability.Ability.AbilityRuntime.Core
219   * @stagemodelonly
220   * @atomicservice
221   * @since 11
222   */
223  export type ExtensionContext = _ExtensionContext.default;
224
225  /**
226   * The context of form extension. It allows access to
227   * formExtension-specific resources.
228   *
229   * @syscap SystemCapability.Ability.AbilityRuntime.Core
230   * @stagemodelonly
231   * @since 9
232   */
233  /**
234   * The context of form extension. It allows access to
235   * formExtension-specific resources.
236   *
237   * @typedef { _FormExtensionContext.default }
238   * @syscap SystemCapability.Ability.AbilityRuntime.Core
239   * @stagemodelonly
240   * @atomicservice
241   * @since 11
242   */
243  export type FormExtensionContext = _FormExtensionContext.default;
244
245  /**
246   * The context of service extension. It allows access to
247   * serviceExtension-specific resources.
248   *
249   * @typedef { _ServiceExtensionContext.default }
250   * @syscap SystemCapability.Ability.AbilityRuntime.Core
251   * @systemapi
252   * @stagemodelonly
253   * @since 9
254   */
255  export type ServiceExtensionContext = _ServiceExtensionContext.default;
256
257  /**
258   * The event center of a context, support the subscription and publication of events.
259   *
260   * @syscap SystemCapability.Ability.AbilityRuntime.Core
261   * @stagemodelonly
262   * @since 9
263   */
264  /**
265   * The event center of a context, support the subscription and publication of events.
266   *
267   * @syscap SystemCapability.Ability.AbilityRuntime.Core
268   * @stagemodelonly
269   * @atomicservice
270   * @since 11
271   */
272  /**
273   * The event center of a context, support the subscription and publication of events.
274   *
275   * @typedef { _EventHub.default }
276   * @syscap SystemCapability.Ability.AbilityRuntime.Core
277   * @stagemodelonly
278   * @crossplatform
279   * @atomicservice
280   * @since 12
281   */
282  export type EventHub = _EventHub.default;
283
284  /**
285   * Defines a PacMap object for storing a series of values.
286   *
287   * @syscap SystemCapability.Ability.AbilityRuntime.Core
288   * @stagemodelonly
289   * @since 9
290   */
291  /**
292   * Defines a PacMap object for storing a series of values.
293   *
294   * @typedef { _PacMap }
295   * @syscap SystemCapability.Ability.AbilityRuntime.Core
296   * @atomicservice
297   * @since 11
298   */
299  export type PacMap = _PacMap;
300
301  /**
302   * Indicates the result of startAbility.
303   *
304   * @syscap SystemCapability.Ability.AbilityRuntime.Core
305   * @stagemodelonly
306   * @since 9
307   */
308  /**
309   * Indicates the result of startAbility.
310   *
311   * @typedef { _AbilityResult }
312   * @syscap SystemCapability.Ability.AbilityRuntime.Core
313   * @stagemodelonly
314   * @atomicservice
315   * @since 11
316   */
317  export type AbilityResult = _AbilityResult;
318
319  /**
320   * Indicates the callback of connection
321   *
322   * @typedef { _ConnectOptions }
323   * @syscap SystemCapability.Ability.AbilityRuntime.Core
324   * @stagemodelonly
325   * @since 9
326   */
327  export type ConnectOptions = _ConnectOptions;
328
329  /**
330   * The context of UI extension. It allows access to
331   * UIExtension-specific resources.
332   *
333   * @typedef { _UIExtensionContext.default }
334   * @syscap SystemCapability.Ability.AbilityRuntime.Core
335   * @stagemodelonly
336   * @since 10
337   */
338  export type UIExtensionContext = _UIExtensionContext.default;
339
340  /**
341   * The context of auto fill extension. It allows access to
342   * AutoFillExtension-specific resources.
343   *
344   * @typedef { _AutoFillExtensionContext.default }
345   * @syscap SystemCapability.Ability.AbilityRuntime.Core
346   * @systemapi
347   * @stagemodelonly
348   * @since 11
349   */
350  export type AutoFillExtensionContext = _AutoFillExtensionContext.default;
351
352  /**
353   * The function Called when some error occurred except disconnected from UIAbility or UIExtensionAbility
354   *
355   * @typedef { _AbilityStartCallback }
356   * @syscap SystemCapability.Ability.AbilityRuntime.Core
357   * @stagemodelonly
358   * @atomicservice
359   * @since 11
360   */
361  export type AbilityStartCallback = _AbilityStartCallback;
362
363  /**
364   * The class of auto startup info.
365   *
366   * @typedef { _AutoStartupInfo }
367   * @syscap SystemCapability.Ability.AbilityRuntime.Core
368   * @systemapi
369   * @stagemodelonly
370   * @since 11
371   */
372  export type AutoStartupInfo = _AutoStartupInfo;
373
374  /**
375   * The class of auto startup callback.
376   *
377   * @typedef { _AutoStartupCallback }
378   * @syscap SystemCapability.Ability.AbilityRuntime.Core
379   * @systemapi
380   * @stagemodelonly
381   * @since 11
382   */
383  export type AutoStartupCallback = _AutoStartupCallback;
384
385  /**
386   * The context of vpn extension. It allows access to
387   * vpnExtension-specific resources.
388   * The class of auto startup info.
389   *
390   * @typedef { _VpnExtensionContext.default }
391   * @syscap SystemCapability.Ability.AbilityRuntime.Core
392   * @stagemodelonly
393   * @since 11
394   */
395  export type VpnExtensionContext = _VpnExtensionContext.default;
396
397  /**
398   * The context of an embeddable UIAbility.
399   *
400   * @typedef { _EmbeddableUIAbilityContext.default }
401   * @syscap SystemCapability.Ability.AbilityRuntime.Core
402   * @stagemodelonly
403   * @atomicservice
404   * @since 12
405   */
406  export type EmbeddableUIAbilityContext = _EmbeddableUIAbilityContext.default;
407
408  /**
409   * The context of an photo editor extension ability.
410   *
411   * @typedef { _PhotoEditorExtensionContext.default }
412   * @syscap SystemCapability.Ability.AppExtension.PhotoEditorExtension
413   * @stagemodelonly
414   * @since 12
415   */
416    export type PhotoEditorExtensionContext = _PhotoEditorExtensionContext.default;
417}
418
419export default common;
420