Merge "Bluetooth 5 AdvertisingSet implementation (3/4)" am: ecb7fc5332
am: 00a91f290b
Change-Id: I1db5837866531e13cfbaca4b8660f24c5bd09136
This commit is contained in:
commit
9673fcf99c
1 changed files with 18 additions and 6 deletions
|
@ -49,16 +49,17 @@ class BleAdvertiserInterface {
|
||||||
using StatusCallback = base::Callback<void(uint8_t /* status */)>;
|
using StatusCallback = base::Callback<void(uint8_t /* status */)>;
|
||||||
using IdStatusCallback =
|
using IdStatusCallback =
|
||||||
base::Callback<void(uint8_t /* advertiser_id */, uint8_t /* status */)>;
|
base::Callback<void(uint8_t /* advertiser_id */, uint8_t /* status */)>;
|
||||||
|
using IdTxPowerStatusCallback =
|
||||||
|
base::Callback<void(uint8_t /* advertiser_id */, int8_t /* tx_power */, uint8_t /* status */)>;
|
||||||
|
using ParametersCallback =
|
||||||
|
base::Callback<void(uint8_t /* status */, int8_t /* tx_power */)>;
|
||||||
|
|
||||||
/** Registers an advertiser with the stack */
|
/** Registers an advertiser with the stack */
|
||||||
virtual void RegisterAdvertiser(IdStatusCallback) = 0;
|
virtual void RegisterAdvertiser(IdStatusCallback) = 0;
|
||||||
|
|
||||||
/* Set the parameters as per spec, user manual specified values */
|
/* Set the parameters as per spec, user manual specified values */
|
||||||
virtual void SetParameters(
|
virtual void SetParameters(uint8_t advertiser_id, AdvertiseParameters params,
|
||||||
uint8_t advertiser_id, uint16_t advertising_event_properties,
|
ParametersCallback cb) = 0;
|
||||||
uint32_t min_interval, uint32_t max_interval, int chnl_map, int tx_power,
|
|
||||||
uint8_t primary_advertising_phy, uint8_t secondary_advertising_phy,
|
|
||||||
uint8_t scan_request_notification_enable, StatusCallback cb) = 0;
|
|
||||||
|
|
||||||
/* Setup the data */
|
/* Setup the data */
|
||||||
virtual void SetData(int advertiser_id, bool set_scan_rsp,
|
virtual void SetData(int advertiser_id, bool set_scan_rsp,
|
||||||
|
@ -81,12 +82,23 @@ class BleAdvertiserInterface {
|
||||||
* parameters and data, and enabling it. |register_cb| is called when the set
|
* parameters and data, and enabling it. |register_cb| is called when the set
|
||||||
* is advertising. |timeout_cb| is called when the timeout_s have passed */
|
* is advertising. |timeout_cb| is called when the timeout_s have passed */
|
||||||
virtual void StartAdvertisingSet(
|
virtual void StartAdvertisingSet(
|
||||||
IdStatusCallback register_cb, AdvertiseParameters params,
|
IdTxPowerStatusCallback register_cb, AdvertiseParameters params,
|
||||||
std::vector<uint8_t> advertise_data,
|
std::vector<uint8_t> advertise_data,
|
||||||
std::vector<uint8_t> scan_response_data,
|
std::vector<uint8_t> scan_response_data,
|
||||||
PeriodicAdvertisingParameters periodic_params,
|
PeriodicAdvertisingParameters periodic_params,
|
||||||
std::vector<uint8_t> periodic_data, int timeout_s,
|
std::vector<uint8_t> periodic_data, int timeout_s,
|
||||||
IdStatusCallback timeout_cb) = 0;
|
IdStatusCallback timeout_cb) = 0;
|
||||||
|
|
||||||
|
virtual void SetPeriodicAdvertisingParameters(
|
||||||
|
int advertiser_id, PeriodicAdvertisingParameters parameters,
|
||||||
|
StatusCallback cb) = 0;
|
||||||
|
|
||||||
|
virtual void SetPeriodicAdvertisingData(int advertiser_id,
|
||||||
|
std::vector<uint8_t> data,
|
||||||
|
StatusCallback cb) = 0;
|
||||||
|
|
||||||
|
virtual void SetPeriodicAdvertisingEnable(int advertiser_id, bool enable,
|
||||||
|
StatusCallback cb) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* ANDROID_INCLUDE_BLE_ADVERTISER_H */
|
#endif /* ANDROID_INCLUDE_BLE_ADVERTISER_H */
|
||||||
|
|
Loading…
Reference in a new issue