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_EXT_NAPI_ROOT/mdns/include", 26 "$NETMANAGER_EXT_NAPI_ROOT/mdns/include/contexts", 27 ] 28 29 sources = [ 30 "src/contexts/mdns_addlocalservice_context.cpp", 31 "src/contexts/mdns_base_context.cpp", 32 "src/contexts/mdns_removelocalservice_context.cpp", 33 "src/contexts/mdns_resolvelocalservice_context.cpp", 34 "src/contexts/mdns_startsearching_context.cpp", 35 "src/mdns_async_work.cpp", 36 "src/mdns_callback_observer.cpp", 37 "src/mdns_exec.cpp", 38 "src/mdns_instances.cpp", 39 "src/mdns_module.cpp", 40 ] 41 42 defines = [ "NETMGR_DEBUG" ] 43 44 deps = [ 45 "$EXT_INNERKITS_ROOT/mdnsclient:mdns_manager_if", 46 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 47 ] 48 49 external_deps = [ 50 "c_utils:utils", 51 "hilog:libhilog", 52 "ipc:ipc_core", 53 "napi:ace_napi", 54 "netmanager_base:napi_utils", 55 ] 56 57 configs = [ ":mdns_config" ] 58 59 relative_install_dir = "module/net" 60 part_name = "netmanager_ext" 61 subsystem_name = "communication" 62} 63