From cec16f1e0079370bd6304b8bced66d2a6921a25b Mon Sep 17 00:00:00 2001 From: jiangwensai Date: Wed, 23 Feb 2022 02:39:37 +0000 Subject: [PATCH] IssueNo: #I4UUXH Description: Fix Extension Name. Sig: SIG_ApplicationFramework Feature or Bugfix: Bugfix Binary Source: No Signed-off-by: jiangwensai Change-Id: If5930c04b37998cdd9c59c6c008b256edfb1cd07 --- ....application.ServiceExtensionAbility.d.ts} | 8 +- api/application/ExtAbilityContext.d.ts | 37 ------ api/application/ServiceExtAbilityContext.d.ts | 120 ------------------ 3 files changed, 4 insertions(+), 161 deletions(-) rename api/{@ohos.application.ServiceExtAbility.d.ts => @ohos.application.ServiceExtensionAbility.d.ts} (94%) delete mode 100644 api/application/ExtAbilityContext.d.ts delete mode 100644 api/application/ServiceExtAbilityContext.d.ts diff --git a/api/@ohos.application.ServiceExtAbility.d.ts b/api/@ohos.application.ServiceExtensionAbility.d.ts similarity index 94% rename from api/@ohos.application.ServiceExtAbility.d.ts rename to api/@ohos.application.ServiceExtensionAbility.d.ts index c87682539c..a2567c8945 100644 --- a/api/@ohos.application.ServiceExtAbility.d.ts +++ b/api/@ohos.application.ServiceExtensionAbility.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 @@ -14,7 +14,7 @@ */ import rpc from "./@ohos.rpc"; -import ServiceExtAbilityContext from "./application/ServiceExtAbilityContext"; +import ServiceExtensionContext from "./application/ServiceExtensionContext"; import Want from './@ohos.application.Want'; /** @@ -25,7 +25,7 @@ import Want from './@ohos.application.Want'; * @systemapi hide for inner use. * @StageModelOnly */ -export default class ServiceExtAbility { +export default class ServiceExtensionAbility { /** * Indicates service extension ability context. * @@ -34,7 +34,7 @@ export default class ServiceExtAbility { * @systemapi hide for inner use. * @StageModelOnly */ - context: ServiceExtAbilityContext; + context: ServiceExtensionContext; /** * Called back when a service extension is started for initialization. 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/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 -- Gitee