BLE scan filter setup simplification (1/3)

Bug: 30622771
Test: sl4a BleScanTest
Change-Id: I41f53e2275c0d5da5244c72faefc7b330bd1a8f9
This commit is contained in:
Jakub Pawlowski 2016-12-16 14:26:20 -08:00
parent f43056dc4d
commit b4a82ba556
3 changed files with 18 additions and 19 deletions

View file

@ -92,8 +92,9 @@ class BleScannerInterface {
virtual void Scan(bool start) = 0;
/** Setup scan filter params */
virtual bt_status_t scan_filter_param_setup(
btgatt_filt_param_setup_t filt_param) = 0;
virtual void ScanFilterParamSetup(uint8_t client_if, uint8_t action,
uint8_t filt_index,
std::unique_ptr<btgatt_filt_param_setup_t> filt_param) = 0;
/** Configure a scan filter condition */
virtual bt_status_t scan_filter_add_remove(

View file

@ -73,4 +73,19 @@ typedef struct
uint16_t permissions;
} btgatt_db_element_t;
typedef struct
{
uint16_t feat_seln;
uint16_t list_logic_type;
uint8_t filt_logic_type;
uint8_t rssi_high_thres;
uint8_t rssi_low_thres;
uint8_t dely_mode;
uint16_t found_timeout;
uint16_t lost_timeout;
uint8_t found_timeout_cnt;
uint16_t num_of_tracking_entries;
} btgatt_filt_param_setup_t;
#endif /* ANDROID_INCLUDE_BT_COMMON_TYPES_H */

View file

@ -66,23 +66,6 @@ typedef struct
uint8_t is_notify;
} btgatt_notify_params_t;
typedef struct
{
uint8_t client_if;
uint8_t action;
uint8_t filt_index;
uint16_t feat_seln;
uint16_t list_logic_type;
uint8_t filt_logic_type;
uint8_t rssi_high_thres;
uint8_t rssi_low_thres;
uint8_t dely_mode;
uint16_t found_timeout;
uint16_t lost_timeout;
uint8_t found_timeout_cnt;
uint16_t num_of_tracking_entries;
} btgatt_filt_param_setup_t;
typedef struct
{
bt_bdaddr_t *bda1;