• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @file softbus_broadcast_manager.h
18  * @brief
19  *
20  * @since 4.1
21  * @version 1.0
22  */
23 
24 #ifndef SOFTBUS_BROADCAST_MANAGER_STRUCT_H
25 #define SOFTBUS_BROADCAST_MANAGER_STRUCT_H
26 
27 #include "softbus_broadcast_type.h"
28 
29 #ifdef __cplusplus
30 extern "C"{
31 #endif
32 
33 /**
34  * @brief Defines the broadcast callback function.
35  *
36  * @since 4.1
37  * @version 1.0
38  */
39 typedef struct {
40     void (*OnStartBroadcastingCallback)(int32_t bcId, int32_t status);
41     void (*OnStopBroadcastingCallback)(int32_t bcId, int32_t status);
42     void (*OnUpdateBroadcastingCallback)(int32_t bcId, int32_t status);
43     void (*OnSetBroadcastingCallback)(int32_t bcId, int32_t status);
44     void (*OnSetBroadcastingParamCallback)(int32_t bcId, int32_t status);
45     void (*OnEnableBroadcastingCallback)(int32_t bcId, int32_t status);
46     void (*OnDisableBroadcastingCallback)(int32_t bcId, int32_t status);
47 } BroadcastCallback;
48 
49 /**
50  * @brief Defines the broadcast scan callback function.
51  *
52  * @since 4.1
53  * @version 1.0
54  */
55 typedef struct {
56     void (*OnStartScanCallback)(int32_t listenerId, int32_t status);
57     void (*OnStopScanCallback)(int32_t listenerId, int32_t status);
58     void (*OnReportScanDataCallback)(int32_t listenerId, const BroadcastReportInfo *reportInfo);
59     void (*OnScanStateChanged)(int32_t resultCode, bool isStartScan);
60     void (*OnLpDeviceInfoCallback)(const BroadcastUuid *uuid, int32_t type, uint8_t *data, uint32_t dataSize);
61 } ScanCallback;
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* SOFTBUS_BROADCAST_MANAGER_STRUCT_H */
68