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: public/GattCharacteristic.h
- Revision:
- 325:501ad8b8bbe5
- Parent:
- 324:13a128a1505d
- Child:
- 345:b977276fb4d3
--- a/public/GattCharacteristic.h Mon Mar 23 16:28:09 2015 +0000
+++ b/public/GattCharacteristic.h Mon Mar 23 16:28:09 2015 +0000
@@ -365,12 +365,12 @@
* @param params to capture the context of the write-auth request; and also contains an out-parameter for reply.
* @return true if the write is authorized to proceed.
*/
- bool authorizeWrite(GattCharacteristicWriteAuthCBParams *params) {
+ GattCharacteristicAuthCBReply_t authorizeWrite(GattCharacteristicWriteAuthCBParams *params) {
if (!isWriteAuthorizationEnabled()) {
- return true;
+ return AUTH_CALLBACK_REPLY_SUCCESS;
}
- params->authorizationReply = true; /* initialized to true by default */
+ params->authorizationReply = AUTH_CALLBACK_REPLY_SUCCESS; /* initialized to no-error by default */
writeAuthorizationCallback.call(params);
return params->authorizationReply;
}
@@ -391,12 +391,12 @@
*
* @return true if the read is authorized to proceed.
*/
- bool authorizeRead(GattCharacteristicReadAuthCBParams *params) {
+ GattCharacteristicAuthCBReply_t authorizeRead(GattCharacteristicReadAuthCBParams *params) {
if (!isReadAuthorizationEnabled()) {
- return true;
+ return AUTH_CALLBACK_REPLY_SUCCESS;
}
- params->authorizationReply = true; /* initialized to true by default */
+ params->authorizationReply = AUTH_CALLBACK_REPLY_SUCCESS; /* initialized to no-error by default */
readAuthorizationCallback.call(params);
return params->authorizationReply;
}
