161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2020-2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit DistributedServiceKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport type { AsyncCallback, Callback } from './@ohos.base';
2261847f8eSopenharmony_ci
2361847f8eSopenharmony_ci/**
2461847f8eSopenharmony_ci * Providers interfaces to create a {@link deviceManager} instances.
2561847f8eSopenharmony_ci *
2661847f8eSopenharmony_ci * @namespace deviceManager
2761847f8eSopenharmony_ci * @syscap SystemCapability.DistributedHardware.DeviceManager
2861847f8eSopenharmony_ci * @since 7
2961847f8eSopenharmony_ci * @deprecated since 11
3061847f8eSopenharmony_ci * @useinstead ohos.distributedDeviceManager/distributedDeviceManager
3161847f8eSopenharmony_ci */
3261847f8eSopenharmony_cideclare namespace deviceManager {
3361847f8eSopenharmony_ci  /**
3461847f8eSopenharmony_ci   * DeviceInfo
3561847f8eSopenharmony_ci   *
3661847f8eSopenharmony_ci   * @interface DeviceInfo
3761847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
3861847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
3961847f8eSopenharmony_ci   * @since 7
4061847f8eSopenharmony_ci   * @deprecated since 11
4161847f8eSopenharmony_ci   * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceBasicInfo
4261847f8eSopenharmony_ci   */
4361847f8eSopenharmony_ci  interface DeviceInfo {
4461847f8eSopenharmony_ci    /**
4561847f8eSopenharmony_ci     * DeviceId ID.
4661847f8eSopenharmony_ci     *
4761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
4861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
4961847f8eSopenharmony_ci     * @since 7
5061847f8eSopenharmony_ci     * @deprecated since 11
5161847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceBasicInfo#deviceId
5261847f8eSopenharmony_ci     */
5361847f8eSopenharmony_ci    deviceId: string;
5461847f8eSopenharmony_ci
5561847f8eSopenharmony_ci    /**
5661847f8eSopenharmony_ci     * Device name of the device.
5761847f8eSopenharmony_ci     *
5861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
5961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
6061847f8eSopenharmony_ci     * @since 7
6161847f8eSopenharmony_ci     * @deprecated since 11
6261847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceBasicInfo#deviceName
6361847f8eSopenharmony_ci     */
6461847f8eSopenharmony_ci    deviceName: string;
6561847f8eSopenharmony_ci
6661847f8eSopenharmony_ci    /**
6761847f8eSopenharmony_ci     * Device type of the device.
6861847f8eSopenharmony_ci     *
6961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
7061847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
7161847f8eSopenharmony_ci     * @since 7
7261847f8eSopenharmony_ci     * @deprecated since 11
7361847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceBasicInfo#deviceType
7461847f8eSopenharmony_ci     */
7561847f8eSopenharmony_ci    deviceType: DeviceType;
7661847f8eSopenharmony_ci
7761847f8eSopenharmony_ci    /**
7861847f8eSopenharmony_ci     * NetworkId of the device.
7961847f8eSopenharmony_ci     *
8061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
8161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
8261847f8eSopenharmony_ci     * @since 8
8361847f8eSopenharmony_ci     * @deprecated since 11
8461847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceBasicInfo#networkId
8561847f8eSopenharmony_ci     */
8661847f8eSopenharmony_ci    networkId: string;
8761847f8eSopenharmony_ci
8861847f8eSopenharmony_ci    /**
8961847f8eSopenharmony_ci     * The distance of discovered device, in centimeter(cm).
9061847f8eSopenharmony_ci     *
9161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
9261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
9361847f8eSopenharmony_ci     * @since 9
9461847f8eSopenharmony_ci     * @deprecated since 11
9561847f8eSopenharmony_ci     */
9661847f8eSopenharmony_ci    range: number;
9761847f8eSopenharmony_ci
9861847f8eSopenharmony_ci    /**
9961847f8eSopenharmony_ci     * Indicates the device's trusted type
10061847f8eSopenharmony_ci     *
10161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
10261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
10361847f8eSopenharmony_ci     * @since 10
10461847f8eSopenharmony_ci     * @deprecated since 11
10561847f8eSopenharmony_ci     */
10661847f8eSopenharmony_ci    authForm: AuthForm;
10761847f8eSopenharmony_ci  }
10861847f8eSopenharmony_ci
10961847f8eSopenharmony_ci  /**
11061847f8eSopenharmony_ci   * Device trusted type definitions
11161847f8eSopenharmony_ci   *
11261847f8eSopenharmony_ci   * @enum { number }
11361847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
11461847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
11561847f8eSopenharmony_ci   * @since 10
11661847f8eSopenharmony_ci   * @deprecated since 11
11761847f8eSopenharmony_ci   */
11861847f8eSopenharmony_ci  enum AuthForm {
11961847f8eSopenharmony_ci    /**
12061847f8eSopenharmony_ci     * Indicates invalid trusted device type.
12161847f8eSopenharmony_ci     *
12261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
12361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
12461847f8eSopenharmony_ci     * @since 10
12561847f8eSopenharmony_ci     * @deprecated since 11
12661847f8eSopenharmony_ci     */
12761847f8eSopenharmony_ci    INVALID_TYPE = -1,
12861847f8eSopenharmony_ci
12961847f8eSopenharmony_ci    /**
13061847f8eSopenharmony_ci     * Indicates peer to peer trusted device type without account.
13161847f8eSopenharmony_ci     *
13261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
13361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
13461847f8eSopenharmony_ci     * @since 10
13561847f8eSopenharmony_ci     * @deprecated since 11
13661847f8eSopenharmony_ci     */
13761847f8eSopenharmony_ci    PEER_TO_PEER = 0,
13861847f8eSopenharmony_ci
13961847f8eSopenharmony_ci    /**
14061847f8eSopenharmony_ci     * Indicates identical account trusted device type.
14161847f8eSopenharmony_ci     *
14261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
14361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
14461847f8eSopenharmony_ci     * @since 10
14561847f8eSopenharmony_ci     * @deprecated since 11
14661847f8eSopenharmony_ci     */
14761847f8eSopenharmony_ci    IDENTICAL_ACCOUNT = 1,
14861847f8eSopenharmony_ci
14961847f8eSopenharmony_ci    /**
15061847f8eSopenharmony_ci     * Indicates across account trusted device type.
15161847f8eSopenharmony_ci     *
15261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
15361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
15461847f8eSopenharmony_ci     * @since 10
15561847f8eSopenharmony_ci     * @deprecated since 11
15661847f8eSopenharmony_ci     */
15761847f8eSopenharmony_ci    ACROSS_ACCOUNT = 2
15861847f8eSopenharmony_ci  }
15961847f8eSopenharmony_ci
16061847f8eSopenharmony_ci  /**
16161847f8eSopenharmony_ci   * Device Type definitions
16261847f8eSopenharmony_ci   *
16361847f8eSopenharmony_ci   * @enum { number }
16461847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
16561847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
16661847f8eSopenharmony_ci   * @since 7
16761847f8eSopenharmony_ci   * @deprecated since 11
16861847f8eSopenharmony_ci   */
16961847f8eSopenharmony_ci  enum DeviceType {
17061847f8eSopenharmony_ci    /**
17161847f8eSopenharmony_ci     * Indicates an unknown device type.
17261847f8eSopenharmony_ci     *
17361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
17461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
17561847f8eSopenharmony_ci     * @since 7
17661847f8eSopenharmony_ci     * @deprecated since 11
17761847f8eSopenharmony_ci     */
17861847f8eSopenharmony_ci    UNKNOWN_TYPE = 0,
17961847f8eSopenharmony_ci
18061847f8eSopenharmony_ci    /**
18161847f8eSopenharmony_ci     * Indicates a speaker.
18261847f8eSopenharmony_ci     *
18361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
18461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
18561847f8eSopenharmony_ci     * @since 7
18661847f8eSopenharmony_ci     * @deprecated since 11
18761847f8eSopenharmony_ci     */
18861847f8eSopenharmony_ci    SPEAKER = 0x0A,
18961847f8eSopenharmony_ci
19061847f8eSopenharmony_ci    /**
19161847f8eSopenharmony_ci     * Indicates a smartphone.
19261847f8eSopenharmony_ci     *
19361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
19461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
19561847f8eSopenharmony_ci     * @since 7
19661847f8eSopenharmony_ci     * @deprecated since 11
19761847f8eSopenharmony_ci     */
19861847f8eSopenharmony_ci    PHONE = 0x0E,
19961847f8eSopenharmony_ci
20061847f8eSopenharmony_ci    /**
20161847f8eSopenharmony_ci     * Indicates a tablet.
20261847f8eSopenharmony_ci     *
20361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
20461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
20561847f8eSopenharmony_ci     * @since 7
20661847f8eSopenharmony_ci     * @deprecated since 11
20761847f8eSopenharmony_ci     */
20861847f8eSopenharmony_ci    TABLET = 0x11,
20961847f8eSopenharmony_ci
21061847f8eSopenharmony_ci    /**
21161847f8eSopenharmony_ci     * Indicates a smart watch.
21261847f8eSopenharmony_ci     *
21361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
21461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
21561847f8eSopenharmony_ci     * @since 7
21661847f8eSopenharmony_ci     * @deprecated since 11
21761847f8eSopenharmony_ci     */
21861847f8eSopenharmony_ci    WEARABLE = 0x6D,
21961847f8eSopenharmony_ci
22061847f8eSopenharmony_ci    /**
22161847f8eSopenharmony_ci     * Indicates a car.
22261847f8eSopenharmony_ci     *
22361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
22461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
22561847f8eSopenharmony_ci     * @since 7
22661847f8eSopenharmony_ci     * @deprecated since 11
22761847f8eSopenharmony_ci     */
22861847f8eSopenharmony_ci    CAR = 0x83,
22961847f8eSopenharmony_ci
23061847f8eSopenharmony_ci    /**
23161847f8eSopenharmony_ci     * Indicates a smart TV.
23261847f8eSopenharmony_ci     *
23361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
23461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
23561847f8eSopenharmony_ci     * @since 7
23661847f8eSopenharmony_ci     * @deprecated since 11
23761847f8eSopenharmony_ci     */
23861847f8eSopenharmony_ci    TV = 0x9C
23961847f8eSopenharmony_ci  }
24061847f8eSopenharmony_ci
24161847f8eSopenharmony_ci  /**
24261847f8eSopenharmony_ci   * Device state change event definition
24361847f8eSopenharmony_ci   *
24461847f8eSopenharmony_ci   * @enum { number }
24561847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
24661847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
24761847f8eSopenharmony_ci   * @since 7
24861847f8eSopenharmony_ci   * @deprecated since 11
24961847f8eSopenharmony_ci   * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceStateChange
25061847f8eSopenharmony_ci   */
25161847f8eSopenharmony_ci  enum DeviceStateChangeAction {
25261847f8eSopenharmony_ci    /**
25361847f8eSopenharmony_ci     * Device online action, which indicates the device is physically online
25461847f8eSopenharmony_ci     *
25561847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
25661847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
25761847f8eSopenharmony_ci     * @since 7
25861847f8eSopenharmony_ci     * @deprecated since 11
25961847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceStateChange#UNKNOWN
26061847f8eSopenharmony_ci     */
26161847f8eSopenharmony_ci    ONLINE = 0,
26261847f8eSopenharmony_ci
26361847f8eSopenharmony_ci    /**
26461847f8eSopenharmony_ci     * Device ready action, which indicates the information between devices has been synchronized in the Distributed Data Service (DDS) module,
26561847f8eSopenharmony_ci     * and the device is ready for running distributed services
26661847f8eSopenharmony_ci     *
26761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
26861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
26961847f8eSopenharmony_ci     * @since 7
27061847f8eSopenharmony_ci     * @deprecated since 11
27161847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceStateChange#AVAILABLE
27261847f8eSopenharmony_ci     */
27361847f8eSopenharmony_ci    READY = 1,
27461847f8eSopenharmony_ci
27561847f8eSopenharmony_ci    /**
27661847f8eSopenharmony_ci     * Device offline action, which Indicates the device is physically offline
27761847f8eSopenharmony_ci     *
27861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
27961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
28061847f8eSopenharmony_ci     * @since 7
28161847f8eSopenharmony_ci     * @deprecated since 11
28261847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceStateChange#UNAVAILABLE
28361847f8eSopenharmony_ci     */
28461847f8eSopenharmony_ci    OFFLINE = 2,
28561847f8eSopenharmony_ci
28661847f8eSopenharmony_ci    /**
28761847f8eSopenharmony_ci     * Device change action
28861847f8eSopenharmony_ci     *
28961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
29061847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
29161847f8eSopenharmony_ci     * @since 7
29261847f8eSopenharmony_ci     * @deprecated since 11
29361847f8eSopenharmony_ci     */
29461847f8eSopenharmony_ci    CHANGE = 3
29561847f8eSopenharmony_ci  }
29661847f8eSopenharmony_ci
29761847f8eSopenharmony_ci  /**
29861847f8eSopenharmony_ci   * Service subscribe info for device discover
29961847f8eSopenharmony_ci   *
30061847f8eSopenharmony_ci   * @interface SubscribeInfo
30161847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
30261847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
30361847f8eSopenharmony_ci   * @since 7
30461847f8eSopenharmony_ci   * @deprecated since 11
30561847f8eSopenharmony_ci   */
30661847f8eSopenharmony_ci  interface SubscribeInfo {
30761847f8eSopenharmony_ci    /**
30861847f8eSopenharmony_ci     * Service subscribe ID, the value is in scope [0, 65535], should be unique for each discover process
30961847f8eSopenharmony_ci     *
31061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
31161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
31261847f8eSopenharmony_ci     * @since 7
31361847f8eSopenharmony_ci     * @deprecated since 11
31461847f8eSopenharmony_ci     */
31561847f8eSopenharmony_ci    subscribeId: number;
31661847f8eSopenharmony_ci
31761847f8eSopenharmony_ci    /**
31861847f8eSopenharmony_ci     * Discovery mode for service subscription.
31961847f8eSopenharmony_ci     *
32061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
32161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
32261847f8eSopenharmony_ci     * @since 7
32361847f8eSopenharmony_ci     * @deprecated since 11
32461847f8eSopenharmony_ci     */
32561847f8eSopenharmony_ci    mode: DiscoverMode;
32661847f8eSopenharmony_ci
32761847f8eSopenharmony_ci    /**
32861847f8eSopenharmony_ci     * Service subscription medium.
32961847f8eSopenharmony_ci     *
33061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
33161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
33261847f8eSopenharmony_ci     * @since 7
33361847f8eSopenharmony_ci     * @deprecated since 11
33461847f8eSopenharmony_ci     */
33561847f8eSopenharmony_ci    medium: ExchangeMedium;
33661847f8eSopenharmony_ci
33761847f8eSopenharmony_ci    /**
33861847f8eSopenharmony_ci     * Service subscription frequency.
33961847f8eSopenharmony_ci     *
34061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
34161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
34261847f8eSopenharmony_ci     * @since 7
34361847f8eSopenharmony_ci     * @deprecated since 11
34461847f8eSopenharmony_ci     */
34561847f8eSopenharmony_ci    freq: ExchangeFreq;
34661847f8eSopenharmony_ci
34761847f8eSopenharmony_ci    /**
34861847f8eSopenharmony_ci     * only find the device with the same account.
34961847f8eSopenharmony_ci     *
35061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
35161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
35261847f8eSopenharmony_ci     * @since 7
35361847f8eSopenharmony_ci     * @deprecated since 11
35461847f8eSopenharmony_ci     */
35561847f8eSopenharmony_ci    isSameAccount: boolean;
35661847f8eSopenharmony_ci
35761847f8eSopenharmony_ci    /**
35861847f8eSopenharmony_ci     * find the sleeping devices.
35961847f8eSopenharmony_ci     *
36061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
36161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
36261847f8eSopenharmony_ci     * @since 7
36361847f8eSopenharmony_ci     * @deprecated since 11
36461847f8eSopenharmony_ci     */
36561847f8eSopenharmony_ci    isWakeRemote: boolean;
36661847f8eSopenharmony_ci
36761847f8eSopenharmony_ci    /**
36861847f8eSopenharmony_ci     * Subscribe capability.
36961847f8eSopenharmony_ci     *
37061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
37161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
37261847f8eSopenharmony_ci     * @since 7
37361847f8eSopenharmony_ci     * @deprecated since 11
37461847f8eSopenharmony_ci     */
37561847f8eSopenharmony_ci    capability: SubscribeCap;
37661847f8eSopenharmony_ci  }
37761847f8eSopenharmony_ci
37861847f8eSopenharmony_ci  /**
37961847f8eSopenharmony_ci   * Service publish info for device discover
38061847f8eSopenharmony_ci   *
38161847f8eSopenharmony_ci   * @interface PublishInfo
38261847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
38361847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
38461847f8eSopenharmony_ci   * @since 9
38561847f8eSopenharmony_ci   * @deprecated since 11
38661847f8eSopenharmony_ci   */
38761847f8eSopenharmony_ci  interface PublishInfo {
38861847f8eSopenharmony_ci    /**
38961847f8eSopenharmony_ci     * Service publish ID, the value is in scope [0, 65535], should be unique for each publish process
39061847f8eSopenharmony_ci     *
39161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
39261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
39361847f8eSopenharmony_ci     * @since 9
39461847f8eSopenharmony_ci     * @deprecated since 11
39561847f8eSopenharmony_ci     */
39661847f8eSopenharmony_ci    publishId: number;
39761847f8eSopenharmony_ci
39861847f8eSopenharmony_ci    /**
39961847f8eSopenharmony_ci     * Discovery mode for service subscription.
40061847f8eSopenharmony_ci     *
40161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
40261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
40361847f8eSopenharmony_ci     * @since 9
40461847f8eSopenharmony_ci     * @deprecated since 11
40561847f8eSopenharmony_ci     */
40661847f8eSopenharmony_ci    mode: DiscoverMode;
40761847f8eSopenharmony_ci
40861847f8eSopenharmony_ci    /**
40961847f8eSopenharmony_ci     * Service subscription frequency.
41061847f8eSopenharmony_ci     *
41161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
41261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
41361847f8eSopenharmony_ci     * @since 9
41461847f8eSopenharmony_ci     * @deprecated since 11
41561847f8eSopenharmony_ci     */
41661847f8eSopenharmony_ci    freq: ExchangeFreq;
41761847f8eSopenharmony_ci
41861847f8eSopenharmony_ci    /**
41961847f8eSopenharmony_ci     *  Whether the device should be ranged by discoverer.
42061847f8eSopenharmony_ci     *
42161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
42261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
42361847f8eSopenharmony_ci     * @since 9
42461847f8eSopenharmony_ci     * @deprecated since 11
42561847f8eSopenharmony_ci     */
42661847f8eSopenharmony_ci    ranging: boolean;
42761847f8eSopenharmony_ci  }
42861847f8eSopenharmony_ci
42961847f8eSopenharmony_ci  /**
43061847f8eSopenharmony_ci   * device discover mode
43161847f8eSopenharmony_ci   *
43261847f8eSopenharmony_ci   * @enum { number }
43361847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
43461847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
43561847f8eSopenharmony_ci   * @since 7
43661847f8eSopenharmony_ci   * @deprecated since 11
43761847f8eSopenharmony_ci   */
43861847f8eSopenharmony_ci  enum DiscoverMode {
43961847f8eSopenharmony_ci    /**
44061847f8eSopenharmony_ci     * when using this key at client side, it means discovering for available nearby devices by
44161847f8eSopenharmony_ci     * calling @startDeviceDiscovery function, while using this key at server side indicating that
44261847f8eSopenharmony_ci     * a device publication or advertisement by calling @publishDeviceDiscovery.
44361847f8eSopenharmony_ci     *
44461847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
44561847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
44661847f8eSopenharmony_ci     * @since 7
44761847f8eSopenharmony_ci     * @deprecated since 11
44861847f8eSopenharmony_ci     */
44961847f8eSopenharmony_ci    DISCOVER_MODE_PASSIVE = 0x55,
45061847f8eSopenharmony_ci
45161847f8eSopenharmony_ci    /**
45261847f8eSopenharmony_ci     * when using this key at server side, it means discovering for available nearby devices by
45361847f8eSopenharmony_ci     * calling @startDeviceDiscovery function, while using this key at client side indicating that
45461847f8eSopenharmony_ci     * a device publication or advertisement by calling @publishDeviceDiscovery.
45561847f8eSopenharmony_ci     *
45661847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
45761847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
45861847f8eSopenharmony_ci     * @since 7
45961847f8eSopenharmony_ci     * @deprecated since 11
46061847f8eSopenharmony_ci     */
46161847f8eSopenharmony_ci    DISCOVER_MODE_ACTIVE = 0xAA
46261847f8eSopenharmony_ci  }
46361847f8eSopenharmony_ci
46461847f8eSopenharmony_ci  /**
46561847f8eSopenharmony_ci   * device discover medium
46661847f8eSopenharmony_ci   *
46761847f8eSopenharmony_ci   * @enum { number }
46861847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
46961847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
47061847f8eSopenharmony_ci   * @since 7
47161847f8eSopenharmony_ci   * @deprecated since 11
47261847f8eSopenharmony_ci   */
47361847f8eSopenharmony_ci  enum ExchangeMedium {
47461847f8eSopenharmony_ci    /**
47561847f8eSopenharmony_ci     * Automatic medium selection
47661847f8eSopenharmony_ci     *
47761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
47861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
47961847f8eSopenharmony_ci     * @since 7
48061847f8eSopenharmony_ci     * @deprecated since 11
48161847f8eSopenharmony_ci     */
48261847f8eSopenharmony_ci    AUTO = 0,
48361847f8eSopenharmony_ci
48461847f8eSopenharmony_ci    /**
48561847f8eSopenharmony_ci     * Bluetooth
48661847f8eSopenharmony_ci     *
48761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
48861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
48961847f8eSopenharmony_ci     * @since 7
49061847f8eSopenharmony_ci     * @deprecated since 11
49161847f8eSopenharmony_ci     */
49261847f8eSopenharmony_ci    BLE = 1,
49361847f8eSopenharmony_ci
49461847f8eSopenharmony_ci    /**
49561847f8eSopenharmony_ci     * Wi-Fi
49661847f8eSopenharmony_ci     *
49761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
49861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
49961847f8eSopenharmony_ci     * @since 7
50061847f8eSopenharmony_ci     * @deprecated since 11
50161847f8eSopenharmony_ci     */
50261847f8eSopenharmony_ci    COAP = 2,
50361847f8eSopenharmony_ci
50461847f8eSopenharmony_ci    /**
50561847f8eSopenharmony_ci     * USB
50661847f8eSopenharmony_ci     *
50761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
50861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
50961847f8eSopenharmony_ci     * @since 7
51061847f8eSopenharmony_ci     * @deprecated since 11
51161847f8eSopenharmony_ci     */
51261847f8eSopenharmony_ci    USB = 3
51361847f8eSopenharmony_ci  }
51461847f8eSopenharmony_ci
51561847f8eSopenharmony_ci  /**
51661847f8eSopenharmony_ci   * device discover freq
51761847f8eSopenharmony_ci   *
51861847f8eSopenharmony_ci   * @enum { number }
51961847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
52061847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
52161847f8eSopenharmony_ci   * @since 7
52261847f8eSopenharmony_ci   * @deprecated since 11
52361847f8eSopenharmony_ci   */
52461847f8eSopenharmony_ci  enum ExchangeFreq {
52561847f8eSopenharmony_ci    /**
52661847f8eSopenharmony_ci     * Low
52761847f8eSopenharmony_ci     *
52861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
52961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
53061847f8eSopenharmony_ci     * @since 7
53161847f8eSopenharmony_ci     * @deprecated since 11
53261847f8eSopenharmony_ci     */
53361847f8eSopenharmony_ci    LOW = 0,
53461847f8eSopenharmony_ci
53561847f8eSopenharmony_ci    /**
53661847f8eSopenharmony_ci     * Medium
53761847f8eSopenharmony_ci     *
53861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
53961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
54061847f8eSopenharmony_ci     * @since 7
54161847f8eSopenharmony_ci     * @deprecated since 11
54261847f8eSopenharmony_ci     */
54361847f8eSopenharmony_ci    MID = 1,
54461847f8eSopenharmony_ci
54561847f8eSopenharmony_ci    /**
54661847f8eSopenharmony_ci     * High
54761847f8eSopenharmony_ci     *
54861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
54961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
55061847f8eSopenharmony_ci     * @since 7
55161847f8eSopenharmony_ci     * @deprecated since 11
55261847f8eSopenharmony_ci     */
55361847f8eSopenharmony_ci    HIGH = 2,
55461847f8eSopenharmony_ci
55561847f8eSopenharmony_ci    /**
55661847f8eSopenharmony_ci     * Super-high
55761847f8eSopenharmony_ci     *
55861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
55961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
56061847f8eSopenharmony_ci     * @since 7
56161847f8eSopenharmony_ci     * @deprecated since 11
56261847f8eSopenharmony_ci     */
56361847f8eSopenharmony_ci    SUPER_HIGH = 3
56461847f8eSopenharmony_ci  }
56561847f8eSopenharmony_ci
56661847f8eSopenharmony_ci  /**
56761847f8eSopenharmony_ci   * device discover capability
56861847f8eSopenharmony_ci   *
56961847f8eSopenharmony_ci   * @enum { number }
57061847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
57161847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
57261847f8eSopenharmony_ci   * @since 7
57361847f8eSopenharmony_ci   * @deprecated since 11
57461847f8eSopenharmony_ci   */
57561847f8eSopenharmony_ci  enum SubscribeCap {
57661847f8eSopenharmony_ci    /**
57761847f8eSopenharmony_ci     * ddmpCapability, will be discarded later. Currently, it will be converted to OSD capability inner.
57861847f8eSopenharmony_ci     *
57961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
58061847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
58161847f8eSopenharmony_ci     * @since 7
58261847f8eSopenharmony_ci     * @deprecated since 11
58361847f8eSopenharmony_ci     */
58461847f8eSopenharmony_ci    SUBSCRIBE_CAPABILITY_DDMP = 0,
58561847f8eSopenharmony_ci
58661847f8eSopenharmony_ci    /**
58761847f8eSopenharmony_ci     * One Super Device Capability
58861847f8eSopenharmony_ci     *
58961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
59061847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
59161847f8eSopenharmony_ci     * @since 7
59261847f8eSopenharmony_ci     * @deprecated since 11
59361847f8eSopenharmony_ci     */
59461847f8eSopenharmony_ci    SUBSCRIBE_CAPABILITY_OSD = 1
59561847f8eSopenharmony_ci  }
59661847f8eSopenharmony_ci
59761847f8eSopenharmony_ci  /**
59861847f8eSopenharmony_ci   * Device Authentication param
59961847f8eSopenharmony_ci   *
60061847f8eSopenharmony_ci   * @interface AuthParam
60161847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
60261847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications
60361847f8eSopenharmony_ci   * @since 7
60461847f8eSopenharmony_ci   * @deprecated since 11
60561847f8eSopenharmony_ci   */
60661847f8eSopenharmony_ci  interface AuthParam {
60761847f8eSopenharmony_ci    /**
60861847f8eSopenharmony_ci     * Authentication type, 1 for pin code.
60961847f8eSopenharmony_ci     *
61061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
61161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications
61261847f8eSopenharmony_ci     * @since 7
61361847f8eSopenharmony_ci     * @deprecated since 11
61461847f8eSopenharmony_ci     */
61561847f8eSopenharmony_ci    authType: number;
61661847f8eSopenharmony_ci
61761847f8eSopenharmony_ci    /**
61861847f8eSopenharmony_ci     * Authentication extra infos.
61961847f8eSopenharmony_ci     *
62061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
62161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications
62261847f8eSopenharmony_ci     * @since 7
62361847f8eSopenharmony_ci     * @deprecated since 11
62461847f8eSopenharmony_ci     */
62561847f8eSopenharmony_ci    extraInfo: { [key: string]: any };
62661847f8eSopenharmony_ci  }
62761847f8eSopenharmony_ci
62861847f8eSopenharmony_ci  /**
62961847f8eSopenharmony_ci   * Device auth info.
63061847f8eSopenharmony_ci   *
63161847f8eSopenharmony_ci   * @interface AuthInfo
63261847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
63361847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications
63461847f8eSopenharmony_ci   * @since 7
63561847f8eSopenharmony_ci   * @deprecated since 11
63661847f8eSopenharmony_ci   */
63761847f8eSopenharmony_ci  interface AuthInfo {
63861847f8eSopenharmony_ci    /**
63961847f8eSopenharmony_ci     * Authentication type, 1 for pin code.
64061847f8eSopenharmony_ci     *
64161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
64261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications
64361847f8eSopenharmony_ci     * @since 7
64461847f8eSopenharmony_ci     * @deprecated since 11
64561847f8eSopenharmony_ci     */
64661847f8eSopenharmony_ci    authType: number;
64761847f8eSopenharmony_ci
64861847f8eSopenharmony_ci    /**
64961847f8eSopenharmony_ci     * the token used for this authentication.
65061847f8eSopenharmony_ci     *
65161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
65261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications
65361847f8eSopenharmony_ci     * @since 7
65461847f8eSopenharmony_ci     * @deprecated since 11
65561847f8eSopenharmony_ci     */
65661847f8eSopenharmony_ci    token: number;
65761847f8eSopenharmony_ci
65861847f8eSopenharmony_ci    /**
65961847f8eSopenharmony_ci     * Authentication extra infos.
66061847f8eSopenharmony_ci     *
66161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
66261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications
66361847f8eSopenharmony_ci     * @since 7
66461847f8eSopenharmony_ci     * @deprecated since 11
66561847f8eSopenharmony_ci     */
66661847f8eSopenharmony_ci    extraInfo: { [key: string]: any };
66761847f8eSopenharmony_ci  }
66861847f8eSopenharmony_ci
66961847f8eSopenharmony_ci  /**
67061847f8eSopenharmony_ci   * Creates a {@code DeviceManager} instance.
67161847f8eSopenharmony_ci   * <p>To manage devices, you must first call this method to obtain a {@code DeviceManager} instance and then
67261847f8eSopenharmony_ci   * use this instance to call other device management methods.
67361847f8eSopenharmony_ci   *
67461847f8eSopenharmony_ci   * @param { string } bundleName Indicates the bundle name of the application.
67561847f8eSopenharmony_ci   * @param { AsyncCallback<DeviceManager> } callback Indicates the callback to be invoked upon {@code DeviceManager} instance creation.
67661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes:
67761847f8eSopenharmony_ci   *                                                  1. Mandatory parameters are left unspecified;
67861847f8eSopenharmony_ci   *                                                  2. Incorrect parameter types;
67961847f8eSopenharmony_ci   *                                                  3. Parameter verification failed.
68061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
68161847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
68261847f8eSopenharmony_ci   * @systemapi this method can be used only by system applications.
68361847f8eSopenharmony_ci   * @since 7
68461847f8eSopenharmony_ci   * @deprecated since 11
68561847f8eSopenharmony_ci   * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.createDeviceManager
68661847f8eSopenharmony_ci   */
68761847f8eSopenharmony_ci  function createDeviceManager(bundleName: string, callback: AsyncCallback<DeviceManager>): void;
68861847f8eSopenharmony_ci
68961847f8eSopenharmony_ci  /**
69061847f8eSopenharmony_ci   * Provides methods for managing devices.
69161847f8eSopenharmony_ci   *
69261847f8eSopenharmony_ci   * @interface DeviceManager
69361847f8eSopenharmony_ci   * @syscap SystemCapability.DistributedHardware.DeviceManager
69461847f8eSopenharmony_ci   * @since 7
69561847f8eSopenharmony_ci   * @deprecated since 11
69661847f8eSopenharmony_ci   * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager
69761847f8eSopenharmony_ci   */
69861847f8eSopenharmony_ci  interface DeviceManager {
69961847f8eSopenharmony_ci    /**
70061847f8eSopenharmony_ci     * Releases the {@code DeviceManager} instance after the methods for device management are no longer used.
70161847f8eSopenharmony_ci     *
70261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
70361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
70461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
70561847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
70661847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
70761847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
70861847f8eSopenharmony_ci     * @since 7
70961847f8eSopenharmony_ci     * @deprecated since 11
71061847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.releaseDeviceManager
71161847f8eSopenharmony_ci     */
71261847f8eSopenharmony_ci    release(): void;
71361847f8eSopenharmony_ci
71461847f8eSopenharmony_ci    /**
71561847f8eSopenharmony_ci     * Obtains a list of trusted devices.
71661847f8eSopenharmony_ci     *
71761847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
71861847f8eSopenharmony_ci     * @returns { Array<DeviceInfo> } returns a list of trusted devices.
71961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
72061847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
72161847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
72261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
72361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
72461847f8eSopenharmony_ci     * @since 7
72561847f8eSopenharmony_ci     * @deprecated since 11
72661847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getAvailableDeviceListSync
72761847f8eSopenharmony_ci     */
72861847f8eSopenharmony_ci    getTrustedDeviceListSync(): Array<DeviceInfo>;
72961847f8eSopenharmony_ci
73061847f8eSopenharmony_ci    /**
73161847f8eSopenharmony_ci     * Obtains a list of trusted devices.
73261847f8eSopenharmony_ci     *
73361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
73461847f8eSopenharmony_ci     * @param { boolean } isRefresh Refresh the online device list to quickly bring nearby trusted devices online.
73561847f8eSopenharmony_ci     * @returns { Array<DeviceInfo> } Returns a list of trusted devices.
73661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
73761847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
73861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
73961847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
74061847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
74161847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
74261847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
74361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
74461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
74561847f8eSopenharmony_ci     * @since 10
74661847f8eSopenharmony_ci     * @deprecated since 11
74761847f8eSopenharmony_ci     */
74861847f8eSopenharmony_ci    getTrustedDeviceListSync(isRefresh: boolean): Array<DeviceInfo>;
74961847f8eSopenharmony_ci
75061847f8eSopenharmony_ci    /**
75161847f8eSopenharmony_ci     * Obtains a list of trusted devices.
75261847f8eSopenharmony_ci     *
75361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
75461847f8eSopenharmony_ci     * @param { AsyncCallback<Array<DeviceInfo>> } callback Indicates the callback to be invoked upon getTrustedDeviceList
75561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
75661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
75761847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
75861847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
75961847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
76061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
76161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
76261847f8eSopenharmony_ci     * @since 8
76361847f8eSopenharmony_ci     * @deprecated since 11
76461847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getAvailableDeviceList
76561847f8eSopenharmony_ci     */
76661847f8eSopenharmony_ci    getTrustedDeviceList(callback: AsyncCallback<Array<DeviceInfo>>): void;
76761847f8eSopenharmony_ci
76861847f8eSopenharmony_ci    /**
76961847f8eSopenharmony_ci     * Obtains a list of trusted devices.
77061847f8eSopenharmony_ci     *
77161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
77261847f8eSopenharmony_ci     * @returns { Promise<Array<DeviceInfo>> } Returns a list of trusted devices.
77361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
77461847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
77561847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
77661847f8eSopenharmony_ci     * @since 8
77761847f8eSopenharmony_ci     * @deprecated since 11
77861847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getAvailableDeviceList
77961847f8eSopenharmony_ci     */
78061847f8eSopenharmony_ci    getTrustedDeviceList(): Promise<Array<DeviceInfo>>;
78161847f8eSopenharmony_ci
78261847f8eSopenharmony_ci    /**
78361847f8eSopenharmony_ci     * Obtains local device info
78461847f8eSopenharmony_ci     *
78561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
78661847f8eSopenharmony_ci     * @returns { DeviceInfo } Returns local device info.
78761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
78861847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
78961847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
79061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
79161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
79261847f8eSopenharmony_ci     * @since 8
79361847f8eSopenharmony_ci     * @deprecated since 11
79461847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getLocalDeviceNetworkId
79561847f8eSopenharmony_ci     */
79661847f8eSopenharmony_ci    getLocalDeviceInfoSync(): DeviceInfo;
79761847f8eSopenharmony_ci
79861847f8eSopenharmony_ci    /**
79961847f8eSopenharmony_ci     * Obtains local device info
80061847f8eSopenharmony_ci     *
80161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
80261847f8eSopenharmony_ci     * @param { AsyncCallback<DeviceInfo> } callback Indicates the callback to be invoked upon getLocalDeviceInfo
80361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
80461847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
80561847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
80661847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
80761847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
80861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
80961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
81061847f8eSopenharmony_ci     * @since 8
81161847f8eSopenharmony_ci     * @deprecated since 11
81261847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getLocalDeviceNetworkId
81361847f8eSopenharmony_ci     */
81461847f8eSopenharmony_ci    getLocalDeviceInfo(callback: AsyncCallback<DeviceInfo>): void;
81561847f8eSopenharmony_ci
81661847f8eSopenharmony_ci    /**
81761847f8eSopenharmony_ci     * Obtains local device info
81861847f8eSopenharmony_ci     *
81961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
82061847f8eSopenharmony_ci     * @returns { Promise<DeviceInfo> } Returns local device info.
82161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
82261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
82361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
82461847f8eSopenharmony_ci     * @since 8
82561847f8eSopenharmony_ci     * @deprecated since 11
82661847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getLocalDeviceNetworkId
82761847f8eSopenharmony_ci     */
82861847f8eSopenharmony_ci    getLocalDeviceInfo(): Promise<DeviceInfo>;
82961847f8eSopenharmony_ci
83061847f8eSopenharmony_ci    /**
83161847f8eSopenharmony_ci     * Obtains device info
83261847f8eSopenharmony_ci     *
83361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
83461847f8eSopenharmony_ci     * @param { string } networkId - device network id.
83561847f8eSopenharmony_ci     * @param { AsyncCallback<DeviceInfo> } callback - Indicates the callback to be invoked upon getDeviceInfo.
83661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
83761847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
83861847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
83961847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
84061847f8eSopenharmony_ci     *                                                  4. The size of specified networkId is greater than 255.
84161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
84261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
84361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
84461847f8eSopenharmony_ci     * @since 10
84561847f8eSopenharmony_ci     * @deprecated since 11
84661847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getDeviceName
84761847f8eSopenharmony_ci     */
84861847f8eSopenharmony_ci    getDeviceInfo(networkId: string, callback: AsyncCallback<DeviceInfo>): void;
84961847f8eSopenharmony_ci
85061847f8eSopenharmony_ci    /**
85161847f8eSopenharmony_ci     * Obtains device info
85261847f8eSopenharmony_ci     *
85361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
85461847f8eSopenharmony_ci     * @param { string } networkId - device network id.
85561847f8eSopenharmony_ci     * @returns { Promise<DeviceInfo> } Returns device info.
85661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
85761847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
85861847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
85961847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
86061847f8eSopenharmony_ci     *                                                  4. The size of specified networkId is greater than 255.
86161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
86261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
86361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
86461847f8eSopenharmony_ci     * @since 10
86561847f8eSopenharmony_ci     * @deprecated since 11
86661847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#getDeviceName
86761847f8eSopenharmony_ci     */
86861847f8eSopenharmony_ci    getDeviceInfo(networkId: string): Promise<DeviceInfo>;
86961847f8eSopenharmony_ci
87061847f8eSopenharmony_ci    /**
87161847f8eSopenharmony_ci     * Start to discover device.
87261847f8eSopenharmony_ci     *
87361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
87461847f8eSopenharmony_ci     * @param { SubscribeInfo } subscribeInfo subscribe info to discovery device
87561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
87661847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
87761847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
87861847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
87961847f8eSopenharmony_ci     *                                                  4. The size of specified param is greater than 255.
88061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
88161847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
88261847f8eSopenharmony_ci     * @throws { BusinessError } 11600104 - Discovery unavailable.
88361847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
88461847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
88561847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
88661847f8eSopenharmony_ci     * @since 8
88761847f8eSopenharmony_ci     * @deprecated since 11
88861847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#startDiscovering
88961847f8eSopenharmony_ci     */
89061847f8eSopenharmony_ci    startDeviceDiscovery(subscribeInfo: SubscribeInfo): void;
89161847f8eSopenharmony_ci
89261847f8eSopenharmony_ci    /**
89361847f8eSopenharmony_ci     * Start to discover device.
89461847f8eSopenharmony_ci     *
89561847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
89661847f8eSopenharmony_ci     * @param { SubscribeInfo } subscribeInfo subscribe info to discovery device
89761847f8eSopenharmony_ci     * @param { string } filterOptions filterOptions to filter discovery device
89861847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
89961847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
90061847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
90161847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
90261847f8eSopenharmony_ci     *                                                  4. The size of specified param is greater than 255.
90361847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
90461847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
90561847f8eSopenharmony_ci     * @throws { BusinessError } 11600104 - Discovery unavailable.
90661847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
90761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
90861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
90961847f8eSopenharmony_ci     * @since 9
91061847f8eSopenharmony_ci     * @deprecated since 11
91161847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#startDiscovering
91261847f8eSopenharmony_ci     */
91361847f8eSopenharmony_ci    startDeviceDiscovery(subscribeInfo: SubscribeInfo, filterOptions?: string): void;
91461847f8eSopenharmony_ci
91561847f8eSopenharmony_ci    /**
91661847f8eSopenharmony_ci     * Stop to discover device.
91761847f8eSopenharmony_ci     *
91861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
91961847f8eSopenharmony_ci     * @param { number } subscribeId Service subscribe ID
92061847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
92161847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
92261847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
92361847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
92461847f8eSopenharmony_ci     *                                                  4. The size of specified param is greater than 255.
92561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
92661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
92761847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
92861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
92961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
93061847f8eSopenharmony_ci     * @since 7
93161847f8eSopenharmony_ci     * @deprecated since 11
93261847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#stopDiscovering
93361847f8eSopenharmony_ci     */
93461847f8eSopenharmony_ci    stopDeviceDiscovery(subscribeId: number): void;
93561847f8eSopenharmony_ci
93661847f8eSopenharmony_ci    /**
93761847f8eSopenharmony_ci     * Publish discover device.
93861847f8eSopenharmony_ci     *
93961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
94061847f8eSopenharmony_ci     * @param { PublishInfo } publishInfo publish info to Publish discovery device
94161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
94261847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
94361847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
94461847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
94561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
94661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
94761847f8eSopenharmony_ci     * @throws { BusinessError } 11600105 - Publish unavailable.
94861847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
94961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
95061847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
95161847f8eSopenharmony_ci     * @since 9
95261847f8eSopenharmony_ci     * @deprecated since 11
95361847f8eSopenharmony_ci     */
95461847f8eSopenharmony_ci    publishDeviceDiscovery(publishInfo: PublishInfo): void;
95561847f8eSopenharmony_ci
95661847f8eSopenharmony_ci    /**
95761847f8eSopenharmony_ci     * UnPublish discover device.
95861847f8eSopenharmony_ci     *
95961847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
96061847f8eSopenharmony_ci     * @param { number } publishId Service publish ID, identify a publish operation, should be a unique id in package range
96161847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
96261847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
96361847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
96461847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
96561847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
96661847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
96761847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
96861847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
96961847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
97061847f8eSopenharmony_ci     * @since 9
97161847f8eSopenharmony_ci     * @deprecated since 11
97261847f8eSopenharmony_ci     */
97361847f8eSopenharmony_ci    unPublishDeviceDiscovery(publishId: number): void;
97461847f8eSopenharmony_ci
97561847f8eSopenharmony_ci    /**
97661847f8eSopenharmony_ci     * Authenticate the specified device.
97761847f8eSopenharmony_ci     *
97861847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
97961847f8eSopenharmony_ci     * @param { DeviceInfo } deviceInfo deviceInfo of device to authenticate
98061847f8eSopenharmony_ci     * @param { AuthParam } authParam authParam of device to authenticate
98161847f8eSopenharmony_ci     * @param { AsyncCallback<{ deviceId: string, pinToken?: number }> } callback Indicates the callback to be invoked upon authenticateDevice
98261847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
98361847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
98461847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
98561847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
98661847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
98761847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
98861847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
98961847f8eSopenharmony_ci     * @since 7
99061847f8eSopenharmony_ci     * @deprecated since 11
99161847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#bindTarget
99261847f8eSopenharmony_ci     */
99361847f8eSopenharmony_ci    authenticateDevice(
99461847f8eSopenharmony_ci      deviceInfo: DeviceInfo,
99561847f8eSopenharmony_ci      authParam: AuthParam,
99661847f8eSopenharmony_ci      callback: AsyncCallback<{ deviceId: string, pinToken?: number }>
99761847f8eSopenharmony_ci    ): void;
99861847f8eSopenharmony_ci
99961847f8eSopenharmony_ci    /**
100061847f8eSopenharmony_ci     * unAuthenticate the specified device.
100161847f8eSopenharmony_ci     *
100261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
100361847f8eSopenharmony_ci     * @param { DeviceInfo } deviceInfo deviceInfo of device to unAuthenticate
100461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
100561847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
100661847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
100761847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
100861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
100961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
101061847f8eSopenharmony_ci     * @throws { BusinessError } 11600101 - Failed to execute the function.
101161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
101261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
101361847f8eSopenharmony_ci     * @since 8
101461847f8eSopenharmony_ci     * @deprecated since 11
101561847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#unbindTarget
101661847f8eSopenharmony_ci     */
101761847f8eSopenharmony_ci    unAuthenticateDevice(deviceInfo: DeviceInfo): void;
101861847f8eSopenharmony_ci
101961847f8eSopenharmony_ci    /**
102061847f8eSopenharmony_ci     * verify auth info, such as pin code.
102161847f8eSopenharmony_ci     *
102261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
102361847f8eSopenharmony_ci     * @param { AuthInfo } authInfo device auth info o verify
102461847f8eSopenharmony_ci     * @param { AsyncCallback<{ deviceId: string, level: number }> } callback Indicates the callback to be invoked upon verifyAuthInfo
102561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
102661847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
102761847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
102861847f8eSopenharmony_ci     *                                                  3. Parameter verification failed.
102961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
103061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
103161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
103261847f8eSopenharmony_ci     * @since 7
103361847f8eSopenharmony_ci     * @deprecated since 11
103461847f8eSopenharmony_ci     */
103561847f8eSopenharmony_ci    verifyAuthInfo(authInfo: AuthInfo, callback: AsyncCallback<{ deviceId: string, level: number }>): void;
103661847f8eSopenharmony_ci
103761847f8eSopenharmony_ci    /**
103861847f8eSopenharmony_ci     * Set user Operation from devicemanager Sea, this interface can only be used by devicemanager Sea.
103961847f8eSopenharmony_ci     *
104061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
104161847f8eSopenharmony_ci     * @param { number } operateAction User Operation Actions.
104261847f8eSopenharmony_ci     * @param { string } params Indicates the input param of the user.
104361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
104461847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
104561847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
104661847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
104761847f8eSopenharmony_ci     *                                                  4. The size of specified params is greater than 255.
104861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
104961847f8eSopenharmony_ci     * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
105061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
105161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
105261847f8eSopenharmony_ci     * @since 9
105361847f8eSopenharmony_ci     * @deprecated since 11
105461847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#replyUiAction
105561847f8eSopenharmony_ci     */
105661847f8eSopenharmony_ci    setUserOperation(operateAction: number, params: string): void;
105761847f8eSopenharmony_ci
105861847f8eSopenharmony_ci    /**
105961847f8eSopenharmony_ci     * Request credential information.
106061847f8eSopenharmony_ci     *
106161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
106261847f8eSopenharmony_ci     * @param { string } requestInfo - Request credential params, the params is json string, it includes version and userId.
106361847f8eSopenharmony_ci     * @param { AsyncCallback<{ registerInfo: string }> } callback Indicates the callback to be invoked upon requestCredential
106461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
106561847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
106661847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
106761847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
106861847f8eSopenharmony_ci     *                                                  4. The size of specified requestInfo is greater than 255.
106961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
107061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
107161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
107261847f8eSopenharmony_ci     * @since 10
107361847f8eSopenharmony_ci     * @deprecated since 11
107461847f8eSopenharmony_ci     */
107561847f8eSopenharmony_ci    requestCredentialRegisterInfo(requestInfo: string, callback: AsyncCallback<{ registerInfo: string }>): void;
107661847f8eSopenharmony_ci
107761847f8eSopenharmony_ci    /**
107861847f8eSopenharmony_ci     * Import credential information.
107961847f8eSopenharmony_ci     *
108061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
108161847f8eSopenharmony_ci     * @param { string } credentialInfo - Import credential params, the params is json string, it includes processType, authType,
108261847f8eSopenharmony_ci     * userId, deviceId, version, devicePk and credentialData, the credentialData is array, each array element
108361847f8eSopenharmony_ci     * include credentialType, credentialId, serverPk, pkInfoSignature, pkInfo, authCode, peerDeviceId.
108461847f8eSopenharmony_ci     * @param { AsyncCallback<{ resultInfo: string }> } callback Indicates the callback to be invoked upon importCredential.
108561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
108661847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
108761847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
108861847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
108961847f8eSopenharmony_ci     *                                                  4. The size of specified credentialInfo is greater than 5999.
109061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
109161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
109261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
109361847f8eSopenharmony_ci     * @since 10
109461847f8eSopenharmony_ci     * @deprecated since 11
109561847f8eSopenharmony_ci     */
109661847f8eSopenharmony_ci    importCredential(credentialInfo: string, callback: AsyncCallback<{ resultInfo: string }>): void;
109761847f8eSopenharmony_ci
109861847f8eSopenharmony_ci    /**
109961847f8eSopenharmony_ci     * delete credential information.
110061847f8eSopenharmony_ci     *
110161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
110261847f8eSopenharmony_ci     * @param { string } queryInfo - delete credential params. the params is json string, it includes processType, authType, userId.
110361847f8eSopenharmony_ci     * @param { AsyncCallback<{ resultInfo: string }> } callback Indicates the callback to be invoked upon deleteCredential
110461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
110561847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
110661847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
110761847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
110861847f8eSopenharmony_ci     *                                                  4. The size of specified queryInfo is greater than 5999.
110961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
111061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
111161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
111261847f8eSopenharmony_ci     * @since 10
111361847f8eSopenharmony_ci     * @deprecated since 11
111461847f8eSopenharmony_ci     */
111561847f8eSopenharmony_ci    deleteCredential(queryInfo: string, callback: AsyncCallback<{ resultInfo: string }>): void;
111661847f8eSopenharmony_ci
111761847f8eSopenharmony_ci    /**
111861847f8eSopenharmony_ci     * Register a callback from deviceManager service so that the devicemanager ui can be notified when ui statue
111961847f8eSopenharmony_ci     * changes.
112061847f8eSopenharmony_ci     *
112161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
112261847f8eSopenharmony_ci     * @param { 'uiStateChange' } type Ui state to unregister.
112361847f8eSopenharmony_ci     * @param { Callback<{ param: string }> } callback Indicates the devicemanager ui state to register.
112461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
112561847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
112661847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
112761847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
112861847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
112961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
113061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
113161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
113261847f8eSopenharmony_ci     * @since 9
113361847f8eSopenharmony_ci     * @deprecated since 11
113461847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#on
113561847f8eSopenharmony_ci     */
113661847f8eSopenharmony_ci    on(type: 'uiStateChange', callback: Callback<{ param: string }>): void;
113761847f8eSopenharmony_ci
113861847f8eSopenharmony_ci    /**
113961847f8eSopenharmony_ci     * Unregister uiStatueChange, this interface can only be used by devicemanager ui.
114061847f8eSopenharmony_ci     *ui state change
114161847f8eSopenharmony_ci     *
114261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
114361847f8eSopenharmony_ci     * @param { 'uiStateChange' } type Ui state to unregister.
114461847f8eSopenharmony_ci     * @param { Callback<{ param: string }> } callback Indicates the devicemanager ui state to unregister.
114561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
114661847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
114761847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
114861847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
114961847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
115061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
115161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
115261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
115361847f8eSopenharmony_ci     * @since 9
115461847f8eSopenharmony_ci     * @deprecated since 11
115561847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#off
115661847f8eSopenharmony_ci     */
115761847f8eSopenharmony_ci    off(type: 'uiStateChange', callback?: Callback<{ param: string }>): void;
115861847f8eSopenharmony_ci
115961847f8eSopenharmony_ci    /**
116061847f8eSopenharmony_ci     * Register a device state callback so that the application can be notified upon device state changes based on
116161847f8eSopenharmony_ci     * the application bundle name.
116261847f8eSopenharmony_ci     *
116361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
116461847f8eSopenharmony_ci     * @param { 'deviceStateChange' } type Device status change.
116561847f8eSopenharmony_ci     * @param { Callback<{ action: DeviceStateChangeAction, device: DeviceInfo }> } callback
116661847f8eSopenharmony_ci     *          Indicates the device state callback to register.
116761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
116861847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
116961847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
117061847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
117161847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
117261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
117361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
117461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
117561847f8eSopenharmony_ci     * @since 7
117661847f8eSopenharmony_ci     * @deprecated since 11
117761847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#on
117861847f8eSopenharmony_ci     */
117961847f8eSopenharmony_ci    on(type: 'deviceStateChange', callback: Callback<{ action: DeviceStateChangeAction, device: DeviceInfo }>): void;
118061847f8eSopenharmony_ci
118161847f8eSopenharmony_ci    /**
118261847f8eSopenharmony_ci     * UnRegister device state callback based on the application bundle name.
118361847f8eSopenharmony_ci     *
118461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
118561847f8eSopenharmony_ci     * @param { 'deviceStateChange' } type Device status change.
118661847f8eSopenharmony_ci     * @param { Callback<{ action: DeviceStateChangeAction, device: DeviceInfo }> } callback Indicates the device state callback to register.
118761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
118861847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
118961847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
119061847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
119161847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
119261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
119361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
119461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
119561847f8eSopenharmony_ci     * @since 7
119661847f8eSopenharmony_ci     * @deprecated since 11
119761847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#off
119861847f8eSopenharmony_ci     */
119961847f8eSopenharmony_ci    off(type: 'deviceStateChange', callback?: Callback<{ action: DeviceStateChangeAction, device: DeviceInfo }>): void;
120061847f8eSopenharmony_ci
120161847f8eSopenharmony_ci    /**
120261847f8eSopenharmony_ci     * Register a device found callback so that the application can be notified when the device was found
120361847f8eSopenharmony_ci     *
120461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
120561847f8eSopenharmony_ci     * @param { 'deviceFound' } type Successfully discovered device.
120661847f8eSopenharmony_ci     * @param { Callback<{ subscribeId: number, device: DeviceInfo }> } callback Indicates the device found callback to register.
120761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
120861847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
120961847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
121061847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
121161847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
121261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
121361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
121461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
121561847f8eSopenharmony_ci     * @since 7
121661847f8eSopenharmony_ci     * @deprecated since 11
121761847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#on
121861847f8eSopenharmony_ci     */
121961847f8eSopenharmony_ci    on(type: 'deviceFound', callback: Callback<{ subscribeId: number, device: DeviceInfo }>): void;
122061847f8eSopenharmony_ci
122161847f8eSopenharmony_ci    /**
122261847f8eSopenharmony_ci     * UnRegister a device found callback so that the application can be notified when the device was found
122361847f8eSopenharmony_ci     *
122461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
122561847f8eSopenharmony_ci     * @param { 'deviceFound' } type Successfully discovered device.
122661847f8eSopenharmony_ci     * @param { Callback<{ subscribeId: number, device: DeviceInfo }> } callback Indicates the device found callback to register.
122761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
122861847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
122961847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
123061847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
123161847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
123261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
123361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
123461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
123561847f8eSopenharmony_ci     * @since 7
123661847f8eSopenharmony_ci     * @deprecated since 11
123761847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#off
123861847f8eSopenharmony_ci     */
123961847f8eSopenharmony_ci    off(type: 'deviceFound', callback?: Callback<{ subscribeId: number, device: DeviceInfo }>): void;
124061847f8eSopenharmony_ci
124161847f8eSopenharmony_ci    /**
124261847f8eSopenharmony_ci     * Register a device found result callback so that the application can be notified when the device discover was failed
124361847f8eSopenharmony_ci     *
124461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
124561847f8eSopenharmony_ci     * @param { 'discoverFail' } type Discovery Device Failure.
124661847f8eSopenharmony_ci     * @param { Callback<{ subscribeId: number, reason: number }> } callback Indicates the device found result callback to register.
124761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
124861847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
124961847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
125061847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
125161847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
125261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
125361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
125461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
125561847f8eSopenharmony_ci     * @since 7
125661847f8eSopenharmony_ci     * @deprecated since 11
125761847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#on
125861847f8eSopenharmony_ci     */
125961847f8eSopenharmony_ci    on(type: 'discoverFail', callback: Callback<{ subscribeId: number, reason: number }>): void;
126061847f8eSopenharmony_ci
126161847f8eSopenharmony_ci    /**
126261847f8eSopenharmony_ci     * UnRegister a device found result callback so that the application can be notified when the device discover was failed
126361847f8eSopenharmony_ci     *
126461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
126561847f8eSopenharmony_ci     * @param { 'discoverFail' } type Discovery Device Failure.
126661847f8eSopenharmony_ci     * @param { Callback<{ subscribeId: number, reason: number }> } callback Indicates the device found result callback to register.
126761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
126861847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
126961847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
127061847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
127161847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
127261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
127361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
127461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
127561847f8eSopenharmony_ci     * @since 7
127661847f8eSopenharmony_ci     * @deprecated since 11
127761847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#off
127861847f8eSopenharmony_ci     */
127961847f8eSopenharmony_ci    off(type: 'discoverFail', callback?: Callback<{ subscribeId: number, reason: number }>): void;
128061847f8eSopenharmony_ci
128161847f8eSopenharmony_ci    /**
128261847f8eSopenharmony_ci     * Register a device publish result callback so that the application can be notified when the device publish success
128361847f8eSopenharmony_ci     *
128461847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
128561847f8eSopenharmony_ci     * @param { 'publishSuccess' } type Successfully published device.
128661847f8eSopenharmony_ci     * @param { Callback<{ publishId: number }> } callback Indicates the device publish result callback to register.
128761847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
128861847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
128961847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
129061847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
129161847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
129261847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
129361847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
129461847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
129561847f8eSopenharmony_ci     * @since 9
129661847f8eSopenharmony_ci     * @deprecated since 11
129761847f8eSopenharmony_ci     */
129861847f8eSopenharmony_ci    on(type: 'publishSuccess', callback: Callback<{ publishId: number }>): void;
129961847f8eSopenharmony_ci
130061847f8eSopenharmony_ci    /**
130161847f8eSopenharmony_ci     * UnRegister a device publish result callback so that the application can be notified when the device publish was failed
130261847f8eSopenharmony_ci     *
130361847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
130461847f8eSopenharmony_ci     * @param { 'publishSuccess' } type Successfully published device.
130561847f8eSopenharmony_ci     * @param { Callback<{ publishId: number }> } callback Indicates the device publish result callback to register.
130661847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
130761847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
130861847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
130961847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
131061847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
131161847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
131261847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
131361847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
131461847f8eSopenharmony_ci     * @since 9
131561847f8eSopenharmony_ci     * @deprecated since 11
131661847f8eSopenharmony_ci     */
131761847f8eSopenharmony_ci    off(type: 'publishSuccess', callback?: Callback<{ publishId: number }>): void;
131861847f8eSopenharmony_ci
131961847f8eSopenharmony_ci    /**
132061847f8eSopenharmony_ci     * Register a device publish result callback so that the application can be notified when the device publish was failed
132161847f8eSopenharmony_ci     *
132261847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
132361847f8eSopenharmony_ci     * @param { 'publishFail' } type Failed to publish device.
132461847f8eSopenharmony_ci     * @param { Callback<{ publishId: number, reason: number }> } callback Indicates the device publish result callback to register.
132561847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
132661847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
132761847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
132861847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
132961847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
133061847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
133161847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
133261847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
133361847f8eSopenharmony_ci     * @since 9
133461847f8eSopenharmony_ci     * @deprecated since 11
133561847f8eSopenharmony_ci     */
133661847f8eSopenharmony_ci    on(type: 'publishFail', callback: Callback<{ publishId: number, reason: number }>): void;
133761847f8eSopenharmony_ci
133861847f8eSopenharmony_ci    /**
133961847f8eSopenharmony_ci     * UnRegister a device publish result callback so that the application can be notified when the device publish was failed
134061847f8eSopenharmony_ci     *
134161847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
134261847f8eSopenharmony_ci     * @param { 'publishFail' } type Failed to publish device.
134361847f8eSopenharmony_ci     * @param { Callback<{ publishId: number, reason: number }> } callback Indicates the device publish result callback to register.
134461847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
134561847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
134661847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
134761847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
134861847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
134961847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
135061847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
135161847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
135261847f8eSopenharmony_ci     * @since 9
135361847f8eSopenharmony_ci     * @deprecated since 11
135461847f8eSopenharmony_ci     */
135561847f8eSopenharmony_ci    off(type: 'publishFail', callback?: Callback<{ publishId: number, reason: number }>): void;
135661847f8eSopenharmony_ci
135761847f8eSopenharmony_ci    /**
135861847f8eSopenharmony_ci     * Register a serviceError callback so that the application can be notified when devicemanager service died
135961847f8eSopenharmony_ci     *
136061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
136161847f8eSopenharmony_ci     * @param { 'serviceDie' } type Service death.
136261847f8eSopenharmony_ci     * @param { function } callback Indicates the service error callback to register.
136361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
136461847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
136561847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
136661847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
136761847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
136861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
136961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
137061847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
137161847f8eSopenharmony_ci     * @since 7
137261847f8eSopenharmony_ci     * @deprecated since 11
137361847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#on
137461847f8eSopenharmony_ci     */
137561847f8eSopenharmony_ci    on(type: 'serviceDie', callback: () => void): void;
137661847f8eSopenharmony_ci
137761847f8eSopenharmony_ci    /**
137861847f8eSopenharmony_ci     * UnRegister a serviceError callback so that the application can be notified when devicemanager service died
137961847f8eSopenharmony_ci     *
138061847f8eSopenharmony_ci     * @permission ohos.permission.ACCESS_SERVICE_DM
138161847f8eSopenharmony_ci     * @param { 'serviceDie' } type Service death.
138261847f8eSopenharmony_ci     * @param { function } callback Indicates the service error callback to register.
138361847f8eSopenharmony_ci     * @throws { BusinessError } 401 - Parameter error. Possible causes:
138461847f8eSopenharmony_ci     *                                                  1. Mandatory parameters are left unspecified;
138561847f8eSopenharmony_ci     *                                                  2. Incorrect parameter type;
138661847f8eSopenharmony_ci     *                                                  3. Parameter verification failed;
138761847f8eSopenharmony_ci     *                                                  4. The size of specified eventType is greater than 255.
138861847f8eSopenharmony_ci     * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API.
138961847f8eSopenharmony_ci     * @syscap SystemCapability.DistributedHardware.DeviceManager
139061847f8eSopenharmony_ci     * @systemapi this method can be used only by system applications.
139161847f8eSopenharmony_ci     * @since 7
139261847f8eSopenharmony_ci     * @deprecated since 11
139361847f8eSopenharmony_ci     * @useinstead ohos.distributedDeviceManager/distributedDeviceManager.DeviceManager#off
139461847f8eSopenharmony_ci     */
139561847f8eSopenharmony_ci    off(type: 'serviceDie', callback?: () => void): void;
139661847f8eSopenharmony_ci  }
139761847f8eSopenharmony_ci}
139861847f8eSopenharmony_ci
139961847f8eSopenharmony_ciexport default deviceManager;
1400