summaryrefslogtreecommitdiff
path: root/android/bluetooth.h
diff options
context:
space:
mode:
authorMartin Fuzzey <mfuzzey@parkeon.com>2017-10-13 16:02:10 +0200
committerSzymon Janc <szymon.janc@codecoup.pl>2017-11-06 10:14:50 +0100
commitaba8f1fbafccd78dca27830d9a3705dd5fa156a6 (patch)
treeeead1ad36141a8e7b8d66f553fd5ab763fcaaa42 /android/bluetooth.h
parenta98f81146cefc7e5cfe4e98ccc39a267a1dacf2b (diff)
downloadbluez-aba8f1fbafccd78dca27830d9a3705dd5fa156a6.tar.gz
android: Enable multiadvertising
This is required for custom advertising data. The HAL entry points related to multiadvertising are now implemented and map to the mgmnt "add advertising" operation.
Diffstat (limited to 'android/bluetooth.h')
-rw-r--r--android/bluetooth.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/android/bluetooth.h b/android/bluetooth.h
index 4b1720937..b139cb15f 100644
--- a/android/bluetooth.h
+++ b/android/bluetooth.h
@@ -88,3 +88,28 @@ typedef void (*bt_paired_device_cb)(const bdaddr_t *addr);
bool bt_paired_register(bt_paired_device_cb cb);
void bt_paired_unregister(bt_paired_device_cb cb);
bool bt_is_pairing(const bdaddr_t *addr);
+
+struct bt_ad;
+struct adv_instance {
+ uint8_t instance;
+ int32_t timeout;
+ int32_t type;
+ struct bt_ad *ad;
+ struct bt_ad *sr;
+ unsigned include_tx_power:1;
+};
+
+/* Values below have no C API definition - only in Java (AdvertiseManager.java)
+ * and bluedroid
+ */
+enum android_adv_type {
+ ANDROID_ADVERTISING_EVENT_TYPE_CONNECTABLE = 0,
+ ANDROID_ADVERTISING_EVENT_TYPE_SCANNABLE = 2,
+ ANDROID_ADVERTISING_EVENT_TYPE_NON_CONNECTABLE = 3,
+};
+
+typedef void (*bt_le_addrm_advertising_done)(uint8_t status, void *user_data);
+bool bt_le_add_advertising(struct adv_instance *adv,
+ bt_le_addrm_advertising_done cb, void *user_data);
+bool bt_le_remove_advertising(struct adv_instance *adv,
+ bt_le_addrm_advertising_done cb, void *user_data);