diff --git a/api/@ohos.continuation.continuationManager.d.ts b/api/@ohos.continuation.continuationManager.d.ts index 2c9244e8d3a708b77b28424ac83e82e66e37bd9e..aa535f12e330a0f58e688a652e15d52d4095aee3 100644 --- a/api/@ohos.continuation.continuationManager.d.ts +++ b/api/@ohos.continuation.continuationManager.d.ts @@ -27,11 +27,36 @@ import { ContinuationExtraParams } from './continuation/continuationExtraParams' * @permission N/A */ declare namespace continuationManager { + /** + * Called when the user selects devices from the candidate device list. + * You can implement your own processing logic in this callback to initiate the hop process. + * + * @since 9 + * @syscap SystemCapability.Ability.DistributedAbilityManager + * @param type deviceConnect. + * @return callback Indicates the information about the selected devices. + */ + function on(type: "deviceConnect", token: number, callback: Callback>): void; + function off(type: "deviceConnect", token: number): void; + + /** + * Called when devices is disconnected from the continuation manager servcie. + * You can implement your own processing logic in this callback, such as notifying the user of the disconnection. + * + * @since 9 + * @syscap SystemCapability.Ability.DistributedAbilityManager + * @param type deviceDisconnect. + * @return callback Indicates the ID of the disconnected devices. + */ + function on(type: "deviceDisconnect", token: number, callback: Callback>): void; + function off(type: "deviceDisconnect", token: number): void; + /** * Called when the user selects a device from the candidate device list. * You can implement your own processing logic in this callback to initiate the hop process. * * @since 8 + * @deprecated since 9 * @syscap SystemCapability.Ability.DistributedAbilityManager * @param type deviceConnect. * @return callback Indicates the information about the selected device. @@ -44,6 +69,7 @@ declare namespace continuationManager { * You can implement your own processing logic in this callback, such as notifying the user of the disconnection. * * @since 8 + * @deprecated since 9 * @syscap SystemCapability.Ability.DistributedAbilityManager * @param type deviceDisconnect. * @return callback Indicates the ID of the disconnected device. diff --git a/api/continuation/continuationExtraParams.d.ts b/api/continuation/continuationExtraParams.d.ts index 63ec73151c34457bd39da7d86b1d0c7e20241a53..4ea827c4ee3826579ab104c10e2ea1e453e91276 100644 --- a/api/continuation/continuationExtraParams.d.ts +++ b/api/continuation/continuationExtraParams.d.ts @@ -47,7 +47,7 @@ export interface ContinuationExtraParams { description?: string; /** - * Parameters used for filtering devices. + * Parameters used for filtering devices, type must be { [key: string]: any }. * * @since 8 * @syscap SystemCapability.Ability.DistributedAbilityManager