# Copyright (c) 2021-2022 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("../../../dsoftbus.gni") adapter_bus_center_path = "$softbus_adapter_common/bus_center" bus_center_adapter_src = [] bus_center_adapter_inc = [ "$softbus_adapter_common/bus_center/include", "$dsoftbus_root_path/core/common/dfx/interface/include", ] bus_center_adapter_deps = [ "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log" ] if (!defined(global_parts_info) || defined(global_parts_info.notification_common_event_service)) { has_ces_part = true } else { has_ces_part = false } if (defined(ohos_lite)) { if (ohos_kernel_type == "liteos_m") { if (dsoftbus_feature_lnn_net) { bus_center_adapter_src += [ "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", "$adapter_bus_center_path/network/lnn_lwip_monitor.c", "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", ] } } else if (ohos_kernel_type == "linux") { if (dsoftbus_feature_lnn_net) { bus_center_adapter_src += [ "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", "$adapter_bus_center_path/network/lnn_linkwatch.c", "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", "$adapter_bus_center_path/network/lnn_netlink_monitor.c", "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", ] } } else if (ohos_kernel_type == "liteos_a") { bus_center_adapter_inc += [ "//drivers/hdf_core/adapter/uhdf/posix/include", "//drivers/hdf_core/framework/include/utils", "//drivers/hdf_core/framework/include/core", "//drivers/hdf_core/framework/ability/sbuf/include", ] if (dsoftbus_feature_lnn_net) { bus_center_adapter_src += [ "$adapter_bus_center_path/driver/lnn_hdf_driver_monitor.c", "$adapter_bus_center_path/driver/lnn_hdf_driver_request.c", "$adapter_bus_center_path/network/lnn_linkwatch_virtual.c", "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", "$adapter_bus_center_path/network/lnn_netlink_monitor_virtual.c", "$adapter_bus_center_path/platform/lnn_product_monitor.c", "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", ] bus_center_adapter_inc += [ "//drivers/hdf_core/framework/core/shared/include", "//drivers/hdf_core/framework/include", ] bus_center_adapter_deps += [ "//drivers/hdf_core/adapter/uhdf/manager:hdf_core", "//drivers/hdf_core/adapter/uhdf/platform:hdf_platform", "//drivers/hdf_core/adapter/uhdf/posix:hdf_posix_osal", ] } } } else { bus_center_adapter_external_deps = [] if (has_ces_part) { bus_center_adapter_src += [ "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor.cpp", "$adapter_bus_center_path/common_event/lnn_common_event_monitor.cpp", "$adapter_bus_center_path/network/lnn_netmanager_listener.cpp", ] bus_center_adapter_external_deps += [ "ability_base:want", "common_event_service:cesfwk_innerkits", "init:libbeget_proxy", "netmanager_base:net_conn_manager_if", "power_manager:powermgr_client", ] } else { bus_center_adapter_src += [ "$adapter_bus_center_path/boot_event/lnn_boot_event_monitor_virtual.cpp", "$adapter_bus_center_path/common_event/lnn_common_event_monitor_virtual.cpp", "$adapter_bus_center_path/network/lnn_netmanager_listener_virtual.cpp", ] } if (dsoftbus_feature_lnn_net) { bus_center_adapter_src += [ "$adapter_bus_center_path/driver/lnn_driver_monitor_virtual.c", "$adapter_bus_center_path/driver/lnn_driver_request_virtual.c", "$adapter_bus_center_path/network/lnn_linkwatch.c", "$adapter_bus_center_path/network/lnn_lwip_monitor_virtual.c", "$adapter_bus_center_path/network/lnn_netlink_monitor.c", "$adapter_bus_center_path/platform/lnn_product_monitor_virtual.c", ] if (dsoftbus_feature_lnn_wifiservice_dependence && has_ces_part) { bus_center_adapter_src += [ "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor.cpp" ] bus_center_adapter_external_deps += [ "ability_base:want", "wifi:wifi_sdk", ] } else { bus_center_adapter_src += [ "$adapter_bus_center_path/wlan/lnn_wifiservice_monitor_virtual.cpp", ] } } } if (dsoftbus_feature_lnn_net) { if (support_bluetooth && (dsoftbus_feature_conn_br || dsoftbus_feature_conn_ble)) { bus_center_adapter_src += [ "$adapter_bus_center_path/network/lnn_bt_monitor.c" ] bus_center_adapter_inc += [ "$softbus_adapter_common/net/bluetooth/include", "$dsoftbus_root_path/core/common/dfx/interface/include", ] bus_center_adapter_external_deps += [ "wifi:wifi_sdk" ] bus_center_adapter_deps += [ "$dsoftbus_root_path/core/common/dfx/log:softbus_dfx_log" ] } else { bus_center_adapter_src += [ "$adapter_bus_center_path/network/lnn_bt_monitor_virtual.c" ] } }