bluetooth: add callback to notify pairing is complete

Added two new callbacks for Bluetooth stack to notify
the application that pairing has been completed or failed.

fixes: #8390

Signed-off-by: Jun Li <jun.r.li@intel.com>
This commit is contained in:
Jun Li 2018-06-13 13:37:49 -07:00 committed by Johan Hedberg
commit 9b6ad4067b
2 changed files with 38 additions and 3 deletions

View file

@ -392,6 +392,22 @@ struct bt_conn_auth_cb {
#if defined(CONFIG_BT_BREDR)
void (*pincode_entry)(struct bt_conn *conn, bool highsec);
#endif
/** @brief notify that pairing process was complete.
*
* This callback notifies the applicaiton that the pairing process
* has been completed.
*
* @param conn Connection object.
* @param bonded pairing is bonded or not.
*/
void (*pairing_complete)(struct bt_conn *conn, bool bonded);
/** @brief notify that pairing process has failed.
*
* @param conn Connection object.
*/
void (*pairing_failed)(struct bt_conn *conn);
};
/** @brief Register authentication callbacks.