Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: services/URIBeaconConfigService.h
- Revision:
- 524:6e97ab392e2a
- Parent:
- 522:6bc4662d4e30
- Child:
- 526:caa67c3187a0
--- a/services/URIBeaconConfigService.h Fri Jun 19 15:52:06 2015 +0100
+++ b/services/URIBeaconConfigService.h Fri Jun 19 15:52:06 2015 +0100
@@ -232,8 +232,8 @@
* characteristics of this service. Attempts to do so are also applied to
* the internal state of this service object.
*/
- void onDataWrittenCallback(const GattCharacteristicWriteCBParams *writeParams) {
- uint16_t handle = writeParams->charHandle;
+ void onDataWrittenCallback(const GattWriteCallbackParams *writeParams) {
+ uint16_t handle = writeParams->handle;
if (handle == lockChar.getValueHandle()) {
// Validated earlier
@@ -305,8 +305,8 @@
reinterpret_cast<uint8_t *>(params.advPowerLevels), sizeof(PowerLevels_t));
}
-private:
- void lockAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) {
+ private:
+ void lockAuthorizationCallback(GattWriteAuthCallbackParams *authParams) {
if (lockedState) {
authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION;
} else if (authParams->len != sizeof(Lock_t)) {
@@ -319,7 +319,7 @@
}
- void unlockAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) {
+ void unlockAuthorizationCallback(GattWriteAuthCallbackParams *authParams) {
if (!lockedState) {
authParams->authorizationReply = AUTH_CALLBACK_REPLY_SUCCESS;
} else if (authParams->len != sizeof(Lock_t)) {
@@ -333,7 +333,7 @@
}
}
- void uriDataWriteAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) {
+ void uriDataWriteAuthorizationCallback(GattWriteAuthCallbackParams *authParams) {
if (lockedState) {
authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION;
} else if (authParams->offset != 0) {
@@ -343,7 +343,7 @@
}
}
- void powerModeAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) {
+ void powerModeAuthorizationCallback(GattWriteAuthCallbackParams *authParams) {
if (lockedState) {
authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION;
} else if (authParams->len != sizeof(uint8_t)) {
@@ -358,7 +358,7 @@
}
template <typename T>
- void basicAuthorizationCallback(GattCharacteristicWriteAuthCBParams *authParams) {
+ void basicAuthorizationCallback(GattWriteAuthCallbackParams *authParams) {
if (lockedState) {
authParams->authorizationReply = AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION;
} else if (authParams->len != sizeof(T)) {
@@ -370,7 +370,6 @@
}
}
-protected:
BLEDevice &ble;
Params_t ¶ms;
@@ -392,7 +391,7 @@
ReadWriteGattCharacteristic<uint16_t> beaconPeriodChar;
WriteOnlyGattCharacteristic<uint8_t> resetChar;
-public:
+ public:
/*
* Encode a human-readable URI into the binary format defined by URIBeacon spec (https://github.com/google/uribeacon/tree/master/specification).
*/
