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 16import * as _UIAbilityContext from './application/UIAbilityContext'; 17import type * as _UIExtensionContext from './application/UIExtensionContext'; 18import * as _AbilityStageContext from './application/AbilityStageContext'; 19import * as _ApplicationContext from './application/ApplicationContext'; 20import * as _BaseContext from './application/BaseContext'; 21import * as _Context from './application/Context'; 22import * as _ExtensionContext from './application/ExtensionContext'; 23import * as _FormExtensionContext from './application/FormExtensionContext'; 24import * as _ServiceExtensionContext from './application/ServiceExtensionContext'; 25import * as _EventHub from './application/EventHub'; 26import { PacMap as _PacMap } from './ability/dataAbilityHelper'; 27import { AbilityResult as _AbilityResult } from './ability/abilityResult'; 28import { ConnectOptions as _ConnectOptions } from './ability/connectOptions'; 29 30/** 31 * This module provides application context classes and common data structures. 32 * 33 * @namespace common 34 * @syscap SystemCapability.Ability.AbilityRuntime.Core 35 * @StageModelOnly 36 * @since 9 37 */ 38/** 39 * This module provides application context classes and common data structures. 40 * 41 * @namespace common 42 * @syscap SystemCapability.Ability.AbilityRuntime.Core 43 * @StageModelOnly 44 * @crossplatform 45 * @since 10 46 */ 47declare namespace common { 48 /** 49 * The context of an ability. It allows access to ability-specific resources. 50 * 51 * @syscap SystemCapability.Ability.AbilityRuntime.Core 52 * @StageModelOnly 53 * @since 9 54 */ 55 /** 56 * The context of an ability. It allows access to ability-specific resources. 57 * 58 * @syscap SystemCapability.Ability.AbilityRuntime.Core 59 * @StageModelOnly 60 * @crossplatform 61 * @since 10 62 */ 63 export type UIAbilityContext = _UIAbilityContext.default; 64 65 /** 66 * The context of an abilityStage. It allows access to abilityStage-specific resources. 67 * 68 * @syscap SystemCapability.Ability.AbilityRuntime.Core 69 * @StageModelOnly 70 * @since 9 71 */ 72 /** 73 * The context of an abilityStage. It allows access to abilityStage-specific resources. 74 * 75 * @syscap SystemCapability.Ability.AbilityRuntime.Core 76 * @StageModelOnly 77 * @crossplatform 78 * @since 10 79 */ 80 export type AbilityStageContext = _AbilityStageContext.default; 81 82 /** 83 * The context of an application. It allows access to application-specific resources. 84 * 85 * @syscap SystemCapability.Ability.AbilityRuntime.Core 86 * @StageModelOnly 87 * @since 9 88 */ 89 /** 90 * The context of an application. It allows access to application-specific resources. 91 * 92 * @syscap SystemCapability.Ability.AbilityRuntime.Core 93 * @StageModelOnly 94 * @crossplatform 95 * @since 10 96 */ 97 export type ApplicationContext = _ApplicationContext.default; 98 99 /** 100 * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode. 101 * 102 * @syscap SystemCapability.Ability.AbilityRuntime.Core 103 * @StageModelOnly 104 * @since 9 105 */ 106 /** 107 * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode. 108 * 109 * @syscap SystemCapability.Ability.AbilityRuntime.Core 110 * @StageModelOnly 111 * @crossplatform 112 * @since 10 113 */ 114 export type BaseContext = _BaseContext.default; 115 116 /** 117 * The base context of an ability or an application. It allows access to 118 * application-specific resources. 119 * 120 * @syscap SystemCapability.Ability.AbilityRuntime.Core 121 * @StageModelOnly 122 * @since 9 123 */ 124 /** 125 * The base context of an ability or an application. It allows access to 126 * application-specific resources. 127 * 128 * @syscap SystemCapability.Ability.AbilityRuntime.Core 129 * @StageModelOnly 130 * @crossplatform 131 * @since 10 132 */ 133 export type Context = _Context.default; 134 135 /** 136 * The context of an extension. It allows access to extension-specific resources. 137 * 138 * @syscap SystemCapability.Ability.AbilityRuntime.Core 139 * @StageModelOnly 140 * @since 9 141 */ 142 export type ExtensionContext = _ExtensionContext.default; 143 144 /** 145 * The context of form extension. It allows access to 146 * formExtension-specific resources. 147 * 148 * @syscap SystemCapability.Ability.AbilityRuntime.Core 149 * @StageModelOnly 150 * @since 9 151 */ 152 export type FormExtensionContext = _FormExtensionContext.default; 153 154 /** 155 * The context of service extension. It allows access to 156 * serviceExtension-specific resources. 157 * 158 * @syscap SystemCapability.Ability.AbilityRuntime.Core 159 * @systemapi 160 * @StageModelOnly 161 * @since 9 162 */ 163 export type ServiceExtensionContext = _ServiceExtensionContext.default; 164 165 /** 166 * The event center of a context, support the subscription and publication of events. 167 * 168 * @syscap SystemCapability.Ability.AbilityRuntime.Core 169 * @StageModelOnly 170 * @since 9 171 */ 172 export type EventHub = _EventHub.default; 173 174 /** 175 * Defines a PacMap object for storing a series of values. 176 * 177 * @syscap SystemCapability.Ability.AbilityRuntime.Core 178 * @StageModelOnly 179 * @since 9 180 */ 181 export type PacMap = _PacMap; 182 183 /** 184 * Indicates the result of startAbility. 185 * 186 * @syscap SystemCapability.Ability.AbilityRuntime.Core 187 * @StageModelOnly 188 * @since 9 189 */ 190 export type AbilityResult = _AbilityResult; 191 192 /** 193 * Indicates the callback of connection 194 * 195 * @syscap SystemCapability.Ability.AbilityRuntime.Core 196 * @StageModelOnly 197 * @since 9 198 */ 199 export type ConnectOptions = _ConnectOptions; 200 201 /** 202 * The context of UI extension. It allows access to 203 * UIExtension-specific resources. 204 * 205 * @syscap SystemCapability.Ability.AbilityRuntime.Core 206 * @StageModelOnly 207 * @since 10 208 */ 209 export type UIExtensionContext = _UIExtensionContext.default; 210} 211 212export default common; 213