1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef SOFTBUS_ADAPTER_WLAN_EXTEND_H
17 #define SOFTBUS_ADAPTER_WLAN_EXTEND_H
18 
19 #include <stdint.h>
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 typedef struct {
25     int32_t channelId;
26     int32_t chload;
27     int32_t noise;
28 } WlanChannelInfo;
29 
30 typedef struct {
31     int32_t *buff;
32     uint32_t num;
33     uint32_t measNum;
34 } ChannelList;
35 
36 typedef struct {
37     WlanChannelInfo *buff;
38     uint32_t num;
39 } ChannelInfoList;
40 
41 typedef struct {
42     int32_t (*onChannelInfoAvailable)(WlanChannelInfo *info, uint32_t num);
43     int32_t (*onFail)(int32_t errorCode);
44 } WlanChannelInfoCb;
45 
46 int32_t SoftBusRegWlanChannelInfoCb(WlanChannelInfoCb *cb);
47 int32_t SoftBusRequestWlanChannelInfo(int32_t *channelId, uint32_t num);
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 #endif // SOFTBUS_ADAPTER_WLAN_EXTEND_H