• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-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")
15
16SUBSYSTEM_DIR = "//foundation/communication"
17
18ohos_shared_library("bluetooth") {
19  sanitize = {
20    cfi = true
21  }
22  stack_protector_ret = true
23
24  #install_enable = true
25  include_dirs = [
26    "include",
27    "//third_party/node/src",
28    "//native_engine",
29    "//commonlibrary/c_utils/base/include",
30    "//utils/system/safwk/native/include",
31    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
32    "//foundation/systemabilitymgr/samgr/adapter/interfaces/innerkits/include",
33    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
34    "//foundation/communication/bluetooth/frameworks/inner/common",
35  ]
36
37  defines = [
38    "BT_LOG_TAG = \"bluetooth_napi\"",
39    "BT_LOG_DOMAIN = 0xD000100",
40  ]
41
42  sources = [
43    "src/napi_bluetooth_a2dp_snk.cpp",
44    "src/napi_bluetooth_a2dp_snk_observer.cpp",
45    "src/napi_bluetooth_a2dp_src.cpp",
46    "src/napi_bluetooth_a2dp_src_observer.cpp",
47    "src/napi_bluetooth_avrcp_ct.cpp",
48    "src/napi_bluetooth_avrcp_ct_observer.cpp",
49    "src/napi_bluetooth_avrcp_tg.cpp",
50    "src/napi_bluetooth_avrcp_tg_observer.cpp",
51    "src/napi_bluetooth_ble.cpp",
52    "src/napi_bluetooth_ble_advertise_callback.cpp",
53    "src/napi_bluetooth_ble_central_manager_callback.cpp",
54    "src/napi_bluetooth_event.cpp",
55    "src/napi_bluetooth_gatt_client.cpp",
56    "src/napi_bluetooth_gatt_client_callback.cpp",
57    "src/napi_bluetooth_gatt_server.cpp",
58    "src/napi_bluetooth_gatt_server_callback.cpp",
59    "src/napi_bluetooth_hfp_ag.cpp",
60    "src/napi_bluetooth_hfp_ag_observer.cpp",
61    "src/napi_bluetooth_hfp_hf.cpp",
62    "src/napi_bluetooth_hfp_hf_observer.cpp",
63    "src/napi_bluetooth_hid_host.cpp",
64    "src/napi_bluetooth_hid_host_observer.cpp",
65    "src/napi_bluetooth_host.cpp",
66    "src/napi_bluetooth_host_observer.cpp",
67    "src/napi_bluetooth_opp.cpp",
68    "src/napi_bluetooth_opp_observer.cpp",
69    "src/napi_bluetooth_pan.cpp",
70    "src/napi_bluetooth_pan_observer.cpp",
71    "src/napi_bluetooth_pbap_pce.cpp",
72    "src/napi_bluetooth_pbap_pce_observer.cpp",
73    "src/napi_bluetooth_pbap_pse.cpp",
74    "src/napi_bluetooth_pbap_pse_observer.cpp",
75    "src/napi_bluetooth_profile.cpp",
76    "src/napi_bluetooth_remote_device_observer.cpp",
77    "src/napi_bluetooth_spp_client.cpp",
78    "src/napi_bluetooth_spp_server.cpp",
79    "src/napi_bluetooth_utils.cpp",
80    "src/native_module.cpp",
81    "src/parser/napi_parser_utils.cpp",
82  ]
83
84  deps = [
85    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
86    "//foundation/arkui/napi:ace_napi",
87    "//foundation/communication/bluetooth/frameworks/inner:btframework",
88    "//third_party/libuv:uv",
89  ]
90
91  external_deps = [
92    "ability_base:want",
93    "ability_runtime:ability_manager",
94    "bundle_framework:appexecfwk_base",
95    "bundle_framework:appexecfwk_core",
96    "c_utils:utils",
97    "hiviewdfx_hilog_native:libhilog",
98    "ipc:ipc_core",
99  ]
100
101  relative_install_dir = "module"
102  part_name = "bluetooth"
103  subsystem_name = "communication"
104}
105
106ohos_shared_library("bluetoothmanager") {
107  #install_enable = true
108  include_dirs = [
109    "include",
110    "//third_party/node/src",
111    "//native_engine",
112    "//commonlibrary/c_utils/base/include",
113    "//utils/system/safwk/native/include",
114    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
115    "//foundation/systemabilitymgr/samgr/adapter/interfaces/innerkits/include",
116    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
117    "//foundation/communication/bluetooth/frameworks/inner/common",
118  ]
119
120  defines = [
121    "BT_LOG_TAG = \"bluetooth_napi\"",
122    "BT_LOG_DOMAIN = 0xD000100",
123    "ENABLE_NAPI_BLUETOOTH_MANAGER",
124  ]
125
126  sources = [
127    "src/napi_bluetooth_a2dp_snk.cpp",
128    "src/napi_bluetooth_a2dp_snk_observer.cpp",
129    "src/napi_bluetooth_a2dp_src.cpp",
130    "src/napi_bluetooth_a2dp_src_observer.cpp",
131    "src/napi_bluetooth_avrcp_ct.cpp",
132    "src/napi_bluetooth_avrcp_ct_observer.cpp",
133    "src/napi_bluetooth_avrcp_tg.cpp",
134    "src/napi_bluetooth_avrcp_tg_observer.cpp",
135    "src/napi_bluetooth_ble.cpp",
136    "src/napi_bluetooth_ble_advertise_callback.cpp",
137    "src/napi_bluetooth_ble_central_manager_callback.cpp",
138    "src/napi_bluetooth_error.cpp",
139    "src/napi_bluetooth_event.cpp",
140    "src/napi_bluetooth_gatt_client.cpp",
141    "src/napi_bluetooth_gatt_client_callback.cpp",
142    "src/napi_bluetooth_gatt_server.cpp",
143    "src/napi_bluetooth_gatt_server_callback.cpp",
144    "src/napi_bluetooth_hfp_ag.cpp",
145    "src/napi_bluetooth_hfp_ag_observer.cpp",
146    "src/napi_bluetooth_hfp_hf.cpp",
147    "src/napi_bluetooth_hfp_hf_observer.cpp",
148    "src/napi_bluetooth_hid_host.cpp",
149    "src/napi_bluetooth_hid_host_observer.cpp",
150    "src/napi_bluetooth_host.cpp",
151    "src/napi_bluetooth_host_observer.cpp",
152    "src/napi_bluetooth_opp.cpp",
153    "src/napi_bluetooth_opp_observer.cpp",
154    "src/napi_bluetooth_pan.cpp",
155    "src/napi_bluetooth_pan_observer.cpp",
156    "src/napi_bluetooth_pbap_pce.cpp",
157    "src/napi_bluetooth_pbap_pce_observer.cpp",
158    "src/napi_bluetooth_pbap_pse.cpp",
159    "src/napi_bluetooth_pbap_pse_observer.cpp",
160    "src/napi_bluetooth_profile.cpp",
161    "src/napi_bluetooth_remote_device_observer.cpp",
162    "src/napi_bluetooth_spp_client.cpp",
163    "src/napi_bluetooth_spp_server.cpp",
164    "src/napi_bluetooth_utils.cpp",
165    "src/native_module.cpp",
166    "src/parser/napi_parser_utils.cpp",
167  ]
168
169  deps = [
170    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
171    "//foundation/arkui/napi:ace_napi",
172    "//foundation/communication/bluetooth/frameworks/inner:btframework",
173    "//third_party/libuv:uv",
174  ]
175
176  external_deps = [
177    "ability_base:want",
178    "ability_runtime:ability_manager",
179    "bundle_framework:appexecfwk_base",
180    "bundle_framework:appexecfwk_core",
181    "c_utils:utils",
182    "hiviewdfx_hilog_native:libhilog",
183    "ipc:ipc_core",
184  ]
185
186  relative_install_dir = "module"
187  part_name = "bluetooth"
188  subsystem_name = "communication"
189}
190
191group("bluetooth_napi") {
192  deps = [
193    "$SUBSYSTEM_DIR/bluetooth/frameworks/js/napi:bluetooth",
194    "$SUBSYSTEM_DIR/bluetooth/frameworks/js/napi:bluetoothmanager",
195  ]
196}
197