forked from h2zero/esp-nimble-cpp
[BREAKING] Asynchronous pin injections for Numeric Comparison and PassKey Input (#165)
* Make NimBLEConnInfo functions const. * Update callback functions and update client to use new functions. * Update examples. * Update migration guide. --------- Co-authored-by: Casey Smith <csmith@morningstarcorp.com>
This commit is contained in:
+5
-5
@@ -147,23 +147,23 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Called when server requests a passkey for pairing.
|
||||
* @return The passkey to be sent to the server.
|
||||
* @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info.
|
||||
*/
|
||||
virtual uint32_t onPassKeyRequest();
|
||||
virtual void onPassKeyEntry(const NimBLEConnInfo& connInfo);
|
||||
|
||||
/**
|
||||
* @brief Called when the pairing procedure is complete.
|
||||
* @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info.\n
|
||||
* This can be used to check the status of the connection encryption/pairing.
|
||||
*/
|
||||
virtual void onAuthenticationComplete(NimBLEConnInfo& connInfo);
|
||||
virtual void onAuthenticationComplete(const NimBLEConnInfo& connInfo);
|
||||
|
||||
/**
|
||||
* @brief Called when using numeric comparision for pairing.
|
||||
* @param [in] connInfo A reference to a NimBLEConnInfo instance containing the peer info.
|
||||
* @param [in] pin The pin to compare with the server.
|
||||
* @return True to accept the pin.
|
||||
*/
|
||||
virtual bool onConfirmPIN(uint32_t pin);
|
||||
virtual void onConfirmPIN(const NimBLEConnInfo& connInfo, uint32_t pin);
|
||||
};
|
||||
|
||||
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */
|
||||
|
||||
Reference in New Issue
Block a user