diff --git a/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h b/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h index d5e88eedfb..cf310c3d4c 100644 --- a/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h +++ b/connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h @@ -1579,6 +1579,17 @@ public: writeAuthorizationCallback.attach(object, member); } + /** + * Return the callback registered to handle client's write. + * + * @return the callback that handles client's write requests. + */ + const FunctionPointerWithContext& + getWriteAuthorizationCallback() const + { + return writeAuthorizationCallback; + } + /** * Register the read requests event handler. * @@ -1616,6 +1627,17 @@ public: readAuthorizationCallback.attach(object, member); } + /** + * Return the callback registered to handle client's read. + * + * @return the callback that handles client's read requests. + */ + const FunctionPointerWithContext& + getReadAuthorizationCallback() const + { + return readAuthorizationCallback; + } + /** * Invoke the write authorization callback. *