1# Copyright (c) 2021 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("../../core/connection/ble/conn_ble.gni") 15import("../../core/connection/br/conn_br.gni") 16import("../../dsoftbus.gni") 17 18#import("//foundation/communication/dsoftbus/core/connection/common/conn_common.gni") 19import("../../core/connection/tcp/conn_tcp.gni") 20CONN_SERVER_DEFINES = [] 21conn_manager_src = ble_connection_src + br_connection_src + tcp_connection_src 22conn_manager_inc = ble_connection_inc + br_connection_inc + tcp_connection_inc 23conn_manager_external_deps = ble_connection_external_deps 24conn_manager_common_deps = [ "$dsoftbus_dfx_path:softbus_dfx" ] 25 26conn_manager_src += [ 27 "$dsoftbus_root_path/core/connection/manager/softbus_conn_manager.c", 28 "$dsoftbus_root_path/core/connection/manager/softbus_conn_flow_control.c", 29] 30conn_manager_inc += [ 31 "$dsoftbus_root_path/core/connection/manager", 32 "$dsoftbus_root_path/core/connection/interface", 33 "$dsoftbus_root_path/core/common/include", 34 "$dsoftbus_root_path/core/connection/coap/include", 35] 36if (dsoftbus_feature_conn_tcp_comm) { 37 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_TCP_COMM" ] 38 if (dsoftbus_feature_conn_tcp_proxy) { 39 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_TCP_PROXY" ] 40 } 41} 42if (dsoftbus_feature_conn_ble) { 43 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_BLE" ] 44} 45if (dsoftbus_feature_conn_br) { 46 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_BR" ] 47} 48 49if (dsoftbus_feature_ex_kits) { 50 import( 51 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/coap/conn_coap.gni") 52 53 conn_manager_inc += conn_coap_inc 54 conn_manager_src += conn_coap_src 55 conn_manager_common_deps += conn_coap_common_deps 56 conn_manager_external_deps += conn_coap_external_deps 57 58 import( 59 "$dsoftbus_root_path/dsoftbus_enhance/core/connection/legacy/legacy.gni") 60 61 conn_manager_inc += legacy_connection_inc 62 conn_manager_src += legacy_connection_src 63 conn_manager_common_deps += legacy_connection_common_deps 64 conn_manager_external_deps += legacy_connection_external_deps 65 if (dsoftbus_feature_conn_ble_direct) { 66 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_BLE_DIRECT" ] 67 } 68 if (dsoftbus_feature_conn_coc) { 69 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_COC" ] 70 } 71 if (dsoftbus_feature_conn_legacy_data) { 72 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_LEGACY_DATA" ] 73 } 74 if (dsoftbus_feature_conn_legacy_im) { 75 CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_LEGACY_IM" ] 76 } 77} else { 78 conn_manager_src += [ 79 "$dsoftbus_root_path/adapter/common/net/bluetooth/ble/softbus_adapter_ble_conflict_virtual.c", 80 "$dsoftbus_root_path/core/connection/coap/src/conn_coap_manager_virtual.c", 81 ] 82} 83