• 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")
15import("//build/ohos_var.gni")
16import("//foundation/communication/bluetooth_service/bluetooth.gni")
17
18SUBSYSTEM_DIR = "//foundation/communication"
19
20config("btipc_public_config") {
21  include_dirs = [ "include" ]
22}
23
24ohos_static_library("btipc_service") {
25  # sanitize = {
26  #   cfi = true
27  #   blocklist = "./ipc_blocklist.txt"
28  # }
29  stack_protector_ret = true
30  public_configs = [ ":btipc_public_config" ]
31  include_dirs = [
32    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/common",
33    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/include",
34  ]
35  sources = [
36    "src/bluetooth_ble_advertise_callback_proxy.cpp",
37    "src/bluetooth_ble_advertiser_stub.cpp",
38    "src/bluetooth_ble_central_manager_callback_proxy.cpp",
39    "src/bluetooth_ble_central_manager_stub.cpp",
40    "src/bluetooth_ble_peripheral_observer_proxy.cpp",
41    "src/bluetooth_gatt_client_callback_proxy.cpp",
42    "src/bluetooth_gatt_client_stub.cpp",
43    "src/bluetooth_gatt_server_callback_proxy.cpp",
44    "src/bluetooth_gatt_server_stub.cpp",
45    "src/bluetooth_host_observer_proxy.cpp",
46    "src/bluetooth_host_stub.cpp",
47    "src/bluetooth_remote_device_observer_proxy.cpp",
48    "src/bluetooth_socket_stub.cpp",
49  ]
50
51  if (bluetooth_service_a2dp_sink_feature) {
52    sources += [
53      "src/bluetooth_a2dp_sink_observer_proxy.cpp",
54      "src/bluetooth_a2dp_sink_stub.cpp",
55    ]
56  }
57
58  if (bluetooth_service_a2dp_source_feature) {
59    sources += [
60      "src/bluetooth_a2dp_src_observer_proxy.cpp",
61      "src/bluetooth_a2dp_src_stub.cpp",
62    ]
63  }
64
65  if (bluetooth_service_avrcp_ct_feature) {
66    sources += [
67      "src/bluetooth_avrcp_ct_observer_proxy.cpp",
68      "src/bluetooth_avrcp_ct_stub.cpp",
69    ]
70  }
71
72  if (bluetooth_service_avrcp_tg_feature) {
73    sources += [
74      "src/bluetooth_avrcp_tg_observer_proxy.cpp",
75      "src/bluetooth_avrcp_tg_stub.cpp",
76    ]
77  }
78
79  if (bluetooth_service_hfp_ag_feature) {
80    sources += [
81      "src/bluetooth_hfp_ag_observer_proxy.cpp",
82      "src/bluetooth_hfp_ag_stub.cpp",
83    ]
84  }
85
86  if (bluetooth_service_hfp_hf_feature) {
87    sources += [
88      "src/bluetooth_hfp_hf_observer_proxy.cpp",
89      "src/bluetooth_hfp_hf_stub.cpp",
90    ]
91  }
92
93  if (bluetooth_service_hid_host_feature) {
94    sources += [
95      "src/bluetooth_hid_host_observer_proxy.cpp",
96      "src/bluetooth_hid_host_stub.cpp",
97    ]
98  }
99
100  if (bluetooth_service_map_client_feature) {
101    sources += [
102      "src/bluetooth_map_mce_observer_proxy.cpp",
103      "src/bluetooth_map_mce_stub.cpp",
104    ]
105  }
106
107  if (bluetooth_service_map_server_feature) {
108    sources += [
109      "src/bluetooth_map_mse_observer_proxy.cpp",
110      "src/bluetooth_map_mse_stub.cpp",
111    ]
112  }
113
114  if (bluetooth_service_opp_feature) {
115    sources += [
116      "src/bluetooth_opp_observer_proxy.cpp",
117      "src/bluetooth_opp_stub.cpp",
118    ]
119  }
120
121  if (bluetooth_service_pan_feature) {
122    sources += [
123      "src/bluetooth_pan_observer_proxy.cpp",
124      "src/bluetooth_pan_stub.cpp",
125    ]
126  }
127
128  if (bluetooth_service_pbap_client_feature) {
129    sources += [
130      "src/bluetooth_pbap_pce_observer_proxy.cpp",
131      "src/bluetooth_pbap_pce_stub.cpp",
132    ]
133  }
134
135  if (bluetooth_service_pbap_server_feature) {
136    sources += [
137      "src/bluetooth_pbap_pse_observer_proxy.cpp",
138      "src/bluetooth_pbap_pse_stub.cpp",
139    ]
140  }
141
142  cflags_cc = [ "-fvisibility=hidden" ]
143
144  deps = []
145
146  external_deps = [
147    "bluetooth:btcommon",
148    "c_utils:utils",
149    "hilog:libhilog",
150    "ipc:ipc_core",
151  ]
152
153  subsystem_name = "communication"
154  part_name = "bluetooth_service"
155}
156
157# Only temporary used in drivers_peripheral\bluetooth\audio
158
159config("btipc_static_public_config") {
160  visibility = [ "*" ]
161  include_dirs = [
162    "$SUBSYSTEM_DIR/bluetooth/interfaces/inner_api/include",
163    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/common",
164    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/include",
165    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/common",
166    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/include",
167    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/interface",
168    "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/parcel",
169    "//foundation/communication/bluetooth_service/services/bluetooth/ipc/include",
170    "//foundation/communication/bluetooth_service/services/bluetooth/common",
171  ]
172}
173
174ohos_static_library("btipc_static") {
175  stack_protector_ret = true
176  public_configs = [ ":btipc_static_public_config" ]
177
178  include_dirs = [ "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/include" ]
179
180  sources = [ "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/src/bluetooth_host_proxy.cpp" ]
181
182  if (bluetooth_service_a2dp_source_feature) {
183    sources += [ "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/src/bluetooth_a2dp_src_proxy.cpp" ]
184  }
185
186  deps = []
187
188  external_deps = [
189    "bluetooth:btcommon",
190    "c_utils:utils",
191    "hilog:libhilog",
192    "hisysevent:libhisysevent",
193    "ipc:ipc_core",
194    "samgr:samgr_proxy",
195  ]
196
197  subsystem_name = "communication"
198  part_name = "bluetooth_service"
199}
200