• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 './basic';
17import { ElementName }  from './bundle/elementName';
18import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo';
19
20/**
21 * distributedBundle.
22 * @name distributedBundle
23 * @since 8
24 * @syscap SystemCapability.BundleManager.DistributedBundleFramework
25 * @systemapi Hide this for inner system use
26 * @deprecated since 9
27 * @useinstead ohos.bundle.distributedBundleManager
28 */
29 declare namespace distributedBundle {
30  /**
31   * Obtains information about the ability info of the remote device.
32   *
33   * @since 8
34   * @syscap SystemCapability.BundleManager.DistributedBundleFramework
35   * @param elementName Indicates the elementName.
36   * @returns Returns the ability info of the remote device.
37   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
38   * @systemapi
39   * @deprecated since 9
40   * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo
41   */
42   function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback<RemoteAbilityInfo>): void;
43   function getRemoteAbilityInfo(elementName: ElementName): Promise<RemoteAbilityInfo>;
44
45  /**
46   * Obtains information about the ability infos of the remote device.
47   *
48   * @since 8
49   * @syscap SystemCapability.BundleManager.DistributedBundleFramework
50   * @param elementNames Indicates the elementNames, Maximum array length ten.
51   * @returns Returns the ability infos of the remote device.
52   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
53   * @systemapi
54   * @deprecated since 9
55   * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo
56   */
57   function getRemoteAbilityInfos(elementNames: Array<ElementName>, callback: AsyncCallback<Array<RemoteAbilityInfo>>): void;
58   function getRemoteAbilityInfos(elementNames: Array<ElementName>): Promise<Array<RemoteAbilityInfo>>;
59}
60export default distributedBundle;