diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index e415e528a9b2f726a1eb5db28f3975f2c898ebb2..dcd2c01ac83f2e2837cf544051376a73e5f8532b 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -489,6 +489,39 @@ declare class HttpAuthHandler { handleCancel(): void; } +/** + * Defines the client certificate request result, related to {@link onClientAuthenticationRequest} method. + * @since 9 + */ + declare class ClientAuthenticationHandler { + /** + * Constructor. + * @since 9 + */ + constructor(); + + /** + * Confirm to use the specified private key and client certificate chain. + * @param priKeyFile The file that store private key. + * @param certChainFile The file that store client certificate chain. + * + * @since 9 + */ + confirm(priKeyFile : string, certChainFile : string): void; + + /** + * Cancel this certificate request. + * @since 9 + */ + cancel(): void; + + /** + * Ignore this certificate request temporarily. + * @since 9 + */ + ignore(): void; +} + /** * Defines the accessible resource type, related to {@link onPermissionRequest} method. * @since 9 @@ -1260,6 +1293,12 @@ declare class WebCookie { * @since 9 */ clearSslCache(): void; + + /** + * Clears the client authentication certificate cache in the Web. + * @since 9 + */ + clearClientAuthenticationCache(): void; } /** @@ -1733,6 +1772,15 @@ declare class WebAttribute extends CommonMethod { * @since 9 */ onSslErrorEventReceive(callback: (event: { handler: SslErrorHandler, error: SslError }) => void): WebAttribute; + + /** + * Triggered when the Web page needs ssl client certificate from the user. + * @param callback The triggered callback when needs ssl client certificate from the user. + * + * @since 9 + */ + onClientAuthenticationRequest(callback: (event: {handler : ClientAuthenticationHandler, host : string, port : number, + keyTypes : Array, issuers : Array}) => void): WebAttribute; } declare const Web: WebInterface; diff --git a/api/@internal/ets/lifecycle.d.ts b/api/@internal/ets/lifecycle.d.ts index b0f9efcbb54fa33ab37dff6c2e15bc487f295475..88a0bce3ec0759de5aaf5797f4e2ba0c3f38de34 100644 --- a/api/@internal/ets/lifecycle.d.ts +++ b/api/@internal/ets/lifecycle.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Want from "../../@ohos.application.want"; +import Want from "../../@ohos.application.Want"; import ResultSet from "../../data/rdb/resultSet"; import { AbilityInfo } from "../../bundle/abilityInfo"; import { DataAbilityResult } from "../../ability/dataAbilityResult"; diff --git a/api/@ohos.ability.featureAbility.d.ts b/api/@ohos.ability.featureAbility.d.ts index f2e673e613ade315cb8443524f635d5d17c8e21d..944d6d321bf4df658cc2725939bf90ecf744ea0c 100644 --- a/api/@ohos.ability.featureAbility.d.ts +++ b/api/@ohos.ability.featureAbility.d.ts @@ -15,7 +15,7 @@ import { AsyncCallback } from './basic'; import { Callback } from './basic'; -import Want from './@ohos.application.want'; +import Want from './@ohos.application.Want'; import { StartAbilityParameter } from './ability/startAbilityParameter'; import { AbilityResult } from './ability/abilityResult'; import { AppVersionInfo as _AppVersionInfo } from './app/appVersionInfo'; diff --git a/api/@ohos.ability.particleAbility.d.ts b/api/@ohos.ability.particleAbility.d.ts index d282b6d82c424c70c9f978eeb4ad95e8807201f5..04321ffcd7a9455510aa33a4ccfaa8ab1c040658 100644 --- a/api/@ohos.ability.particleAbility.d.ts +++ b/api/@ohos.ability.particleAbility.d.ts @@ -18,7 +18,7 @@ import { StartAbilityParameter } from './ability/startAbilityParameter'; import { DataAbilityHelper } from './ability/dataAbilityHelper'; import { NotificationRequest } from './notification/notificationRequest'; import { ConnectOptions } from './ability/connectOptions'; -import Want from './@ohos.application.want'; +import Want from './@ohos.application.Want'; /** * A Particle Ability represents an ability with service. diff --git a/api/@ohos.ability.wantConstant.d.ts b/api/@ohos.ability.wantConstant.d.ts index 5a858dbad2758da173e1d9fd58634d0f7f672373..fabd47f44d36238052d47822a04e4a52583efcf1 100644 --- a/api/@ohos.ability.wantConstant.d.ts +++ b/api/@ohos.ability.wantConstant.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -230,7 +230,47 @@ declare namespace wantConstant { * @since 9 * @systemapi Hide this for inner system use. */ - ACTION_MARKET_CROWDTEST = "ohos.want.action.marketCrowdTest" + ACTION_MARKET_CROWDTEST = "ohos.want.action.marketCrowdTest", + + /** + * Indicates the param of sandbox flag. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_SANDBOX = "ohos.dlp.params.sandbox", + + /** + * Indicates the param of dlp bundle name. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_BUNDLE_NAME = "ohos.dlp.params.bundleName", + + /** + * Indicates the param of dlp module name. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_MODULE_NAME = "ohos.dlp.params.moduleName", + + /** + * Indicates the param of dlp ability name. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_ABILITY_NAME = "ohos.dlp.params.abilityName", + + /** + * Indicates the param of dlp bundle index. + * + * @since 9 + * @systemapi Hide this for inner system use. + */ + DLP_PARAMS_INDEX = "ohos.dlp.params.index" } /** diff --git a/api/@ohos.abilityAccessCtrl.d.ts b/api/@ohos.abilityAccessCtrl.d.ts index 5a1421291fbc5182d6b0ac298fe1bfdd0a0bd9ff..e9561b16fec798aa70a3104bb11274c57e6b481f 100644 --- a/api/@ohos.abilityAccessCtrl.d.ts +++ b/api/@ohos.abilityAccessCtrl.d.ts @@ -144,6 +144,7 @@ import { AsyncCallback, Callback } from './basic'; /** * Enum for permision state change type. + * @systemapi * @since 9 */ export enum PermissionStateChangeType { @@ -161,6 +162,7 @@ import { AsyncCallback, Callback } from './basic'; * Indicates the information of permission state change. * * @name PermissionStateChangeInfo + * @systemapi * @since 9 */ interface PermissionStateChangeInfo { diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts index 8cc1d9a98ccdb0b7105fa96e8b49e149702e337d..834a8ef58d767279399e56eec2936495cedce034 100644 --- a/api/@ohos.application.appManager.d.ts +++ b/api/@ohos.application.appManager.d.ts @@ -29,6 +29,37 @@ import { ProcessRunningInformation as _ProcessRunningInformation } from './appli * @permission N/A */ declare namespace appManager { + /** + * @name ApplicationState + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi Hide this for inner system use. + * @permission N/A + */ + export enum ApplicationState { + STATE_CREATE, + STATE_FOREGROUND, + STATE_ACTIVE, + STATE_BACKGROUND, + STATE_DESTROY + } + + + /** + * @name ProcessState + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi Hide this for inner system use. + * @permission N/A + */ + export enum ProcessState { + STATE_CREATE, + STATE_FOREGROUND, + STATE_ACTIVE, + STATE_BACKGROUND, + STATE_DESTROY + } + /** * Register application state observer. * diff --git a/api/@ohos.application.formProvider.d.ts b/api/@ohos.application.formProvider.d.ts index 049443064be8a1e353b21762ce4c37e7ce856f99..8cf49dc98ac620e949508fa4fb3626613416f911 100644 --- a/api/@ohos.application.formProvider.d.ts +++ b/api/@ohos.application.formProvider.d.ts @@ -16,6 +16,7 @@ import { AsyncCallback } from "./basic"; import formBindingData from "./@ohos.application.formBindingData"; import formInfo from "./@ohos.application.formInfo"; +import Want from './@ohos.application.Want'; /** * interface of formProvider. diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 9d2bfd75d3f014880f12b2be75cef1c9a3ddd921..468be9fb97238214a070f680c72daccf4123437f 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -24,7 +24,7 @@ import { ExtensionAbilityInfo as _ExtensionAbilityInfo } from './bundle/extensio import { PermissionDef as _PermissionDef } from './bundle/PermissionDef'; import { ElementName as _ElementName } from './bundle/elementName'; import { DispatchInfo as _DispatchInfo } from './bundle/dispatchInfo'; -import Want from './@ohos.application.want'; +import Want from './@ohos.application.Want'; import image from './@ohos.multimedia.image'; import pack from './bundle/packInfo'; import * as _PackInfo from './bundle/packInfo'; diff --git a/api/@ohos.effectKit.d.ts b/api/@ohos.effectKit.d.ts index 3164c81f25eaf2dbc74468ec04119524e0653e97..78ffb0c148c94351fdceebeff7ce3583c8e7371d 100644 --- a/api/@ohos.effectKit.d.ts +++ b/api/@ohos.effectKit.d.ts @@ -13,6 +13,9 @@ * limitations under the License. */ +import { AsyncCallback } from './basic'; +import image from './@ohos.multimedia.image'; + /** * @name effectKit * @since 9 diff --git a/api/@ohos.enterpriseDeviceManager.d.ts b/api/@ohos.enterpriseDeviceManager.d.ts index 03fb19c9007e5ea96bdc021bd86a9a8a5040a9dc..273c97f1174fee9f4667838aebe769b198c0706e 100644 --- a/api/@ohos.enterpriseDeviceManager.d.ts +++ b/api/@ohos.enterpriseDeviceManager.d.ts @@ -15,7 +15,7 @@ import { AsyncCallback, Callback } from "./basic"; import { DeviceSettingsManager as _DeviceSettingsManager } from "./enterpriseDeviceManager/DeviceSettingsManager"; -import Want from "./@ohos.application.want"; +import Want from "./@ohos.application.Want"; /** * enterprise device manager. diff --git a/api/@ohos.fileExtensionInfo.d.ts b/api/@ohos.fileExtensionInfo.d.ts index 877d5c4c2ef4e25ab184698512156ccc38bfc4b3..d016f74bc52af58ac158def2e5bc16b1992e198b 100644 --- a/api/@ohos.fileExtensionInfo.d.ts +++ b/api/@ohos.fileExtensionInfo.d.ts @@ -18,12 +18,14 @@ * * @since 9 * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi */ declare namespace fileExtensionInfo { /** * DeviceType Indicates the type of device connected to the fileaccess server. * @since 9 * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi * @StageModelOnly */ enum DeviceType { @@ -40,6 +42,7 @@ declare namespace fileExtensionInfo { * Indicates the supported capabilities of the device. * @since 9 * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi * @StageModelOnly */ namespace DeviceFlag { @@ -51,6 +54,7 @@ declare namespace fileExtensionInfo { * Indicate the supported capabilities of the file or directory. * @since 9 * @syscap SystemCapability.FileManagement.UserFileService + * @systemapi * @StageModelOnly */ namespace DocumentFlag { diff --git a/api/@ohos.fileio.d.ts b/api/@ohos.fileio.d.ts index 46e416e0050f3945cec446c6f50c02190cf38b33..e13dae4b53d4765a96485a94704bd981a2d218a3 100644 --- a/api/@ohos.fileio.d.ts +++ b/api/@ohos.fileio.d.ts @@ -1160,6 +1160,7 @@ declare interface Filter { /** * @type {Array} * @syscap SystemCapability.FileManagement.File.FileIO + * @systemapi * @since 9 * @readonly */ @@ -1167,6 +1168,7 @@ declare interface Filter { /** * @type {Array} * @syscap SystemCapability.FileManagement.File.FileIO + * @systemapi * @since 9 * @readonly */ @@ -1174,6 +1176,7 @@ declare interface Filter { /** * @type {Array} * @syscap SystemCapability.FileManagement.File.FileIO + * @systemapi * @since 9 * @readonly */ @@ -1181,6 +1184,7 @@ declare interface Filter { /** * @type {number} * @syscap SystemCapability.FileManagement.File.FileIO + * @systemapi * @since 9 * @readonly */ @@ -1188,6 +1192,7 @@ declare interface Filter { /** * @type {number} * @syscap SystemCapability.FileManagement.File.FileIO + * @systemapi * @since 9 * @readonly */ @@ -1195,6 +1200,7 @@ declare interface Filter { /** * @type {boolean} * @syscap SystemCapability.FileManagement.File.FileIO + * @systemapi * @since 9 * @readonly */ diff --git a/api/@ohos.net.connection.d.ts b/api/@ohos.net.connection.d.ts index ad31470548326a71072f5f033a80691786475118..8fdc6979627bbbe8998c64d2c733e92516ed7151 100644 --- a/api/@ohos.net.connection.d.ts +++ b/api/@ohos.net.connection.d.ts @@ -47,6 +47,18 @@ declare namespace connection { function getDefaultNet(callback: AsyncCallback): void; function getDefaultNet(): Promise; + /** + * Obtains the data network that is activated by default. + * + *

To call this method, you must have the {@code ohos.permission.GET_NETWORK_INFO} permission. + * + * @return Returns the {@link NetHandle} object; + * returns {@code null} if the default network is not activated. + * @permission ohos.permission.GET_NETWORK_INFO + * @since 9 + */ + function getDefaultNetSync(): NetHandle; + /** * Obtains the list of data networks that are activated. * diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index cf7e702fcd7952bb01f411e0e996508b3ad7890d..6ef00195f9217f8bfb44fda61b4fd0f2d51b22a0 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ import { AsyncCallback } from './basic'; -import Want from './@ohos.application.want'; +import Want from './@ohos.application.Want'; import { image } from './@ohos.multimedia.image'; /** diff --git a/api/@ohos.pluginComponent.d.ts b/api/@ohos.pluginComponent.d.ts index f264256223c464b862d896303e0620daf961d2d2..834ca7614cd182895019a59207a51a9df001b8f8 100644 --- a/api/@ohos.pluginComponent.d.ts +++ b/api/@ohos.pluginComponent.d.ts @@ -14,7 +14,7 @@ */ import { AsyncCallback } from './basic'; -import Want from './@ohos.application.want'; +import Want from './@ohos.application.Want'; /** * Plugin component template property. diff --git a/api/@ohos.telephony.data.d.ts b/api/@ohos.telephony.data.d.ts index a82b90e3dd203f02940c831c92af55e69c970de6..1ca3ce823f77aed38d4cfc72243670bd0c3022db 100644 --- a/api/@ohos.telephony.data.d.ts +++ b/api/@ohos.telephony.data.d.ts @@ -31,6 +31,17 @@ declare namespace data { function getDefaultCellularDataSlotId(callback: AsyncCallback): void; function getDefaultCellularDataSlotId(): Promise; + /** + * Checks whether cellular data services are enabled. + * + *

Requires Permission: {@code ohos.permission.GET_NETWORK_INFO}. + * + * @return Returns default cellular data slot id. + * @permission ohos.permission.GET_NETWORK_INFO + * @since 9 + */ + function getDefaultCellularDataSlotIdSync(): number; + /** * Switches cellular data services to another card, without changing the default settings. * diff --git a/api/@ohos.wantAgent.d.ts b/api/@ohos.wantAgent.d.ts index 27e0b6bfe490fa812a5129de4a8aa2d14ad87799..48a996a4816d4cb917332e965b0ca0d4c0b1f803 100644 --- a/api/@ohos.wantAgent.d.ts +++ b/api/@ohos.wantAgent.d.ts @@ -14,7 +14,7 @@ */ import { AsyncCallback , Callback} from './basic'; -import Want from './@ohos.application.want'; +import Want from './@ohos.application.Want'; import { WantAgentInfo as _WantAgentInfo } from './wantAgent/wantAgentInfo'; import { TriggerInfo as _TriggerInfo } from './wantAgent/triggerInfo'; diff --git a/api/ability/want.d.ts b/api/ability/want.d.ts index 51e6579928be2ea6d566a121d3e9dcebabba2b50..dffea8ddf4591fc075983acb301b60f4182907ce 100644 --- a/api/ability/want.d.ts +++ b/api/ability/want.d.ts @@ -20,6 +20,7 @@ * @syscap SystemCapability.Ability.AbilityBase * @permission N/A * @deprecated since 9 + * @useinstead ohos.application.Want */ export declare interface Want { /** diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index 4febfbf618f68d3c89d0bdefc89d8abdc5b34232..2cce1451eee205b3de3a4296fc8edf05d2c1fa1f 100755 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -/// +/// import { AbilityInfo } from "../bundle/abilityInfo"; import { AbilityResult } from "../ability/abilityResult"; diff --git a/api/application/ApplicationStateObserver.d.ts b/api/application/ApplicationStateObserver.d.ts index 320238f2cadf66d4561a10c75860925bb53098fd..fc5e62e55f3a5b3bfb5248a787f4551fcb69407d 100644 --- a/api/application/ApplicationStateObserver.d.ts +++ b/api/application/ApplicationStateObserver.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -69,6 +69,17 @@ export default class ApplicationStateObserver { * @return - */ onProcessDied(processData: ProcessData): void; + + /** + * Called when process state changes. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param processData Process info. + * @systemapi hide for inner use. + * @return - + */ + onProcessStateChanged(processData: ProcessData): void; } /** diff --git a/api/application/MissionSnapshot.d.ts b/api/application/MissionSnapshot.d.ts index 3fa0dd05878ad1bb7db96bcb761bfd91b50b15f7..eec0f49c6b443ed78d9a3078aea8f6f4693a018c 100644 --- a/api/application/MissionSnapshot.d.ts +++ b/api/application/MissionSnapshot.d.ts @@ -14,7 +14,7 @@ */ import { ElementName } from '../bundle/elementName'; -import { image } from '../@ohos.multimedia.image'; +import image from '../@ohos.multimedia.image'; /** * Mission snapshot corresponding to mission. diff --git a/api/application/ProcessData.d.ts b/api/application/ProcessData.d.ts index e96fe473aeb76300f0dc17f7c8fed921f104fadf..9244839db546ab8f1248a7f19d5286c3ec437290 100644 --- a/api/application/ProcessData.d.ts +++ b/api/application/ProcessData.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -48,4 +48,31 @@ export default class ProcessData { * @systemapi hide for inner use. */ uid: number; + + /** + * The process state. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + */ + state: number; + + /** + * Whether the process is continuous task. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + */ + isContinuousTask: boolean; + + /** + * Whether the process is keep alive. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + */ + isKeepAlive: boolean; } \ No newline at end of file diff --git a/api/enterpriseDeviceManager/DeviceSettingsManager.d.ts b/api/enterpriseDeviceManager/DeviceSettingsManager.d.ts index d670189b3989d3e3427297f25d1b789c339aad24..c29c0dda15f0914d3d49df606b81687b93eea872 100644 --- a/api/enterpriseDeviceManager/DeviceSettingsManager.d.ts +++ b/api/enterpriseDeviceManager/DeviceSettingsManager.d.ts @@ -14,7 +14,7 @@ */ import { AsyncCallback, Callback } from "./../basic"; -import Want from "./../@ohos.application.want"; +import Want from "./../@ohos.application.Want"; /** * @name Offers set settings policies on the devices. diff --git a/api/wantAgent/triggerInfo.d.ts b/api/wantAgent/triggerInfo.d.ts index 20e1d1b009044078a276802aa1a8f1a268289daa..8da1a958774314f90eba6d9e5d60220c033c720b 100644 --- a/api/wantAgent/triggerInfo.d.ts +++ b/api/wantAgent/triggerInfo.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Want from '../@ohos.application.want'; +import Want from '../@ohos.application.Want'; /** * Provides the information required for triggering a WantAgent. diff --git a/api/wantAgent/wantAgentInfo.d.ts b/api/wantAgent/wantAgentInfo.d.ts index 52cc3383bd51cb4d89a0e53e7e76d2b23a6e34ec..7f06e33be5b77e6cee22d65c194194cd74610d18 100644 --- a/api/wantAgent/wantAgentInfo.d.ts +++ b/api/wantAgent/wantAgentInfo.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import Want from '../@ohos.application.want'; +import Want from '../@ohos.application.Want'; import wantAgent from '../@ohos.wantAgent' /**