• 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 #ifndef G_ENHANCE_ADAPTER_FUNC_H
17 #define G_ENHANCE_ADAPTER_FUNC_H
18 
19 #include "stdint.h"
20 #include "softbus_adapter_range.h"
21 #include "softbus_config_type.h"
22 #include "softbus_adapter_sle_common_struct.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 typedef int32_t (*SoftBusRegRangeCbFunc)(SoftBusRangeModule module, const SoftBusRangeCallback *callback);
29 typedef void (*SoftBusUnregRangeCbFunc)(SoftBusRangeModule module);
30 typedef int (*SoftBusBleRangeFunc)(SoftBusRangeParam *param, int32_t *range);
31 typedef int (*SoftBusGetBlePowerFunc)(int8_t *power);
32 typedef int32_t (*SoftBusAddSleStateListenerFunc)(const SoftBusSleStateListener *listener, int32_t *listenerId);
33 typedef bool (*IsSleEnabledFunc)(void);
34 typedef void (*SoftBusRemoveSleStateListenerFunc)(int listenerId);
35 typedef int32_t (*GetSleRangeCapacityFunc)(void);
36 typedef int32_t (*GetLocalSleAddrFunc)(char *sleAddr, uint32_t sleAddrLen);
37 typedef void (*SoftbusBleAdapterInitFunc)(void);
38 typedef void (*SoftbusBleAdapterDeInitFunc)(void);
39 typedef void (*RegisterRadarCbForOpenSrcFunc)(void *callback);
40 typedef void (*SoftbusSleAdapterInit)(void);
41 typedef void (*SoftbusSleAdapterDeInit)(void);
42 
43 typedef struct TagAdapterEnhanceFuncList {
44     SoftBusRegRangeCbFunc softBusRegRangeCb;
45     SoftBusUnregRangeCbFunc softBusUnregRangeCb;
46     SoftBusBleRangeFunc softBusBleRange;
47     SoftBusGetBlePowerFunc softBusGetBlePower;
48     SoftBusAddSleStateListenerFunc softBusAddSleStateListener;
49     IsSleEnabledFunc isSleEnabled;
50     SoftBusRemoveSleStateListenerFunc softBusRemoveSleStateListener;
51     GetSleRangeCapacityFunc getSleRangeCapacity;
52     GetLocalSleAddrFunc getLocalSleAddr;
53     SoftbusBleAdapterInitFunc softbusBleAdapterInit;
54     SoftbusBleAdapterDeInitFunc softbusBleAdapterDeInit;
55     RegisterRadarCbForOpenSrcFunc registerRadarCbForOpenSrc;
56     SoftbusSleAdapterInit softbusSleAdapterInit;
57     SoftbusSleAdapterDeInit softbusSleAdapterDeInit;
58 } AdapterEnhanceFuncList;
59 
60 AdapterEnhanceFuncList *AdapterEnhanceFuncListGet(void);
61 int32_t AdapterRegisterEnhanceFunc(void *soHandle);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif