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 = [ "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/include" ] 32 sources = [ 33 "src/bluetooth_ble_advertise_callback_proxy.cpp", 34 "src/bluetooth_ble_advertiser_stub.cpp", 35 "src/bluetooth_ble_central_manager_callback_proxy.cpp", 36 "src/bluetooth_ble_central_manager_stub.cpp", 37 "src/bluetooth_ble_peripheral_observer_proxy.cpp", 38 "src/bluetooth_gatt_client_callback_proxy.cpp", 39 "src/bluetooth_gatt_client_stub.cpp", 40 "src/bluetooth_gatt_server_callback_proxy.cpp", 41 "src/bluetooth_gatt_server_stub.cpp", 42 "src/bluetooth_host_observer_proxy.cpp", 43 "src/bluetooth_host_stub.cpp", 44 "src/bluetooth_remote_device_observer_proxy.cpp", 45 "src/bluetooth_socket_observer_proxy.cpp", 46 "src/bluetooth_socket_stub.cpp", 47 ] 48 49 if (bluetooth_service_a2dp_sink_feature) { 50 sources += [ 51 "src/bluetooth_a2dp_sink_observer_proxy.cpp", 52 "src/bluetooth_a2dp_sink_stub.cpp", 53 ] 54 } 55 56 if (bluetooth_service_a2dp_source_feature) { 57 sources += [ 58 "src/bluetooth_a2dp_src_observer_proxy.cpp", 59 "src/bluetooth_a2dp_src_stub.cpp", 60 ] 61 } 62 63 if (bluetooth_service_avrcp_ct_feature) { 64 sources += [ 65 "src/bluetooth_avrcp_ct_observer_proxy.cpp", 66 "src/bluetooth_avrcp_ct_stub.cpp", 67 ] 68 } 69 70 if (bluetooth_service_avrcp_tg_feature) { 71 sources += [ 72 "src/bluetooth_avrcp_tg_observer_proxy.cpp", 73 "src/bluetooth_avrcp_tg_stub.cpp", 74 ] 75 } 76 77 if (bluetooth_service_hfp_ag_feature) { 78 sources += [ 79 "src/bluetooth_hfp_ag_observer_proxy.cpp", 80 "src/bluetooth_hfp_ag_stub.cpp", 81 ] 82 } 83 84 if (bluetooth_service_hfp_hf_feature) { 85 sources += [ 86 "src/bluetooth_hfp_hf_observer_proxy.cpp", 87 "src/bluetooth_hfp_hf_stub.cpp", 88 ] 89 } 90 91 if (bluetooth_service_hid_host_feature) { 92 sources += [ 93 "src/bluetooth_hid_host_observer_proxy.cpp", 94 "src/bluetooth_hid_host_stub.cpp", 95 ] 96 } 97 98 if (bluetooth_service_pan_feature) { 99 sources += [ 100 "src/bluetooth_pan_observer_proxy.cpp", 101 "src/bluetooth_pan_stub.cpp", 102 ] 103 } 104 105 cflags_cc = [ "-fvisibility=hidden" ] 106 107 deps = [] 108 109 external_deps = [ 110 "bluetooth:btcommon", 111 "c_utils:utils", 112 "hilog:libhilog", 113 "ipc:ipc_core", 114 ] 115 116 subsystem_name = "communication" 117 part_name = "bluetooth_service" 118} 119 120# Only temporary used in drivers_peripheral\bluetooth\audio 121 122config("btipc_static_public_config") { 123 visibility = [ "*" ] 124 include_dirs = [ 125 "$SUBSYSTEM_DIR/bluetooth/interfaces/inner_api/include", 126 "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/include", 127 "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/common", 128 "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/include", 129 "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/interface", 130 "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/parcel", 131 "//foundation/communication/bluetooth_service/services/bluetooth/ipc/include", 132 "//foundation/communication/bluetooth_service/services/bluetooth/common", 133 ] 134} 135 136ohos_static_library("btipc_static") { 137 stack_protector_ret = true 138 public_configs = [ ":btipc_static_public_config" ] 139 140 include_dirs = [ "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/include" ] 141 142 sources = [ "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/src/bluetooth_host_proxy.cpp" ] 143 144 if (bluetooth_service_a2dp_source_feature) { 145 sources += [ "$SUBSYSTEM_DIR/bluetooth/frameworks/inner/ipc/src/bluetooth_a2dp_src_proxy.cpp" ] 146 } 147 148 deps = [] 149 150 external_deps = [ 151 "bluetooth:btcommon", 152 "c_utils:utils", 153 "hilog:libhilog", 154 "hisysevent:libhisysevent", 155 "ipc:ipc_core", 156 "samgr:samgr_proxy", 157 ] 158 159 subsystem_name = "communication" 160 part_name = "bluetooth_service" 161} 162