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 #ifndef LNN_LANE_VAP_INFO_H 17 #define LNN_LANE_VAP_INFO_H 18 19 #include <stdint.h> 20 #include <stdbool.h> 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 #define LNN_INVALID_CHANNEL_ID (-1) 27 28 typedef enum { 29 LNN_VAP_UNKNOWN = -1, 30 LNN_VAP_HML = 0, 31 LNN_VAP_STA, 32 LNN_VAP_P2P, 33 LNN_VAP_AP, 34 LNN_VAP_BUTT, 35 } LnnVapType; 36 37 typedef struct { 38 bool isEnable; 39 int32_t channelId; 40 uint32_t availableLinkNums; /* reserved */ 41 } LnnVapAttr; 42 43 int32_t LnnInitVapInfo(void); 44 void LnnDeinitVapInfo(void); 45 46 int32_t LnnAddLocalVapInfo(LnnVapType type, const LnnVapAttr *vapAttr); 47 int32_t LnnDeleteLocalVapInfo(LnnVapType type); 48 int32_t LnnGetLocalVapInfo(LnnVapType type, LnnVapAttr *vapAttr); 49 int32_t LnnAddRemoteVapInfo(const char *udid, LnnVapType type, const LnnVapAttr *vapAttr); 50 int32_t LnnDeleteRemoteVapInfo(const char *udid); 51 int32_t LnnGetRemoteVapInfo(const char *udid, LnnVapType type, LnnVapAttr *vapAttr); 52 int32_t LnnGetLocalPreferChannel(void); 53 int32_t LnnGetLocalChannelCode(void); 54 int32_t LnnAddRemoteChannelCode(const char *udid, int32_t channelCode); 55 int32_t LnnGetRecommendChannel(const char *udid, int32_t *preferChannel); 56 57 #ifdef __cplusplus 58 } 59 #endif 60 #endif // LNN_LANE_VAP_INFO_H