From dc615f628410e3142702ade7a5b93889d42bc6b4 Mon Sep 17 00:00:00 2001 From: dy_study Date: Tue, 15 Mar 2022 21:06:36 +0800 Subject: [PATCH] IssueNo:#I4XZVM Description:remove aafwk api9 interface Sig:SIG_ApplicationFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: dy_study Change-Id: Idf0074d6913c464ab31c6c56931b55f8fc710396 --- api/@ohos.application.Ability.d.ts | 253 ------------------ api/@ohos.application.AbilityConstant.d.ts | 93 ------- api/@ohos.application.AbilityStage.d.ts | 71 ----- api/@ohos.application.Configuration.d.ts | 24 -- ...hos.application.ConfigurationConstant.d.ts | 28 -- api/@ohos.application.FormExtension.d.ts | 125 --------- api/@ohos.application.ServiceExtAbility.d.ts | 113 -------- ...s.application.ServiceExtensionAbility.d.ts | 126 --------- api/@ohos.application.StartOptions.d.ts | 43 --- api/@ohos.application.abilityManager.d.ts | 13 - api/@ohos.application.formProvider.d.ts | 2 +- ...ohos.application.uriPermissionManager.d.ts | 41 --- api/application/AbilityContext.d.ts | 235 ---------------- api/application/AbilityStageContext.d.ts | 47 ---- api/application/Context.d.ts | 160 ----------- api/application/EventHub.d.ts | 60 ----- api/application/ExtAbilityContext.d.ts | 37 --- api/application/ExtensionContext.d.ts | 47 ---- api/application/ExtensionRunningInfo.d.ts | 75 ------ api/application/FormExtensionContext.d.ts | 45 ---- api/application/PermissionRequestResult.d.ts | 43 --- api/application/ServiceExtAbilityContext.d.ts | 120 --------- api/application/ServiceExtensionContext.d.ts | 133 --------- api/application/abilityDelegator.d.ts | 84 ------ api/application/abilityMonitor.d.ts | 91 ------- 25 files changed, 1 insertion(+), 2108 deletions(-) delete mode 100755 api/@ohos.application.Ability.d.ts delete mode 100644 api/@ohos.application.AbilityConstant.d.ts delete mode 100644 api/@ohos.application.AbilityStage.d.ts delete mode 100644 api/@ohos.application.FormExtension.d.ts delete mode 100644 api/@ohos.application.ServiceExtAbility.d.ts delete mode 100644 api/@ohos.application.ServiceExtensionAbility.d.ts delete mode 100644 api/@ohos.application.StartOptions.d.ts delete mode 100644 api/@ohos.application.uriPermissionManager.d.ts delete mode 100755 api/application/AbilityContext.d.ts delete mode 100644 api/application/AbilityStageContext.d.ts delete mode 100755 api/application/Context.d.ts delete mode 100644 api/application/EventHub.d.ts delete mode 100644 api/application/ExtAbilityContext.d.ts delete mode 100644 api/application/ExtensionContext.d.ts delete mode 100644 api/application/ExtensionRunningInfo.d.ts delete mode 100644 api/application/FormExtensionContext.d.ts delete mode 100755 api/application/PermissionRequestResult.d.ts delete mode 100644 api/application/ServiceExtAbilityContext.d.ts delete mode 100644 api/application/ServiceExtensionContext.d.ts delete mode 100644 api/application/abilityMonitor.d.ts diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts deleted file mode 100755 index ffa692bf33..0000000000 --- a/api/@ohos.application.Ability.d.ts +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import AbilityConstant from "./@ohos.application.AbilityConstant"; -import AbilityContext from "./application/AbilityContext"; -import Want from './@ohos.application.Want'; -import window from './@ohos.window'; -import { Configuration } from './@ohos.application.Configuration'; -import rpc from '/@ohos.rpc'; - -/** - * The interface of a Caller. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @permission N/A - * @StageModelOnly - */ - interface Caller { - /** - * Notify the server of Sequenceable type data. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @StageModelOnly - */ - call(method: string, data: rpc.Sequenceable): Promise; - - /** - * Notify the server of Sequenceable type data and return the notification result. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * return Sequenceable data - * @StageModelOnly - */ - callWithResult(method: string, data: rpc.Sequenceable): Promise; - - /** - * Clear service records. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * return Sequenceable data - * @StageModelOnly - */ - release(): void; - - /** - * Register death listener notification callback. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * return Sequenceable data - * @StageModelOnly - */ - onRelease(callback: function): void; - } - - /** - * The interface of a Callee. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @permission N/A - * @StageModelOnly - */ - interface Callee { - - /** - * Register data listener callback. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @StageModelOnly - */ - on(method: string, callback: function): void; - - /** - * Unregister data listener callback. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @StageModelOnly - */ - off(method: string): void; - } - -/** - * The class of an ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @permission N/A - * @StageModelOnly - */ -export default class Ability { - /** - * Indicates configuration information about an ability context. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @StageModelOnly - */ - context: AbilityContext; - - /** - * Indicates ability launch want. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @StageModelOnly - */ - launchWant: Want; - - /** - * Indicates ability last request want. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @StageModelOnly - */ - lastRequestWant: Want; - - /** - * Call Service Stub Object. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @StageModelOnly - */ - callee: Callee; - - /** - * Called back when an ability is started for initialization. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @param want Indicates the want info of the created ability. - * @param param Indicates the launch param. - * @return - - * @StageModelOnly - */ - onCreate(want: Want, param: AbilityConstant.LaunchParam): void; - - /** - * Called back when an ability window stage is created. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @param windowStage Indicates the created WindowStage. - * @return - - * @StageModelOnly - */ - onWindowStageCreate(windowStage: window.WindowStage): void; - - /** - * Called back when an ability window stage is destroyed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @return - - * @StageModelOnly - */ - onWindowStageDestroy(): void; - - /** - * Called back when an ability window stage is restored. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @param windowStage window stage to restore - * @return - - * @StageModelOnly - */ - onWindowStageRestore(windowStage: window.WindowStage): void; - - /** - * Called back before an ability is destroyed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @return - - * @StageModelOnly - */ - onDestroy(): void; - - /** - * Called back when the state of an ability changes to foreground. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @return - - * @StageModelOnly - */ - onForeground(): void; - - /** - * Called back when the state of an ability changes to background. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @return - - * @StageModelOnly - */ - onBackground(): void; - - /** - * Called back when an ability prepares to continue. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @param wantParam Indicates the want parameter. - * @return 0 if ability agrees to continue and saves data successfully, otherwise errcode. - * @StageModelOnly - */ - onContinue(wantParam : {[key: string]: any}): AbilityConstant.OnContinueResult; - - /** - * Called when the launch mode of an ability is set to singleton. - * This happens when you re-launch an ability that has been at the top of the ability stack. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @param want Indicates the want info of ability. - * @return - - * @StageModelOnly - */ - onNewWant(want: Want): void; - - /** - * Called when the system configuration is updated. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @param config Indicates the updated configuration. - * @return - - * @StageModelOnly - */ - onConfigurationUpdated(config: Configuration): void; -} diff --git a/api/@ohos.application.AbilityConstant.d.ts b/api/@ohos.application.AbilityConstant.d.ts deleted file mode 100644 index 518bac32dc..0000000000 --- a/api/@ohos.application.AbilityConstant.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The definition of AbilityConstant. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -declare namespace AbilityConstant { - /** - * Interface of launch param. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - export interface LaunchParam { - /** - * Indicates launch reason. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - launchReason: LaunchReason; - - /** - * Indicates last exit reason. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - lastExitReason: LastExitReason; - } - - /** - * Type of launch reason. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - export enum LaunchReason { - UNKNOWN = 0, - START_ABILITY = 1, - CALL = 2, - CONTINUATION = 3, - } - - /** - * Type of last exit reason. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - export enum LastExitReason { - UNKNOWN = 0, - ABILITY_NOT_RESPONDING = 1, - NORMAL = 2, - } - - /** - * Type of onContinue result. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - export enum OnContinueResult { - AGREE = 0, - REJECT = 1, - MISMATCH = 2, - } -} - -export default AbilityConstant diff --git a/api/@ohos.application.AbilityStage.d.ts b/api/@ohos.application.AbilityStage.d.ts deleted file mode 100644 index ae3a53612f..0000000000 --- a/api/@ohos.application.AbilityStage.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import AbilityStageContext from "./application/AbilityStageContext"; -import Want from './@ohos.application.Want'; -import { Configuration } from './@ohos.application.Configuration'; - -/** - * The class of an ability stage. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class AbilityStage { - /** - * Indicates configuration information about context. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - context: AbilityStageContext; - - /** - * Called back when an ability stage is started for initialization. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return - - * @StageModelOnly - */ - onCreate(): void; - - /** - * Called back when start specified ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want info of startd ability. - * @return The user returns an ability string ID. If the ability of this ID has been started before, - * do not create a new instance and pull it back to the top of the stack. - * Otherwise, create a new instance and start it. - * @StageModelOnly - */ - onAcceptWant(want: Want): string; - - /** - * Called when the system configuration is updated. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param config Indicates the updated configuration. - * @return - - * @StageModelOnly - */ - onConfigurationUpdated(config: Configuration): void; -} diff --git a/api/@ohos.application.Configuration.d.ts b/api/@ohos.application.Configuration.d.ts index f00b528ddf..81c19fd0db 100644 --- a/api/@ohos.application.Configuration.d.ts +++ b/api/@ohos.application.Configuration.d.ts @@ -39,28 +39,4 @@ export interface Configuration { * @syscap SystemCapability.Ability.AbilityBase */ colorMode: ConfigurationConstant.ColorMode; - - /** - * Indicates the screen direction of the current device. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityBase - */ - direction: ConfigurationConstant.Direction; - - /** - * Indicates the screen density of the current device. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityBase - */ - screenDensity: ConfigurationConstant.ScreenDensity; - - /** - * Indicates the displayId of the current device. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityBase - */ - displayId: number; } diff --git a/api/@ohos.application.ConfigurationConstant.d.ts b/api/@ohos.application.ConfigurationConstant.d.ts index cdf3b32724..617e00c3b0 100644 --- a/api/@ohos.application.ConfigurationConstant.d.ts +++ b/api/@ohos.application.ConfigurationConstant.d.ts @@ -32,34 +32,6 @@ COLOR_MODE_DARK = 0, COLOR_MODE_LIGHT = 1, } - - /** - * @name Direction - * @since 9 - * @syscap SystemCapability.Ability.AbilityBase - * @permission N/A - */ - export enum Direction { - DIRECTION_NOT_SET = -1, - DIRECTION_VERTICAL = 0, - DIRECTION_HORIZONTAL = 1, - } - - /** - * @name ScreenDensity - * @since 9 - * @syscap SystemCapability.Ability.AbilityBase - * @permission N/A - */ - export enum ScreenDensity { - SCREEN_DENSITY_NOT_SET = 0, - SCREEN_DENSITY_SDPI = 120, - SCREEN_DENSITY_MDPI = 160, - SCREEN_DENSITY_LDPI = 240, - SCREEN_DENSITY_XLDPI = 320, - SCREEN_DENSITY_XXLDPI = 480, - SCREEN_DENSITY_XXXLDPI = 640, - } } export default ConfigurationConstant diff --git a/api/@ohos.application.FormExtension.d.ts b/api/@ohos.application.FormExtension.d.ts deleted file mode 100644 index 63862c0c22..0000000000 --- a/api/@ohos.application.FormExtension.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import formBindingData from './@ohos.application.formBindingData'; -import FormExtensionContext from "./application/FormExtensionContext"; -import Want from './@ohos.application.Want'; -import { Configuration } from './@ohos.application.Configuration'; - -/** - * class of form extension. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @StageModelOnly - */ -export default class FormExtension { - /** - * Indicates form extension context. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @StageModelOnly - */ - context: FormExtensionContext; - - /** - * Called to return a {@link formBindingData#FormBindingData} object. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @param want Indicates the detailed information for creating a {@link formBindingData#FormBindingData}. - * The {@code Want} object must include the form ID, form name, and grid style of the form. - * Such form information must be managed as persistent data for further form - * acquisition, update, and deletion. - * @return Returns the created {@link formBindingData#FormBindingData} object. - * @StageModelOnly - */ - onCreate(want: Want): formBindingData.FormBindingData; - - /** - * Called when the form provider is notified that a temporary form is successfully converted to a normal form. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @param formId Indicates the ID of the form. - * @return - - * @StageModelOnly - */ - onCastToNormal(formId: string): void; - - /** - * Called to notify the form provider to update a specified form. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @param formId Indicates the ID of the form to update. - * @return - - * @StageModelOnly - */ - onUpdate(formId: string): void; - - /** - * Called when the form provider receives form events from the system. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @param newStatus Indicates the form events occurred. The key in the {@code Map} object indicates the form ID, - * and the value indicates the event type, which can be either {@link formManager#VisibilityType#FORM_VISIBLE} - * or {@link formManager#VisibilityType#FORM_INVISIBLE}. {@link formManager#VisibilityType#FORM_VISIBLE} - * means that the form becomes visible, and {@link formManager#VisibilityType#FORM_INVISIBLE} - * means that the form becomes invisible. - * @return - - * @StageModelOnly - */ - onVisibilityChange(newStatus: { [key: string]: number }): void; - - /** - * Called when a specified message event defined by the form provider is triggered. This method is valid only for - * JS forms. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @param formId Indicates the ID of the form on which the message event is triggered, which is provided by - * the client to the form provider. - * @param message Indicates the value of the {@code params} field of the message event. This parameter is - * used to identify the specific component on which the event is triggered. - * @return - - * @StageModelOnly - */ - onEvent(formId: string, message: string): void; - - /** - * Called to notify the form provider that a specified form has been destroyed. Override this method if - * you want your application, as the form provider, to be notified of form deletion. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @param formId Indicates the ID of the destroyed form. - * @return - - * @StageModelOnly - */ - onDestroy(formId: string): void; - - /** - * Called when the system configuration is updated. - * - * @since 9 - * @syscap SystemCapability.Ability.Form - * @return - - * @StageModelOnly - */ - onConfigurationUpdated(config: Configuration): void; -} \ No newline at end of file diff --git a/api/@ohos.application.ServiceExtAbility.d.ts b/api/@ohos.application.ServiceExtAbility.d.ts deleted file mode 100644 index c87682539c..0000000000 --- a/api/@ohos.application.ServiceExtAbility.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2021 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import rpc from "./@ohos.rpc"; -import ServiceExtAbilityContext from "./application/ServiceExtAbilityContext"; -import Want from './@ohos.application.Want'; - -/** - * class of service extension ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @StageModelOnly - */ -export default class ServiceExtAbility { - /** - * Indicates service extension ability context. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @StageModelOnly - */ - context: ServiceExtAbilityContext; - - /** - * Called back when a service extension is started for initialization. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onCreate(want: Want): void; - - /** - * Called back before a service extension is destroyed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onDestroy(): void; - - /** - * Called back when a service extension is started. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want of service extension to start. - * @param startId Indicates the number of times the service extension has been started. The {@code startId} is - * incremented by 1 every time the service extension is started. For example, if the service extension - * has been started for six times. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onRequest(want: Want, startId: number): void; - - /** - * Called back when a service extension is first connected to an ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates connection information about the Service ability. - * @systemapi hide for inner use. - * @return Returns the proxy of the Service ability. - * @StageModelOnly - */ - onConnect(want: Want): rpc.RemoteObject; - - /** - * Called back when all abilities connected to a service extension are disconnected. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates disconnection information about the service extension. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onDisconnect(want: Want): void; - - /** - * Called when a new client attempts to connect to a service extension after all previous client connections to it - * are disconnected. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want of the service extension being connected. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onReconnect(want: Want): void; -} - diff --git a/api/@ohos.application.ServiceExtensionAbility.d.ts b/api/@ohos.application.ServiceExtensionAbility.d.ts deleted file mode 100644 index d4d06bc404..0000000000 --- a/api/@ohos.application.ServiceExtensionAbility.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import rpc from "./@ohos.rpc"; -import ServiceExtensionContext from "./application/ServiceExtensionContext"; -import Want from './@ohos.application.Want'; -import { Configuration } from './@ohos.application.Configuration'; - -/** - * class of service extension ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @StageModelOnly - */ -export default class ServiceExtensionAbility { - /** - * Indicates service extension ability context. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @StageModelOnly - */ - context: ServiceExtensionContext; - - /** - * Called back when a service extension is started for initialization. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want of created service extension. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onCreate(want: Want): void; - - /** - * Called back before a service extension is destroyed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onDestroy(): void; - - /** - * Called back when a service extension is started. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want of service extension to start. - * @param startId Indicates the number of times the service extension has been started. The {@code startId} is - * incremented by 1 every time the service extension is started. For example, if the service extension - * has been started for six times. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onRequest(want: Want, startId: number): void; - - /** - * Called back when a service extension is first connected to an ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates connection information about the Service ability. - * @systemapi hide for inner use. - * @return Returns the proxy of the Service ability. - * @StageModelOnly - */ - onConnect(want: Want): rpc.RemoteObject; - - /** - * Called back when all abilities connected to a service extension are disconnected. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates disconnection information about the service extension. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onDisconnect(want: Want): void; - - /** - * Called when a new client attempts to connect to a service extension after all previous client connections to it - * are disconnected. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want of the service extension being connected. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - onReconnect(want: Want): void; - - /** - * Called when the system configuration is updated. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param config Indicates the updated configuration. - * @return - - * @StageModelOnly - */ - onConfigurationUpdated(config: Configuration): void; -} - diff --git a/api/@ohos.application.StartOptions.d.ts b/api/@ohos.application.StartOptions.d.ts deleted file mode 100644 index b4cd41bbce..0000000000 --- a/api/@ohos.application.StartOptions.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2021 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * StartOptions is the basic communication component of the system. - * - * @name StartOptions - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class StartOptions { - /** - * windowMode - * @default - - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - windowMode?: number; - - /** - * displayId - * @default - - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - displayId?: number; -} \ No newline at end of file diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts index 5221fc08a0..73335bb264 100644 --- a/api/@ohos.application.abilityManager.d.ts +++ b/api/@ohos.application.abilityManager.d.ts @@ -65,19 +65,6 @@ declare namespace abilityManager { */ function getAbilityRunningInfos(): Promise>; function getAbilityRunningInfos(callback: AsyncCallback>): void; - - /** - * Get information about running extensions - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param upperLimit Get the maximum limit of the number of messages - * @systemapi Hide this for inner system use. - * @return Returns the array of {@link ExtensionRunningInfo}. - * @permission ohos.permission.GET_RUNNING_INFO - */ - function getExtensionRunningInfos(upperLimit: number): Promise>; - function getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void; } export default abilityManager; \ No newline at end of file diff --git a/api/@ohos.application.formProvider.d.ts b/api/@ohos.application.formProvider.d.ts index e0961bbf0f..fa294de340 100644 --- a/api/@ohos.application.formProvider.d.ts +++ b/api/@ohos.application.formProvider.d.ts @@ -20,7 +20,7 @@ import formBindingData from "./@ohos.application.formBindingData"; * interface of formProvider. * * @name formProvider - * @since 9 + * @since 8 * @syscap SystemCapability.Ability.Form */ declare namespace formProvider { diff --git a/api/@ohos.application.uriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts deleted file mode 100644 index 37cd85441c..0000000000 --- a/api/@ohos.application.uriPermissionManager.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AsyncCallback } from './basic'; -import wantConstant from "./@ohos.ability.wantConstant"; - -/** - * The management class for uri of file. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - */ -declare namespace uriPermissionManager { - /** - * Check whether the application corresponding to the accesstokenID has access rights to the URI. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param uri File URI. - * @param flag wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION or wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION - * @param accessTokenId Indicates the access token of the application. - * @return Returns 0 if the verification is successful, otherwise returns -1. - */ - function verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number, callback: AsyncCallback): void; - function verifyUriPermission(uri: string, flag: wantConstant.Flags, accessTokenId: number): Promise; -} - -export default uriPermissionManager; \ No newline at end of file diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts deleted file mode 100755 index 1e12eaa959..0000000000 --- a/api/application/AbilityContext.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AbilityInfo } from "../bundle/abilityInfo"; -import { AbilityResult } from "../ability/abilityResult"; -import { AsyncCallback } from "../basic"; -import { ConnectOptions } from "../ability/connectOptions"; -import { HapModuleInfo } from "../bundle/hapModuleInfo"; -import Context from "./Context"; -import Want from "../@ohos.application.Want"; -import StartOptions from "../@ohos.application.StartOptions"; -import PermissionRequestResult from "./PermissionRequestResult"; -import { Configuration } from '../@ohos.application.Configuration'; -import Caller from '../@ohos.application.Ability'; -import { ContentStorage } from '../@internal/component/ets/state_management'; - -/** - * The context of an ability. It allows access to ability-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class AbilityContext extends Context { - /** - * Indicates configuration information about an ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - abilityInfo: AbilityInfo; - - /** - * Indicates configuration information about an module. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - currentHapModuleInfo: HapModuleInfo; - - /** - * Indicates configuration information. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - config: Configuration; - - /** - * Starts a new ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the ability to start. - * @param options Indicates the start options. - * @return - - * @StageModelOnly - */ - startAbility(want: Want, callback: AsyncCallback): void; - startAbility(want: Want, options: StartOptions, callback: AsyncCallback): void; - startAbility(want: Want, options?: StartOptions): Promise; - - /** - * Get the caller object of the startup capability - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the ability to start. - * @return Returns to the Caller interface on success Returns empty or undefined on failure - * @StageModelOnly - */ - startAbilityByCall(want: Want): Promise; - - /** - * Starts a new ability with account. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want info to start. - * @param accountId Indicates the account to start. - * @param options Indicates the start options. - * @systemapi hide for inner use. - * @return - - * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @StageModelOnly - */ - startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; - startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; - startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise; - - /** - * Starts an ability and returns the execution result when the ability is destroyed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the ability to start. - * @param options Indicates the start options. - * @return Returns the {@link AbilityResult}. - * @StageModelOnly - */ - startAbilityForResult(want: Want, callback: AsyncCallback): void; - startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback): void; - startAbilityForResult(want: Want, options?: StartOptions): Promise; - - /** - * Starts an ability and returns the execution result when the ability is destroyed with account. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want Indicates the want info to start. - * @param accountId Indicates the account to start. - * @param options Indicates the start options. - * @systemapi hide for inner use. - * @return Returns the {@link AbilityResult}. - * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @StageModelOnly - */ - startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; - startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; - startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise; - - /** - * Destroys this Page ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return - - * @StageModelOnly - */ - terminateSelf(callback: AsyncCallback): void; - terminateSelf(): Promise; - - /** - * Sets the result code and data to be returned by this Page ability to the caller - * and destroys this Page ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param parameter Indicates the result to return. - * @return - - * @StageModelOnly - */ - terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback): void; - terminateSelfWithResult(parameter: AbilityResult): Promise; - - /** - * Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want The element name of the service ability - * @param options The remote object instance - * @hide hide for inner use. - * @return Returns the number code of the ability connected - * @StageModelOnly - */ - connectAbility(want: Want, options: ConnectOptions): number; - - /** - * Connects the current ability to an ability using the AbilityInfo.AbilityType.SERVICE template with account. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param want The element name of the service ability - * @param accountId The account to connect - * @param options The remote object instance - * @systemapi hide for inner use. - * @return Returns the number code of the ability connected - * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @StageModelOnly - */ - connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; - - /** - * The callback interface was connect successfully. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param connection The number code of the ability connected - * @hide hide for inner use. - * @StageModelOnly - */ - disconnectAbility(connection: number, callback:AsyncCallback): void; - disconnectAbility(connection: number): Promise; - - /** - * Set mission label of current ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param label The label of ability that showed in recent missions. - * @StageModelOnly - */ - setMissionLabel(label: string, callback:AsyncCallback): void; - setMissionLabel(label: string): Promise; - - /** - * Requests certain permissions from the system. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param permissions Indicates the list of permissions to be requested. This parameter cannot be null or empty. - * @return Returns the {@link PermissionRequestResult}. - * @StageModelOnly - */ - requestPermissionsFromUser(permissions: Array, requestCallback: AsyncCallback) : void; - requestPermissionsFromUser(permissions: Array) : Promise; - - /** - * Restore window stage data in ability continuation - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param contentStorage the storage data used to restore window stage - * @StageModelOnly - */ - restoreWindowStage(contentStorage: ContentStorage) : void; - -} \ No newline at end of file diff --git a/api/application/AbilityStageContext.d.ts b/api/application/AbilityStageContext.d.ts deleted file mode 100644 index 4b2777b37d..0000000000 --- a/api/application/AbilityStageContext.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { HapModuleInfo } from "../bundle/hapModuleInfo"; -import { Configuration } from '../@ohos.application.Configuration'; -import Context from "./Context"; - -/** - * The context of an abilityStage. It allows access to abilityStage-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class AbilityStageContext extends Context { - - /** - * Indicates configuration information about an module. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - currentHapModuleInfo: HapModuleInfo; - - /** - * Indicates configuration information. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - config: Configuration; -} \ No newline at end of file diff --git a/api/application/Context.d.ts b/api/application/Context.d.ts deleted file mode 100755 index 8f1add64df..0000000000 --- a/api/application/Context.d.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { ApplicationInfo } from "../bundle/applicationInfo"; -import resmgr from "../@ohos.resourceManager"; -import BaseContext from "./BaseContext"; -import EventHub from "./EventHub"; - -/** - * The base context of an ability or an application. It allows access to - * application-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class Context extends BaseContext { - /** - * Indicates the capability of accessing application resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - resourceManager: resmgr.ResourceManager; - - /** - * Indicates configuration information about an application. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - applicationInfo: ApplicationInfo; - - /** - * Indicates app cache dir. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - cacheDir: string; - - /** - * Indicates app temp dir. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - tempDir: string; - - /** - * Indicates app files dir. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - filesDir : string; - - /** - * Indicates app database dir. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - databaseDir : string; - - /** - * Indicates app storage dir. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - storageDir : string; - - /** - * Indicates app bundle code dir. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - bundleCodeDir : string; - - /** - * Indicates app distributed files dir. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - distributedFilesDir: string; - - /** - * Indicates event hub. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - eventHub: EventHub; - - /** - * Create a bundle context - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @param bundleName Indicates the bundle name. - * @return application context - * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED - * @StageModelOnly - */ - createBundleContext(bundleName: string): Context; - - /** - * Get application context - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return application context - * @StageModelOnly - */ - getApplicationContext(): Context; - - /** - * Switch file area - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param mode file area. - * @StageModelOnly - */ - switchArea(mode: AreaMode): void; -} - -export enum AreaMode { - EL1 = 0, - EL2 = 1, - EL3 = 2, - EL4 = 3 -} \ No newline at end of file diff --git a/api/application/EventHub.d.ts b/api/application/EventHub.d.ts deleted file mode 100644 index cbc9cbdc8b..0000000000 --- a/api/application/EventHub.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2021 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The event center of a context, support the subscription and publication of events. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class EventHub { - /** - * Subscribe to an event. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param event Indicates the event. - * @param callback Indicates the callback. - * @return - - * @StageModelOnly - */ - on(event: string, callback: Function): void - - /** - * Unsubscribe from an event. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param event Indicates the event. - * @param callback Indicates the callback. - * @return - - * @StageModelOnly - */ - off(event: string, callback?: Function): void - - /** - * Trigger the event callbacks. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param event Indicates the event. - * @param args Indicates the callback arguments. - * @return - - * @StageModelOnly - */ - emit(event: string, ...args: Object[]): void -} \ No newline at end of file diff --git a/api/application/ExtAbilityContext.d.ts b/api/application/ExtAbilityContext.d.ts deleted file mode 100644 index 36ddd06d4d..0000000000 --- a/api/application/ExtAbilityContext.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2021 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { HapModuleInfo } from "../bundle/hapModuleInfo"; -import Context from "./Context"; - -/** - * The context of an extension. It allows access to extension-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class ExtAbilityContext extends Context { - - /** - * Indicates configuration information about an module. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - currentHapModuleInfo: HapModuleInfo; -} \ No newline at end of file diff --git a/api/application/ExtensionContext.d.ts b/api/application/ExtensionContext.d.ts deleted file mode 100644 index b08fcc76a3..0000000000 --- a/api/application/ExtensionContext.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { HapModuleInfo } from "../bundle/hapModuleInfo"; -import { Configuration } from '../@ohos.application.Configuration'; -import Context from "./Context"; - -/** - * The context of an extension. It allows access to extension-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class ExtensionContext extends Context { - - /** - * Indicates configuration information about an module. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - currentHapModuleInfo: HapModuleInfo; - - /** - * Indicates configuration information. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @StageModelOnly - */ - config: Configuration; -} \ No newline at end of file diff --git a/api/application/ExtensionRunningInfo.d.ts b/api/application/ExtensionRunningInfo.d.ts deleted file mode 100644 index 21b196d364..0000000000 --- a/api/application/ExtensionRunningInfo.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2021 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { ElementName } from '../bundle/elementName'; -import bundle from '../@ohos.bundle'; - -/** - * The class of an extension running information. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - */ -export interface ExtensionRunningInfo { - /** - * @default Indicates the extension of the extension info - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - extension: ElementName; - - /** - * @default process id - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - pid: number; - - /** - * @default user id - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - uid: number; - - /** - * @default the name of the process - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - processName: string; - - /** - * @default ability start time - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - startTime: number; - - /** - * @default All package names under the current process - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - clientPackage: Array; - - /** - * @default Enumerates types of the entension info - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - type: bundle.ExtensionAbilityType; -} \ No newline at end of file diff --git a/api/application/FormExtensionContext.d.ts b/api/application/FormExtensionContext.d.ts deleted file mode 100644 index 8d9b9f3125..0000000000 --- a/api/application/FormExtensionContext.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AsyncCallback } from "../basic"; -import ExtensionContext from "./ExtensionContext"; -import formBindingData from '../@ohos.application.formBindingData'; - -/** - * The context of form extension. It allows access to - * formExtension-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission N/A - * @StageModelOnly - */ -export default class FormExtensionContext extends ExtensionContext { - - /** - * update the given form. - * - *

