• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_LENGTH, /* the default val is 4194304 */
29     SOFTBUS_INT_MAX_MESSAGE_LENGTH, /* the default val is 4096 */
30     SOFTBUS_INT_CONN_BR_MAX_DATA_LENGTH, /* the default val is 4096 */
31     SOFTBUS_INT_CONN_RFCOM_SEND_MAX_LEN, /* the default val is 990 */
32     SOFTBUS_INT_CONN_BR_RECEIVE_MAX_LEN, /* the default val is 10 */
33     SOFTBUS_INT_CONN_BR_MAX_CONN_NUM, /* the default val is 20 */
34     SOFTBUS_INT_CONN_TCP_MAX_LENGTH, /* the default val is 3072 */
35     SOFTBUS_INT_CONN_TCP_MAX_CONN_NUM, /* the default val is 30 */
36     SOFTBUS_INT_CONN_TCP_TIME_OUT, /* the default val is 100 */
37     SOFTBUS_INT_MAX_NODE_STATE_CB_CNT, /* the default val is 10 */
38     SOFTBUS_INT_MAX_LNN_CONNECTION_CNT, /* the default val is 10 */
39     SOFTBUS_INT_LNN_SUPPORT_CAPABILITY, /* the default val is 30 */
40     SOFTBUS_INT_AUTH_ABILITY_COLLECTION, /* the default val is 0 */
41     SOFTBUS_INT_ADAPTER_LOG_LEVEL, /* the default val is 0 */
42     SOFTBUS_STR_STORAGE_DIRECTORY, /* the max length is MAX_STORAGE_PATH_LEN */
43     SOFTBUS_INT_SUPPORT_TCP_PROXY, /* the l0 devices val is 0 , others is 1 */
44     SOFTBUS_INT_SUPPORT_SELECT_INTERVAL, /* the l0 devices val is 100000us , others is 10000us */
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_CONFIG_TYPE_MAX,
56 } ConfigType;
57 
58 typedef struct {
59     int32_t (* SetConfig)(ConfigType type, const unsigned char *val, uint32_t len);
60 } ConfigSetProc;
61 
62 #ifdef __cplusplus
63 #if __cplusplus
64 }
65 #endif
66 #endif /* __cplusplus */
67 
68 #endif