# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("../../core/common/dfx/dsoftbus_dfx.gni") import("../../core/transmission/trans_channel/trans_channel.gni") import("../../dsoftbus.gni") native_source_path = rebase_path("$dsoftbus_root_path") broadcast_dep_dir = "dsoftbus_enhance/core/transmission/trans_channel/ble_broadcast" enhanced_broadcast = exec_script("$dsoftbus_root_path/check_sub_module.py", [ "$native_source_path", "$broadcast_dep_dir", ], "value") trans_session_src = trans_channel_src trans_session_inc = trans_channel_inc trans_session_deps = trans_channel_deps trans_session_deps += [ "$dsoftbus_dfx_path/log:softbus_dfx_log" ] trans_session_external_deps = [] trans_session_src += [ "$dsoftbus_root_path/core/transmission/session/src/trans_session_manager.c", "$dsoftbus_root_path/core/transmission/session/src/trans_session_service.c", ] trans_session_inc += [ "$dsoftbus_root_path/core/transmission/ipc/include", "$dsoftbus_root_path/core/transmission/session/include", "$dsoftbus_root_path/core/transmission/interface", ] if (defined(ohos_lite)) { if (ohos_kernel_type == "liteos_m") { trans_session_src += [ "$dsoftbus_root_path/core/transmission/ipc/mini/trans_client_proxy.c", ] trans_session_inc += [ "$dsoftbus_root_path/sdk/transmission/trans_channel/manager/include" ] trans_session_deps += [ "//build/lite/config/component/cJSON:cjson_static" ] } else { trans_session_src += [ "$dsoftbus_root_path/core/transmission/ipc/small/trans_client_proxy.c", ] trans_session_deps += [ "//build/lite/config/component/cJSON:cjson_shared", "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", ] } } else { trans_session_inc += [ "$dsoftbus_root_path/core/transmission/ipc/$os_type/include", "$dsoftbus_root_path/sdk/frame/$os_type/include", "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct", "//third_party/cJSON", "//third_party/bounds_checking_function/include", ] trans_session_src += [ "$dsoftbus_root_path/core/transmission/ipc/$os_type/src/trans_client_proxy.cpp", "$dsoftbus_root_path/core/transmission/ipc/$os_type/src/trans_client_proxy_standard.cpp", ] if (enhanced_broadcast) { import( "$dsoftbus_root_path/dsoftbus_enhance/core/transmission/trans_channel/ble_broadcast/ble_broadcast.gni") trans_session_src += broadcast_sources trans_session_inc += broadcast_include_dirs } else { trans_session_inc += [ "$dsoftbus_root_path/core/transmission/broadcast/include" ] trans_session_src += [ "$dsoftbus_root_path/core/transmission/broadcast/src/trans_spec_object_stub.cpp" ] } trans_session_deps += [ "//third_party/bounds_checking_function:libsec_shared" ] trans_session_external_deps += [ "c_utils:utils" ] } if (dsoftbus_feature_wifi_notify == true && softbus_communication_wifi_feature == true) { trans_session_src += [ "$dsoftbus_root_path/core/transmission/session/src/softbus_scenario_manager.c" ] trans_session_external_deps += [ "wifi:wifi_sdk" ] } else { trans_session_src += [ "$dsoftbus_root_path/core/transmission/session/src/softbus_scenario_manager_virtual.c" ] }