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 17NETMANAGER_EXT_NAPI_ROOT = "$NETMANAGER_EXT_ROOT/frameworks/js/napi/" 18 19ohos_shared_library("vpnextension") { 20 sources = [ 21 "src/context/destroy_context_ext.cpp", 22 "src/context/prepare_context_ext.cpp", 23 "src/context/protect_context_ext.cpp", 24 "src/context/setup_context_ext.cpp", 25 "src/vpn_async_work_ext.cpp", 26 "src/vpn_connection_ext.cpp", 27 "src/vpn_exec_ext.cpp", 28 "src/vpn_module_ext.cpp", 29 "src/vpn_monitor_ext.cpp", 30 ] 31 32 configs = [ "$ABILITY_RUNTIME_SERVICES_PATH/abilitymgr:abilityms_config" ] 33 include_dirs = [ 34 "$NETMANAGER_EXT_NAPI_ROOT/vpnext/include", 35 "$NETMANAGER_EXT_NAPI_ROOT/vpnext/include/context", 36 "$NETMANAGER_BASE_ROOT/utils/common_utils/include", 37 "$NETMANAGER_BASE_ROOT/utils/errorcode_utils/include", 38 "$NETMANAGER_BASE_ROOT/utils/napi_utils/include", 39 "$BASE_INNERKITS_ROOT/netvpnclient/include", 40 "$BASE_INNERKITS_ROOT/netvpnclient/include/ipc", 41 "$ABILITY_RUNTIME_NAPI_PATH/inner/napi_common", 42 "$NETMANAGER_EXT_ROOT/interfaces/innerkits/vpnextension/include", 43 "$ABILITY_RUNTIME_KITS_PATH/native/appkit/ability_runtime/context", 44 ] 45 46 deps = [ 47 "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netvpnclient:net_vpn_manager_if", 48 "$NETMANAGER_EXT_ROOT/interfaces/innerkits/vpnextension:vpn_extension", 49 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 50 ] 51 52 external_deps = [ 53 "ability_base:want", 54 "ability_base:zuri", 55 "ability_runtime:ability_manager", 56 "ability_runtime:app_context", 57 "ability_runtime:napi_common", 58 "bundle_framework:appexecfwk_base", 59 "c_utils:utils", 60 "hilog:libhilog", 61 "ipc:ipc_core", 62 "napi:ace_napi", 63 "netmanager_base:napi_utils", 64 "netmanager_base:net_data_share", 65 "netmanager_base:net_manager_common", 66 "samgr:samgr_proxy", 67 ] 68 69 relative_install_dir = "module/net" 70 part_name = "netmanager_ext" 71 subsystem_name = "communication" 72} 73