summaryrefslogtreecommitdiff
path: root/android/bluetooth.h
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-03-17 01:01:09 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-03-17 10:41:46 +0100
commit43802b5ae1333a7509b56a19d783a0a6dee0086e (patch)
tree09361594b9324c96e1736ec509d6dddd5edcc1e5 /android/bluetooth.h
parentb77c5ffd3d5f944ef56167880da67c4e1eee6b7f (diff)
downloadbluez-43802b5ae1333a7509b56a19d783a0a6dee0086e.tar.gz
android/bluetooth: Add GATT notifications on LE discovery
This patch introduce API which GATT can use to start/stop discovery and register for required events. This is because GATT needs to get from GAP notifications about founded devices and also notification when discovery has been stopped. GATT will need it explicity when GATT client calls scan, and also in case of connect device, as before le connect is sent we do scan first to make sure that device is available. For now on adapter have two variables tracing discovery. 1. cur_discovery_type which show type of ongoing discovery type. 2. exp_discovery_type which shows type of next discovery session. We need this because of scenarion when GATT is interesting in scan and in the same time HAL wants to do scanning.
Diffstat (limited to 'android/bluetooth.h')
-rw-r--r--android/bluetooth.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/android/bluetooth.h b/android/bluetooth.h
index f436178eb..a03305da3 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -34,3 +34,10 @@ void bt_bluetooth_unregister(void);
int bt_adapter_add_record(sdp_record_t *rec, uint8_t svc_hint);
void bt_adapter_remove_record(uint32_t handle);
+
+typedef void (*bt_le_device_found)(bdaddr_t *addr, uint8_t addr_type, int rssi,
+ uint16_t eir_len, const void *eir);
+bool bt_le_discovery_start(bt_le_device_found cb);
+
+typedef void (*bt_le_discovery_stopped)(void);
+bool bt_le_discovery_stop(bt_le_discovery_stopped cb);