# Copyright (c) 2023 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") NETMANAGER_EXT_NAPI_ROOT = "$NETMANAGER_EXT_ROOT/frameworks/js/napi/" ohos_shared_library("vpnextension") { sources = [ "src/context/destroy_context_ext.cpp", "src/context/prepare_context_ext.cpp", "src/context/protect_context_ext.cpp", "src/context/setup_context_ext.cpp", "src/vpn_async_work_ext.cpp", "src/vpn_connection_ext.cpp", "src/vpn_exec_ext.cpp", "src/vpn_module_ext.cpp", "src/vpn_monitor_ext.cpp", ] configs = [ "$ABILITY_RUNTIME_SERVICES_PATH/abilitymgr:abilityms_config" ] include_dirs = [ "$NETMANAGER_EXT_NAPI_ROOT/vpnext/include", "$NETMANAGER_EXT_NAPI_ROOT/vpnext/include/context", "$NETMANAGER_BASE_ROOT/utils/common_utils/include", "$NETMANAGER_BASE_ROOT/utils/errorcode_utils/include", "$NETMANAGER_BASE_ROOT/utils/napi_utils/include", "$BASE_INNERKITS_ROOT/netvpnclient/include", "$BASE_INNERKITS_ROOT/netvpnclient/include/ipc", "$ABILITY_RUNTIME_NAPI_PATH/inner/napi_common", "$NETMANAGER_EXT_ROOT/interfaces/innerkits/vpnextension/include", "$ABILITY_RUNTIME_KITS_PATH/native/appkit/ability_runtime/context", ] deps = [ "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netvpnclient:net_vpn_manager_if", "$NETMANAGER_EXT_ROOT/interfaces/innerkits/vpnextension:vpn_extension", "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:app_context", "ability_runtime:napi_common", "bundle_framework:appexecfwk_base", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", "netmanager_base:napi_utils", "netmanager_base:net_data_share", "netmanager_base:net_manager_common", "samgr:samgr_proxy", ] relative_install_dir = "module/net" part_name = "netmanager_ext" subsystem_name = "communication" }