You can use this method to update the given form

- * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param formId Indicates the given form. - * @param formBindingData Indicates the form data. - * @return - - * @StageModelOnly - */ - updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback): void; - updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise; -} \ No newline at end of file diff --git a/api/application/PermissionRequestResult.d.ts b/api/application/PermissionRequestResult.d.ts deleted file mode 100755 index bd84e1f626..0000000000 --- a/api/application/PermissionRequestResult.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The result of requestPermissionsFromUser with asynchronous callback. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @permission N/A - * @StageModelOnly - */ -export default class PermissionRequestResult { - /** - * The permissions passed in by the user. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @StageModelOnly - */ - permissions: Array; - - /** - * The results for the corresponding request permissions. The value 0 indicates that a - * permission is granted, and the value -1 indicates not. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @StageModelOnly - */ - authResults: Array; -} \ No newline at end of file diff --git a/api/application/ServiceExtAbilityContext.d.ts b/api/application/ServiceExtAbilityContext.d.ts deleted file mode 100644 index f10e58fc9a..0000000000 --- a/api/application/ServiceExtAbilityContext.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2021 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AsyncCallback } from "../basic"; -import { ConnectOptions } from "../ability/connectOptions"; -import ExtAbilityContext from "./ExtAbilityContext"; -import Want from "../@ohos.application.Want"; -import StartOptions from "../@ohos.application.StartOptions"; - -/** - * The context of service extension. It allows access to - * serviceExtension-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @permission N/A - * @StageModelOnly - */ -export default class ServiceExtAbilityContext extends ExtAbilityContext { - /** - * Service extension uses this method to start a specific ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param parameter Indicates the ability to start. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - startAbility(want: Want, callback: AsyncCallback): void; - startAbility(want: Want, options: StartOptions, callback: AsyncCallback): void; - startAbility(want: Want, options?: StartOptions): Promise; - - /** - * Service extension uses this method to start a specific ability with account. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param parameter Indicates the ability to start. - * @param parameter Indicates the accountId to start. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; - startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; - startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise; - - /** - * Destroys this service extension. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - terminateSelf(callback: AsyncCallback): void; - terminateSelf(): Promise; - - /** - * Connects an ability to a Service extension. - * - *

This method can be called by an ability or service extension, but the destination of the connection must be a - * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target - * service extension when the Service extension is connected.

- * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param request Indicates the service extension to connect. - * @systemapi hide for inner use. - * @return connection id, int value. - * @StageModelOnly - */ - connectAbility(want: Want, options: ConnectOptions): number; - - /** - * Connects an ability to a Service extension with account. - * - *

This method can be called by an ability or service extension, but the destination of the connection must be a - * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target - * service extension when the Service extension is connected.

- * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param request Indicates the service extension to connect. - * @param request Indicates the account to connect. - * @systemapi hide for inner use. - * @return connection id, int value. - * @StageModelOnly - */ - connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; - - /** - * Disconnects an ability to a service extension, in contrast to - * {@link connectAbility}. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param connection the connection id returned from connectAbility api. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - disconnectAbility(connection: number, callback:AsyncCallback): void; - disconnectAbility(connection: number): Promise; -} \ No newline at end of file diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts deleted file mode 100644 index 22a5412a8f..0000000000 --- a/api/application/ServiceExtensionContext.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AsyncCallback } from "../basic"; -import { ConnectOptions } from "../ability/connectOptions"; -import ExtensionContext from "./ExtensionContext"; -import Want from "../@ohos.application.Want"; -import StartOptions from "../@ohos.application.StartOptions"; -import { ExtensionAbilityInfo } from "../bundle/extensionAbilityInfo"; - -/** - * The context of service extension. It allows access to - * serviceExtension-specific resources. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @systemapi hide for inner use. - * @permission N/A - * @StageModelOnly - */ -export default class ServiceExtensionContext extends ExtensionContext { - /** - * Service extension information. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - */ - extensionAbilityInfo: ExtensionAbilityInfo; - - /** - * Service extension uses this method to start a specific ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param want Indicates the ability to start. - * @param options Indicates the start options. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - startAbility(want: Want, callback: AsyncCallback): void; - startAbility(want: Want, options: StartOptions, callback: AsyncCallback): void; - startAbility(want: Want, options?: StartOptions): Promise; - - /** - * Service extension uses this method to start a specific ability with account. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param want Indicates the ability to start. - * @param accountId Indicates the accountId to start. - * @param options Indicates the start options. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; - startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void; - startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise; - - /** - * Destroys this service extension. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - terminateSelf(callback: AsyncCallback): void; - terminateSelf(): Promise; - - /** - * Connects an ability to a Service extension. - * - *

This method can be called by an ability or service extension, but the destination of the connection must be a - * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target - * service extension when the Service extension is connected.

- * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param want Indicates the service extension to connect. - * @param options Indicates the callback of connection. - * @systemapi hide for inner use. - * @return connection id, int value. - * @StageModelOnly - */ - connectAbility(want: Want, options: ConnectOptions): number; - - /** - * Connects an ability to a Service extension with account. - * - *

This method can be called by an ability or service extension, but the destination of the connection must be a - * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target - * service extension when the Service extension is connected.

- * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param want Indicates the service extension to connect. - * @param accountId Indicates the account to connect. - * @param options Indicates the callback of connection. - * @systemapi hide for inner use. - * @return connection id, int value. - * @StageModelOnly - */ - connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; - - /** - * Disconnects an ability to a service extension, in contrast to - * {@link connectAbility}. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param connection the connection id returned from connectAbility api. - * @systemapi hide for inner use. - * @return - - * @StageModelOnly - */ - disconnectAbility(connection: number, callback:AsyncCallback): void; - disconnectAbility(connection: number): Promise; -} \ No newline at end of file diff --git a/api/application/abilityDelegator.d.ts b/api/application/abilityDelegator.d.ts index 597b5a76f8..2fcf0b6f7c 100644 --- a/api/application/abilityDelegator.d.ts +++ b/api/application/abilityDelegator.d.ts @@ -28,90 +28,6 @@ import { ShellCmdResult } from './shellCmdResult' * @permission N/A */ export interface AbilityDelegator { - /** - * Add an AbilityMonitor object for monitoring the lifecycle state changes of the specified ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param monitor AbilityMonitor object - */ - addAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; - addAbilityMonitor(monitor: AbilityMonitor): Promise; - - /** - * Remove a specified AbilityMonitor object from the application memory. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param monitor AbilityMonitor object - */ - removeAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; - removeAbilityMonitor(monitor: AbilityMonitor): Promise; - - /** - * Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param monitor AbilityMonitor object - * @param timeout Maximum wait time, in milliseconds - * @return success: return the Ability object, failure: return null - */ - waitAbilityMonitor(monitor: AbilityMonitor, callback: AsyncCallback): void; - waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void; - waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise; - - /** - * Obtain the application context. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return App Context - */ - getAppContext(): Context; - - /** - * Obtain the lifecycle state of a specified ability. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param ability The Ability object - * @return The state of the Ability object. enum AbilityLifecycleState - */ - getAbilityState(ability: Ability): number; - - /** - * Obtain the ability that is currently being displayed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return The top ability of the current application - */ - getCurrentTopAbility(callback: AsyncCallback): void; - getCurrentTopAbility(): Promise - - /** - * Invoke the Ability.onForeground() callback of a specified ability without changing its lifecycle state. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param ability The ability object - * @return true: success false: failure - */ - doAbilityForeground(ability: Ability, callback: AsyncCallback): void; - doAbilityForeground(ability: Ability): Promise; - - /** - * Invoke the Ability.onBackground() callback of a specified ability without changing its lifecycle state. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param ability The ability object - * @return true: success false: failure - */ - doAbilityBackground(ability: Ability, callback: AsyncCallback): void; - doAbilityBackground(ability: Ability): Promise; - /** * Prints log information to the unit testing console. * The total length of the log information to be printed cannot exceed 1000 characters. diff --git a/api/application/abilityMonitor.d.ts b/api/application/abilityMonitor.d.ts deleted file mode 100644 index 81806c4369..0000000000 --- a/api/application/abilityMonitor.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2021 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Provide methods for matching monitored Ability objects that meet specified conditions. - * The most recently matched Ability objects will be saved in the AbilityMonitor object. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @import import AbilityMonitor from 'application/abilityMonitor.d' - * @permission N/A - */ -export interface AbilityMonitor { - /** - * The name of the ability to monitor. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - abilityName: string; - - /** - * Called back when the ability is started for initialization. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - onAbilityCreate?:() => void; - - /** - * Called back when the state of the ability changes to foreground. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - onAbilityForeground?:() => void; - - /** - * Called back when the state of the ability changes to background. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - onAbilityBackground?:() => void; - - /** - * Called back before the ability is destroyed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - onAbilityDestroy?:() => void; - - /** - * Called back when an ability window stage is created. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - onWindowStageCreate?:() => void; - - /** - * Called back when an ability window stage is restored. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - onWindowStageRestore?:() => void; - - /** - * Called back when an ability window stage is destroyed. - * - * @since 9 - * @syscap SystemCapability.Ability.AbilityRuntime.Core - */ - onWindowStageDestroy?:() => void; -} - -export default AbilityMonitor; \ No newline at end of file -- Gitee