• 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    "//third_party/libnfc-nci/SN100x/src/gki/common/",
31    "//third_party/libnfc-nci/SN100x/src/gki/ulinux/",
32    "//third_party/libnfc-nci/SN100x/src/include",
33    "//third_party/libnfc-nci/SN100x/src/nfa/include",
34    "//third_party/libnfc-nci/SN100x/src/nfc/include",
35    "//third_party/libnfc-nci/SN100x/utils/include",
36    "//foundation/communication/nfc/interfaces/inner_api/include",
37  ]
38}
39
40ohos_shared_library("nfc_service") {
41  sources = [
42    "src/app_data_parser.cpp",
43    "src/common_event_handler.cpp",
44    "src/controller/nfc_controller_callback_proxy.cpp",
45    "src/controller/nfc_controller_death_recipient.cpp",
46    "src/controller/nfc_controller_impl.cpp",
47    "src/controller/nfc_controller_stub.cpp",
48    "src/nci_adapter/nci_adaptations.cpp",
49    "src/nci_adapter/nfcc_host.cpp",
50    "src/nci_adapter/nfcc_nci_adapter.cpp",
51    "src/nci_adapter/tag_host.cpp",
52    "src/nci_adapter/tag_nci_adapter.cpp",
53    "src/nfc_polling_params.cpp",
54    "src/nfc_sa_manager.cpp",
55    "src/nfc_service.cpp",
56    "src/tags/tag_dispatcher.cpp",
57    "src/tags/tag_session.cpp",
58    "src/tags/tag_session_stub.cpp",
59    "src/utils/nfc_chip_type_parser.cpp",
60    "src/utils/nfc_watch_dog.cpp",
61    "src/utils/permission_tools.cpp",
62    "src/utils/preferences/nfc_pref_impl.cpp",
63    "src/utils/synchronize_event.cpp",
64  ]
65
66  public_configs = [ ":nfc_config" ]
67
68  deps = [
69    "etc/init:etc",
70    "//foundation/communication/nfc/interfaces/inner_api:nfc_inner_kits",
71    "//third_party/libnfc-nci/SN100x:nfc-nci",
72    "//third_party/libnfc-nci/SN100x/utils:nfcutils",
73  ]
74
75  external_deps = [
76    "ability_base:want",
77    "ability_runtime:ability_manager",
78    "access_token:libaccesstoken_sdk",
79    "bundle_framework:appexecfwk_base",
80    "bundle_framework:appexecfwk_core",
81    "c_utils:utils",
82    "common_event_service:cesfwk_core",
83    "common_event_service:cesfwk_innerkits",
84    "eventhandler:libeventhandler",
85    "hiviewdfx_hilog_native:libhilog",
86    "ipc:ipc_core",
87    "preferences:native_preferences",
88    "safwk:system_ability_fwk",
89    "samgr:samgr_proxy",
90  ]
91
92  part_name = "nfc"
93  subsystem_name = "communication"
94}
95