Move start advertise method to advertising interface (2/3)

Advertising related code should be exposed through
BleAdvertiserInterface. Move client.listen function into this interface.
Remove reduntant clientif parameter.

Bug: 30622771
Bug: 24099160
Test: no tests necessary
Change-Id: Ic4335f2c65c1e21f20d3ae08222fba4341b63e27
This commit is contained in:
Jakub Pawlowski 2016-10-31 11:14:05 -07:00
parent 86f508d45d
commit f82a249795
2 changed files with 3 additions and 9 deletions

View file

@ -42,6 +42,9 @@ class BleAdvertiserInterface {
/** Set the advertising data or scan response data */
virtual void SetData(bool set_scan_rsp, vector<uint8_t> data) = 0;
/** Start or stop advertising */
virtual void Enable(bool start, BleAdvertiserCb cb) = 0;
/* Set the parameters as per spec, user manual specified values */
virtual void MultiAdvSetParameters(int advertiser_id, int min_interval,
int max_interval, int adv_type,

View file

@ -165,11 +165,6 @@ typedef void (*write_descriptor_callback)(int conn_id, int status, uint16_t hand
typedef void (*read_remote_rssi_callback)(int client_if, bt_bdaddr_t* bda,
int rssi, int status);
/**
* Callback indicating the status of a listen() operation
*/
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);
@ -203,7 +198,6 @@ typedef struct {
write_descriptor_callback write_descriptor_cb;
execute_write_callback execute_write_cb;
read_remote_rssi_callback read_remote_rssi_cb;
listen_callback listen_cb;
configure_mtu_callback configure_mtu_cb;
congestion_callback congestion_cb;
get_gatt_db_callback get_gatt_db_cb;
@ -228,9 +222,6 @@ typedef struct {
bt_status_t (*disconnect)( int client_if, const bt_bdaddr_t *bd_addr,
int conn_id);
/** Start or stop advertisements to listen for incoming connections */
bt_status_t (*listen)(int client_if, bool start);
/** Clear the attribute cache for a given device */
bt_status_t (*refresh)( int client_if, const bt_bdaddr_t *bd_addr );