• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2025 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
18import("$dsoftbus_root_path/core/connection/general/general_connection.gni")
19import("$dsoftbus_root_path/core/connection/proxy/proxy_connection.gni")
20
21#import("//foundation/communication/dsoftbus/core/connection/common/conn_common.gni")
22import("../../core/connection/tcp/conn_tcp.gni")
23
24CONN_SERVER_DEFINES = []
25conn_manager_src = ble_connection_src + br_connection_src + tcp_connection_src +
26                   general_connection_src + proxy_connection_src
27conn_manager_inc = ble_connection_inc + br_connection_inc + tcp_connection_inc +
28                   general_connection_inc + proxy_connection_inc
29conn_manager_external_deps = ble_connection_external_deps
30conn_manager_common_deps = [ "$dsoftbus_dfx_path:softbus_dfx" ]
31
32conn_manager_src += [
33  "$dsoftbus_root_path/core/connection/manager/softbus_conn_manager.c",
34  "$dsoftbus_root_path/core/connection/manager/softbus_conn_flow_control.c",
35  "$dsoftbus_root_path/core/connection/manager/softbus_conn_ipc.c",
36]
37conn_manager_inc += [
38  "$dsoftbus_root_path/interfaces/kits/connection",
39  "$dsoftbus_root_path/core/connection/manager",
40  "$dsoftbus_root_path/interfaces/kits/connect",
41  "$dsoftbus_root_path/core/connection/interface",
42  "$dsoftbus_root_path/core/common/include",
43  "$dsoftbus_root_path/core/connection/coap/include",
44  "$dsoftbus_root_path/core/connection/sle/include",
45  "$dsoftbus_root_path/core/connection/ipc/include",
46]
47if (dsoftbus_feature_conn_tcp_comm) {
48  CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_TCP_COMM" ]
49  if (dsoftbus_feature_conn_tcp_proxy) {
50    CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_TCP_PROXY" ]
51  }
52}
53if (dsoftbus_feature_conn_ble) {
54  CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_BLE" ]
55}
56if (dsoftbus_feature_conn_br) {
57  CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_BR" ]
58}
59
60if (dsoftbus_feature_conn_ble_direct) {
61  CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_BLE_DIRECT" ]
62}
63
64if (dsoftbus_feature_conn_coc) {
65  CONN_SERVER_DEFINES += [ "DSOFTBUS_FEATURE_CONN_COC" ]
66}
67
68conn_manager_inc += [ "$dsoftbus_root_path/core/connection/ipc/include" ]
69if (defined(ohos_lite)) {
70  if (ohos_kernel_type == "liteos_m") {
71    conn_manager_src += [
72      "$dsoftbus_root_path/core/connection/ipc/mini/general_connection_client_proxy.c",
73    ]
74  } else {
75    conn_manager_src += [
76      "$dsoftbus_root_path/core/connection/ipc/small/general_connection_client_proxy.c",
77    ]
78  }
79} else {
80  conn_manager_src += [
81    "$dsoftbus_root_path/core/connection/ipc/$os_type/src/general_connection_client_proxy.cpp",
82    "$dsoftbus_root_path/core/connection/ipc/$os_type/src/general_connection_client_proxy_standard.cpp",
83  ]
84  conn_manager_inc +=
85      [ "$dsoftbus_root_path/core/connection/ipc/$os_type/include" ]
86}