1# Copyright (C) 2022 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/config/components/idl_tool/idl.gni") 15import("//build/ohos.gni") 16import("//build/ohos_var.gni") 17import("../../../nfc.gni") 18 19idl_gen_interface("nfc_controller_interface") { 20 sources = [ "idl/INfcController.idl" ] 21 configs = [ ":nfc_inner_kits_public_config" ] 22 23 sequenceable_ext_deps = [ "ability_base:want" ] 24 log_domainid = "0xD000301" 25 log_tag = "Nfc_Controller" 26 part_name = "nfc" 27 subsystem_name = "communication" 28} 29 30config("nfc_inner_kits_config") { 31 visibility = [ ":*" ] 32 defines = [ "DEBUG" ] 33 cflags_cc = [ "-fexceptions" ] 34 35 include_dirs = [] 36} 37 38config("nfc_inner_kits_public_config") { 39 visibility = [ ":*" ] 40 defines = [] 41 if (nfc_service_feature_vendor_applications_enabled) { 42 defines += [ "VENDOR_APPLICATIONS_ENABLED" ] 43 } 44 include_dirs = [ 45 "${target_gen_dir}", 46 "$NFC_DIR/interfaces/inner_api/common", 47 "$NFC_DIR/interfaces/inner_api/controller", 48 ] 49} 50 51ohos_shared_library("nfc_inner_kits_controller") { 52 sanitize = { 53 cfi = true 54 boundary_sanitize = true 55 integer_overflow = true 56 cfi_cross_dso = true 57 debug = false 58 ubsan = true 59 } 60 branch_protector_ret = "pac_ret" 61 sources = [ 62 "ndef_msg_callback_stub.cpp", 63 "nfc_controller.cpp", 64 "nfc_controller_callback_stub.cpp", 65 "nfc_sa_client.cpp", 66 ] 67 if (nfc_service_feature_vendor_applications_enabled) { 68 sources += [ 69 "on_card_emulation_notify_cb_stub.cpp", 70 "query_app_info_callback_stub.cpp", 71 ] 72 } 73 configs = [ ":nfc_inner_kits_config" ] 74 75 public_configs = [ ":nfc_inner_kits_public_config" ] 76 77 deps = [ 78 ":libnfc_controller_interface_proxy", 79 ":nfc_controller_interface", 80 "../common:nfc_inner_kits_common" 81 ] 82 83 external_deps = [ 84 "ability_base:want", 85 "ability_base:zuri", 86 "ability_runtime:dataobs_manager", 87 "bundle_framework:appexecfwk_base", 88 "c_utils:utils", 89 "hilog:libhilog", 90 "ipc:ipc_core", 91 "samgr:samgr_proxy", 92 ] 93 94 part_name = "nfc" 95 subsystem_name = "communication" 96} 97