1# Copyright (c) 2021-2023 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. 13import("../../adapter/common/net/bluetooth/net_bluetooth.gni") 14import("../../core/common/dfx/dsoftbus_dfx.gni") 15import("../../dsoftbus.gni") 16 17br_adapter_src = 18 [ "$dsoftbus_root_path/core/adapter/br/mock/wrapper_br_interface.c" ] 19 20br_adapter_inc = [ "$dsoftbus_root_path/core/adapter/br/include" ] 21 22bus_center_core_adapter_src = [ 23 "$dsoftbus_root_path/core/adapter/bus_center/src/bus_center_adapter.c", 24 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_deviceinfo_to_profile_virtual.c", 25 "$dsoftbus_root_path/core/adapter/transmission/src/data_bus_native_virtual.c", 26 "$dsoftbus_root_path/core/adapter/authentication/src/lnn_extdata_config_virtual.c", 27] 28bus_center_core_adapter_inc = [ "$dsoftbus_root_path/adapter/common/include" ] 29bus_center_core_adapter_deps = [ "$dsoftbus_dfx_path/log:softbus_dfx_log" ] 30bus_center_core_adapter_external_deps = [ "init:libbegetutil" ] 31 32if (dsoftbus_feature_lnn_cloud_sync) { 33 bus_center_core_adapter_external_deps += [ "kv_store:distributeddata_inner" ] 34 bus_center_core_adapter_src += [ 35 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_kv_adapter_wrapper.cpp", 36 "$dsoftbus_root_path/core/adapter/kv_store/src/lnn_kv_adapter.cpp", 37 "$dsoftbus_root_path/core/adapter/kv_store/src/lnn_kv_data_change_listener.cpp", 38 "$dsoftbus_root_path/core/adapter/subscribe_kv_store_sa/src/lnn_kv_store_launch_listener.cpp", 39 ] 40 bus_center_core_adapter_inc += [ 41 "$dsoftbus_root_path/core/adapter/kv_store/include", 42 "$dsoftbus_root_path/core/adapter/subscribe_kv_store_sa/include", 43 ] 44} else { 45 bus_center_core_adapter_src += [ "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_kv_adapter_wrapper_virtual.cpp" ] 46} 47 48if (defined(ohos_lite)) { 49 bus_center_core_adapter_src += [ 50 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp", 51 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_virtual.cpp", 52 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp", 53 ] 54 bus_center_core_adapter_inc += [ 55 "$dsoftbus_root_path/core/adapter/bus_center/include", 56 "$dsoftbus_root_path/core/bus_center/utils/include", 57 "//base/startup/init/interfaces/innerkits/include/syspara", 58 ] 59 60 bus_center_core_adapter_deps += 61 [ "//base/startup/init/interfaces/innerkits:libbegetutil" ] 62 63 if (dsoftbus_feature_encrypt == 0) { 64 bus_center_core_adapter_src += [ 65 "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt_virtual.c", 66 ] 67 bus_center_core_adapter_inc += 68 [ "$dsoftbus_root_path/core/adapter/huks/include" ] 69 } else if (dsoftbus_feature_encrypt == 1) { 70 bus_center_core_adapter_src += 71 [ "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt.c" ] 72 bus_center_core_adapter_inc += 73 [ "$dsoftbus_root_path/core/adapter/huks/include" ] 74 bus_center_core_adapter_external_deps += [ 75 "huks:libhukssdk", 76 "openssl:libcrypto_shared", 77 ] 78 } 79} else { 80 if (!dsoftbus_get_devicename) { 81 bus_center_core_adapter_src += [ "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor_virtual.cpp" ] 82 bus_center_core_adapter_inc += 83 [ "$dsoftbus_root_path/core/adapter/bus_center/include" ] 84 } else { 85 bus_center_core_adapter_src += [ "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_settingdata_event_monitor.cpp" ] 86 87 bus_center_core_adapter_inc += [ 88 "$dsoftbus_root_path/adapter/common/bus_center/include", 89 "$dsoftbus_root_path/core/adapter/bus_center/include", 90 ] 91 92 bus_center_core_adapter_external_deps += [ 93 "ability_base:want", 94 "ability_base:zuri", 95 "ability_runtime:abilitykit_native", 96 "ability_runtime:dataobs_manager", 97 "data_share:datashare_common", 98 "data_share:datashare_consumer", 99 "relational_store:native_dataability", 100 "relational_store:native_rdb", 101 ] 102 } 103 if (softbus_os_account) { 104 bus_center_core_adapter_src += [ 105 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account.cpp", 106 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter.cpp", 107 ] 108 bus_center_core_adapter_external_deps += [ 109 "os_account:libaccountkits", 110 "os_account:os_account_innerkits", 111 ] 112 } else { 113 bus_center_core_adapter_src += [ 114 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_virtual.cpp", 115 "$dsoftbus_root_path/core/adapter/bus_center/src/lnn_ohos_account_adapter_virtual.cpp", 116 ] 117 } 118 if (dsoftbus_feature_encrypt == 0) { 119 bus_center_core_adapter_src += [ 120 "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt_virtual.c", 121 ] 122 bus_center_core_adapter_inc += 123 [ "$dsoftbus_root_path/core/adapter/huks/include" ] 124 } else if (dsoftbus_feature_encrypt == 1) { 125 bus_center_core_adapter_src += 126 [ "$dsoftbus_root_path/core/adapter/huks/src/softbus_rsa_encrypt.c" ] 127 bus_center_core_adapter_inc += 128 [ "$dsoftbus_root_path/core/adapter/huks/include" ] 129 bus_center_core_adapter_external_deps += [ 130 "huks:libhukssdk", 131 "openssl:libcrypto_shared", 132 ] 133 } 134} 135