aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-11-24 07:58:14 +0100
committerSven Gothel <[email protected]>2023-11-24 07:58:14 +0100
commit2c9afcdb852ccdb9155d5a8e6bfdea6cb4544674 (patch)
tree366ed36d952ad2cd1d5a8d57a45e2b5007085263 /api
parenta7c13863b9351dba2ad4a1251547b2399e9c053f (diff)
BTDevice::pairing_data.is_pre_paired: Set on uploadKeys() post setup, aligned for all cases (C++ and Java, via setSMPKey() or manual)
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/BTDevice.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/api/direct_bt/BTDevice.hpp b/api/direct_bt/BTDevice.hpp
index 50be88ff..c42a8b88 100644
--- a/api/direct_bt/BTDevice.hpp
+++ b/api/direct_bt/BTDevice.hpp
@@ -679,6 +679,9 @@ namespace direct_bt {
*/
HCIStatusCode disconnect(const HCIStatusCode reason=HCIStatusCode::REMOTE_USER_TERMINATED_CONNECTION ) noexcept;
+ /** Returns true if this device has completed SMP pairing or keys are set via uploadKeys() */
+ bool isPrePaired() const noexcept { return pairing_data.is_pre_paired; }
+
/**
* Returns the responder SMP passkey, ranging from [0..999999].
* <p>
@@ -737,6 +740,7 @@ namespace direct_bt {
* Must be called before connecting to this device, otherwise HCIStatusCode::CONNECTION_ALREADY_EXISTS will be returned.
*
* @return ::HCIStatusCode::SUCCESS if successful, otherwise the appropriate error code.
+ * @see isPrePaired()
* @see setLongTermKey()
* @see setIdentityResolvingKey()
* @see setSignatureResolvingKey()
@@ -927,7 +931,7 @@ namespace direct_bt {
* Method either changes both parameter for the upcoming connection or none at all.
* </p>
* @param[in] sec_level ::BTSecurityLevel to be applied.
- * @param[in] io_cap ::SMPIOCapability to be applied.
+ * @param[in] io_cap ::SMPIOCapability to be applied, defaults to ::SMPIOCapability::UNSET
* @see ::BTSecurityLevel
* @see ::SMPIOCapability
* @see getConnSecurityLevel()