LE: Add controller based advertising filter API (1/2)
Change-Id: I6c3ed7d1d088d2ac48493a835912617f1f655a37
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 @@
/** 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 @@
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 @@
/** 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 );