1# Copyright (C) 2021-2025 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("telephony_core_service.gni") 16 17TELEPHONY_NETWORK_SEARCH_ROOT = "services/network_search" 18TELEPHONY_SIM_ROOT = "services/sim" 19TELEPHONY_TEL_RIL_ROOT = "services/tel_ril" 20TELEPHONY_IMS_CORE_SERVICE_SRC_PATH = "services/ims_service_interaction/src" 21TELEPHONY_SATELLITE_CORE_SERVICE_SRC_PATH = 22 "services/satellite_service_interaction/src" 23TELEPHONY_EXT_WRAPPER_ROOT = "services/telephony_ext_wrapper" 24 25ohos_shared_library("tel_core_service") { 26 sanitize = { 27 cfi = true 28 cfi_cross_dso = true 29 debug = false 30 } 31 branch_protector_ret = "pac_ret" 32 install_enable = true 33 34 sources = [ 35 "$TELEPHONY_EXT_WRAPPER_ROOT/src/telephony_ext_wrapper.cpp", 36 "$TELEPHONY_IMS_CORE_SERVICE_SRC_PATH/ims_core_service_callback_stub.cpp", 37 "$TELEPHONY_IMS_CORE_SERVICE_SRC_PATH/ims_core_service_client.cpp", 38 "$TELEPHONY_IMS_CORE_SERVICE_SRC_PATH/ims_core_service_proxy.cpp", 39 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/cell_info.cpp", 40 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/device_state_handler.cpp", 41 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/device_state_observer.cpp", 42 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/ims_reg_info_callback_proxy.cpp", 43 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_register.cpp", 44 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_search_callback_proxy.cpp", 45 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_search_handler.cpp", 46 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_search_manager.cpp", 47 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_search_notify.cpp", 48 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_search_state.cpp", 49 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_selection.cpp", 50 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_type.cpp", 51 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/network_utils.cpp", 52 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/nitz_update.cpp", 53 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/nr_ssb_info.cpp", 54 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/operator_name.cpp", 55 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/operator_name_utils.cpp", 56 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/radio_info.cpp", 57 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/setting_utils.cpp", 58 "$TELEPHONY_NETWORK_SEARCH_ROOT/src/signal_info.cpp", 59 "$TELEPHONY_SATELLITE_CORE_SERVICE_SRC_PATH/satellite_core_callback.cpp", 60 "$TELEPHONY_SATELLITE_CORE_SERVICE_SRC_PATH/satellite_core_callback_stub.cpp", 61 "$TELEPHONY_SATELLITE_CORE_SERVICE_SRC_PATH/satellite_service_client.cpp", 62 "$TELEPHONY_SATELLITE_CORE_SERVICE_SRC_PATH/satellite_service_proxy.cpp", 63 "$TELEPHONY_SIM_ROOT/src/csim_file_controller.cpp", 64 "$TELEPHONY_SIM_ROOT/src/icc_dialling_numbers_cache.cpp", 65 "$TELEPHONY_SIM_ROOT/src/icc_dialling_numbers_handler.cpp", 66 "$TELEPHONY_SIM_ROOT/src/icc_dialling_numbers_manager.cpp", 67 "$TELEPHONY_SIM_ROOT/src/icc_file.cpp", 68 "$TELEPHONY_SIM_ROOT/src/icc_file_controller.cpp", 69 "$TELEPHONY_SIM_ROOT/src/icc_operator_privilege_controller.cpp", 70 "$TELEPHONY_SIM_ROOT/src/icc_operator_rule.cpp", 71 "$TELEPHONY_SIM_ROOT/src/icc_state.cpp", 72 "$TELEPHONY_SIM_ROOT/src/isim_file.cpp", 73 "$TELEPHONY_SIM_ROOT/src/isim_file_controller.cpp", 74 "$TELEPHONY_SIM_ROOT/src/mcc_pool.cpp", 75 "$TELEPHONY_SIM_ROOT/src/multi_sim_controller.cpp", 76 "$TELEPHONY_SIM_ROOT/src/multi_sim_monitor.cpp", 77 "$TELEPHONY_SIM_ROOT/src/operator_config_cache.cpp", 78 "$TELEPHONY_SIM_ROOT/src/operator_config_loader.cpp", 79 "$TELEPHONY_SIM_ROOT/src/operator_file_parser.cpp", 80 "$TELEPHONY_SIM_ROOT/src/operator_matching_rule.cpp", 81 "$TELEPHONY_SIM_ROOT/src/pdp_profile_rdb_helper.cpp", 82 "$TELEPHONY_SIM_ROOT/src/plmn_file.cpp", 83 "$TELEPHONY_SIM_ROOT/src/radio_protocol_controller.cpp", 84 "$TELEPHONY_SIM_ROOT/src/ruim_file.cpp", 85 "$TELEPHONY_SIM_ROOT/src/ruim_file_controller.cpp", 86 "$TELEPHONY_SIM_ROOT/src/sim_account_callback_death_recipient.cpp", 87 "$TELEPHONY_SIM_ROOT/src/sim_account_manager.cpp", 88 "$TELEPHONY_SIM_ROOT/src/sim_char_decode.cpp", 89 "$TELEPHONY_SIM_ROOT/src/sim_file.cpp", 90 "$TELEPHONY_SIM_ROOT/src/sim_file_controller.cpp", 91 "$TELEPHONY_SIM_ROOT/src/sim_file_init.cpp", 92 "$TELEPHONY_SIM_ROOT/src/sim_file_manager.cpp", 93 "$TELEPHONY_SIM_ROOT/src/sim_manager.cpp", 94 "$TELEPHONY_SIM_ROOT/src/sim_number_decode.cpp", 95 "$TELEPHONY_SIM_ROOT/src/sim_rdb_helper.cpp", 96 "$TELEPHONY_SIM_ROOT/src/sim_sms_controller.cpp", 97 "$TELEPHONY_SIM_ROOT/src/sim_sms_manager.cpp", 98 "$TELEPHONY_SIM_ROOT/src/sim_state_handle.cpp", 99 "$TELEPHONY_SIM_ROOT/src/sim_state_manager.cpp", 100 "$TELEPHONY_SIM_ROOT/src/sim_state_tracker.cpp", 101 "$TELEPHONY_SIM_ROOT/src/sim_utils.cpp", 102 "$TELEPHONY_SIM_ROOT/src/stk_controller.cpp", 103 "$TELEPHONY_SIM_ROOT/src/stk_manager.cpp", 104 "$TELEPHONY_SIM_ROOT/src/tag_service.cpp", 105 "$TELEPHONY_SIM_ROOT/src/telephony_data_helper.cpp", 106 "$TELEPHONY_SIM_ROOT/src/usim_dialling_numbers_service.cpp", 107 "$TELEPHONY_SIM_ROOT/src/usim_file_controller.cpp", 108 "$TELEPHONY_SIM_ROOT/src/voice_mail_constants.cpp", 109 "$TELEPHONY_TEL_RIL_ROOT/src/observer_handler.cpp", 110 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_base.cpp", 111 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_call.cpp", 112 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_callback.cpp", 113 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_data.cpp", 114 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_handler.cpp", 115 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_manager.cpp", 116 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_modem.cpp", 117 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_network.cpp", 118 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_sim.cpp", 119 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_sms.cpp", 120 "services/core/src/core_service.cpp", 121 "services/core/src/core_service_dump_helper.cpp", 122 "services/core/src/core_service_hisysevent.cpp", 123 "services/core/src/core_service_stub.cpp", 124 ] 125 if (core_service_support_esim) { 126 sources += [ 127 "$TELEPHONY_SIM_ROOT/src/esim_controller.cpp", 128 "$TELEPHONY_SIM_ROOT/src/esim_file.cpp", 129 "$TELEPHONY_SIM_ROOT/src/start_osu_result_callback.cpp", 130 ] 131 } 132 133 include_dirs = [ 134 "$TELEPHONY_SIM_ROOT/include", 135 "$TELEPHONY_TEL_RIL_ROOT/include", 136 "$TELEPHONY_NETWORK_SEARCH_ROOT/include", 137 "$TELEPHONY_EXT_WRAPPER_ROOT/include", 138 "services/core/include", 139 "services/satellite_service_interaction/include", 140 "utils/log/include", 141 ] 142 143 if (core_service_support_esim) { 144 include_dirs += [ 145 "utils/codec/include", 146 "utils/vcard/include", 147 ] 148 } 149 150 configs = [ "utils:telephony_log_config" ] 151 152 defines = [ 153 "TELEPHONY_LOG_TAG = \"CoreService\"", 154 "LOG_DOMAIN = 0xD001F04", 155 "OPENSSL_SUPPRESS_DEPRECATED", 156 ] 157 158 defines += telephony_extra_defines 159 160 deps = [ 161 "interfaces/innerkits:tel_core_service_api", 162 "utils:libtel_common", 163 ] 164 165 if (core_service_support_esim) { 166 deps += [ "utils:libtel_vcard" ] 167 } 168 169 external_deps = [ 170 "ability_base:want", 171 "ability_base:zuri", 172 "ability_runtime:ability_deps_wrapper", 173 "ability_runtime:ability_manager", 174 "ability_runtime:app_manager", 175 "ability_runtime:data_ability_helper", 176 "ability_runtime:dataobs_manager", 177 "ability_runtime:wantagent_innerkits", 178 "bundle_framework:appexecfwk_base", 179 "bundle_framework:appexecfwk_core", 180 "cJSON:cjson", 181 "c_utils:utils", 182 "common_event_service:cesfwk_innerkits", 183 "config_policy:configpolicy_util", 184 "data_share:datashare_common", 185 "data_share:datashare_consumer", 186 "drivers_interface_ril:libril_proxy_1.1", 187 "drivers_interface_ril:libril_proxy_1.2", 188 "drivers_interface_ril:libril_proxy_1.3", 189 "drivers_interface_ril:libril_proxy_1.4", 190 "eventhandler:libeventhandler", 191 "ffrt:libffrt", 192 "hdf_core:libhdi", 193 "hdf_core:libpub_utils", 194 "hilog:libhilog", 195 "hisysevent:libhisysevent", 196 "huks:libhukssdk", 197 "i18n:intl_util", 198 "i18n:zone_util", 199 "init:libbegetutil", 200 "ipc:ipc_single", 201 "libphonenumber:phonenumber_standard", 202 "libpng:libpng", 203 "libxml2:libxml2", 204 "netmanager_base:net_conn_manager_if", 205 "openssl:libcrypto_shared", 206 "safwk:system_ability_fwk", 207 "samgr:samgr_proxy", 208 "telephony_data:tel_telephony_data", 209 "time_service:time_client", 210 ] 211 212 if (defined(global_parts_info) && 213 defined(global_parts_info.communication_netmanager_ext) && 214 global_parts_info.communication_netmanager_ext) { 215 external_deps += [ "netmanager_ext:net_tether_manager_if" ] 216 defines += [ "ABILITY_NETMANAGER_EXT_SUPPORT" ] 217 } 218 219 if (defined(global_parts_info) && 220 defined(global_parts_info.powermgr_power_manager) && 221 global_parts_info.powermgr_power_manager) { 222 external_deps += [ "power_manager:powermgr_client" ] 223 defines += [ "ABILITY_POWER_SUPPORT" ] 224 } 225 226 if (defined(global_parts_info) && 227 defined(global_parts_info.powermgr_battery_manager) && 228 global_parts_info.powermgr_battery_manager) { 229 external_deps += [ "battery_manager:batterysrv_client" ] 230 defines += [ "ABILITY_BATTERY_SUPPORT" ] 231 } 232 233 if (defined(global_parts_info) && 234 defined(global_parts_info.location_location) && 235 global_parts_info.location_location) { 236 external_deps += [ 237 "location:lbsservice_common", 238 "location:locator_sdk", 239 ] 240 defines += [ "ABILITY_LOCATION_SUPPORT" ] 241 } 242 243 if (telephony_hicollie_able) { 244 external_deps += [ "hicollie:libhicollie" ] 245 defines += [ "HICOLLIE_ENABLE" ] 246 } 247 248 part_name = "core_service" 249 subsystem_name = "telephony" 250} 251