summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2017-03-30 20:51:00 -0700
committerJakub Pawlowski <jpawlowski@google.com>2017-03-30 20:53:45 -0700
commitdd3e64f258e5e7dbed89853f5a5e3ef1a39d37b2 (patch)
tree3430dde39600d6e05f5116d75fa0543fe40c751c
parente077d6fa766f6182b2a7aa519ad8e9606f8f2d3b (diff)
downloadlibhardware-dd3e64f258e5e7dbed89853f5a5e3ef1a39d37b2.tar.gz
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
-rw-r--r--include/hardware/ble_advertiser.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/hardware/ble_advertiser.h b/include/hardware/ble_advertiser.h
index 013e426f..8abca00a 100644
--- a/include/hardware/ble_advertiser.h
+++ b/include/hardware/ble_advertiser.h
@@ -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,