1# Copyright (c) 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. 13 14import("//build/ohos.gni") 15import("//foundation/communication/netmanager_ext/netmanager_ext_config.gni") 16 17config("net_conn_manager_if_config") { 18 include_dirs = [ 19 "include", 20 "include/ipc", 21 "$BASE_INNERKITS_ROOT/include", 22 "$BASE_INNERKITS_ROOT/netconnclient/include", 23 "$BASE_INNERKITS_ROOT/netmanagernative/include", 24 "$NETMANAGERNATIVE_ROOT/fwmarkclient/include", 25 "$EXT_INNERKITS_ROOT/include", 26 "$NETMANAGER_EXT_ROOT/utils/log/include", 27 ] 28 29 defines = [] 30 if (is_double_framework) { 31 defines += [ "CONFIG_DUAL_FRAMEWORK" ] 32 } 33 if (target_cpu == "arm") { 34 defines += [ "BINDER_IPC_32BIT" ] 35 } 36 if (is_standard_system) { 37 defines += [ "CONFIG_STANDARD_SYSTEM" ] 38 } 39 if (defined(build_public_version) && build_public_version) { 40 defines += [ "BUILD_PUBLIC_VERSION" ] 41 } 42} 43 44ohos_source_set("networkvpn_parcel") { 45 sources = [ "$VPN_INNERKITS_SOURCE_DIR/src/vpn_config.cpp" ] 46 47 include_dirs = [ 48 "$BASE_INNERKITS_ROOT/include", 49 "$BASE_INNERKITS_ROOT/netconnclient/include", 50 "$EXT_INNERKITS_ROOT/include", 51 "$EXT_INNERKITS_ROOT/netvpnclient/include", 52 "$NETMANAGER_EXT_ROOT/utils/log/include", 53 ] 54 55 external_deps = [ 56 "c_utils:utils", 57 "hilog:libhilog", 58 "netmanager_base:net_conn_parcel", 59 "netmanager_base:net_manager_common", 60 ] 61 62 part_name = "netmanager_ext" 63 subsystem_name = "communication" 64} 65 66ohos_shared_library("net_vpn_manager_if") { 67 sources = [ 68 "$VPN_INNERKITS_SOURCE_DIR/src/ipc/networkvpn_service_proxy.cpp", 69 "$VPN_INNERKITS_SOURCE_DIR/src/ipc/vpn_event_callback_stub.cpp", 70 "$VPN_INNERKITS_SOURCE_DIR/src/networkvpn_client.cpp", 71 "$VPN_INNERKITS_SOURCE_DIR/src/vpn_interface.cpp", 72 ] 73 74 public_configs = [ ":net_conn_manager_if_config" ] 75 76 deps = [ ":networkvpn_parcel" ] 77 78 external_deps = [ 79 "hilog:libhilog", 80 "ipc:ipc_single", 81 "netmanager_base:fwmark_client", 82 "samgr:samgr_proxy", 83 ] 84 85 defines = [ 86 "NETMGR_LOG_TAG = \"NetworkVpn\"", 87 "LOG_DOMAIN = 0xD0015B0", 88 ] 89 90 if (enable_netmgr_ext_debug) { 91 defines += [ "NETMGR_DEBUG" ] 92 } 93 94 part_name = "netmanager_ext" 95 subsystem_name = "communication" 96} 97