1# Copyright (C) 2021-2024 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_manager.cpp", 87 "$TELEPHONY_SIM_ROOT/src/sim_char_decode.cpp", 88 "$TELEPHONY_SIM_ROOT/src/sim_file.cpp", 89 "$TELEPHONY_SIM_ROOT/src/sim_file_controller.cpp", 90 "$TELEPHONY_SIM_ROOT/src/sim_file_manager.cpp", 91 "$TELEPHONY_SIM_ROOT/src/sim_manager.cpp", 92 "$TELEPHONY_SIM_ROOT/src/sim_number_decode.cpp", 93 "$TELEPHONY_SIM_ROOT/src/sim_rdb_helper.cpp", 94 "$TELEPHONY_SIM_ROOT/src/sim_sms_controller.cpp", 95 "$TELEPHONY_SIM_ROOT/src/sim_sms_manager.cpp", 96 "$TELEPHONY_SIM_ROOT/src/sim_state_handle.cpp", 97 "$TELEPHONY_SIM_ROOT/src/sim_state_manager.cpp", 98 "$TELEPHONY_SIM_ROOT/src/sim_state_tracker.cpp", 99 "$TELEPHONY_SIM_ROOT/src/sim_utils.cpp", 100 "$TELEPHONY_SIM_ROOT/src/stk_controller.cpp", 101 "$TELEPHONY_SIM_ROOT/src/stk_manager.cpp", 102 "$TELEPHONY_SIM_ROOT/src/tag_service.cpp", 103 "$TELEPHONY_SIM_ROOT/src/telephony_data_helper.cpp", 104 "$TELEPHONY_SIM_ROOT/src/usim_dialling_numbers_service.cpp", 105 "$TELEPHONY_SIM_ROOT/src/usim_file_controller.cpp", 106 "$TELEPHONY_SIM_ROOT/src/voice_mail_constants.cpp", 107 "$TELEPHONY_TEL_RIL_ROOT/src/observer_handler.cpp", 108 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_base.cpp", 109 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_call.cpp", 110 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_callback.cpp", 111 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_data.cpp", 112 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_handler.cpp", 113 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_manager.cpp", 114 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_modem.cpp", 115 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_network.cpp", 116 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_sim.cpp", 117 "$TELEPHONY_TEL_RIL_ROOT/src/tel_ril_sms.cpp", 118 "services/core/src/core_service.cpp", 119 "services/core/src/core_service_dump_helper.cpp", 120 "services/core/src/core_service_hisysevent.cpp", 121 "services/core/src/core_service_stub.cpp", 122 ] 123 124 include_dirs = [ 125 "$TELEPHONY_SIM_ROOT/include", 126 "$TELEPHONY_TEL_RIL_ROOT/include", 127 "$TELEPHONY_NETWORK_SEARCH_ROOT/include", 128 "$TELEPHONY_EXT_WRAPPER_ROOT/include", 129 "services/core/include", 130 "services/satellite_service_interaction/include", 131 "utils/log/include", 132 ] 133 134 configs = [ "utils:telephony_log_config" ] 135 136 defines = [ 137 "TELEPHONY_LOG_TAG = \"CoreService\"", 138 "LOG_DOMAIN = 0xD001F04", 139 "OPENSSL_SUPPRESS_DEPRECATED", 140 ] 141 142 defines += telephony_extra_defines 143 144 deps = [ 145 "interfaces/innerkits:tel_core_service_api", 146 "utils:libtel_common", 147 "//third_party/libphonenumber/cpp:phonenumber_standard", 148 "//third_party/libpng:libpng", 149 "//third_party/libxml2:libxml2", 150 "//third_party/openssl:libcrypto_shared", 151 ] 152 153 external_deps = [ 154 "ability_base:want", 155 "ability_base:zuri", 156 "ability_runtime:ability_deps_wrapper", 157 "ability_runtime:ability_manager", 158 "ability_runtime:app_manager", 159 "ability_runtime:data_ability_helper", 160 "ability_runtime:dataobs_manager", 161 "ability_runtime:wantagent_innerkits", 162 "bundle_framework:appexecfwk_base", 163 "bundle_framework:appexecfwk_core", 164 "cJSON:cjson", 165 "c_utils:utils", 166 "common_event_service:cesfwk_innerkits", 167 "config_policy:configpolicy_util", 168 "data_share:datashare_common", 169 "data_share:datashare_consumer", 170 "drivers_interface_ril:libril_proxy_1.1", 171 "drivers_interface_ril:libril_proxy_1.2", 172 "drivers_interface_ril:libril_proxy_1.3", 173 "eventhandler:libeventhandler", 174 "ffrt:libffrt", 175 "hdf_core:libhdi", 176 "hdf_core:libpub_utils", 177 "hilog:libhilog", 178 "hisysevent:libhisysevent", 179 "huks:libhukssdk", 180 "i18n:intl_util", 181 "i18n:zone_util", 182 "init:libbegetutil", 183 "ipc:ipc_single", 184 "netmanager_base:net_conn_manager_if", 185 "netmanager_ext:net_tether_manager_if", 186 "safwk:system_ability_fwk", 187 "samgr:samgr_proxy", 188 "telephony_data:tel_telephony_data", 189 "time_service:time_client", 190 ] 191 192 if (defined(global_parts_info) && 193 defined(global_parts_info.powermgr_power_manager) && 194 global_parts_info.powermgr_power_manager) { 195 external_deps += [ "power_manager:powermgr_client" ] 196 defines += [ "ABILITY_POWER_SUPPORT" ] 197 } 198 199 if (defined(global_parts_info) && 200 defined(global_parts_info.powermgr_battery_manager) && 201 global_parts_info.powermgr_battery_manager) { 202 external_deps += [ "battery_manager:batterysrv_client" ] 203 defines += [ "ABILITY_BATTERY_SUPPORT" ] 204 } 205 206 if (defined(global_parts_info) && 207 defined(global_parts_info.location_location) && 208 global_parts_info.location_location) { 209 external_deps += [ 210 "location:lbsservice_common", 211 "location:locator_sdk", 212 ] 213 defines += [ "ABILITY_LOCATION_SUPPORT" ] 214 } 215 216 if (telephony_hicollie_able) { 217 external_deps += [ "hicollie:libhicollie" ] 218 defines += [ "HICOLLIE_ENABLE" ] 219 } 220 221 part_name = "core_service" 222 subsystem_name = "telephony" 223} 224