summaryrefslogtreecommitdiff
path: root/src/adapter.h
diff options
context:
space:
mode:
authorAlex Deymo <deymo@chromium.org>2013-05-08 17:37:58 -0700
committerJohan Hedberg <johan.hedberg@intel.com>2013-05-10 10:20:50 +0300
commit445a1036a11eb92df1c1ab76353ef2608087513d (patch)
tree8f129304049f6060e7f6c19efde65756ce5098a2 /src/adapter.h
parent543d659bdc4797f9300514893f815f2007f16527 (diff)
downloadbluez-445a1036a11eb92df1c1ab76353ef2608087513d.tar.gz
core: Retry bonding attempt until the iterator reaches the end
This patch splits the bonding process in an interative process consisting of one or more "bonding attempts". The user/agent starts a new "bonding" that may involve several rounds of "bonding attempts" with the device before it gets back to the user/agent. Some functions were split in two parts to reflect this change. When a bonding attempt fails with an authentication error and a pin code was provided, a new bonding attempt is initiated (after a short delay) to retry with the next function (or next call to the same function) in the pincode callback list. If no pin code was provided to the device, no retry is attempted and the authentication error is returned to the client. This effectively allows a plugin try different pincodes for the same device during the same bonding.
Diffstat (limited to 'src/adapter.h')
-rw-r--r--src/adapter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/adapter.h b/src/adapter.h
index 09d80c249..2de873003 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -179,6 +179,9 @@ int btd_adapter_passkey_reply(struct btd_adapter *adapter,
int adapter_create_bonding(struct btd_adapter *adapter, const bdaddr_t *bdaddr,
uint8_t addr_type, uint8_t io_cap);
+int adapter_bonding_attempt(struct btd_adapter *adapter, const bdaddr_t *bdaddr,
+ uint8_t addr_type, uint8_t io_cap);
+
int adapter_cancel_bonding(struct btd_adapter *adapter, const bdaddr_t *bdaddr,
uint8_t addr_type);