Skip to content

Commit c099b85

Browse files
committed
BLE: Add APIs to get characteristic authorization callbacks.
1 parent aa561ee commit c099b85

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

connectivity/FEATURE_BLE/include/ble/gatt/GattCharacteristic.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,17 @@ class GattCharacteristic {
15791579
writeAuthorizationCallback.attach(object, member);
15801580
}
15811581

1582+
/**
1583+
* Return the callback registered to handle client's write.
1584+
*
1585+
* @return the callback that handles client's write requests.
1586+
*/
1587+
const FunctionPointerWithContext<GattWriteAuthCallbackParams *>&
1588+
getWriteAuthorizationCallback() const
1589+
{
1590+
return writeAuthorizationCallback;
1591+
}
1592+
15821593
/**
15831594
* Register the read requests event handler.
15841595
*
@@ -1616,6 +1627,17 @@ class GattCharacteristic {
16161627
readAuthorizationCallback.attach(object, member);
16171628
}
16181629

1630+
/**
1631+
* Return the callback registered to handle client's read.
1632+
*
1633+
* @return the callback that handles client's read requests.
1634+
*/
1635+
const FunctionPointerWithContext<GattReadAuthCallbackParams *>&
1636+
getReadAuthorizationCallback() const
1637+
{
1638+
return readAuthorizationCallback;
1639+
}
1640+
16191641
/**
16201642
* Invoke the write authorization callback.
16211643
*

0 commit comments

Comments
 (0)