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("//base/notification/distributed_notification_service/notification.gni") 15import("//build/ohos.gni") 16 17group("ans_client") { 18 deps = [ ":ans_innerkits" ] 19} 20 21config("ans_innerkits_public_config") { 22 visibility = [ "./../../*" ] 23 24 include_dirs = [ 25 "${inner_api_path}", 26 "${interfaces_path}/kits/native", 27 "${core_path}/common/include", 28 "${core_path}/include", 29 "//third_party/json/single_include", 30 ] 31 configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] 32} 33 34ohos_shared_library("ans_innerkits") { 35 sanitize = { 36 integer_overflow = true 37 ubsan = true 38 boundary_sanitize = true 39 cfi = true 40 cfi_cross_dso = true 41 debug = false 42 } 43 branch_protector_ret = "pac_ret" 44 45 include_dirs = [ "${inner_api_path}" ] 46 47 sources = [ 48 "${core_path}/common/src/ans_convert_enum.cpp", 49 "${core_path}/common/src/ans_log_wrapper.cpp", 50 "${core_path}/common/src/ans_watchdog.cpp", 51 "${core_path}/src/ans_dialog_callback_interface.cpp", 52 "${core_path}/src/ans_dialog_callback_proxy.cpp", 53 "${core_path}/src/ans_dialog_callback_stub.cpp", 54 "${core_path}/src/ans_image_util.cpp", 55 "${core_path}/src/ans_manager_death_recipient.cpp", 56 "${core_path}/src/ans_manager_proxy.cpp", 57 "${core_path}/src/ans_manager_proxy_disturb.cpp", 58 "${core_path}/src/ans_manager_proxy_reminder.cpp", 59 "${core_path}/src/ans_manager_proxy_slot.cpp", 60 "${core_path}/src/ans_manager_proxy_subscribe.cpp", 61 "${core_path}/src/ans_manager_proxy_utils.cpp", 62 "${core_path}/src/ans_manager_stub.cpp", 63 "${core_path}/src/ans_manager_stub_invalid.cpp", 64 "${core_path}/src/ans_notification.cpp", 65 "${core_path}/src/ans_subscriber_listener.cpp", 66 "${core_path}/src/ans_subscriber_local_live_view_proxy.cpp", 67 "${core_path}/src/ans_subscriber_local_live_view_stub.cpp", 68 "${core_path}/src/ans_subscriber_proxy.cpp", 69 "${core_path}/src/ans_subscriber_stub.cpp", 70 "${core_path}/src/swing_callback_proxy.cpp", 71 "${core_path}/src/swing_callback_stub.cpp", 72 "${frameworks_module_ans_path}/src/ans_dialog_host_client.cpp", 73 "${frameworks_module_ans_path}/src/badge_number_callback_data.cpp", 74 "${frameworks_module_ans_path}/src/enabled_notification_callback_data.cpp", 75 "${frameworks_module_ans_path}/src/message_user.cpp", 76 "${frameworks_module_ans_path}/src/notification.cpp", 77 "${frameworks_module_ans_path}/src/notification_action_button.cpp", 78 "${frameworks_module_ans_path}/src/notification_basic_content.cpp", 79 "${frameworks_module_ans_path}/src/notification_bundle_option.cpp", 80 "${frameworks_module_ans_path}/src/notification_button_option.cpp", 81 "${frameworks_module_ans_path}/src/notification_capsule.cpp", 82 "${frameworks_module_ans_path}/src/notification_check_info.cpp", 83 "${frameworks_module_ans_path}/src/notification_check_request.cpp", 84 "${frameworks_module_ans_path}/src/notification_constant.cpp", 85 "${frameworks_module_ans_path}/src/notification_content.cpp", 86 "${frameworks_module_ans_path}/src/notification_conversational_content.cpp", 87 "${frameworks_module_ans_path}/src/notification_conversational_message.cpp", 88 "${frameworks_module_ans_path}/src/notification_distributed_options.cpp", 89 "${frameworks_module_ans_path}/src/notification_do_not_disturb_date.cpp", 90 "${frameworks_module_ans_path}/src/notification_do_not_disturb_profile.cpp", 91 "${frameworks_module_ans_path}/src/notification_flags.cpp", 92 "${frameworks_module_ans_path}/src/notification_helper.cpp", 93 "${frameworks_module_ans_path}/src/notification_live_view_content.cpp", 94 "${frameworks_module_ans_path}/src/notification_local_live_view_button.cpp", 95 "${frameworks_module_ans_path}/src/notification_local_live_view_content.cpp", 96 "${frameworks_module_ans_path}/src/notification_local_live_view_subscriber.cpp", 97 "${frameworks_module_ans_path}/src/notification_long_text_content.cpp", 98 "${frameworks_module_ans_path}/src/notification_media_content.cpp", 99 "${frameworks_module_ans_path}/src/notification_multiline_content.cpp", 100 "${frameworks_module_ans_path}/src/notification_normal_content.cpp", 101 "${frameworks_module_ans_path}/src/notification_picture_content.cpp", 102 "${frameworks_module_ans_path}/src/notification_progress.cpp", 103 "${frameworks_module_ans_path}/src/notification_request.cpp", 104 "${frameworks_module_ans_path}/src/notification_slot.cpp", 105 "${frameworks_module_ans_path}/src/notification_sorting.cpp", 106 "${frameworks_module_ans_path}/src/notification_sorting_map.cpp", 107 "${frameworks_module_ans_path}/src/notification_subscribe_info.cpp", 108 "${frameworks_module_ans_path}/src/notification_subscriber.cpp", 109 "${frameworks_module_ans_path}/src/notification_template.cpp", 110 "${frameworks_module_ans_path}/src/notification_time.cpp", 111 "${frameworks_module_ans_path}/src/notification_unified_group_info.cpp", 112 "${frameworks_module_ans_path}/src/notification_user_input.cpp", 113 "${frameworks_module_ans_path}/src/push_callback_stub.cpp", 114 "${frameworks_module_ans_path}/src/push_promise_callback.cpp", 115 "${frameworks_module_ans_path}/src/reminder_helper.cpp", 116 "${frameworks_module_ans_path}/src/reminder_request.cpp", 117 "${frameworks_module_ans_path}/src/reminder_request_alarm.cpp", 118 "${frameworks_module_ans_path}/src/reminder_request_calendar.cpp", 119 "${frameworks_module_ans_path}/src/reminder_request_timer.cpp", 120 ] 121 122 public_configs = [ ":ans_innerkits_public_config" ] 123 124 defines = [] 125 126 external_deps = [ 127 "ability_base:want", 128 "ability_base:zuri", 129 "ability_runtime:appkit_native", 130 "bundle_framework:appexecfwk_base", 131 "bundle_framework:appexecfwk_core", 132 "c_utils:utils", 133 "eventhandler:libeventhandler", 134 "hicollie:libhicollie", 135 "hilog:libhilog", 136 "i18n:intl_util", 137 "ipc:ipc_core", 138 "resource_management:global_resmgr", 139 "samgr:samgr_proxy", 140 "time_service:time_client", 141 ] 142 143 public_external_deps = [ 144 "ability_runtime:wantagent_innerkits", 145 "image_framework:image_native", 146 ] 147 148 if (is_double_framework) { 149 cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ] 150 } 151 152 if (ans_hitrace_usage) { 153 external_deps += [ "hitrace:hitrace_meter" ] 154 defines += [ "HITRACE_METER_ENABLE" ] 155 } 156 157 if (notification_smart_reminder_supported) { 158 defines += [ "NOTIFICATION_SMART_REMINDER_SUPPORTED" ] 159 } 160 161 subsystem_name = "${subsystem_name}" 162 part_name = "${component_name}" 163} 164