• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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_base/netmanager_base_config.gni")
16
17ohos_shared_library("connection") {
18  sanitize = {
19    cfi = true
20    cfi_cross_dso = true
21    boundary_sanitize = true
22    all_ubsan = true
23    debug = false
24  }
25
26  include_dirs = [
27    "async_context/include",
28    "async_work/include",
29    "constant/include",
30    "connection_exec/include",
31    "connection_module/include",
32    "observer/include",
33    "options/include",
34    "$NETMANAGER_BASE_ROOT/utils/log/include",
35    "$NETMANAGER_BASE_ROOT/utils/errorcode_utils/include",
36  ]
37
38  sources = [
39    "async_context/src/bindsocket_context.cpp",
40    "async_context/src/deletecustomdnsrule_context.cpp",
41    "async_context/src/deletecustomdnsrules_context.cpp",
42    "async_context/src/factoryresetnetwork_context.cpp",
43    "async_context/src/getaddressbyname_context.cpp",
44    "async_context/src/getappnet_context.cpp",
45    "async_context/src/getdefaultnet_context.cpp",
46    "async_context/src/gethttpproxy_context.cpp",
47    "async_context/src/none_params_context.cpp",
48    "async_context/src/parse_nethandle_context.cpp",
49    "async_context/src/register_context.cpp",
50    "async_context/src/setappnet_context.cpp",
51    "async_context/src/setcustomdnsrule_context.cpp",
52    "async_context/src/setglobalhttpproxy_context.cpp",
53    "async_work/src/connection_async_work.cpp",
54    "connection_exec/src/connection_exec.cpp",
55    "connection_module/src/connection_module.cpp",
56    "observer/src/net_conn_callback_observer.cpp",
57    "options/src/net_address.cpp",
58    "options/src/netconnection.cpp",
59  ]
60
61  cflags = [
62    "-fstack-protector-strong",
63    "-D_FORTIFY_SOURCE=2",
64    "-O2",
65  ]
66
67  cflags_cc = [
68    "-fstack-protector-strong",
69    "-D_FORTIFY_SOURCE=2",
70    "-O2",
71  ]
72
73  deps = [
74    "$INNERKITS_ROOT/netconnclient:net_conn_manager_if",
75    "$NETMANAGER_BASE_ROOT/utils/napi_utils:napi_utils",
76  ]
77  external_deps = [
78    "c_utils:utils",
79    "hilog:libhilog",
80    "ipc:ipc_core",
81    "napi:ace_napi",
82  ]
83
84  relative_install_dir = "module/net"
85  part_name = "netmanager_base"
86  subsystem_name = "communication"
87}
88