1# Copyright (C) 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 17ohos_shared_library("cj_notification_manager_ffi") { 18 sanitize = { 19 integer_overflow = true 20 ubsan = true 21 boundary_sanitize = true 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 branch_protector_ret = "pac_ret" 27 28 include_dirs = [ 29 "include", 30 "srcold", 31 "${component_path}/interfaces/inner_api", 32 "${component_path}/frameworks/core/common/include", 33 ] 34 35 if (!defined(defines)) { 36 defines = [] 37 } 38 39 use_exceptions = true 40 41 deps = [ "${frameworks_module_ans_path}:ans_innerkits" ] 42 43 external_deps = [ 44 "ability_base:want", 45 "ability_base:zuri", 46 "ability_runtime:ability_manager", 47 "ability_runtime:abilitykit_native", 48 "ability_runtime:data_ability_helper", 49 "c_utils:utils", 50 "ffrt:libffrt", 51 "hilog:libhilog", 52 "image_framework:cj_image_ffi", 53 "ipc:ipc_core", 54 "napi:ace_napi", 55 "napi:cj_bind_ffi", 56 "napi:cj_bind_native", 57 ] 58 59 sources = [ 60 "src/inner_errors.cpp", 61 "src/notification_manager_ffi.cpp", 62 "src/notification_manager_impl.cpp", 63 "src/notification_utils.cpp", 64 "srcold/cj_notification_manager_ffi.cpp", 65 "srcold/cj_notification_manager_impl.cpp", 66 ] 67 68 if (current_os == "ohos") { 69 defines += [ "OHOS_PLATFORM" ] 70 } 71 72 if (current_os == "mingw") { 73 defines += [ "WINDOWS_PLATFORM" ] 74 } 75 76 innerapi_tags = [ "platformsdk" ] 77 subsystem_name = "${subsystem_name}" 78 part_name = "${component_name}" 79} 80