• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_policy_manager") {
18  sources = [
19    "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_callback.cpp",
20    "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_file.cpp",
21    "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_firewall.cpp",
22    "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_service.cpp",
23    "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_service_common.cpp",
24    "$NETPOLICYMANAGER_SOURCE_DIR/src/net_policy_traffic.cpp",
25    "$NETPOLICYMANAGER_SOURCE_DIR/src/stub/net_policy_callback_proxy.cpp",
26    "$NETPOLICYMANAGER_SOURCE_DIR/src/stub/net_policy_service_stub.cpp",
27  ]
28
29  include_dirs = [
30    "$NETPOLICYMANAGER_SOURCE_DIR/include",
31    "$NETPOLICYMANAGER_SOURCE_DIR/include/stub",
32    "$INNERKITS_ROOT/netpolicyclient/include",
33    "$INNERKITS_ROOT/netpolicyclient/include/proxy",
34    "$INNERKITS_ROOT/netconnclient/include",
35    "$NETCONNMANAGER_COMMON_DIR/include",
36  ]
37
38  deps = [
39    "$INNERKITS_ROOT/netpolicyclient:net_policy_parcel",
40    "$NETCONNMANAGER_COMMON_DIR:net_service_common",
41    "$NETMANAGER_BASE_ROOT/utils:net_manager_common",
42    "//third_party/jsoncpp:jsoncpp",
43    "//utils/native/base:utils",
44  ]
45
46  external_deps = [
47    "ces_standard:cesfwk_innerkits",
48    "ipc:ipc_core",
49    "netmanager_base:net_conn_manager_if",
50    "netmanager_base:net_stats_manager_if",
51    "safwk:system_ability_fwk",
52    "samgr_standard:samgr_proxy",
53  ]
54
55  defines = [
56    "NETMGR_LOG_TAG = \"NetConnManager\"",
57    "LOG_DOMAIN = 0xD0015B0",
58  ]
59
60  if (enable_netmgr_debug) {
61    defines += [ "NETMGR_DEBUG" ]
62  }
63
64  if (is_standard_system) {
65    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
66  } else {
67    external_deps += [ "hilog:libhilog" ]
68  }
69
70  part_name = "netmanager_base"
71  subsystem_name = "communication"
72}
73