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