diff --git a/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets b/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets index 19515e8dbda96b0fab82db8e421406183d4c39e8..b28d4c64c4183a31a2175552aa8a99e1e8da10d4 100644 --- a/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets +++ b/interfaces/kits/ani/distributed_bundle_manager/ets/@ohos.bundle.distributedBundleManager.ets @@ -34,7 +34,7 @@ export default namespace distributedBundleManager { return elementNames; } - function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback): void { + function getRemoteAbilityInfoWithElementNameTypedElementNameCallbackOfRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback): void { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), ''); }; @@ -47,7 +47,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementName: ElementName): Promise { + function getRemoteAbilityInfoWithElementNameTypedElementNameReturnsPromiseOfRemoteAbilityInfo(elementName: ElementName): Promise { let p = new Promise((resolve: (remoteAbilityInfo: RemoteAbilityInfo) => void, reject: (error: BusinessError) => void) => { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), ''); @@ -63,7 +63,7 @@ export default namespace distributedBundleManager { return p; } - function getRemoteAbilityInfo(elementNames: Array, callback: AsyncCallback>): void { + function getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameCallbackOfArrayOfRemoteAbilityInfo(elementNames: Array, callback: AsyncCallback>): void { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, ''); }; @@ -76,7 +76,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementNames: Array): Promise> { + function getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameReturnsPromiseOfArrayOfRemoteAbilityInfo(elementNames: Array): Promise> { let p = new Promise>((resolve: (arrRemoteAbilityInfo: Array) => void, reject: (error: BusinessError) => void) => { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, ''); @@ -92,7 +92,7 @@ export default namespace distributedBundleManager { return p; } - function getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCallback): void { + function getRemoteAbilityInfoWithElementNameLocaleCallbackOfRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCallback): void { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), locale); }; @@ -105,7 +105,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise { + function getRemoteAbilityInfoWithElementNameLocaleReturnsPromiseOfRemoteAbilityInfo(elementName: ElementName, locale: string): Promise { let p = new Promise((resolve: (remoteAbilityInfo: RemoteAbilityInfo) => void, reject: (error: BusinessError) => void) => { let cb = (): RemoteAbilityInfo => { return distributedBundleManager.getRemoteAbilityInfoNative(elementName2Array(elementName), locale); @@ -121,7 +121,7 @@ export default namespace distributedBundleManager { return p; } - function getRemoteAbilityInfo(elementNames: Array, locale: string, callback: AsyncCallback>): void { + function getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameLocaleCallbackOfArrayOfRemoteAbilityInfo(elementNames: Array, locale: string, callback: AsyncCallback>): void { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, locale); }; @@ -134,7 +134,7 @@ export default namespace distributedBundleManager { }); } - function getRemoteAbilityInfo(elementNames: Array, locale: string): Promise> { + function getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameLocaleReturnsPromiseOfArrayOfRemoteAbilityInfo(elementNames: Array, locale: string): Promise> { let p = new Promise>((resolve: (arrRemoteAbilityInfo: Array) => void, reject: (error: BusinessError) => void) => { let cb = (): (Array) => { return distributedBundleManager.getRemoteAbilityInfosNative(elementNames, locale); @@ -150,5 +150,16 @@ export default namespace distributedBundleManager { return p; } + overload getRemoteAbilityInfo { + getRemoteAbilityInfoWithElementNameTypedElementNameCallbackOfRemoteAbilityInfo, + getRemoteAbilityInfoWithElementNameTypedElementNameReturnsPromiseOfRemoteAbilityInfo, + getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameCallbackOfArrayOfRemoteAbilityInfo, + getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameReturnsPromiseOfArrayOfRemoteAbilityInfo, + getRemoteAbilityInfoWithElementNameLocaleCallbackOfRemoteAbilityInfo, + getRemoteAbilityInfoWithElementNameLocaleReturnsPromiseOfRemoteAbilityInfo, + getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameLocaleCallbackOfArrayOfRemoteAbilityInfo, + getRemoteAbilityInfoWithArrayOfElementNameTypedElementNameLocaleReturnsPromiseOfArrayOfRemoteAbilityInfo + } + export type RemoteAbilityInfo = _RemoteAbilityInfo; }