• 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_service/services/bluetooth/service/src/permission",
33  ]
34  sources = [
35    "src/bluetooth_ble_advertise_callback_proxy.cpp",
36    "src/bluetooth_ble_advertiser_stub.cpp",
37    "src/bluetooth_ble_central_manager_callback_proxy.cpp",
38    "src/bluetooth_ble_central_manager_stub.cpp",
39    "src/bluetooth_ble_peripheral_observer_proxy.cpp",
40    "src/bluetooth_gatt_client_callback_proxy.cpp",
41    "src/bluetooth_gatt_client_stub.cpp",
42    "src/bluetooth_gatt_server_callback_proxy.cpp",
43    "src/bluetooth_gatt_server_stub.cpp",
44    "src/bluetooth_host_observer_proxy.cpp",
45    "src/bluetooth_host_stub.cpp",
46    "src/bluetooth_remote_device_observer_proxy.cpp",
47    "src/bluetooth_socket_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_pan_feature) {
101    sources += [
102      "src/bluetooth_pan_observer_proxy.cpp",
103      "src/bluetooth_pan_stub.cpp",
104    ]
105  }
106
107  cflags_cc = [ "-fvisibility=hidden" ]
108
109  deps = []
110
111  external_deps = [
112    "access_token:libaccesstoken_sdk",
113    "bluetooth:btframework",
114    "bluetooth:btcommon",
115    "c_utils:utils",
116    "hilog:libhilog",
117    "ipc:ipc_core",
118  ]
119
120  subsystem_name = "communication"
121  part_name = "bluetooth_service"
122}
123
124# Only temporary used in drivers_peripheral\bluetooth\audio
125
126config("btipc_static_public_config") {
127  visibility = [ "*" ]
128  include_dirs = [
129    "//foundation/communication/bluetooth_service/services/bluetooth/ipc/include",
130    "//foundation/communication/bluetooth_service/services/bluetooth/common",
131  ]
132}
133