• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  ]
24
25  cflags = []
26  if (is_double_framework) {
27    cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ]
28  }
29  if (target_cpu == "arm") {
30    cflags += [ "-DBINDER_IPC_32BIT" ]
31  }
32  if (is_standard_system) {
33    cflags += [ "-DCONFIG_STANDARD_SYSTEM" ]
34  }
35  if (defined(build_public_version) && build_public_version) {
36    cflags += [ "-DBUILD_PUBLIC_VERSION" ]
37  }
38}
39
40ohos_source_set("mdns_parcel") {
41  sources = [
42    "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/mdns_common.cpp",
43    "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/mdns_service_info.cpp",
44  ]
45
46  include_dirs = [ "$EXT_INNERKITS_ROOT/mdnsclient/include" ]
47
48  deps = [ "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common" ]
49
50  external_deps = [
51    "c_utils:utils",
52    "netmanager_base:net_manager_common",
53  ]
54
55  external_deps += [ "hilog:libhilog" ]
56
57  part_name = "netmanager_ext"
58  subsystem_name = "communication"
59}
60
61ohos_shared_library("mdns_manager_if") {
62  sources = [
63    "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/mdns_client.cpp",
64    "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/proxy/mdns_event_stub.cpp",
65    "$NETMANAGER_EXT_ROOT/frameworks/native/mdnsclient/src/proxy/mdns_service_proxy.cpp",
66  ]
67
68  version_script = "libmdns_kits.map"
69
70  public_configs = [ ":net_mdns_manager_if_config" ]
71
72  deps = [
73    ":mdns_parcel",
74    "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common",
75  ]
76
77  external_deps = [
78    "ipc:ipc_single",
79    "samgr:samgr_proxy",
80  ]
81
82  defines = [
83    "NETMGR_LOG_TAG = \"MDnsManager\"",
84    "LOG_DOMAIN = 0xD0015B0",
85  ]
86
87  if (enable_netmgr_ext_debug) {
88    defines += [ "NETMGR_DEBUG" ]
89  }
90
91  external_deps += [ "hilog:libhilog" ]
92
93  innerapi_tags = [ "platformsdk" ]
94  part_name = "netmanager_ext"
95  subsystem_name = "communication"
96}
97