1/* 2 * Copyright (c) 2022 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 16import * as _UIAbilityContext from './application/UIAbilityContext'; 17import * as _AbilityStageContext from './application/AbilityStageContext'; 18import * as _ApplicationContext from './application/ApplicationContext'; 19import * as _BaseContext from './application/BaseContext'; 20import * as _Context from './application/Context'; 21import * as _ExtensionContext from './application/ExtensionContext'; 22import * as _FormExtensionContext from './application/FormExtensionContext'; 23import * as _ServiceExtensionContext from './application/ServiceExtensionContext'; 24import * as _EventHub from './application/EventHub'; 25import { PacMap as _PacMap } from "./ability/dataAbilityHelper"; 26import { AbilityResult as _AbilityResult } from "./ability/abilityResult"; 27import { ConnectOptions as _ConnectOptions } from "./ability/connectOptions"; 28 29/** 30 * This module provides application context classes and common data structures. 31 * @syscap SystemCapability.Ability.AbilityRuntime.Core 32 * @StageModelOnly 33 * @since 9 34 */ 35declare namespace common { 36 37 /** 38 * The context of an ability. It allows access to ability-specific resources. 39 * @syscap SystemCapability.Ability.AbilityRuntime.Core 40 * @StageModelOnly 41 * @since 9 42 */ 43 export type UIAbilityContext = _UIAbilityContext.default 44 45 /** 46 * The context of an abilityStage. It allows access to abilityStage-specific resources. 47 * @syscap SystemCapability.Ability.AbilityRuntime.Core 48 * @StageModelOnly 49 * @since 9 50 */ 51 export type AbilityStageContext = _AbilityStageContext.default 52 53 /** 54 * The context of an application. It allows access to application-specific resources. 55 * @syscap SystemCapability.Ability.AbilityRuntime.Core 56 * @StageModelOnly 57 * @since 9 58 */ 59 export type ApplicationContext = _ApplicationContext.default 60 61 /** 62 * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode. 63 * @syscap SystemCapability.Ability.AbilityRuntime.Core 64 * @since 9 65 */ 66 export type BaseContext = _BaseContext.default 67 68 /** 69 * The base context of an ability or an application. It allows access to 70 * application-specific resources. 71 * @syscap SystemCapability.Ability.AbilityRuntime.Core 72 * @StageModelOnly 73 * @since 9 74 */ 75 export type Context = _Context.default 76 77 /** 78 * The context of an extension. It allows access to extension-specific resources. 79 * @syscap SystemCapability.Ability.AbilityRuntime.Core 80 * @StageModelOnly 81 * @since 9 82 */ 83 export type ExtensionContext = _ExtensionContext.default 84 85 /** 86 * The context of form extension. It allows access to 87 * formExtension-specific resources. 88 * @syscap SystemCapability.Ability.AbilityRuntime.Core 89 * @StageModelOnly 90 * @since 9 91 */ 92 export type FormExtensionContext = _FormExtensionContext.default 93 94 /** 95 * The context of service extension. It allows access to 96 * serviceExtension-specific resources. 97 * @syscap SystemCapability.Ability.AbilityRuntime.Core 98 * @systemapi 99 * @StageModelOnly 100 * @since 9 101 */ 102 export type ServiceExtensionContext = _ServiceExtensionContext.default 103 104 /** 105 * The event center of a context, support the subscription and publication of events. 106 * @syscap SystemCapability.Ability.AbilityRuntime.Core 107 * @StageModelOnly 108 * @since 9 109 */ 110 export type EventHub = _EventHub.default 111 112 /** 113 * Defines a PacMap object for storing a series of values. 114 * @syscap SystemCapability.Ability.AbilityRuntime.Core 115 * @StageModelOnly 116 * @since 9 117 */ 118 export type PacMap = _PacMap 119 120 /** 121 * Indicates the result of startAbility. 122 * @syscap SystemCapability.Ability.AbilityRuntime.Core 123 * @StageModelOnly 124 * @since 9 125 */ 126 export type AbilityResult = _AbilityResult 127 128 /** 129 * Indicates the callback of connection 130 * @syscap SystemCapability.Ability.AbilityRuntime.Core 131 * @StageModelOnly 132 * @since 9 133 */ 134 export type ConnectOptions = _ConnectOptions 135} 136 137export default common; 138