1# Copyright (c) 2024-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("//base/notification/distributed_notification_service/notification.gni") 15import("//build/config/components/idl_tool/idl.gni") 16import("//build/ohos.gni") 17 18group("reminder_client") { 19 deps = [ ":reminder_innerkits" ] 20} 21 22idl_interface_sources = [ 23 "${target_gen_dir}/reminder_agent_service_proxy.cpp", 24 "${target_gen_dir}/reminder_agent_service_stub.cpp", 25] 26 27idl_gen_interface("reminder_service_interface") { 28 src_idl = rebase_path("IReminderAgentService.idl") 29 dst_file = string_join(",", idl_interface_sources) 30 hitrace = "HITRACE_TAG_ABILITY_MANAGER" 31 log_domainid = "0xD003900" 32 log_tag = "ReminderAgentService" 33} 34 35config("reminder_innerkits_public_config") { 36 visibility = [ "./../../*" ] 37 38 include_dirs = [ 39 "${inner_api_path}", 40 "${core_path}/common/include", 41 "${core_path}/include", 42 "${target_gen_dir}", 43 ] 44} 45 46ohos_shared_library("reminder_innerkits") { 47 sanitize = { 48 integer_overflow = true 49 ubsan = true 50 boundary_sanitize = true 51 cfi = true 52 cfi_cross_dso = true 53 debug = false 54 } 55 branch_protector_ret = "pac_ret" 56 57 include_dirs = [ "${inner_api_path}" ] 58 public_configs = [ 59 ":reminder_innerkits_public_config", 60 "${frameworks_path}/ans:ans_innerkits_config", 61 ] 62 output_values = get_target_outputs(":reminder_service_interface") 63 sources = [ 64 "${frameworks_module_reminder_path}/src/reminder_helper.cpp", 65 "${frameworks_module_reminder_path}/src/reminder_request.cpp", 66 "${frameworks_module_reminder_path}/src/reminder_request_adaptation.cpp", 67 "${frameworks_module_reminder_path}/src/reminder_request_alarm.cpp", 68 "${frameworks_module_reminder_path}/src/reminder_request_calendar.cpp", 69 "${frameworks_module_reminder_path}/src/reminder_request_client.cpp", 70 "${frameworks_module_reminder_path}/src/reminder_request_factory.cpp", 71 "${frameworks_module_reminder_path}/src/reminder_request_timer.cpp", 72 "${frameworks_module_reminder_path}/src/reminder_service_load_callback.cpp", 73 ] 74 sources += filter_include(output_values, [ "*.cpp" ]) 75 defines = [] 76 deps = [ 77 ":reminder_service_interface", 78 "${frameworks_path}/ans:ans_client", 79 ] 80 81 external_deps = [ 82 "ability_base:want", 83 "ability_base:zuri", 84 "ability_runtime:appkit_native", 85 "bundle_framework:appexecfwk_base", 86 "bundle_framework:appexecfwk_core", 87 "c_utils:utils", 88 "eventhandler:libeventhandler", 89 "hicollie:libhicollie", 90 "hilog:libhilog", 91 "i18n:intl_util", 92 "ipc:ipc_core", 93 "samgr:samgr_proxy", 94 "time_service:time_client", 95 ] 96 97 public_external_deps = [ 98 "ability_runtime:wantagent_innerkits", 99 "ffrt:libffrt", 100 "image_framework:image_native", 101 ] 102 103 if (is_double_framework) { 104 cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ] 105 } 106 107 if (ans_hitrace_usage) { 108 external_deps += [ "hitrace:hitrace_meter" ] 109 defines += [ "HITRACE_METER_ENABLE" ] 110 } 111 112 if (notification_smart_reminder_supported) { 113 defines += [ "NOTIFICATION_SMART_REMINDER_SUPPORTED" ] 114 } 115 116 subsystem_name = "${subsystem_name}" 117 part_name = "${component_name}" 118} 119