1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { AsyncCallback } from './@ohos.base'; 17import { ElementName } from './bundle/elementName'; 18import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo'; 19 20/** 21 * distributedBundle. 22 * 23 * @namespace distributedBundle 24 * @syscap SystemCapability.BundleManager.DistributedBundleFramework 25 * @systemapi Hide this for inner system use 26 * @since 8 27 * @deprecated since 9 28 * @useinstead ohos.bundle.distributedBundleManager 29 */ 30declare namespace distributedBundle { 31 /** 32 * Obtains information about the ability info of the remote device. 33 * 34 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 35 * @param { ElementName } elementName Indicates the elementName. 36 * @param { AsyncCallback<RemoteAbilityInfo> } callback 37 * @syscap SystemCapability.BundleManager.DistributedBundleFramework 38 * @systemapi 39 * @since 8 40 * @deprecated since 9 41 * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo 42 */ 43 function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback<RemoteAbilityInfo>): void; 44 45 /** 46 * Obtains information about the ability info of the remote device. 47 * 48 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 49 * @param { ElementName } elementName Indicates the elementName. 50 * @returns { Promise<RemoteAbilityInfo> } Returns the ability info of the remote device. 51 * @syscap SystemCapability.BundleManager.DistributedBundleFramework 52 * @systemapi 53 * @since 8 54 * @deprecated since 9 55 * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo 56 */ 57 function getRemoteAbilityInfo(elementName: ElementName): Promise<RemoteAbilityInfo>; 58 59 /** 60 * Obtains information about the ability infos of the remote device. 61 * 62 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 63 * @param { Array<ElementName> } elementNames Indicates the elementNames, Maximum array length ten. 64 * @param { AsyncCallback<Array<RemoteAbilityInfo>> } callback 65 * @syscap SystemCapability.BundleManager.DistributedBundleFramework 66 * @systemapi 67 * @since 8 68 * @deprecated since 9 69 * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo 70 */ 71 function getRemoteAbilityInfos(elementNames: Array<ElementName>, 72 callback: AsyncCallback<Array<RemoteAbilityInfo>>): void; 73 74 /** 75 * Obtains information about the ability infos of the remote device. 76 * 77 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 78 * @param { Array<ElementName> } elementNames Indicates the elementNames, Maximum array length ten. 79 * @returns { Promise<Array<RemoteAbilityInfo>> } Returns the ability infos of the remote device. 80 * @syscap SystemCapability.BundleManager.DistributedBundleFramework 81 * @systemapi 82 * @since 8 83 * @deprecated since 9 84 * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo 85 */ 86 function getRemoteAbilityInfos(elementNames: Array<ElementName>): Promise<Array<RemoteAbilityInfo>>; 87} 88export default distributedBundle; 89