diff --git a/api/@ohos.wantAgent.d.ts b/api/@ohos.wantAgent.d.ts index 15a908ec67113cf100b8d14dbf9df351101c24b5..6b06dd07fa1e76c92a7a1e3e5474e7ca37ae8c31 100644 --- a/api/@ohos.wantAgent.d.ts +++ b/api/@ohos.wantAgent.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 @@ -101,6 +101,16 @@ declare namespace wantAgent { function getWantAgent(info: WantAgentInfo, callback: AsyncCallback): void; function getWantAgent(info: WantAgentInfo): Promise; + /** + * Obtains the {@link OperationType} of a {@link WantAgent}. + * + * @since 9 + * @param agent Indicates the {@link WantAgent} whose {@link OperationType} is to be obtained. + * @return Returns the {@link OperationType} of the {@link WantAgent}. + */ + function getOperationType(agent: WantAgent, callback: AsyncCallback): void; + function getOperationType(agent: WantAgent): Promise; + /** * Enumerates flags for using a WantAgent. */ @@ -226,4 +236,4 @@ declare namespace wantAgent { */ export type WantAgent = object; -export default wantAgent; \ No newline at end of file +export default wantAgent; diff --git a/api/commonEvent/commonEventSubscriber.d.ts b/api/commonEvent/commonEventSubscriber.d.ts index 565f3418fd415f5fde09d1e969ec6135f679bc6a..b1260900bbf195135251313e3f75310e93dcc81b 100644 --- a/api/commonEvent/commonEventSubscriber.d.ts +++ b/api/commonEvent/commonEventSubscriber.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 @@ -218,4 +218,21 @@ export interface CommonEventSubscriber { * @return Returns the commonEvent subscribe information */ getSubscribeInfo(): Promise; + + /** + * finish the current ordered common event. + * + * @since 9 + * @param callback Indicate the callback function after the ordered common event is finished. + * @return - + */ + finishCommonEvent(callback: AsyncCallback): void; + + /** + * finish the current ordered common event. + * + * @since 9 + * @return - + */ + finishCommonEvent(): Promise; }