1# Copyright (c) 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/ets_frontend/ets2abc_config.gni") 16import("//build/ohos.gni") 17 18ohos_shared_library("notification_manager_ani") { 19 branch_protector_ret = "pac_ret" 20 sanitize = { 21 cfi = true 22 cfi_cross_dso = true 23 cfi_vcall_icall_only = true 24 debug = false 25 } 26 27 include_dirs = [ 28 "./include", 29 "./include/manager", 30 "${core_path}/common/include", 31 "${inner_api_path}", 32 "${frameworks_path}/cj/ffi/include", 33 ] 34 35 sources = [ 36 "./src/manager/ani_ans_dialog_callback.cpp", 37 "./src/manager/ani_cance.cpp", 38 "./src/manager/ani_display_badge.cpp", 39 "./src/manager/ani_distributed_enable.cpp", 40 "./src/manager/ani_do_not_disturb_date.cpp", 41 "./src/manager/ani_do_not_disturb_profile.cpp", 42 "./src/manager/ani_get_active.cpp", 43 "./src/manager/ani_local_live_view.cpp", 44 "./src/manager/ani_manager.cpp", 45 "./src/manager/ani_notification_enable.cpp", 46 "./src/manager/ani_on.cpp", 47 "./src/manager/ani_open_settings.cpp", 48 "./src/manager/ani_publish.cpp", 49 "./src/manager/ani_push_callback.cpp", 50 "./src/manager/ani_remove_group.cpp", 51 "./src/manager/ani_request_enable.cpp", 52 "./src/manager/ani_slot.cpp", 53 "./src/manager/ani_support_template.cpp", 54 "./src/manager/ani_sync_config.cpp", 55 "./src/sts_action_button.cpp", 56 "./src/sts_bundle_option.cpp", 57 "./src/sts_common.cpp", 58 "./src/sts_convert_other.cpp", 59 "./src/sts_disturb_mode.cpp", 60 "./src/sts_notification_content.cpp", 61 "./src/sts_notification_flag.cpp", 62 "./src/sts_notification_manager.cpp", 63 "./src/sts_request.cpp", 64 "./src/sts_slot.cpp", 65 "./src/sts_sorting.cpp", 66 "./src/sts_sorting_map.cpp", 67 "./src/sts_subscribe.cpp", 68 "./src/sts_subscribe_info.cpp", 69 "./src/sts_subscriber.cpp", 70 "./src/sts_template.cpp", 71 "./src/sts_throw_erro.cpp", 72 "./src/sts_user_input.cpp", 73 ] 74 75 cflags = [] 76 if (target_cpu == "arm") { 77 cflags += [ "-DBINDER_IPC_32BIT" ] 78 } 79 80 deps = [ 81 "${frameworks_module_ans_path}:ans_innerkits", 82 "${frameworks_path}/cj/ffi:cj_notification_manager_ffi", 83 ] 84 85 defines = [] 86 87 if (distributed_notification_service_feature_local_liveview) { 88 defines += [ "ANS_FEATURE_LIVEVIEW_LOCAL_LIVEVIEW" ] 89 } 90 91 external_deps = [ 92 "ability_base:zuri", 93 "ability_runtime:ability_context_native", 94 "ability_runtime:abilitykit_native", 95 "ability_runtime:ani_base_context", 96 "ability_runtime:ani_common", 97 "ability_runtime:ani_wantagent_common", 98 "ability_runtime:app_context", 99 "ability_runtime:runtime", 100 "ability_runtime:wantagent_innerkits", 101 "access_token:libtokenid_sdk", 102 "ace_engine:ace_uicontent", 103 "c_utils:utils", 104 "ffrt:libffrt", 105 "hilog:libhilog", 106 "image_framework:image_taihe", 107 "image_framework:image_native", 108 "ipc:ipc_core", 109 "napi:ace_napi", 110 "resource_management:global_resmgr", 111 "runtime_core:ani", 112 ] 113 114 innerapi_tags = [ "platformsdk" ] 115 subsystem_name = "${subsystem_name}" 116 part_name = "${component_name}" 117} 118 119ohos_shared_library("notification_subscribe_ani") { 120 branch_protector_ret = "pac_ret" 121 sanitize = { 122 cfi = true 123 cfi_cross_dso = true 124 cfi_vcall_icall_only = true 125 debug = false 126 } 127 128 include_dirs = [ 129 "./include", 130 "./include/subscribe", 131 "${core_path}/common/include", 132 "${inner_api_path}", 133 "${frameworks_path}/cj/ffi/include", 134 ] 135 136 configs = [ "${frameworks_module_ans_path}:ans_innerkits_public_config" ] 137 138 sources = [ 139 "./src/sts_action_button.cpp", 140 "./src/sts_bundle_option.cpp", 141 "./src/sts_common.cpp", 142 "./src/sts_convert_other.cpp", 143 "./src/sts_disturb_mode.cpp", 144 "./src/sts_notification_content.cpp", 145 "./src/sts_notification_flag.cpp", 146 "./src/sts_notification_manager.cpp", 147 "./src/sts_request.cpp", 148 "./src/sts_slot.cpp", 149 "./src/sts_sorting.cpp", 150 "./src/sts_sorting_map.cpp", 151 "./src/sts_subscribe.cpp", 152 "./src/sts_subscribe_info.cpp", 153 "./src/sts_subscriber.cpp", 154 "./src/sts_template.cpp", 155 "./src/sts_throw_erro.cpp", 156 "./src/sts_user_input.cpp", 157 "./src/subscribe/ani_remove.cpp", 158 "./src/subscribe/ani_subscribe.cpp", 159 ] 160 161 cflags = [] 162 if (target_cpu == "arm") { 163 cflags += [ "-DBINDER_IPC_32BIT" ] 164 } 165 166 deps = [ 167 "${frameworks_module_ans_path}:ans_innerkits", 168 "${frameworks_path}/cj/ffi:cj_notification_manager_ffi", 169 ] 170 171 external_deps = [ 172 "ability_base:want", 173 "ability_base:zuri", 174 "ability_runtime:ani_common", 175 "ability_runtime:ani_common", 176 "ability_runtime:ani_wantagent_common", 177 "ability_runtime:runtime", 178 "ability_runtime:wantagent_innerkits", 179 "c_utils:utils", 180 "hilog:libhilog", 181 "image_framework:image", 182 "image_framework:image_taihe", 183 "image_framework:image_native", 184 "ipc:ipc_core", 185 "napi:ace_napi", 186 "resource_management:global_resmgr", 187 "runtime_core:ani", 188 ] 189 190 innerapi_tags = [ "platformsdk" ] 191 subsystem_name = "${subsystem_name}" 192 part_name = "${component_name}" 193} 194