diff --git a/api/ability/connectOptions.d.ts b/api/ability/connectOptions.d.ts index ba55aa9e5dd74b7d6e5545c3d6f18fb24ab8c6f8..585efa7efcae8fac84ce2dc8487331743679e3cf 100644 --- a/api/ability/connectOptions.d.ts +++ b/api/ability/connectOptions.d.ts @@ -45,11 +45,21 @@ export interface ConnectOptions { * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability * @param { rpc.IRemoteObject } remote - The remote object instance * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onConnect(elementName: ElementName, remote: rpc.IRemoteObject): void; + /** + * The callback interface was connect successfully. + * + * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability + * @param { rpc.IRemoteObject } remote - The remote object instance + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + onConnect: (elementName: ElementName, remote: rpc.IRemoteObject) => void; + /** * The callback interface was disconnect successfully. * @@ -62,18 +72,36 @@ export interface ConnectOptions { * * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDisconnect(elementName: ElementName): void; + /** + * The callback interface was disconnect successfully. + * + * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + onDisconnect: (elementName: ElementName) => void; + /** * The callback interface was connect failed. * * @param { int } code - The error code of the failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ onFailed(code: int): void; + + /** + * The callback interface was connect failed. + * + * @param { int } code - The error code of the failed. + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + onFailed: (code: int) => void; }