1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @addtogroup HdiBluetoothLpBle
18 * @{
19 *
20 * @brief Provides APIs for the low power BLE service.
21 *
22 * @since 5.0
23 * @version 1.0
24 */
25
26/**
27 * @file IBleCallback.idl
28 *
29 * @brief Declares the callbacks for the low power BLE module.
30 *
31 * @since 5.0
32 * @version 1.0
33 */
34
35/**
36 * @brief Declares the path of the low power BLE module interface package.
37 *
38 * @since 5.0
39 */
40package ohos.hdi.bluetooth.lp_ble.v1_0;
41
42/**
43 * @brief Defines the message callback for the low power BLE module.
44 *
45 * Before enabling the low power BLE feature, you need to register this callback to report the information.
46 * For details, see {@link IBleInterface}.
47 *
48 * @since 5.0
49 */
50[callback] interface IBleCallback {
51    /**
52     * @brief Called to report the message data sent by the controller.
53     *
54     *
55     *
56     * @param message Indicates the data report.
57     *
58     * @return Returns <b>0</b> if the operation is successful.
59     * @return Returns a negative value if the operation fails.
60     *
61     * @since 5.0
62     * @version 1.0
63     */
64    [oneway] OnMessageCallback([in] unsigned char[] message);
65
66    /**
67     * @brief Called to report the device list sent by the controller.
68     *
69     *
70     *
71     * @param deviceList Indicates the device list report.
72     *
73     * @return Returns <b>0</b> if the operation is successful.
74     * @return Returns a negative value if the operation fails.
75     *
76     * @since 5.0
77     * @version 1.0
78     */
79    [oneway] OnDeviceListCallback([in] unsigned char[] deviceList);
80}
81