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 LNN_SELECT_RULE_H 17 #define LNN_SELECT_RULE_H 18 19 #include "lnn_lane_interface.h" 20 #include "lnn_lane_select.h" 21 #include "lnn_select_rule_struct.h" 22 #include "softbus_common.h" 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 int32_t UpdateP2pAvailability(const char *peerUdid, bool isSupportP2p); 29 int32_t GetWlanLinkedFrequency(void); 30 LinkAttribute *GetLinkAttrByLinkType(LaneLinkType linkType); 31 int32_t DecideAvailableLane(const char *networkId, const LaneSelectParam *request, 32 LanePreferredLinkList *recommendList); 33 int32_t DecideDefaultLink(const char *networkId, LaneTransType transType, LaneLinkType *resList, uint32_t *resNum); 34 int32_t DecideCustomLink(const char *networkId, CustomQos customQos, LaneLinkType *resList, uint32_t *resNum); 35 int32_t FinalDecideLinkType(const char *networkId, LaneLinkType *linkList, 36 uint32_t listNum, LanePreferredLinkList *recommendList); 37 int32_t LaneCheckLinkValid(const char *networkId, LaneLinkType linkType, LaneTransType transType); 38 int32_t DecideReuseLane(const char *networkId, const LaneSelectParam *request, 39 LanePreferredLinkList *recommendList); 40 bool IsSupportWifiDirectEnhance(const char *networkId); 41 int32_t InitLaneSelectRule(void); 42 void DeinitLaneSelectRule(void); 43 int32_t GetAllSupportReuseBandWidth(const char *peerNetworkId, LaneTransType transType, 44 uint32_t **supportBw, uint8_t *bwCnt); 45 int32_t GetSupportBandWidth(const char *peerNetworkId, LaneTransType transType, uint32_t *supportBw); 46 47 #ifdef __cplusplus 48 } 49 #endif 50 #endif // LNN_SELECT_RULE_H