1  /*
2   * Copyright (c) 2021 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_CONFIG_TYPE_H
17  #define SOFTBUS_CONFIG_TYPE_H
18  
19  #include <stdint.h>
20  
21  #ifdef __cplusplus
22  #if __cplusplus
23  extern "C" {
24  #endif
25  #endif /* __cplusplus */
26  
27  typedef enum {
28      SOFTBUS_INT_MAX_BYTES_NEW_LENGTH, /* the default val is 4194304 */
29      SOFTBUS_INT_MAX_MESSAGE_NEW_LENGTH, /* the default val is 4096 */
30      SOFTBUS_INT_MAX_BYTES_LENGTH, /* the default val is 4194304 */
31      SOFTBUS_INT_MAX_MESSAGE_LENGTH, /* the default val is 4096 */
32      SOFTBUS_INT_CONN_BR_MAX_DATA_LENGTH, /* the default val is 4096 */
33      SOFTBUS_INT_CONN_RFCOM_SEND_MAX_LEN, /* the default val is 990 */
34      SOFTBUS_INT_CONN_BR_RECEIVE_MAX_LEN, /* the default val is 10 */
35      SOFTBUS_INT_CONN_TCP_MAX_LENGTH, /* the default val is 3072 */
36      SOFTBUS_INT_CONN_TCP_MAX_CONN_NUM, /* the default val is 30 */
37      SOFTBUS_INT_CONN_TCP_TIME_OUT, /* the default val is 100 */
38      SOFTBUS_INT_MAX_NODE_STATE_CB_CNT, /* the default val is 10 */
39      SOFTBUS_INT_MAX_LNN_CONNECTION_CNT, /* the default val is 10 */
40      SOFTBUS_INT_LNN_SUPPORT_CAPABILITY, /* the default val is 30 */
41      SOFTBUS_INT_AUTH_ABILITY_COLLECTION, /* the default val is 0 */
42      SOFTBUS_INT_ADAPTER_LOG_LEVEL, /* the default val is 0 */
43      SOFTBUS_STR_STORAGE_DIRECTORY, /* the max length is MAX_STORAGE_PATH_LEN */
44      SOFTBUS_INT_SUPPORT_TCP_PROXY, /* the l0 devices val is 0 , others is 1 */
45      SOFTBUS_INT_LNN_UDID_INIT_DELAY_LEN, /* the default val is 0 */
46      SOFTBUS_STR_LNN_NET_IF_NAME, /* the default val is 0:eth0,1:wlan0 */
47      SOFTBUS_INT_LNN_MAX_CONCURRENT_NUM, /* the default val is 0 */
48      SOFTBUS_INT_AUTH_MAX_BYTES_LENGTH, /* L1: 4K, L2: 64K */
49      SOFTBUS_INT_AUTH_MAX_MESSAGE_LENGTH, /* L1: 1K, L2: 4K */
50      SOFTBUS_INT_AUTO_NETWORKING_SWITCH, /* support auto networking: true, not support: false */
51      SOFTBUS_BOOL_SUPPORT_TOPO, /* support: true, not support: false */
52      SOFTBUS_INT_DISC_FREQ, /* the default val is 5s 12 times */
53      SOFTBUS_INT_PROXY_MAX_BYTES_LENGTH, /* 4K */
54      SOFTBUS_INT_PROXY_MAX_MESSAGE_LENGTH, /* 1K */
55      SOFTBUS_INT_LNN_SUPPORT_FEATURE, /* the default val is 30658 */
56      SOFTBUS_INT_CONN_COC_MAX_DATA_LENGTH, /* the default val is 4096 */
57      SOFTBUS_INT_CONN_COC_SEND_MTU, /* the default val is 990 */
58      SOFTBUS_INT_CONN_BLE_CLOSE_DELAY_TIME, /* the default val is 1000 */
59      SOFTBUS_INT_BLE_MAC_AUTO_REFRESH_SWITCH, /* the default val is 1 */
60      SOFTBUS_INT_DISC_COAP_MAX_DEVICE_NUM, /* the default val is 20 */
61      SOFTBUS_CONFIG_TYPE_MAX,
62  } ConfigType;
63  
64  typedef struct {
65      int32_t (* SetConfig)(ConfigType type, const unsigned char *val, uint32_t len);
66  } ConfigSetProc;
67  
68  #ifdef __cplusplus
69  #if __cplusplus
70  }
71  #endif
72  #endif /* __cplusplus */
73  
74  #endif /* SOFTBUS_CONFIG_TYPE_H */