• 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  ]
26
27  cflags = []
28  if (is_double_framework) {
29    cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ]
30  }
31  if (target_cpu == "arm") {
32    cflags += [ "-DBINDER_IPC_32BIT" ]
33  }
34  if (is_standard_system) {
35    cflags += [ "-DCONFIG_STANDARD_SYSTEM" ]
36  }
37  if (defined(build_public_version) && build_public_version) {
38    cflags += [ "-DBUILD_PUBLIC_VERSION" ]
39  }
40
41  cflags += [
42    "-fstack-protector-strong",
43    "-D_FORTIFY_SOURCE=2",
44    "-O2",
45  ]
46
47  cflags_cc = [
48    "-fstack-protector-strong",
49    "-D_FORTIFY_SOURCE=2",
50    "-O2",
51  ]
52}
53
54ohos_source_set("networkshare_parcel") {
55  sources = [ "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/network_share_request_parcel.cpp" ]
56
57  include_dirs = [
58    "$BASE_INNERKITS_ROOT/include",
59    "$EXT_INNERKITS_ROOT/include",
60    "$EXT_INNERKITS_ROOT/netshareclient/include",
61    "$NETMANAGER_EXT_ROOT/utils/log/include",
62  ]
63
64  external_deps = [ "netmanager_base:net_conn_parcel" ]
65
66  external_deps += [ "hilog:libhilog" ]
67
68  part_name = "netmanager_ext"
69  subsystem_name = "communication"
70}
71
72ohos_shared_library("net_tether_manager_if") {
73  include_dirs = [ "$NETMANAGER_EXT_ROOT/utils/log/include" ]
74
75  sources = [
76    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/networkshare_client.cpp",
77    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_proxy.cpp",
78    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_stub.cpp",
79    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_proxy.cpp",
80    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_stub.cpp",
81    "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/networkshare_service_proxy.cpp",
82  ]
83
84  version_script = "libnetshare_kits.map"
85
86  public_configs = [ ":net_conn_manager_if_config" ]
87
88  deps = [ ":networkshare_parcel" ]
89
90  external_deps = [
91    "c_utils:utils",
92    "ipc:ipc_single",
93    "samgr:samgr_proxy",
94  ]
95
96  defines = [
97    "NETMGR_LOG_TAG = \"NetworkShareManager\"",
98    "LOG_DOMAIN = 0xD0015B0",
99  ]
100
101  if (enable_netmgr_ext_debug) {
102    defines += [ "NETMGR_DEBUG" ]
103  }
104
105  external_deps += [ "hilog:libhilog" ]
106
107  innerapi_tags = [ "platformsdk" ]
108  part_name = "netmanager_ext"
109  subsystem_name = "communication"
110}
111