1 /*
2  * Copyright (c) 2023 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_FEATURE_CAPABILITY_H
17 #define LNN_FEATURE_CAPABILITY_H
18 
19 #include <stdint.h>
20 #include "softbus_bus_center.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 typedef enum {
27     BIT_WIFI_P2P_REUSE = 1,
28     BIT_BR_DUP,
29     BIT_WIFI_DIRECT_TLV_NEGOTIATION,
30     BIT_META_NODE_CAPABILITY,
31     BIT_INFO_COMPRESS,
32     BIT_SUPPOURT_EX_CAPABILITY,
33     BIT_WIFI_DIRECT_NO_DISCONNECT_RESP,
34     BIT_SUPPORT_UNIFORM_NAME_CAPABILITY,
35     BIT_BLE_ONLINE_REUSE_CAPABILITY,
36     BIT_COC_CONNECT_CAPABILITY,
37     BIT_BLE_SUPPORT_LP_HEARTBEAT, // support burst and lowpower
38     BIT_BLE_DIRECT_ONLINE,
39     BIT_BLE_DIRECT_CONNECT_CAPABILITY,
40     BIT_SUPPORT_NEGO_P2P_BY_CHANNEL_CAPABILITY,
41     BIT_BLE_TRIGGER_CONNECTION,
42     BIT_SUPPORT_THREE_STATE,
43     BIT_CLOUD_SYNC_DEVICE_INFO,
44     BIT_FEATURE_COUNT,
45 } FeatureCapability;
46 
47 uint64_t LnnGetFeatureCapabilty(void);
48 bool IsFeatureSupport(uint64_t feature, FeatureCapability capaBit);
49 int32_t LnnSetFeatureCapability(uint64_t *feature, FeatureCapability capaBit);
50 int32_t LnnClearFeatureCapability(uint64_t *feature, FeatureCapability capaBit);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif // LNN_FEATURE_CAPABILITY_H