1# Copyright (c) 2022 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 17config("statistics_config") { 18 visibility = [ ":statistics" ] 19 20 include_dirs = [ 21 "include", 22 "include/context", 23 "$NETMANAGER_BASE_ROOT/utils/log/include", 24 ] 25} 26 27ohos_shared_library("statistics") { 28 sanitize = { 29 cfi = true 30 cfi_cross_dso = true 31 boundary_sanitize = true 32 all_ubsan = true 33 debug = false 34 } 35 36 sources = [ 37 "src/context/get_cellular_rxbytes_context.cpp", 38 "src/context/get_iface_rxbytes_context.cpp", 39 "src/context/get_iface_stats_context.cpp", 40 "src/context/get_iface_uid_stats_context.cpp", 41 "src/context/get_uid_rxbytes_context.cpp", 42 "src/context/update_iface_stats_context.cpp", 43 "src/statistics_async_work.cpp", 44 "src/statistics_callback_observer.cpp", 45 "src/statistics_exec.cpp", 46 "src/statistics_module.cpp", 47 "src/statistics_observer_wrapper.cpp", 48 ] 49 50 configs = [ ":statistics_config" ] 51 52 deps = [ 53 "$INNERKITS_ROOT/netstatsclient:net_stats_manager_if", 54 "$NETMANAGER_BASE_ROOT/utils:net_manager_common", 55 "$NETMANAGER_BASE_ROOT/utils/napi_utils:napi_utils", 56 ] 57 58 external_deps = [ 59 "c_utils:utils", 60 "hilog:libhilog", 61 "ipc:ipc_core", 62 "napi:ace_napi", 63 ] 64 65 relative_install_dir = "module/net" 66 part_name = "netmanager_base" 67 subsystem_name = "communication" 68} 69