• 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
17ohos_shared_library("networkslice_manager") {
18  sanitize = {
19    cfi = true
20    cfi_cross_dso = true
21    debug = false
22  }
23  branch_protector_ret = "pac_ret"
24  sources = [
25    "$NETCONNMANAGER_INNERKITS_SOURCE_DIR/src/inet_addr.cpp",
26    "src/allowednssaiconfig.cpp",
27    "src/broadcast_proxy.cpp",
28    "src/dns_result_callback.cpp",
29    "src/hwnetworkslicemanager.cpp",
30    "src/net_conn_callback.cpp",
31    "src/networkslice_kernel_proxy.cpp",
32    "src/networkslice_loop_manager.cpp",
33    "src/networkslice_service.cpp",
34    "src/networkslice_service_base.cpp",
35    "src/networkslice_stub.cpp",
36    "src/networkslicemanager.cpp",
37    "src/networkslicemsgcenter.cpp",
38    "src/networksliceutil.cpp",
39    "src/nrunsolicitedmsgparser.cpp",
40    "src/state_utils.cpp",
41    "src/urspconfig.cpp",
42  ]
43  include_dirs = [
44    "include",
45    "model",
46  ]
47
48  external_deps = [
49    "ability_runtime:app_manager",
50    "bundle_framework:appexecfwk_base",
51    "bundle_framework:appexecfwk_core",
52    "c_utils:utils",
53    "cellular_data:tel_cellular_data_api",
54    "core_service:tel_core_service_api",
55    "data_share:datashare_common",
56    "data_share:datashare_consumer",
57    "eventhandler:libeventhandler",
58    "ffrt:libffrt",
59    "hicollie:libhicollie",
60    "hilog:libhilog",
61    "init:libbegetutil",
62    "ipc:ipc_core",
63    "json:nlohmann_json_static",
64    "libxml2:libxml2",
65    "netmanager_base:net_conn_manager_if",
66    "netmanager_base:net_manager_common",
67    "netmanager_base:netsys_controller",
68    "openssl:libcrypto_shared",
69    "os_account:os_account_innerkits",
70    "relational_store:native_rdb",
71    "safwk:system_ability_fwk",
72    "samgr:samgr_proxy",
73  ]
74
75  cflags = [
76    "-fstack-protector-strong",
77    "-D_FORTIFY_SOURCE=2",
78    "-O2",
79  ]
80
81  cflags_cc = [
82    "-fstack-protector-strong",
83    "-fexceptions",
84    "-D_FORTIFY_SOURCE=2",
85    "-O2",
86  ]
87
88  deps = [
89    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netvpnclient:net_vpn_manager_if",
90    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/networksliceclient:networkslice_manager_if",
91    "$NETMANAGER_EXT_ROOT/utils:net_event_report",
92    "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common",
93  ]
94
95  defines = [
96    "NETMGR_LOG_TAG = \"NetworksliceManager\"",
97    "LOG_DOMAIN = 0xD0015B0",
98  ]
99
100  if (enable_netmgr_ext_debug) {
101    defines += [ "NETMGR_DEBUG" ]
102  }
103
104  part_name = "netmanager_ext"
105  subsystem_name = "communication"
106}
107