BLE: Improve naming consistency of ble::Gap::EventHandler functions.

pull/8738/head
Vincent Coubard 2018-11-23 09:47:50 +00:00
parent 6e4e733c1c
commit 8fc62efbd8
4 changed files with 13 additions and 13 deletions

View File

@ -1398,7 +1398,7 @@ public:
* to ble.onDisconnection(callback) should be replaced with
* ble.gap().onDisconnection(callback).
*/
MBED_DEPRECATED("ble.gap().onDisconnection(callback)")
MBED_DEPRECATED("ble.gap().onDisconnectionComplete(callback)")
void onDisconnection(Gap::DisconnectionEventCallback_t disconnectionCallback);
/**
@ -1411,7 +1411,7 @@ public:
* ble.gap().onDisconnection(callback).
*/
template<typename T>
MBED_DEPRECATED("ble.gap().onDisconnection(callback)")
MBED_DEPRECATED("ble.gap().onDisconnectionComplete(callback)")
void onDisconnection(T *tptr, void (T::*mptr)(const Gap::DisconnectionCallbackParams_t*)) {
gap().onDisconnection(tptr, mptr);
}

View File

@ -2622,7 +2622,7 @@ public:
MBED_DEPRECATED_SINCE(
"mbed-os-5.11.0",
"Deprecated since addition of extended advertising support. "
"Use EventHandler::onDisconnection() instead"
"Use EventHandler::onDisconnectionComplete() instead"
)
void processDisconnectionEvent(Handle_t handle, DisconnectionReason_t reason)
{

View File

@ -39,7 +39,7 @@ public:
*
* @param event Scan request event: @see ScanRequestEvent_t for details.
*/
virtual void onScanRequest(const ScanRequestEvent_t &event) { }
virtual void onScanRequestReceived(const ScanRequestEvent_t &event) { }
/** Called when advertising ends.
*
@ -70,7 +70,7 @@ public:
*
* @param event Periodic advertisement event.
*/
virtual void onPeriodicAdvertisingReportEvent(
virtual void onPeriodicAdvertisingReport(
const PeriodicAdvertisingReportEvent &event
) { }
@ -92,7 +92,7 @@ public:
const ConnectionParametersUpdateCompleteEvent &event
) { }
virtual void onDisconnection(const DisconnectionEvent &event) { }
virtual void onDisconnectionComplete(const DisconnectionEvent &event) { }
/**
* Function invoked when the current transmitter and receiver PHY have

View File

@ -1303,7 +1303,7 @@ void GenericGap::processDisconnectionEvent(
}
if (_eventHandler) {
_eventHandler->onDisconnection(
_eventHandler->onDisconnectionComplete(
DisconnectionEvent(
handle,
(disconnection_reason_t::type) reason
@ -2337,15 +2337,15 @@ void GenericGap::on_extended_advertising_report(
address_type ?
(peer_address_type_t::type) address_type->value() :
peer_address_type_t::ANONYMOUS,
(BLEProtocol::AddressBytes_t&)address,
(BLEProtocol::AddressBytes_t &) address,
primary_phy,
secondary_phy? *secondary_phy : phy_t::NONE,
secondary_phy ? *secondary_phy : phy_t::NONE,
advertising_sid,
tx_power,
rssi,
periodic_interval_t(periodic_advertising_interval),
(PeerAddressType_t::type)direct_address_type.value(),
(BLEProtocol::AddressBytes_t&)direct_address,
(PeerAddressType_t::type) direct_address_type.value(),
(BLEProtocol::AddressBytes_t &) direct_address,
mbed::make_Span(data, data_length)
)
);
@ -2394,7 +2394,7 @@ void GenericGap::on_periodic_advertising_report(
return;
}
_eventHandler->onPeriodicAdvertisingReportEvent(
_eventHandler->onPeriodicAdvertisingReport(
PeriodicAdvertisingReportEvent(
sync_handle,
tx_power,
@ -2449,7 +2449,7 @@ void GenericGap::on_scan_request_received(
return;
}
_eventHandler->onScanRequest(
_eventHandler->onScanRequestReceived(
ScanRequestEvent_t(
advertising_handle,
(peer_address_type_t::type) scanner_address_type.value(),