• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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_conn_manager_if_config") {
18  include_dirs = [
19    "include",
20    "include/proxy",
21    "include/proxy/ipccallback",
22    "$BASE_INNERKITS_ROOT/include",
23    "$BASE_INNERKITS_ROOT/netconnclient/include",
24    "$EXT_INNERKITS_ROOT/include",
25    "$NETMANAGER_EXT_ROOT/utils/common/include",
26  ]
27
28  cflags = []
29  if (is_double_framework) {
30    cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ]
31  }
32  if (target_cpu == "arm") {
33    cflags += [ "-DBINDER_IPC_32BIT" ]
34  }
35  if (is_standard_system) {
36    cflags += [ "-DCONFIG_STANDARD_SYSTEM" ]
37  }
38  if (defined(build_public_version) && build_public_version) {
39    cflags += [ "-DBUILD_PUBLIC_VERSION" ]
40  }
41}
42
43ohos_source_set("networkshare_parcel") {
44  sources = [ "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/network_share_request_parcel.cpp" ]
45
46  include_dirs = [
47    "$BASE_INNERKITS_ROOT/include",
48    "$EXT_INNERKITS_ROOT/include",
49    "$EXT_INNERKITS_ROOT/netshareclient/include",
50    "$NETMANAGER_EXT_ROOT/utils/log/include",
51  ]
52
53  deps = [
54    "$BASE_INNERKITS_ROOT/netconnclient:net_conn_parcel",
55    "$NETMANAGER_BASE_ROOT/utils:net_manager_common",
56  ]
57
58  external_deps = [ "c_utils:utils" ]
59  if (is_standard_system) {
60    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
61  } else {
62    external_deps += [ "hilog:libhilog" ]
63  }
64
65  part_name = "netmanager_ext"
66  subsystem_name = "communication"
67}
68
69ohos_shared_library("net_tether_manager_if") {
70  include_dirs = [ "$NETMANAGER_EXT_ROOT/utils/log/include" ]
71
72  sources = [
73    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/networkshare_client.cpp",
74    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_proxy.cpp",
75    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_stub.cpp",
76    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_proxy.cpp",
77    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_stub.cpp",
78    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/networkshare_service_proxy.cpp",
79  ]
80
81  public_configs = [ ":net_conn_manager_if_config" ]
82
83  deps = [ ":networkshare_parcel" ]
84
85  external_deps = [
86    "ipc:ipc_core",
87    "samgr:samgr_proxy",
88  ]
89
90  defines = [
91    "NETMGR_LOG_TAG = \"NetworkShareManager\"",
92    "LOG_DOMAIN = 0xD0015B0",
93  ]
94
95  if (enable_netmgr_ext_debug) {
96    defines += [ "NETMGR_DEBUG" ]
97  }
98
99  if (is_standard_system) {
100    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
101  } else {
102    external_deps += [ "hilog:libhilog" ]
103  }
104
105  part_name = "netmanager_ext"
106  subsystem_name = "communication"
107}
108