blob: 1be40095aec093031d05c31c9f5cf367fa317e07 [file] [log] [blame]
Andre Eisenbach05f49542012-09-18 12:15:26 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_INCLUDE_BLUETOOTH_H
18#define ANDROID_INCLUDE_BLUETOOTH_H
19
Sharvil Nanavati3bd8cba2014-05-30 16:43:38 -070020#include <stdbool.h>
Andre Eisenbach05f49542012-09-18 12:15:26 -070021#include <stdint.h>
22#include <sys/cdefs.h>
23#include <sys/types.h>
24
25#include <hardware/hardware.h>
26
27__BEGIN_DECLS
28
29/**
30 * The Bluetooth Hardware Module ID
31 */
32
33#define BT_HARDWARE_MODULE_ID "bluetooth"
34#define BT_STACK_MODULE_ID "bluetooth"
35#define BT_STACK_TEST_MODULE_ID "bluetooth_test"
36
37
38/* Bluetooth profile interface IDs */
39
40#define BT_PROFILE_HANDSFREE_ID "handsfree"
Hemant Guptae7737c82013-08-19 18:02:54 +053041#define BT_PROFILE_HANDSFREE_CLIENT_ID "handsfree_client"
Andre Eisenbach05f49542012-09-18 12:15:26 -070042#define BT_PROFILE_ADVANCED_AUDIO_ID "a2dp"
Mike Lockwood21e50b12014-06-07 14:05:22 -070043#define BT_PROFILE_ADVANCED_AUDIO_SINK_ID "a2dp_sink"
Andre Eisenbach05f49542012-09-18 12:15:26 -070044#define BT_PROFILE_HEALTH_ID "health"
45#define BT_PROFILE_SOCKETS_ID "socket"
46#define BT_PROFILE_HIDHOST_ID "hidhost"
47#define BT_PROFILE_PAN_ID "pan"
Hemant Gupta053cccf2014-04-18 12:25:24 +053048#define BT_PROFILE_MAP_CLIENT_ID "map_client"
kschulz9a92a7b2015-03-06 09:15:43 +010049#define BT_PROFILE_SDP_CLIENT_ID "sdp"
Ganesh Ganapathi Battafefb3342013-02-05 15:23:45 -080050#define BT_PROFILE_GATT_ID "gatt"
Ravi Nagarajan482ba782013-02-26 10:34:41 -080051#define BT_PROFILE_AV_RC_ID "avrcp"
Mike Lockwood7da4cb82014-06-02 16:20:51 -070052#define BT_PROFILE_AV_RC_CTRL_ID "avrcp_ctrl"
Andre Eisenbach05f49542012-09-18 12:15:26 -070053
54/** Bluetooth Address */
55typedef struct {
56 uint8_t address[6];
57} __attribute__((packed))bt_bdaddr_t;
58
59/** Bluetooth Device Name */
60typedef struct {
Ganesh Ganapathi Battafefb3342013-02-05 15:23:45 -080061 uint8_t name[249];
Andre Eisenbach05f49542012-09-18 12:15:26 -070062} __attribute__((packed))bt_bdname_t;
63
64/** Bluetooth Adapter Visibility Modes*/
65typedef enum {
66 BT_SCAN_MODE_NONE,
67 BT_SCAN_MODE_CONNECTABLE,
68 BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE
69} bt_scan_mode_t;
70
71/** Bluetooth Adapter State */
72typedef enum {
73 BT_STATE_OFF,
74 BT_STATE_ON
75} bt_state_t;
76
77/** Bluetooth Error Status */
78/** We need to build on this */
79
80typedef enum {
81 BT_STATUS_SUCCESS,
82 BT_STATUS_FAIL,
83 BT_STATUS_NOT_READY,
84 BT_STATUS_NOMEM,
85 BT_STATUS_BUSY,
86 BT_STATUS_DONE, /* request already completed */
87 BT_STATUS_UNSUPPORTED,
88 BT_STATUS_PARM_INVALID,
89 BT_STATUS_UNHANDLED,
90 BT_STATUS_AUTH_FAILURE,
Hemant Gupta4d864552013-07-31 19:14:02 +053091 BT_STATUS_RMT_DEV_DOWN,
92 BT_STATUS_AUTH_REJECTED
Andre Eisenbach05f49542012-09-18 12:15:26 -070093
94} bt_status_t;
95
96/** Bluetooth PinKey Code */
97typedef struct {
98 uint8_t pin[16];
99} __attribute__((packed))bt_pin_code_t;
100
Satya Callojibe7f0442014-07-03 10:59:16 -0700101typedef struct {
102 uint8_t status;
103 uint8_t ctrl_state; /* stack reported state */
104 uint64_t tx_time; /* in ms */
105 uint64_t rx_time; /* in ms */
106 uint64_t idle_time; /* in ms */
107 uint64_t energy_used; /* a product of mA, V and ms */
108} __attribute__((packed))bt_activity_energy_info;
109
Andre Eisenbach05f49542012-09-18 12:15:26 -0700110/** Bluetooth Adapter Discovery state */
111typedef enum {
112 BT_DISCOVERY_STOPPED,
113 BT_DISCOVERY_STARTED
114} bt_discovery_state_t;
115
116/** Bluetooth ACL connection state */
117typedef enum {
118 BT_ACL_STATE_CONNECTED,
119 BT_ACL_STATE_DISCONNECTED
120} bt_acl_state_t;
121
122/** Bluetooth 128-bit UUID */
123typedef struct {
124 uint8_t uu[16];
125} bt_uuid_t;
126
127/** Bluetooth SDP service record */
128typedef struct
129{
130 bt_uuid_t uuid;
131 uint16_t channel;
132 char name[256]; // what's the maximum length
133} bt_service_record_t;
134
Ganesh Ganapathi Battafefb3342013-02-05 15:23:45 -0800135
136/** Bluetooth Remote Version info */
137typedef struct
138{
139 int version;
140 int sub_ver;
141 int manufacturer;
142} bt_remote_version_t;
143
Ganesh Ganapathi Batta460343a2014-05-27 16:03:11 -0700144typedef struct
145{
Satya Callojia8b49d32015-02-10 09:20:07 -0800146 uint16_t version_supported;
Ganesh Ganapathi Batta460343a2014-05-27 16:03:11 -0700147 uint8_t local_privacy_enabled;
148 uint8_t max_adv_instance;
149 uint8_t rpa_offload_supported;
150 uint8_t max_irk_list_size;
151 uint8_t max_adv_filter_supported;
Satya Callojibe7f0442014-07-03 10:59:16 -0700152 uint8_t activity_energy_info_supported;
Satya Callojia8b49d32015-02-10 09:20:07 -0800153 uint16_t scan_result_storage_size;
154 uint16_t total_trackable_advertisers;
Ganesh Ganapathi Batta460343a2014-05-27 16:03:11 -0700155}bt_local_le_features_t;
156
Andre Eisenbach05f49542012-09-18 12:15:26 -0700157/* Bluetooth Adapter and Remote Device property types */
158typedef enum {
159 /* Properties common to both adapter and remote device */
160 /**
161 * Description - Bluetooth Device Name
162 * Access mode - Adapter name can be GET/SET. Remote device can be GET
163 * Data type - bt_bdname_t
164 */
165 BT_PROPERTY_BDNAME = 0x1,
166 /**
167 * Description - Bluetooth Device Address
168 * Access mode - Only GET.
169 * Data type - bt_bdaddr_t
170 */
171 BT_PROPERTY_BDADDR,
172 /**
173 * Description - Bluetooth Service 128-bit UUIDs
174 * Access mode - Only GET.
175 * Data type - Array of bt_uuid_t (Array size inferred from property length).
176 */
177 BT_PROPERTY_UUIDS,
178 /**
179 * Description - Bluetooth Class of Device as found in Assigned Numbers
180 * Access mode - Only GET.
181 * Data type - uint32_t.
182 */
183 BT_PROPERTY_CLASS_OF_DEVICE,
184 /**
185 * Description - Device Type - BREDR, BLE or DUAL Mode
186 * Access mode - Only GET.
187 * Data type - bt_device_type_t
188 */
189 BT_PROPERTY_TYPE_OF_DEVICE,
190 /**
191 * Description - Bluetooth Service Record
192 * Access mode - Only GET.
193 * Data type - bt_service_record_t
194 */
195 BT_PROPERTY_SERVICE_RECORD,
196
197 /* Properties unique to adapter */
198 /**
199 * Description - Bluetooth Adapter scan mode
200 * Access mode - GET and SET
201 * Data type - bt_scan_mode_t.
202 */
203 BT_PROPERTY_ADAPTER_SCAN_MODE,
204 /**
205 * Description - List of bonded devices
206 * Access mode - Only GET.
207 * Data type - Array of bt_bdaddr_t of the bonded remote devices
208 * (Array size inferred from property length).
209 */
210 BT_PROPERTY_ADAPTER_BONDED_DEVICES,
211 /**
212 * Description - Bluetooth Adapter Discovery timeout (in seconds)
213 * Access mode - GET and SET
214 * Data type - uint32_t
215 */
216 BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT,
217
218 /* Properties unique to remote device */
219 /**
220 * Description - User defined friendly name of the remote device
221 * Access mode - GET and SET
222 * Data type - bt_bdname_t.
223 */
224 BT_PROPERTY_REMOTE_FRIENDLY_NAME,
225 /**
226 * Description - RSSI value of the inquired remote device
227 * Access mode - Only GET.
228 * Data type - int32_t.
229 */
230 BT_PROPERTY_REMOTE_RSSI,
Ganesh Ganapathi Battafefb3342013-02-05 15:23:45 -0800231 /**
232 * Description - Remote version info
233 * Access mode - SET/GET.
234 * Data type - bt_remote_version_t.
235 */
236
237 BT_PROPERTY_REMOTE_VERSION_INFO,
Andre Eisenbach05f49542012-09-18 12:15:26 -0700238
Ganesh Ganapathi Batta460343a2014-05-27 16:03:11 -0700239 /**
240 * Description - Local LE features
241 * Access mode - GET.
242 * Data type - bt_local_le_features_t.
243 */
244 BT_PROPERTY_LOCAL_LE_FEATURES,
245
Andre Eisenbach05f49542012-09-18 12:15:26 -0700246 BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP = 0xFF,
247} bt_property_type_t;
248
249/** Bluetooth Adapter Property data structure */
250typedef struct
251{
252 bt_property_type_t type;
253 int len;
254 void *val;
255} bt_property_t;
256
Ganesh Ganapathi Batta460343a2014-05-27 16:03:11 -0700257
Andre Eisenbach05f49542012-09-18 12:15:26 -0700258/** Bluetooth Device Type */
259typedef enum {
260 BT_DEVICE_DEVTYPE_BREDR = 0x1,
261 BT_DEVICE_DEVTYPE_BLE,
262 BT_DEVICE_DEVTYPE_DUAL
263} bt_device_type_t;
264/** Bluetooth Bond state */
265typedef enum {
266 BT_BOND_STATE_NONE,
267 BT_BOND_STATE_BONDING,
268 BT_BOND_STATE_BONDED
269} bt_bond_state_t;
270
271/** Bluetooth SSP Bonding Variant */
272typedef enum {
273 BT_SSP_VARIANT_PASSKEY_CONFIRMATION,
274 BT_SSP_VARIANT_PASSKEY_ENTRY,
275 BT_SSP_VARIANT_CONSENT,
276 BT_SSP_VARIANT_PASSKEY_NOTIFICATION
277} bt_ssp_variant_t;
278
279#define BT_MAX_NUM_UUIDS 32
280
281/** Bluetooth Interface callbacks */
282
283/** Bluetooth Enable/Disable Callback. */
284typedef void (*adapter_state_changed_callback)(bt_state_t state);
285
286/** GET/SET Adapter Properties callback */
287/* TODO: For the GET/SET property APIs/callbacks, we may need a session
288 * identifier to associate the call with the callback. This would be needed
289 * whenever more than one simultaneous instance of the same adapter_type
290 * is get/set.
291 *
292 * If this is going to be handled in the Java framework, then we do not need
293 * to manage sessions here.
294 */
295typedef void (*adapter_properties_callback)(bt_status_t status,
296 int num_properties,
297 bt_property_t *properties);
298
299/** GET/SET Remote Device Properties callback */
300/** TODO: For remote device properties, do not see a need to get/set
301 * multiple properties - num_properties shall be 1
302 */
303typedef void (*remote_device_properties_callback)(bt_status_t status,
304 bt_bdaddr_t *bd_addr,
305 int num_properties,
306 bt_property_t *properties);
307
308/** New device discovered callback */
309/** If EIR data is not present, then BD_NAME and RSSI shall be NULL and -1
310 * respectively */
311typedef void (*device_found_callback)(int num_properties,
312 bt_property_t *properties);
313
314/** Discovery state changed callback */
315typedef void (*discovery_state_changed_callback)(bt_discovery_state_t state);
316
317/** Bluetooth Legacy PinKey Request callback */
318typedef void (*pin_request_callback)(bt_bdaddr_t *remote_bd_addr,
319 bt_bdname_t *bd_name, uint32_t cod);
320
321/** Bluetooth SSP Request callback - Just Works & Numeric Comparison*/
322/** pass_key - Shall be 0 for BT_SSP_PAIRING_VARIANT_CONSENT &
323 * BT_SSP_PAIRING_PASSKEY_ENTRY */
324/* TODO: Passkey request callback shall not be needed for devices with display
325 * capability. We still need support this in the stack for completeness */
326typedef void (*ssp_request_callback)(bt_bdaddr_t *remote_bd_addr,
327 bt_bdname_t *bd_name,
328 uint32_t cod,
329 bt_ssp_variant_t pairing_variant,
330 uint32_t pass_key);
331
332/** Bluetooth Bond state changed callback */
333/* Invoked in response to create_bond, cancel_bond or remove_bond */
334typedef void (*bond_state_changed_callback)(bt_status_t status,
335 bt_bdaddr_t *remote_bd_addr,
336 bt_bond_state_t state);
337
338/** Bluetooth ACL connection state changed callback */
339typedef void (*acl_state_changed_callback)(bt_status_t status, bt_bdaddr_t *remote_bd_addr,
340 bt_acl_state_t state);
341
342typedef enum {
343 ASSOCIATE_JVM,
344 DISASSOCIATE_JVM
345} bt_cb_thread_evt;
346
347/** Thread Associate/Disassociate JVM Callback */
348/* Callback that is invoked by the callback thread to allow upper layer to attach/detach to/from
349 * the JVM */
350typedef void (*callback_thread_event)(bt_cb_thread_evt evt);
351
352/** Bluetooth Test Mode Callback */
353/* Receive any HCI event from controller. Must be in DUT Mode for this callback to be received */
354typedef void (*dut_mode_recv_callback)(uint16_t opcode, uint8_t *buf, uint8_t len);
355
Ganesh Ganapathi Battafefb3342013-02-05 15:23:45 -0800356/* LE Test mode callbacks
357* This callback shall be invoked whenever the le_tx_test, le_rx_test or le_test_end is invoked
358* The num_packets is valid only for le_test_end command */
359typedef void (*le_test_mode_callback)(bt_status_t status, uint16_t num_packets);
Satya Callojibe7f0442014-07-03 10:59:16 -0700360
361/** Callback invoked when energy details are obtained */
362/* Ctrl_state-Current controller state-Active-1,scan-2,or idle-3 state as defined by HCI spec.
363 * If the ctrl_state value is 0, it means the API call failed
364 * Time values-In milliseconds as returned by the controller
365 * Energy used-Value as returned by the controller
366 * Status-Provides the status of the read_energy_info API call */
367typedef void (*energy_info_callback)(bt_activity_energy_info *energy_info);
368
Andre Eisenbach05f49542012-09-18 12:15:26 -0700369/** TODO: Add callbacks for Link Up/Down and other generic
370 * notifications/callbacks */
371
372/** Bluetooth DM callback structure. */
373typedef struct {
374 /** set to sizeof(bt_callbacks_t) */
375 size_t size;
376 adapter_state_changed_callback adapter_state_changed_cb;
377 adapter_properties_callback adapter_properties_cb;
378 remote_device_properties_callback remote_device_properties_cb;
379 device_found_callback device_found_cb;
380 discovery_state_changed_callback discovery_state_changed_cb;
381 pin_request_callback pin_request_cb;
382 ssp_request_callback ssp_request_cb;
383 bond_state_changed_callback bond_state_changed_cb;
384 acl_state_changed_callback acl_state_changed_cb;
385 callback_thread_event thread_evt_cb;
386 dut_mode_recv_callback dut_mode_recv_cb;
Ganesh Ganapathi Battafefb3342013-02-05 15:23:45 -0800387 le_test_mode_callback le_test_mode_cb;
Satya Callojibe7f0442014-07-03 10:59:16 -0700388 energy_info_callback energy_info_cb;
Andre Eisenbach05f49542012-09-18 12:15:26 -0700389} bt_callbacks_t;
390
Sharvil Nanavati3bd8cba2014-05-30 16:43:38 -0700391typedef void (*alarm_cb)(void *data);
392typedef bool (*set_wake_alarm_callout)(uint64_t delay_millis, bool should_wake, alarm_cb cb, void *data);
393typedef int (*acquire_wake_lock_callout)(const char *lock_name);
394typedef int (*release_wake_lock_callout)(const char *lock_name);
395
396/** The set of functions required by bluedroid to set wake alarms and
397 * grab wake locks. This struct is passed into the stack through the
398 * |set_os_callouts| function on |bt_interface_t|.
399 */
400typedef struct {
401 /* set to sizeof(bt_os_callouts_t) */
402 size_t size;
403
404 set_wake_alarm_callout set_wake_alarm;
405 acquire_wake_lock_callout acquire_wake_lock;
406 release_wake_lock_callout release_wake_lock;
407} bt_os_callouts_t;
408
Andre Eisenbach05f49542012-09-18 12:15:26 -0700409/** NOTE: By default, no profiles are initialized at the time of init/enable.
410 * Whenever the application invokes the 'init' API of a profile, then one of
411 * the following shall occur:
412 *
413 * 1.) If Bluetooth is not enabled, then the Bluetooth core shall mark the
414 * profile as enabled. Subsequently, when the application invokes the
415 * Bluetooth 'enable', as part of the enable sequence the profile that were
416 * marked shall be enabled by calling appropriate stack APIs. The
417 * 'adapter_properties_cb' shall return the list of UUIDs of the
418 * enabled profiles.
419 *
420 * 2.) If Bluetooth is enabled, then the Bluetooth core shall invoke the stack
421 * profile API to initialize the profile and trigger a
422 * 'adapter_properties_cb' with the current list of UUIDs including the
423 * newly added profile's UUID.
424 *
425 * The reverse shall occur whenever the profile 'cleanup' APIs are invoked
426 */
427
428/** Represents the standard Bluetooth DM interface. */
429typedef struct {
430 /** set to sizeof(bt_interface_t) */
431 size_t size;
432 /**
433 * Opens the interface and provides the callback routines
434 * to the implemenation of this interface.
435 */
436 int (*init)(bt_callbacks_t* callbacks );
437
438 /** Enable Bluetooth. */
439 int (*enable)(void);
440
441 /** Disable Bluetooth. */
442 int (*disable)(void);
443
444 /** Closes the interface. */
445 void (*cleanup)(void);
446
447 /** Get all Bluetooth Adapter properties at init */
448 int (*get_adapter_properties)(void);
449
450 /** Get Bluetooth Adapter property of 'type' */
451 int (*get_adapter_property)(bt_property_type_t type);
452
453 /** Set Bluetooth Adapter property of 'type' */
454 /* Based on the type, val shall be one of
455 * bt_bdaddr_t or bt_bdname_t or bt_scanmode_t etc
456 */
457 int (*set_adapter_property)(const bt_property_t *property);
458
459 /** Get all Remote Device properties */
460 int (*get_remote_device_properties)(bt_bdaddr_t *remote_addr);
461
462 /** Get Remote Device property of 'type' */
463 int (*get_remote_device_property)(bt_bdaddr_t *remote_addr,
464 bt_property_type_t type);
465
466 /** Set Remote Device property of 'type' */
467 int (*set_remote_device_property)(bt_bdaddr_t *remote_addr,
468 const bt_property_t *property);
469
470 /** Get Remote Device's service record for the given UUID */
471 int (*get_remote_service_record)(bt_bdaddr_t *remote_addr,
472 bt_uuid_t *uuid);
473
474 /** Start SDP to get remote services */
475 int (*get_remote_services)(bt_bdaddr_t *remote_addr);
476
477 /** Start Discovery */
478 int (*start_discovery)(void);
479
480 /** Cancel Discovery */
481 int (*cancel_discovery)(void);
482
483 /** Create Bluetooth Bonding */
Andre Eisenbach01206e52014-08-04 17:22:29 -0700484 int (*create_bond)(const bt_bdaddr_t *bd_addr, int transport);
Andre Eisenbach05f49542012-09-18 12:15:26 -0700485
486 /** Remove Bond */
487 int (*remove_bond)(const bt_bdaddr_t *bd_addr);
488
489 /** Cancel Bond */
490 int (*cancel_bond)(const bt_bdaddr_t *bd_addr);
491
Andre Eisenbach0d553bc2014-06-18 12:18:34 -0700492 /**
493 * Get the connection status for a given remote device.
494 * return value of 0 means the device is not connected,
495 * non-zero return status indicates an active connection.
496 */
497 int (*get_connection_state)(const bt_bdaddr_t *bd_addr);
498
Andre Eisenbach05f49542012-09-18 12:15:26 -0700499 /** BT Legacy PinKey Reply */
500 /** If accept==FALSE, then pin_len and pin_code shall be 0x0 */
501 int (*pin_reply)(const bt_bdaddr_t *bd_addr, uint8_t accept,
502 uint8_t pin_len, bt_pin_code_t *pin_code);
503
504 /** BT SSP Reply - Just Works, Numeric Comparison and Passkey
505 * passkey shall be zero for BT_SSP_VARIANT_PASSKEY_COMPARISON &
506 * BT_SSP_VARIANT_CONSENT
507 * For BT_SSP_VARIANT_PASSKEY_ENTRY, if accept==FALSE, then passkey
508 * shall be zero */
509 int (*ssp_reply)(const bt_bdaddr_t *bd_addr, bt_ssp_variant_t variant,
510 uint8_t accept, uint32_t passkey);
511
512 /** Get Bluetooth profile interface */
513 const void* (*get_profile_interface) (const char *profile_id);
514
515 /** Bluetooth Test Mode APIs - Bluetooth must be enabled for these APIs */
516 /* Configure DUT Mode - Use this mode to enter/exit DUT mode */
517 int (*dut_mode_configure)(uint8_t enable);
518
519 /* Send any test HCI (vendor-specific) command to the controller. Must be in DUT Mode */
520 int (*dut_mode_send)(uint16_t opcode, uint8_t *buf, uint8_t len);
Ganesh Ganapathi Battafefb3342013-02-05 15:23:45 -0800521 /** BLE Test Mode APIs */
522 /* opcode MUST be one of: LE_Receiver_Test, LE_Transmitter_Test, LE_Test_End */
523 int (*le_test_mode)(uint16_t opcode, uint8_t *buf, uint8_t len);
524
Zhihai Xua17b75b2013-06-10 20:23:45 -0700525 /* enable or disable bluetooth HCI snoop log */
526 int (*config_hci_snoop_log)(uint8_t enable);
Sharvil Nanavati3bd8cba2014-05-30 16:43:38 -0700527
528 /** Sets the OS call-out functions that bluedroid needs for alarms and wake locks.
529 * This should be called immediately after a successful |init|.
530 */
531 int (*set_os_callouts)(bt_os_callouts_t *callouts);
Satya Callojibe7f0442014-07-03 10:59:16 -0700532
533 /** Read Energy info details - return value indicates BT_STATUS_SUCCESS or BT_STATUS_NOT_READY
534 * Success indicates that the VSC command was sent to controller
535 */
536 int (*read_energy_info)();
Andre Eisenbach05f49542012-09-18 12:15:26 -0700537} bt_interface_t;
538
539/** TODO: Need to add APIs for Service Discovery, Service authorization and
540 * connection management. Also need to add APIs for configuring
541 * properties of remote bonded devices such as name, UUID etc. */
542
543typedef struct {
544 struct hw_device_t common;
545 const bt_interface_t* (*get_bluetooth_interface)();
546} bluetooth_device_t;
547
548typedef bluetooth_device_t bluetooth_module_t;
kschulz9a92a7b2015-03-06 09:15:43 +0100549
550
Andre Eisenbach05f49542012-09-18 12:15:26 -0700551__END_DECLS
552
553#endif /* ANDROID_INCLUDE_BLUETOOTH_H */