mirror of https://github.com/ARMmbed/mbed-os.git
fix constness to match recent const changes
parent
b293426a81
commit
e9c0f587af
|
@ -52,7 +52,7 @@ public:
|
|||
*
|
||||
* @param event Advertising report @see AdvertisingReportEvent_t for details.
|
||||
*/
|
||||
virtual void onAdvertisingReport(const AdvertisingReportEvent &event) { }
|
||||
void onAdvertisingReport(const AdvertisingReportEvent &event) { }
|
||||
|
||||
/** Called when scan times out.
|
||||
*/
|
||||
|
@ -229,7 +229,7 @@ public:
|
|||
*/
|
||||
virtual ble_error_t setAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload,
|
||||
mbed::Span<const uint8_t> payload,
|
||||
bool minimiseFragmentation = false
|
||||
);
|
||||
|
||||
|
@ -243,7 +243,7 @@ public:
|
|||
*/
|
||||
virtual ble_error_t setAdvertisingScanResponse(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> response,
|
||||
mbed::Span<const uint8_t> response,
|
||||
bool minimiseFragmentation = false
|
||||
);
|
||||
|
||||
|
@ -298,7 +298,7 @@ public:
|
|||
*/
|
||||
virtual ble_error_t setPeriodicAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload
|
||||
mbed::Span<const uint8_t> payload
|
||||
);
|
||||
|
||||
/** Start periodic advertising for a given set. Periodic advertising will not start until
|
||||
|
|
|
@ -78,55 +78,55 @@ public:
|
|||
|
||||
/** @copydoc Gap::IsFeatureSupported
|
||||
*/
|
||||
bool isFeatureSupported(
|
||||
virtual bool isFeatureSupported(
|
||||
controller_supported_features_t feature
|
||||
);
|
||||
|
||||
/** @copydoc Gap::getMaxAdvertisingSetNumber
|
||||
*/
|
||||
uint8_t getMaxAdvertisingSetNumber();
|
||||
virtual uint8_t getMaxAdvertisingSetNumber();
|
||||
|
||||
/** @copydoc Gap::getMaxAdvertisingDataLength
|
||||
*/
|
||||
uint8_t getMaxAdvertisingDataLength();
|
||||
virtual uint8_t getMaxAdvertisingDataLength();
|
||||
|
||||
/** @copydoc Gap::createAdvertisingSet
|
||||
*/
|
||||
ble_error_t createAdvertisingSet(
|
||||
virtual ble_error_t createAdvertisingSet(
|
||||
advertising_handle_t *handle,
|
||||
const AdvertisingParameters ¶meters
|
||||
);
|
||||
|
||||
/** @copydoc Gap::destroyAdvertisingSet
|
||||
*/
|
||||
ble_error_t destroyAdvertisingSet(advertising_handle_t handle);
|
||||
virtual ble_error_t destroyAdvertisingSet(advertising_handle_t handle);
|
||||
|
||||
/** @copydoc Gap::setAdvertisingParams
|
||||
*/
|
||||
ble_error_t setAdvertisingParameters(
|
||||
virtual ble_error_t setAdvertisingParameters(
|
||||
advertising_handle_t handle,
|
||||
const AdvertisingParameters ¶ms
|
||||
);
|
||||
|
||||
/** @copydoc Gap::setAdvertisingPayload
|
||||
*/
|
||||
ble_error_t setAdvertisingPayload(
|
||||
virtual ble_error_t setAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload,
|
||||
mbed::Span<const uint8_t> payload,
|
||||
bool minimiseFragmentation
|
||||
);
|
||||
|
||||
/** @copydoc Gap::setAdvertisingScanResponse
|
||||
*/
|
||||
ble_error_t setAdvertisingScanResponse(
|
||||
virtual ble_error_t setAdvertisingScanResponse(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> response,
|
||||
mbed::Span<const uint8_t> response,
|
||||
bool minimiseFragmentation
|
||||
);
|
||||
|
||||
/** @copydoc Gap::startAdvertising
|
||||
*/
|
||||
ble_error_t startAdvertising(
|
||||
virtual ble_error_t startAdvertising(
|
||||
advertising_handle_t handle,
|
||||
adv_duration_t maxDuration,
|
||||
uint8_t maxEvents
|
||||
|
@ -134,11 +134,11 @@ public:
|
|||
|
||||
/** @copydoc Gap::stopAdvertising
|
||||
*/
|
||||
ble_error_t stopAdvertising(advertising_handle_t handle);
|
||||
virtual ble_error_t stopAdvertising(advertising_handle_t handle);
|
||||
|
||||
/** @copydoc Gap::isAdvertisingActive
|
||||
*/
|
||||
bool isAdvertisingActive(advertising_handle_t handle);
|
||||
virtual bool isAdvertisingActive(advertising_handle_t handle);
|
||||
|
||||
/** @copydoc Gap::setPeriodicAdvertisingParameters
|
||||
*/
|
||||
|
@ -153,7 +153,7 @@ public:
|
|||
*/
|
||||
virtual ble_error_t setPeriodicAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload
|
||||
mbed::Span<const uint8_t> payload
|
||||
);
|
||||
|
||||
/** @copydoc Gap::startPeriodicAdvertising
|
||||
|
@ -529,7 +529,7 @@ public:
|
|||
/**
|
||||
* @copydoc ::Gap::processConnectionEvent
|
||||
*/
|
||||
void processConnectionEvent(
|
||||
virtual void processConnectionEvent(
|
||||
Handle_t handle,
|
||||
Role_t role,
|
||||
peer_address_type_t peerAddrType,
|
||||
|
@ -544,7 +544,7 @@ public:
|
|||
/**
|
||||
* @copydoc ::Gap::processDisconnectionEvent
|
||||
*/
|
||||
void processDisconnectionEvent(
|
||||
virtual void processDisconnectionEvent(
|
||||
Handle_t handle,
|
||||
DisconnectionReason_t reason
|
||||
);
|
||||
|
@ -552,7 +552,7 @@ public:
|
|||
private:
|
||||
ble_error_t setAdvertisingData(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload,
|
||||
mbed::Span<const uint8_t> payload,
|
||||
bool minimiseFragmentation,
|
||||
bool scan_response
|
||||
);
|
||||
|
|
|
@ -60,7 +60,7 @@ ble_error_t Gap::setAdvertisingParameters(
|
|||
|
||||
ble_error_t Gap::setAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload,
|
||||
mbed::Span<const uint8_t> payload,
|
||||
bool minimiseFragmentation
|
||||
) {
|
||||
/* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
|
@ -69,7 +69,7 @@ ble_error_t Gap::setAdvertisingPayload(
|
|||
|
||||
ble_error_t Gap::setAdvertisingScanResponse(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> response,
|
||||
mbed::Span<const uint8_t> response,
|
||||
bool minimiseFragmentation
|
||||
) {
|
||||
/* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
|
@ -107,7 +107,7 @@ ble_error_t Gap::setPeriodicAdvertisingParameters(
|
|||
|
||||
ble_error_t Gap::setPeriodicAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload
|
||||
mbed::Span<const uint8_t> payload
|
||||
) {
|
||||
/* Requesting action from porter(s): override this API if this capability is supported. */
|
||||
return BLE_ERROR_NOT_IMPLEMENTED;
|
||||
|
|
|
@ -1907,7 +1907,7 @@ ble_error_t GenericGap::setExtendedAdvertisingParameters(
|
|||
|
||||
ble_error_t GenericGap::setAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload,
|
||||
mbed::Span<const uint8_t> payload,
|
||||
bool minimiseFragmentation
|
||||
) {
|
||||
return setAdvertisingData(handle, payload, minimiseFragmentation, false);
|
||||
|
@ -1915,7 +1915,7 @@ ble_error_t GenericGap::setAdvertisingPayload(
|
|||
|
||||
ble_error_t GenericGap::setAdvertisingScanResponse(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> response,
|
||||
mbed::Span<const uint8_t> response,
|
||||
bool minimiseFragmentation
|
||||
) {
|
||||
return setAdvertisingData(handle, response, minimiseFragmentation, true);
|
||||
|
@ -1923,7 +1923,7 @@ ble_error_t GenericGap::setAdvertisingScanResponse(
|
|||
|
||||
ble_error_t GenericGap::setAdvertisingData(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload,
|
||||
mbed::Span<const uint8_t> payload,
|
||||
bool minimiseFragmentation,
|
||||
bool scan_response
|
||||
) {
|
||||
|
@ -1995,7 +1995,7 @@ ble_error_t GenericGap::setAdvertisingData(
|
|||
}
|
||||
|
||||
// extract the payload
|
||||
mbed::Span<uint8_t> sub_payload = payload.subspan(
|
||||
mbed::Span<const uint8_t> sub_payload = payload.subspan(
|
||||
i,
|
||||
std::min(MAX_HCI_DATA_LENGTH, (end - i))
|
||||
);
|
||||
|
@ -2153,7 +2153,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingParameters(
|
|||
|
||||
ble_error_t GenericGap::setPeriodicAdvertisingPayload(
|
||||
advertising_handle_t handle,
|
||||
mbed::Span<uint8_t> payload
|
||||
mbed::Span<const uint8_t> payload
|
||||
)
|
||||
{
|
||||
if (handle == LEGACY_ADVERTISING_HANDLE) {
|
||||
|
@ -2189,7 +2189,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingPayload(
|
|||
}
|
||||
|
||||
// extract the payload
|
||||
mbed::Span<uint8_t> sub_payload = payload.subspan(
|
||||
mbed::Span<const uint8_t> sub_payload = payload.subspan(
|
||||
i,
|
||||
std::min(MAX_HCI_DATA_LENGTH, (end - i))
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue