• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/ohos.gni")
15import("//build/ohos_var.gni")
16
17config("nfc_config") {
18  visibility = [ ":*" ]
19
20  defines = [ "DEBUG" ]
21
22  cflags_cc = [ "-DNXP_EXTNS=TRUE" ]
23
24  include_dirs = [
25    "include",
26    "src/controller",
27    "src/nci_adapter",
28    "src/tags",
29    "src/utils",
30    "src/card_emulation",
31    "//third_party/libnfc-nci/SN100x/src/gki/common/",
32    "//third_party/libnfc-nci/SN100x/src/gki/ulinux/",
33    "//third_party/libnfc-nci/SN100x/src/include",
34    "//third_party/libnfc-nci/SN100x/src/nfa/include",
35    "//third_party/libnfc-nci/SN100x/src/nfc/include",
36    "//third_party/libnfc-nci/SN100x/utils/include",
37    "//foundation/communication/nfc/interfaces/inner_api/include",
38  ]
39}
40
41ohos_shared_library("nfc_service") {
42  sanitize = {
43    cfi = true
44    boundary_sanitize = true
45    integer_overflow = true
46    cfi_cross_dso = true
47    debug = false
48  }
49  stack_protector_ret = true
50  sources = [
51    "src/app_data_parser.cpp",
52    "src/card_emulation/ce_service.cpp",
53    "src/common_event_handler.cpp",
54    "src/controller/nfc_controller_callback_proxy.cpp",
55    "src/controller/nfc_controller_death_recipient.cpp",
56    "src/controller/nfc_controller_impl.cpp",
57    "src/controller/nfc_controller_stub.cpp",
58    "src/nci_adapter/nci_adaptations.cpp",
59    "src/nci_adapter/nfcc_host.cpp",
60    "src/nci_adapter/nfcc_nci_adapter.cpp",
61    "src/nci_adapter/routing_manager.cpp",
62    "src/nci_adapter/tag_host.cpp",
63    "src/nci_adapter/tag_nci_adapter.cpp",
64    "src/nfc_polling_params.cpp",
65    "src/nfc_sa_manager.cpp",
66    "src/nfc_service.cpp",
67    "src/tags/foreground_callback_proxy.cpp",
68    "src/tags/foreground_death_recipient.cpp",
69    "src/tags/tag_dispatcher.cpp",
70    "src/tags/tag_session.cpp",
71    "src/tags/tag_session_stub.cpp",
72    "src/utils/nfc_chip_type_parser.cpp",
73    "src/utils/nfc_watch_dog.cpp",
74    "src/utils/permission_tools.cpp",
75    "src/utils/preferences/nfc_pref_impl.cpp",
76    "src/utils/synchronize_event.cpp",
77  ]
78
79  public_configs = [ ":nfc_config" ]
80
81  deps = [
82    "etc/init:etc",
83    "//foundation/communication/nfc/interfaces/inner_api:nfc_inner_kits",
84    "//third_party/libnfc-nci/SN100x:nfc-nci",
85    "//third_party/libnfc-nci/SN100x/utils:nfcutils",
86  ]
87
88  external_deps = [
89    "ability_base:want",
90    "ability_runtime:ability_manager",
91    "access_token:libaccesstoken_sdk",
92    "bundle_framework:appexecfwk_base",
93    "bundle_framework:appexecfwk_core",
94    "c_utils:utils",
95    "common_event_service:cesfwk_core",
96    "common_event_service:cesfwk_innerkits",
97    "eventhandler:libeventhandler",
98    "hilog:libhilog",
99    "ipc:ipc_core",
100    "miscdevice:vibrator_interface_native",
101    "preferences:native_preferences",
102    "safwk:system_ability_fwk",
103    "samgr:samgr_proxy",
104  ]
105
106  part_name = "nfc"
107  subsystem_name = "communication"
108}
109