1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 import("//build/config/android/rules.gni") # For generate_jni().
9 config("bluetooth_config") {
12 "/DELAYLOAD:BluetoothApis.dll",
14 # Despite MSDN stating that Bthprops.dll contains the
15 # symbols declared by bthprops.lib, they actually reside here:
16 "/DELAYLOAD:Bthprops.cpl",
17 "/DELAYLOAD:setupapi.dll",
22 component("bluetooth") {
24 "android/bluetooth_jni_registrar.cc",
25 "android/bluetooth_jni_registrar.h",
26 "android/wrappers.cc",
28 "bluetooth_adapter.cc",
29 "bluetooth_adapter.h",
30 "bluetooth_adapter_android.cc",
31 "bluetooth_adapter_android.h",
32 "bluetooth_adapter_chromeos.cc",
33 "bluetooth_adapter_chromeos.h",
34 "bluetooth_adapter_factory.cc",
35 "bluetooth_adapter_factory.h",
36 "bluetooth_adapter_mac.h",
37 "bluetooth_adapter_mac.mm",
38 "bluetooth_adapter_profile_chromeos.cc",
39 "bluetooth_adapter_profile_chromeos.h",
40 "bluetooth_adapter_win.cc",
41 "bluetooth_adapter_win.h",
42 "bluetooth_advertisement.cc",
43 "bluetooth_advertisement.h",
44 "bluetooth_advertisement_chromeos.cc",
45 "bluetooth_advertisement_chromeos.h",
46 "bluetooth_audio_sink.cc",
47 "bluetooth_audio_sink.h",
48 "bluetooth_audio_sink_chromeos.cc",
49 "bluetooth_audio_sink_chromeos.h",
50 "bluetooth_channel_mac.h",
51 "bluetooth_channel_mac.mm",
52 "bluetooth_classic_device_mac.h",
53 "bluetooth_classic_device_mac.mm",
54 "bluetooth_device.cc",
56 "bluetooth_device_android.cc",
57 "bluetooth_device_android.h",
58 "bluetooth_device_chromeos.cc",
59 "bluetooth_device_chromeos.h",
60 "bluetooth_device_mac.h",
61 "bluetooth_device_mac.mm",
62 "bluetooth_device_win.cc",
63 "bluetooth_device_win.h",
64 "bluetooth_discovery_filter.cc",
65 "bluetooth_discovery_filter.h",
66 "bluetooth_discovery_manager_mac.h",
67 "bluetooth_discovery_manager_mac.mm",
68 "bluetooth_discovery_session.cc",
69 "bluetooth_discovery_session.h",
70 "bluetooth_gatt_characteristic.cc",
71 "bluetooth_gatt_characteristic.h",
72 "bluetooth_gatt_connection.cc",
73 "bluetooth_gatt_connection.h",
74 "bluetooth_gatt_connection_chromeos.cc",
75 "bluetooth_gatt_connection_chromeos.h",
76 "bluetooth_gatt_descriptor.cc",
77 "bluetooth_gatt_descriptor.h",
78 "bluetooth_gatt_notify_session.cc",
79 "bluetooth_gatt_notify_session.h",
80 "bluetooth_gatt_notify_session_chromeos.cc",
81 "bluetooth_gatt_notify_session_chromeos.h",
82 "bluetooth_gatt_service.cc",
83 "bluetooth_gatt_service.h",
84 "bluetooth_init_win.cc",
85 "bluetooth_init_win.h",
86 "bluetooth_l2cap_channel_mac.h",
87 "bluetooth_l2cap_channel_mac.mm",
88 "bluetooth_low_energy_central_manager_delegate.h",
89 "bluetooth_low_energy_central_manager_delegate.mm",
90 "bluetooth_low_energy_defs_win.cc",
91 "bluetooth_low_energy_defs_win.h",
92 "bluetooth_low_energy_device_mac.h",
93 "bluetooth_low_energy_device_mac.mm",
94 "bluetooth_low_energy_discovery_manager_mac.h",
95 "bluetooth_low_energy_discovery_manager_mac.mm",
96 "bluetooth_low_energy_win.cc",
97 "bluetooth_low_energy_win.h",
98 "bluetooth_pairing_chromeos.cc",
99 "bluetooth_pairing_chromeos.h",
100 "bluetooth_remote_gatt_characteristic_chromeos.cc",
101 "bluetooth_remote_gatt_characteristic_chromeos.h",
102 "bluetooth_remote_gatt_descriptor_chromeos.cc",
103 "bluetooth_remote_gatt_descriptor_chromeos.h",
104 "bluetooth_remote_gatt_service_chromeos.cc",
105 "bluetooth_remote_gatt_service_chromeos.h",
106 "bluetooth_rfcomm_channel_mac.h",
107 "bluetooth_rfcomm_channel_mac.mm",
108 "bluetooth_service_record_win.cc",
109 "bluetooth_service_record_win.h",
110 "bluetooth_socket.cc",
111 "bluetooth_socket.h",
112 "bluetooth_socket_chromeos.cc",
113 "bluetooth_socket_chromeos.h",
114 "bluetooth_socket_mac.h",
115 "bluetooth_socket_mac.mm",
116 "bluetooth_socket_net.cc",
117 "bluetooth_socket_net.h",
118 "bluetooth_socket_thread.cc",
119 "bluetooth_socket_thread.h",
120 "bluetooth_socket_win.cc",
121 "bluetooth_socket_win.h",
122 "bluetooth_task_manager_win.cc",
123 "bluetooth_task_manager_win.h",
128 defines = [ "DEVICE_BLUETOOTH_IMPLEMENTATION" ]
130 all_dependent_configs = [ ":bluetooth_config" ]
142 deps += [ ":jni_headers" ]
153 libs = [ "IOBluetooth.framework" ]
157 libs = [ "setupapi.lib" ]
161 static_library("mocks") {
164 "test/mock_bluetooth_adapter.cc",
165 "test/mock_bluetooth_adapter.h",
166 "test/mock_bluetooth_advertisement.cc",
167 "test/mock_bluetooth_advertisement.h",
168 "test/mock_bluetooth_central_manager_mac.h",
169 "test/mock_bluetooth_central_manager_mac.mm",
170 "test/mock_bluetooth_device.cc",
171 "test/mock_bluetooth_device.h",
172 "test/mock_bluetooth_discovery_session.cc",
173 "test/mock_bluetooth_discovery_session.h",
174 "test/mock_bluetooth_gatt_characteristic.cc",
175 "test/mock_bluetooth_gatt_characteristic.h",
176 "test/mock_bluetooth_gatt_connection.cc",
177 "test/mock_bluetooth_gatt_connection.h",
178 "test/mock_bluetooth_gatt_descriptor.cc",
179 "test/mock_bluetooth_gatt_descriptor.h",
180 "test/mock_bluetooth_gatt_notify_session.cc",
181 "test/mock_bluetooth_gatt_notify_session.h",
182 "test/mock_bluetooth_gatt_service.cc",
183 "test/mock_bluetooth_gatt_service.h",
184 "test/mock_bluetooth_socket.cc",
185 "test/mock_bluetooth_socket.h",
197 java_sources_needing_jni = [
198 "android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java",
199 "android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java",
200 "android/java/src/org/chromium/device/bluetooth/Wrappers.java",
203 generate_jni("jni_headers") {
204 sources = java_sources_needing_jni
205 jni_package = "bluetooth"
208 android_library("java") {
209 java_files = java_sources_needing_jni