1# Copyright (C) 2023 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_ext/netmanager_ext_config.gni") 16 17config("net_mdns_manager_if_config") { 18 # header file path 19 include_dirs = [ 20 "$BASE_INNERKITS_ROOT/include", 21 "$EXT_INNERKITS_ROOT/mdnsclient/include", 22 "$EXT_INNERKITS_ROOT/mdnsclient/include/proxy", 23 "$NETMANAGER_BASE_ROOT/utils/errorcode_utils/include", 24 ] 25 26 cflags = [] 27 if (is_double_framework) { 28 cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ] 29 } 30 if (target_cpu == "arm") { 31 cflags += [ "-DBINDER_IPC_32BIT" ] 32 } 33 if (is_standard_system) { 34 cflags += [ "-DCONFIG_STANDARD_SYSTEM" ] 35 } 36 if (defined(build_public_version) && build_public_version) { 37 cflags += [ "-DBUILD_PUBLIC_VERSION" ] 38 } 39} 40 41ohos_source_set("mdns_parcel") { 42 sources = [ 43 "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/mdns_common.cpp", 44 "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/mdns_service_info.cpp", 45 ] 46 47 include_dirs = [ "$EXT_INNERKITS_ROOT/mdnsclient/include" ] 48 49 deps = [ 50 "$NETMANAGER_BASE_ROOT/utils:net_manager_common", 51 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 52 ] 53 54 external_deps = [ "c_utils:utils" ] 55 if (is_standard_system) { 56 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 57 } else { 58 external_deps += [ "hilog:libhilog" ] 59 } 60 61 part_name = "netmanager_ext" 62 subsystem_name = "communication" 63} 64 65ohos_shared_library("mdns_manager_if") { 66 sources = [ 67 "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/mdns_client.cpp", 68 "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/proxy/mdns_event_stub.cpp", 69 "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/proxy/mdns_service_proxy.cpp", 70 ] 71 72 public_configs = [ ":net_mdns_manager_if_config" ] 73 74 deps = [ 75 ":mdns_parcel", 76 "$NETMANAGER_BASE_ROOT/utils:net_manager_common", 77 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 78 ] 79 80 external_deps = [ 81 "ipc:ipc_core", 82 "safwk:system_ability_fwk", 83 "samgr:samgr_proxy", 84 ] 85 86 defines = [ 87 "NETMGR_LOG_TAG = \"MDnsManager\"", 88 "LOG_DOMAIN = 0xD0015B0", 89 ] 90 91 if (enable_netmgr_ext_debug) { 92 defines += [ "NETMGR_DEBUG" ] 93 } 94 95 if (is_standard_system) { 96 external_deps += [ "hiviewdfx_hilog_native:libhilog" ] 97 } else { 98 external_deps += [ "hilog:libhilog" ] 99 } 100 101 part_name = "netmanager_ext" 102 subsystem_name = "communication" 103} 104