return false;
}
+ void RemoveAdvertisingSet(uint8_t handle,
+ status_cb command_complete) override {
+ // VSC Advertising don't have remove method.
+ command_complete.Run(0);
+ }
+
public:
static void VendorSpecificEventCback(uint8_t length, uint8_t* p) {
VLOG(1) << __func__;
LOG(INFO) << __func__ << "Legacy can't do periodic advertising";
command_complete.Run(HCI_ERR_ILLEGAL_COMMAND);
}
+
+ void RemoveAdvertisingSet(uint8_t handle,
+ status_cb command_complete) override {
+ // Legacy Advertising don't have remove method.
+ command_complete.Run(0);
+ }
};
class BleAdvertiserHciExtendedImpl : public BleAdvertiserHciInterface {
HCI_LE_ENABLE_PRIODIC_ADVERTISEMENT_LEN, command_complete);
}
+ void RemoveAdvertisingSet(uint8_t handle,
+ status_cb command_complete) override {
+ VLOG(1) << __func__;
+
+ const uint16_t cmd_length = 1;
+ uint8_t param[cmd_length];
+ memset(param, 0, cmd_length);
+
+ uint8_t* pp = param;
+ UINT8_TO_STREAM(pp, handle);
+
+ SendAdvCmd(FROM_HERE, HCI_LE_REMOVE_ADVERTISING_SET, param, cmd_length,
+ command_complete);
+ }
+
public:
void OnAdvertisingSetTerminated(uint8_t length, uint8_t* p) {
VLOG(1) << __func__;
status_cb command_complete) = 0;
virtual void SetPeriodicAdvertisingEnable(uint8_t enable, uint8_t handle,
status_cb command_complete) = 0;
+ virtual void RemoveAdvertisingSet(uint8_t handle,
+ status_cb command_complete) = 0;
// Some implementation don't behave well when handle value 0 is used.
virtual bool QuirkAdvertiserZeroHandle() { return 0; }
MOCK_METHOD5(SetPeriodicAdvertisingData,
void(uint8_t, uint8_t, uint8_t, uint8_t*, status_cb));
MOCK_METHOD3(SetPeriodicAdvertisingEnable, void(uint8_t, uint8_t, status_cb));
+ MOCK_METHOD2(RemoveAdvertisingSet, void(uint8_t, status_cb));
MOCK_METHOD9(SetParameters1,
void(uint8_t, uint16_t, uint32_t, uint32_t, uint8_t, uint8_t,