# 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("//build/ohos.gni") import("//foundation/communication/netmanager_ext/netmanager_ext_config.gni") ohos_shared_library("ethernet_manager") { sources = [ "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/interface_state_callback_proxy.cpp", "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/interface_state_callback_stub.cpp", "src/dev_interface_state.cpp", "src/ethernet_configuration.cpp", "src/ethernet_dhcp_controller.cpp", "src/ethernet_management.cpp", "src/ethernet_service.cpp", "src/ethernet_service_common.cpp", "src/stub/ethernet_service_stub.cpp", ] include_dirs = [ "$BASE_INNERKITS_ROOT/ethernetclient/include/proxy", "$BASE_INNERKITS_ROOT/netstatsclient/include", "$NETCONNMANAGER_UTILS_DIR/common_utils/include", "$NETCONNMANAGER_COMMON_DIR/include", "include", "include/stub", "$EXT_INNERKITS_ROOT/include", "$EXT_INNERKITS_ROOT/ethernetclient/include", "$EXT_INNERKITS_ROOT/ethernetclient/include/proxy", "$BASE_INNERKITS_ROOT/include", "$BASE_INNERKITS_ROOT/netconnclient/include", "$BASE_INNERKITS_ROOT/dnsresolverclient/include", "$BASE_INNERKITS_ROOT/ethernetclient/include", "$NETSYSCONTROLLER_ROOT_DIR/include", "$DHCP_MANAGER_ROOT/services/mgr_service/include", "$DHCP_MANAGER_ROOT/interfaces/inner_api/include", "$DHCP_MANAGER_ROOT/interfaces/inner_api/interfaces", "$SAMGR_MANAGER_ROOT/interfaces/innerkits/samgr_proxy/include", "$BASE_INNERKITS_ROOT/netmanagernative/include", "$NETMANAGER_EXT_ROOT/utils/log/include", "$NETMANAGER_BASE_ROOT/services/netmanagernative/include/netsys", ] deps = [ "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_parcel" ] external_deps = [ "dhcp:dhcp_manager_service", "eventhandler:libeventhandler", "ipc:ipc_core", "netmanager_base:net_service_common", "netmanager_base:netsys_controller", "safwk:system_ability_fwk", ] defines = [ "NETMGR_LOG_TAG = \"EthernetManager\"", "LOG_DOMAIN = 0xD0015B0", "USER_CONFIG_DIR = \"/data/service/el1/public/netmanager/ethernet\"", "NETWORK_CONFIG_PATH = \"/system/etc/communication/netmanager_ext/ethernet_interfaces.json\"", ] if (enable_netmgr_ext_debug) { defines += [ "NETMGR_DEBUG" ] } external_deps += [ "hilog:libhilog" ] part_name = "netmanager_ext" subsystem_name = "communication" } ohos_prebuilt_etc("ethernet_interfaces") { source = "$NETMANAGER_EXT_ROOT/services/ethernetmanager/config/ethernet_interfaces.json" install_enable = true relative_install_dir = "communication/netmanager_ext" part_name = "netmanager_ext" }