1# Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. 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("../../../base/config.gni") 16 17config("network_profiler_service_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "${OHOS_PROFILER_DIR}/device/services/ipc/include", 22 "${OHOS_PROFILER_DIR}/device/services/shared_memory/include", 23 "${OHOS_PROFILER_DIR}/interfaces/kits", 24 "${OHOS_PROFILER_DIR}/device/plugins/api/include", 25 "${OHOS_PROFILER_DIR}/device/base/include", 26 "${OHOS_PROFILER_DIR}/device/plugins/api/src", 27 ] 28} 29 30ohos_source_set("network_profiler_service") { 31 public_configs = [ ":network_profiler_service_config" ] 32 33 sources = [ 34 "src/network_profiler_common.cpp", 35 "src/network_profiler_handle.cpp", 36 "src/network_profiler_manager.cpp", 37 "src/network_profiler_socket_service.cpp", 38 ] 39 40 public_deps = [ 41 "${OHOS_PROFILER_DIR}/device/base:hiprofiler_base", 42 "${OHOS_PROFILER_DIR}/device/services/ipc:ipc", 43 "${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory", 44 "${OHOS_PROFILER_DIR}/proto_encoder:proto_encoder_source", 45 "${OHOS_PROFILER_DIR}/protos/services:plugin_service_proto", 46 "${OHOS_PROFILER_DIR}/protos/services:profiler_service_all_type_source", 47 "${OHOS_PROFILER_DIR}/protos/types/plugins/network_profiler:network_profiler_cpp", 48 "${OHOS_PROFILER_DIR}/protos/types/plugins/network_profiler:network_profiler_encoder", 49 ] 50 51 external_deps = [ 52 "init:libbegetutil", 53 "protobuf:protobuf_lite", 54 ] 55 56 if (current_toolchain != host_toolchain) { 57 defines = [ "HAVE_HILOG" ] 58 external_deps += [ "hilog:libhilog_base" ] 59 } 60 61 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 62 part_name = "${OHOS_PROFILER_PART_NAME}" 63} 64