summaryrefslogtreecommitdiffstats
path: root/include/hardware/bt_gatt_client.h
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2013-12-16 16:16:54 -0800
committerMatthew Xie <mattx@google.com>2014-05-06 01:31:23 -0700
commit709f23982a4c6a0f9f6dd810b514235453be5b1c (patch)
treead6a92b3cfb4e33c61627fbfc73cfc9b9e054b5f /include/hardware/bt_gatt_client.h
parentf9f4d10c4a742e58a465279a116ee0266578c0bc (diff)
downloadhardware_libhardware-709f23982a4c6a0f9f6dd810b514235453be5b1c.zip
hardware_libhardware-709f23982a4c6a0f9f6dd810b514235453be5b1c.tar.gz
hardware_libhardware-709f23982a4c6a0f9f6dd810b514235453be5b1c.tar.bz2
LE: Add controller based advertising filter API (1/2)
Change-Id: I6c3ed7d1d088d2ac48493a835912617f1f655a37
Diffstat (limited to 'include/hardware/bt_gatt_client.h')
-rw-r--r--include/hardware/bt_gatt_client.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index f709e2c..baed4bd 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -159,6 +159,9 @@ typedef void (*listen_callback)(int status, int server_if);
/** Callback invoked when the MTU for a given connection changes */
typedef void (*configure_mtu_callback)(int conn_id, int status, int mtu);
+/** Callback invoked when a scan filter configuration command has completed */
+typedef void (*scan_filter_callback)(int action, int status);
+
typedef struct {
register_client_callback register_client_cb;
scan_result_callback scan_result_cb;
@@ -179,6 +182,7 @@ typedef struct {
read_remote_rssi_callback read_remote_rssi_cb;
listen_callback listen_cb;
configure_mtu_callback configure_mtu_cb;
+ scan_filter_callback scan_filter_cb;
} btgatt_client_callbacks_t;
/** Represents the standard BT-GATT client interface. */
@@ -276,6 +280,17 @@ typedef struct {
/** Request RSSI for a given remote device */
bt_status_t (*read_remote_rssi)( int client_if, const bt_bdaddr_t *bd_addr);
+ /** Enable or disable scan filtering */
+ bt_status_t (*scan_filter_enable)( int enable );
+
+ /** Configure a scan filter condition */
+ bt_status_t (*scan_filter_add)(int type, int company_id, int company_mask,
+ int len, const bt_uuid_t *p_uuid, const bt_uuid_t *p_uuid_mask,
+ const bt_bdaddr_t *bd_addr, char addr_type, const char* p_value);
+
+ /** Clear all scan filter conditions */
+ bt_status_t (*scan_filter_clear)();
+
/** Determine the type of the remote device (LE, BR/EDR, Dual-mode) */
int (*get_device_type)( const bt_bdaddr_t *bd_addr );