• 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
16/**
17 * @file
18 * @kit AbilityKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import { ElementName } from './bundle/elementName';
23import { RemoteAbilityInfo } from './bundle/remoteAbilityInfo';
24
25/**
26 * distributedBundle.
27 *
28 * @namespace distributedBundle
29 * @syscap SystemCapability.BundleManager.DistributedBundleFramework
30 * @systemapi Hide this for inner system use
31 * @since 8
32 * @deprecated since 9
33 * @useinstead ohos.bundle.distributedBundleManager
34 */
35declare namespace distributedBundle {
36  /**
37   * Obtains information about the ability info of the remote device.
38   *
39   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
40   * @param { ElementName } elementName Indicates the elementName.
41   * @param { AsyncCallback<RemoteAbilityInfo> } callback
42   * @syscap SystemCapability.BundleManager.DistributedBundleFramework
43   * @systemapi
44   * @since 8
45   * @deprecated since 9
46   * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo
47   */
48  function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback<RemoteAbilityInfo>): void;
49
50  /**
51   * Obtains information about the ability info of the remote device.
52   *
53   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
54   * @param { ElementName } elementName Indicates the elementName.
55   * @returns { Promise<RemoteAbilityInfo> } Returns the ability info of the remote device.
56   * @syscap SystemCapability.BundleManager.DistributedBundleFramework
57   * @systemapi
58   * @since 8
59   * @deprecated since 9
60   * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo
61   */
62  function getRemoteAbilityInfo(elementName: ElementName): Promise<RemoteAbilityInfo>;
63
64  /**
65   * Obtains information about the ability infos of the remote device.
66   *
67   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
68   * @param { Array<ElementName> } elementNames Indicates the elementNames, Maximum array length ten.
69   * @param { AsyncCallback<Array<RemoteAbilityInfo>> } callback
70   * @syscap SystemCapability.BundleManager.DistributedBundleFramework
71   * @systemapi
72   * @since 8
73   * @deprecated since 9
74   * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo
75   */
76  function getRemoteAbilityInfos(elementNames: Array<ElementName>,
77    callback: AsyncCallback<Array<RemoteAbilityInfo>>): void;
78
79  /**
80   * Obtains information about the ability infos of the remote device.
81   *
82   * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
83   * @param { Array<ElementName> } elementNames Indicates the elementNames, Maximum array length ten.
84   * @returns { Promise<Array<RemoteAbilityInfo>> } Returns the ability infos of the remote device.
85   * @syscap SystemCapability.BundleManager.DistributedBundleFramework
86   * @systemapi
87   * @since 8
88   * @deprecated since 9
89   * @useinstead ohos.bundle.distributedBundleManager#getRemoteAbilityInfo
90   */
91  function getRemoteAbilityInfos(elementNames: Array<ElementName>): Promise<Array<RemoteAbilityInfo>>;
92}
93export default distributedBundle;
94