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("../../../dsoftbus.gni") 15 16native_source_path = rebase_path("$dsoftbus_root_path") 17trans_session_sdk_src = [ 18 "$dsoftbus_sdk_path/transmission/session/src/client_trans_session_callback.c", 19 "$dsoftbus_sdk_path/transmission/session/src/client_trans_session_manager.c", 20 "$dsoftbus_sdk_path/transmission/session/src/client_trans_message_service.c", 21 "$dsoftbus_sdk_path/transmission/session/src/client_trans_session_service.c", 22 "$dsoftbus_sdk_path/transmission/session/src/client_trans_socket_service.c", 23] 24 25broadcast_dep_dir = "dsoftbus_enhance/interfaces/kits/broadcast" 26enhanced_kits_broadcast = exec_script("$dsoftbus_root_path/check_sub_module.py", 27 [ 28 "$native_source_path", 29 "$broadcast_dep_dir", 30 ], 31 "value") 32if (defined(ohos_lite)) { 33 trans_session_sdk_inc = [ 34 "$dsoftbus_sdk_path/transmission/session/include", 35 "$dsoftbus_root_path/interfaces/inner_kits/transport", 36 "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include", 37 "//third_party/cJSON", 38 ] 39} else { 40 trans_session_sdk_inc = [ 41 "$dsoftbus_sdk_path/transmission/session/include", 42 "$dsoftbus_sdk_path/transmission/session/cpp/include", 43 "$dsoftbus_sdk_path/transmission/session/cpp/src", 44 "$dsoftbus_root_path/interfaces/inner_kits/transport", 45 "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include", 46 ] 47 48 trans_session_sdk_src += [ 49 "$dsoftbus_root_path/sdk/transmission/session/cpp/src/session_callback_mock.cpp", 50 "$dsoftbus_root_path/sdk/transmission/session/cpp/src/session_impl.cpp", 51 "$dsoftbus_root_path/sdk/transmission/session/cpp/src/session_mock.cpp", 52 "$dsoftbus_root_path/sdk/transmission/session/cpp/src/session_service_impl.cpp", 53 ] 54 55 broadcast_dep_dir = 56 "dsoftbus_enhance/core/transmission/trans_channel/ble_broadcast" 57 enhanced_broadcast = exec_script("$dsoftbus_root_path/check_sub_module.py", 58 [ 59 "$native_source_path", 60 "$broadcast_dep_dir", 61 ], 62 "value") 63 if (enhanced_broadcast) { 64 import( 65 "$dsoftbus_root_path/dsoftbus_enhance/sdk/transmission/trans_channel/ble_broadcast/broadcast_sdk.gni") 66 67 trans_session_sdk_src += broadcast_sources 68 trans_session_sdk_inc += broadcast_include_dirs 69 } else { 70 trans_session_sdk_inc += 71 [ "$dsoftbus_root_path/core/transmission/broadcast/include" ] 72 trans_session_sdk_src += [ "$dsoftbus_root_path/core/transmission/broadcast/src/trans_spec_object_proxy.cpp" ] 73 } 74} 75 76dep_schema = "dsoftbus_enhance/sdk/transmission/session/src" 77schema_enhanced = exec_script("$dsoftbus_root_path/check_sub_module.py", 78 [ 79 "$native_source_path", 80 "$dep_schema", 81 ], 82 "value") 83 84if (schema_enhanced) { 85 import( 86 "../../../dsoftbus_enhance/sdk/transmission/session/src/trans_schema.gni") 87 88 trans_session_sdk_src += schema_src 89 trans_session_sdk_inc += schema_inc 90} 91