1060ff233Sopenharmony_ci# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2060ff233Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3060ff233Sopenharmony_ci# you may not use this file except in compliance with the License. 4060ff233Sopenharmony_ci# You may obtain a copy of the License at 5060ff233Sopenharmony_ci# 6060ff233Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7060ff233Sopenharmony_ci# 8060ff233Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9060ff233Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10060ff233Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11060ff233Sopenharmony_ci# See the License for the specific language governing permissions and 12060ff233Sopenharmony_ci# limitations under the License. 13060ff233Sopenharmony_ci 14060ff233Sopenharmony_ciimport("../../../core/common/dfx/dsoftbus_dfx.gni") 15060ff233Sopenharmony_ciimport("../../../dsoftbus.gni") 16060ff233Sopenharmony_ci 17060ff233Sopenharmony_ciadapter_bus_center_path = "$softbus_adapter_common/bus_center" 18060ff233Sopenharmony_ci 19060ff233Sopenharmony_cibus_center_adapter_src = [] 20060ff233Sopenharmony_cibus_center_adapter_inc = [ 21060ff233Sopenharmony_ci "$softbus_adapter_common/bus_center/include", 22060ff233Sopenharmony_ci "$dsoftbus_root_path/core/common/dfx/interface/include", 23060ff233Sopenharmony_ci] 24060ff233Sopenharmony_cibus_center_adapter_deps = 25060ff233Sopenharmony_ci [ "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log" ] 26060ff233Sopenharmony_ci 27060ff233Sopenharmony_ciif (!defined(global_parts_info) || 28060ff233Sopenharmony_ci defined(global_parts_info.notification_common_event_service)) { 29060ff233Sopenharmony_ci has_ces_part = true 30060ff233Sopenharmony_ci} else { 31060ff233Sopenharmony_ci has_ces_part = false 32060ff233Sopenharmony_ci} 33060ff233Sopenharmony_ci 34060ff233Sopenharmony_ciif (defined(ohos_lite)) { 35060ff233Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 36060ff233Sopenharmony_ci if (dsoftbus_feature_lnn_net) { 37060ff233Sopenharmony_ci bus_center_adapter_src += [ 38060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 39060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 40060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", 41060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_lwip_monitor.c", 42060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", 43060ff233Sopenharmony_ci "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 44060ff233Sopenharmony_ci "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 45060ff233Sopenharmony_ci "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 46060ff233Sopenharmony_ci "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 47060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", 48060ff233Sopenharmony_ci ] 49060ff233Sopenharmony_ci } 50060ff233Sopenharmony_ci } else if (ohos_kernel_type == "linux") { 51060ff233Sopenharmony_ci if (dsoftbus_feature_lnn_net) { 52060ff233Sopenharmony_ci bus_center_adapter_src += [ 53060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 54060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 55060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_linkwatch.c", 56060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 57060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netlink_monitor.c", 58060ff233Sopenharmony_ci "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 59060ff233Sopenharmony_ci "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 60060ff233Sopenharmony_ci "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 61060ff233Sopenharmony_ci "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 62060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", 63060ff233Sopenharmony_ci ] 64060ff233Sopenharmony_ci } 65060ff233Sopenharmony_ci } else if (ohos_kernel_type == "liteos_a") { 66060ff233Sopenharmony_ci bus_center_adapter_inc += [ 67060ff233Sopenharmony_ci "//drivers/hdf_core/adapter/uhdf/posix/include", 68060ff233Sopenharmony_ci "//drivers/hdf_core/framework/include/utils", 69060ff233Sopenharmony_ci "//drivers/hdf_core/framework/include/core", 70060ff233Sopenharmony_ci "//drivers/hdf_core/framework/ability/sbuf/include", 71060ff233Sopenharmony_ci ] 72060ff233Sopenharmony_ci if (dsoftbus_feature_lnn_net) { 73060ff233Sopenharmony_ci bus_center_adapter_src += [ 74060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_hdf_driver_monitor.c", 75060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_hdf_driver_request.c", 76060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", 77060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 78060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", 79060ff233Sopenharmony_ci "$adapter_bus_center_path/platform/lnn_product_monitor.c", 80060ff233Sopenharmony_ci "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 81060ff233Sopenharmony_ci "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 82060ff233Sopenharmony_ci "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 83060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", 84060ff233Sopenharmony_ci ] 85060ff233Sopenharmony_ci bus_center_adapter_inc += [ 86060ff233Sopenharmony_ci "//drivers/hdf_core/framework/core/shared/include", 87060ff233Sopenharmony_ci "//drivers/hdf_core/framework/include", 88060ff233Sopenharmony_ci ] 89060ff233Sopenharmony_ci bus_center_adapter_deps += [ 90060ff233Sopenharmony_ci "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", 91060ff233Sopenharmony_ci "//drivers/hdf_core/adapter/uhdf/platform:hdf_platform", 92060ff233Sopenharmony_ci "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", 93060ff233Sopenharmony_ci ] 94060ff233Sopenharmony_ci } 95060ff233Sopenharmony_ci } 96060ff233Sopenharmony_ci} else { 97060ff233Sopenharmony_ci bus_center_adapter_external_deps = [] 98060ff233Sopenharmony_ci if (has_ces_part) { 99060ff233Sopenharmony_ci bus_center_adapter_src += [ 100060ff233Sopenharmony_ci "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor.cpp", 101060ff233Sopenharmony_ci "$adapter_bus_center_path/common_event/lnn_common_event_monitor.cpp", 102060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netmanager_listener.cpp", 103060ff233Sopenharmony_ci ] 104060ff233Sopenharmony_ci bus_center_adapter_external_deps += [ 105060ff233Sopenharmony_ci "ability_base:want", 106060ff233Sopenharmony_ci "common_event_service:cesfwk_innerkits", 107060ff233Sopenharmony_ci "init:libbeget_proxy", 108060ff233Sopenharmony_ci "netmanager_base:net_conn_manager_if", 109060ff233Sopenharmony_ci "power_manager:powermgr_client", 110060ff233Sopenharmony_ci ] 111060ff233Sopenharmony_ci } else { 112060ff233Sopenharmony_ci bus_center_adapter_src += [ 113060ff233Sopenharmony_ci "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", 114060ff233Sopenharmony_ci "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", 115060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", 116060ff233Sopenharmony_ci ] 117060ff233Sopenharmony_ci } 118060ff233Sopenharmony_ci if (dsoftbus_feature_lnn_net) { 119060ff233Sopenharmony_ci bus_center_adapter_src += [ 120060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", 121060ff233Sopenharmony_ci "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", 122060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_linkwatch.c", 123060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", 124060ff233Sopenharmony_ci "$adapter_bus_center_path/network/lnn_netlink_monitor.c", 125060ff233Sopenharmony_ci "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", 126060ff233Sopenharmony_ci ] 127060ff233Sopenharmony_ci if (dsoftbus_feature_lnn_wifiservice_dependence && has_ces_part) { 128060ff233Sopenharmony_ci bus_center_adapter_src += 129060ff233Sopenharmony_ci [ "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor.cpp" ] 130060ff233Sopenharmony_ci bus_center_adapter_external_deps += [ 131060ff233Sopenharmony_ci "ability_base:want", 132060ff233Sopenharmony_ci "wifi:wifi_sdk", 133060ff233Sopenharmony_ci ] 134060ff233Sopenharmony_ci } else { 135060ff233Sopenharmony_ci bus_center_adapter_src += [ 136060ff233Sopenharmony_ci "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", 137060ff233Sopenharmony_ci ] 138060ff233Sopenharmony_ci } 139060ff233Sopenharmony_ci } 140060ff233Sopenharmony_ci} 141060ff233Sopenharmony_ci 142060ff233Sopenharmony_ciif (dsoftbus_feature_lnn_net) { 143060ff233Sopenharmony_ci if (support_bluetooth && 144060ff233Sopenharmony_ci (dsoftbus_feature_conn_br || dsoftbus_feature_conn_ble)) { 145060ff233Sopenharmony_ci bus_center_adapter_src += 146060ff233Sopenharmony_ci [ "$adapter_bus_center_path/network/lnn_bt_monitor.c" ] 147060ff233Sopenharmony_ci bus_center_adapter_inc += [ 148060ff233Sopenharmony_ci "$softbus_adapter_common/net/bluetooth/include", 149060ff233Sopenharmony_ci "$dsoftbus_root_path/core/common/dfx/interface/include", 150060ff233Sopenharmony_ci ] 151060ff233Sopenharmony_ci bus_center_adapter_external_deps += [ "wifi:wifi_sdk" ] 152060ff233Sopenharmony_ci bus_center_adapter_deps += 153060ff233Sopenharmony_ci [ "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log" ] 154060ff233Sopenharmony_ci } else { 155060ff233Sopenharmony_ci bus_center_adapter_src += 156060ff233Sopenharmony_ci [ "$adapter_bus_center_path/network/lnn_bt_monitor_virtual.c" ] 157060ff233Sopenharmony_ci } 158060ff233Sopenharmony_ci} 159