• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025-2026 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    "$EXT_INNERKITS_ROOT/include",
21    "$NETMANAGER_EXT_ROOT/utils/log/include",
22  ]
23
24  defines = []
25  if (is_double_framework) {
26    defines += [ "CONFIG_DUAL_FRAMEWORK" ]
27  }
28  if (target_cpu == "arm") {
29    defines += [ "BINDER_IPC_32BIT" ]
30  }
31  if (is_standard_system) {
32    defines += [ "CONFIG_STANDARD_SYSTEM" ]
33  }
34  if (defined(build_public_version) && build_public_version) {
35    defines += [ "BUILD_PUBLIC_VERSION" ]
36  }
37
38  cflags = [
39    "-fstack-protector-strong",
40    "-D_FORTIFY_SOURCE=2",
41    "-O2",
42  ]
43
44  cflags_cc = [
45    "-fstack-protector-strong",
46    "-D_FORTIFY_SOURCE=2",
47    "-O2",
48  ]
49}
50
51ohos_source_set("networkslice_parcel") {
52  sanitize = {
53    cfi = true
54    cfi_cross_dso = true
55    debug = false
56  }
57
58  include_dirs = [
59    "$EXT_INNERKITS_ROOT/include",
60    "$EXT_INNERKITS_ROOT/networksliceclient/include",
61    "$NETMANAGER_EXT_ROOT/utils/log/include",
62  ]
63
64  deps = [ "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common" ]
65
66  external_deps = [
67    "c_utils:utils",
68    "hilog:libhilog",
69    "netmanager_base:net_manager_common",
70  ]
71
72  part_name = "netmanager_ext"
73  subsystem_name = "communication"
74}
75
76ohos_shared_library("networkslice_manager_if") {
77  sanitize = {
78    cfi = true
79    cfi_cross_dso = true
80    debug = false
81  }
82
83  sources = [
84    "$NETWORKSLICE_INNERKITS_SOURCE_DIR/src/networkslice_client.cpp",
85    "$NETWORKSLICE_INNERKITS_SOURCE_DIR/src/networkslice_proxy.cpp",
86  ]
87
88  public_configs = [ ":net_conn_manager_if_config" ]
89
90  deps = [ ":networkslice_parcel" ]
91
92  external_deps = [
93    "hilog:libhilog",
94    "ipc:ipc_single",
95    "netmanager_base:net_native_manager_if",
96    "samgr:samgr_proxy",
97  ]
98
99  defines = [
100    "NETMGR_LOG_TAG = \"NetworkSliceManager\"",
101    "LOG_DOMAIN = 0xD0015B0",
102  ]
103
104  if (enable_netmgr_ext_debug) {
105    defines += [ "NETMGR_DEBUG" ]
106  }
107
108  part_name = "netmanager_ext"
109  subsystem_name = "communication"
110}
111