Bluetooth 5 advertising duration refactoring (2/4)

Expose both duration and maximum extended advertising events to limit
advertising time.

Test: manual
Bug: 30622771
Change-Id: Id5a7246b1d3e937d5c462315c157b320d659a52d
(cherry picked from commit dd3e64f258)
This commit is contained in:
Jakub Pawlowski 2017-03-30 20:51:00 -07:00
parent 097032a21b
commit 784d6f1a88

View file

@ -67,7 +67,8 @@ class BleAdvertiserInterface {
/* Enable the advertising instance */
virtual void Enable(uint8_t advertiser_id, bool enable, StatusCallback cb,
int timeout_s, StatusCallback timeout_cb) = 0;
uint16_t duration, uint8_t maxExtAdvEvents,
StatusCallback timeout_cb) = 0;
/* Unregisters an advertiser */
virtual void Unregister(uint8_t advertiser_id) = 0;
@ -86,8 +87,8 @@ class BleAdvertiserInterface {
std::vector<uint8_t> advertise_data,
std::vector<uint8_t> scan_response_data,
PeriodicAdvertisingParameters periodic_params,
std::vector<uint8_t> periodic_data, int timeout_s,
IdStatusCallback timeout_cb) = 0;
std::vector<uint8_t> periodic_data, uint16_t duration,
uint8_t maxExtAdvEvents, IdStatusCallback timeout_cb) = 0;
virtual void SetPeriodicAdvertisingParameters(
int advertiser_id, PeriodicAdvertisingParameters parameters,