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("//build/ohos.gni") 15import("//foundation/communication/netmanager_base/netmanager_base_config.gni") 16 17ohos_shared_library("net_conn_manager") { 18 sources = [ 19 "$NETCONNMANAGER_COMMON_DIR/src/route_utils.cpp", 20 "src/net_activate.cpp", 21 "src/net_caps.cpp", 22 "src/net_conn_event_handler.cpp", 23 "src/net_conn_service.cpp", 24 "src/net_conn_service_iface.cpp", 25 "src/net_http_proxy_tracker.cpp", 26 "src/net_monitor.cpp", 27 "src/net_score.cpp", 28 "src/net_supplier.cpp", 29 "src/network.cpp", 30 "src/stub/net_conn_callback_proxy.cpp", 31 "src/stub/net_conn_service_stub.cpp", 32 "src/stub/net_detection_callback_proxy.cpp", 33 "src/stub/net_supplier_callback_proxy.cpp", 34 ] 35 36 include_dirs = [ 37 "include", 38 "include/stub", 39 "$INNERKITS_ROOT/include", 40 "$INNERKITS_ROOT/netconnclient/include", 41 "$INNERKITS_ROOT/netconnclient/include/proxy", 42 "$INNERKITS_ROOT/netstatsclient/include", 43 "$NETCONNMANAGER_COMMON_DIR/include", 44 "$NETSYSNATIVE_SOURCE_DIR/include/netsys", 45 "$NETSYSCONTROLLER_ROOT_DIR/include", 46 "$NETMANAGER_BASE_ROOT/services/netmanagernative/fwmarkclient/include", 47 "$INNERKITS_ROOT/netmanagernative/include", 48 "$SAMGR_MANAGER_ROOT/interfaces/innerkits/samgr_proxy/include", 49 ] 50 51 deps = [ 52 "$NETCONNMANAGER_COMMON_DIR:net_service_common", 53 "$NETMANAGER_BASE_ROOT/services/netmanagernative/fwmarkclient:fwmark_client", 54 "$NETMANAGER_BASE_ROOT/utils:net_manager_common", 55 "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller", 56 "$THIRD_PARTY_ROOT/jsoncpp:jsoncpp", 57 ] 58 59 external_deps = [ 60 "c_utils:utils", 61 "common_event_service:cesfwk_innerkits", 62 "eventhandler:libeventhandler", 63 "hisysevent_native:libhisysevent", 64 "init:libbegetutil", 65 "ipc:ipc_core", 66 "safwk:system_ability_fwk", 67 ] 68 69 defines = [ 70 "NETMGR_LOG_TAG = \"NetConnManager\"", 71 "LOG_DOMAIN = 0xD0015B0", 72 ] 73 74 if (enable_netmgr_debug) { 75 defines += [ "NETMGR_DEBUG" ] 76 } 77 78 if (enable_sys_func) { 79 defines += [ "SYS_FUNC" ] 80 } 81 82 if (is_standard_system) { 83 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 84 } else { 85 external_deps += [ "hilog:libhilog" ] 86 } 87 88 part_name = "netmanager_base" 89 subsystem_name = "communication" 90} 91