BLE: Add APIs to get characteristic authorization callbacks.

pull/14257/head
Vincent Coubard 2021-02-09 19:56:58 +00:00
parent aa561ee8f5
commit c099b859d7
1 changed files with 22 additions and 0 deletions

View File

@ -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<GattWriteAuthCallbackParams *>&
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<GattReadAuthCallbackParams *>&
getReadAuthorizationCallback() const
{
return readAuthorizationCallback;
}
/**
* Invoke the write authorization callback.
*