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 17NETMANAGER_EXT_NAPI_ROOT = "$NETMANAGER_EXT_ROOT/frameworks/js/napi/" 18 19config("mdns_config") { 20 visibility = [ ":mdns" ] 21} 22 23ohos_shared_library("mdns") { 24 include_dirs = [ 25 "$NETMANAGER_BASE_ROOT/utils/log/include", 26 "$NETMANAGER_EXT_NAPI_ROOT/mdns/include", 27 "$NETMANAGER_EXT_NAPI_ROOT/mdns/include/contexts", 28 ] 29 30 sources = [ 31 "src/contexts/mdns_addlocalservice_context.cpp", 32 "src/contexts/mdns_base_context.cpp", 33 "src/contexts/mdns_removelocalservice_context.cpp", 34 "src/contexts/mdns_resolvelocalservice_context.cpp", 35 "src/contexts/mdns_startsearching_context.cpp", 36 "src/mdns_async_work.cpp", 37 "src/mdns_callback_observer.cpp", 38 "src/mdns_exec.cpp", 39 "src/mdns_instances.cpp", 40 "src/mdns_module.cpp", 41 ] 42 43 defines = [ "NETMGR_DEBUG" ] 44 45 deps = [ 46 "$EXT_INNERKITS_ROOT/mdnsclient:mdns_manager_if", 47 "$EXT_INNERKITS_ROOT/mdnsclient:mdns_parcel", 48 "$NETMANAGER_BASE_ROOT/utils/napi_utils:napi_utils", 49 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 50 ] 51 52 external_deps = [ 53 "ability_runtime:abilitykit_native", 54 "c_utils:utils", 55 "hiviewdfx_hilog_native:libhilog", 56 "ipc:ipc_core", 57 "napi:ace_napi", 58 "safwk:system_ability_fwk", 59 "samgr:samgr_proxy", 60 ] 61 62 configs = [ ":mdns_config" ] 63 64 relative_install_dir = "module/net" 65 part_name = "netmanager_ext" 66 subsystem_name = "communication" 67} 68