• 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_stats_manager") {
18  sources = [
19    "$NETSTATSMANAGER_SOURCE_DIR/src/net_stats_callback.cpp",
20    "$NETSTATSMANAGER_SOURCE_DIR/src/net_stats_csv.cpp",
21    "$NETSTATSMANAGER_SOURCE_DIR/src/net_stats_listener.cpp",
22    "$NETSTATSMANAGER_SOURCE_DIR/src/net_stats_service.cpp",
23    "$NETSTATSMANAGER_SOURCE_DIR/src/net_stats_service_iface.cpp",
24    "$NETSTATSMANAGER_SOURCE_DIR/src/stub/net_stats_callback_proxy.cpp",
25    "$NETSTATSMANAGER_SOURCE_DIR/src/stub/net_stats_service_stub.cpp",
26  ]
27
28  include_dirs = [
29    "$INNERKITS_ROOT/include",
30    "$INNERKITS_ROOT/netconnclient/include",
31    "$INNERKITS_ROOT/netstatsclient/include",
32    "$INNERKITS_ROOT/netstatsclient/include/proxy",
33    "$NETSTATSMANAGER_SOURCE_DIR/include",
34    "$NETSTATSMANAGER_SOURCE_DIR/include/stub",
35    "$NETCONNMANAGER_COMMON_DIR/include",
36    "$NETSYSCONTROLLER_ROOT_DIR/include",
37  ]
38
39  deps = [
40    "$INNERKITS_ROOT/netstatsclient:net_stats_parcel",
41    "$NETCONNMANAGER_COMMON_DIR:net_service_common",
42    "$NETMANAGER_BASE_ROOT/utils:net_manager_common",
43    "$NETSYSCONTROLLER_ROOT_DIR:netsys_controller",
44    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
45    "//utils/native/base:utils",
46  ]
47
48  external_deps = [
49    "ability_base:want",
50    "ces_standard:cesfwk_innerkits",
51    "eventhandler:libeventhandler",
52    "ipc:ipc_core",
53    "safwk:system_ability_fwk",
54    "samgr_standard:samgr_proxy",
55  ]
56
57  defines = [
58    "NETMGR_LOG_TAG = \"NetStatsClient\"",
59    "LOG_DOMAIN = 0xD0015B0",
60  ]
61
62  if (enable_netmgr_debug) {
63    defines += [ "NETMGR_DEBUG" ]
64  }
65
66  if (is_standard_system) {
67    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
68  } else {
69    external_deps += [ "hilog:libhilog" ]
70  }
71
72  part_name = "netmanager_base"
73  subsystem_name = "communication"
74}
75