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 17NETMANAGER_NAPI_ROOT = "$SUBSYSTEM_DIR/netmanager_base/frameworks/js/napi/" 18 19ohos_shared_library("policy") { 20 include_dirs = [ 21 "//third_party/node/src", 22 "$NETMANAGER_NAPI_ROOT/netpolicy/include", 23 "$NETMANAGER_NAPI_ROOT/common", 24 "$NETMANAGER_BASE_ROOT/utils/log/include", 25 "$INNERKITS_ROOT/netpolicyclient/include", 26 "$INNERKITS_ROOT/netpolicyclient/include/proxy", 27 "$INNERKITS_ROOT/netconnclient/include", 28 ] 29 30 sources = [ 31 "$NETMANAGER_NAPI_ROOT/common/napi_common.cpp", 32 "$NETMANAGER_NAPI_ROOT/netpolicy/src/napi_net_policy.cpp", 33 "$NETMANAGER_NAPI_ROOT/netpolicy/src/napi_net_policy_observer.cpp", 34 "$NETMANAGER_NAPI_ROOT/netpolicy/src/net_policy_event_listener_context.cpp", 35 ] 36 37 defines = [ "NETMGR_DEBUG" ] 38 39 deps = [ 40 "$INNERKITS_ROOT/netpolicyclient:net_policy_manager_if", 41 "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native", 42 "//foundation/ace/napi/:ace_napi", 43 "//utils/native/base:utils", 44 ] 45 46 external_deps = [ 47 "ability_base:want", 48 "ces_standard:cesfwk_innerkits", 49 "eventhandler:libeventhandler", 50 "hiviewdfx_hilog_native:libhilog", 51 "ipc:ipc_core", 52 "safwk:system_ability_fwk", 53 "samgr_standard:samgr_proxy", 54 ] 55 56 relative_install_dir = "module/net" 57 part_name = "netmanager_base" 58 subsystem_name = "communication" 59} 60