summaryrefslogtreecommitdiff
path: root/src/adapter.h
diff options
context:
space:
mode:
authorAlex Deymo <deymo@chromium.org>2013-05-08 17:37:56 -0700
committerJohan Hedberg <johan.hedberg@intel.com>2013-05-10 10:16:48 +0300
commitfa73398ae61e055f7e4bc53614fe2760ed102b7f (patch)
tree1eabb269cda5db2a13333d469c97771964f8b4c6 /src/adapter.h
parent8a7c267e36a83245999dc374b627a889acd694f0 (diff)
downloadbluez-fa73398ae61e055f7e4bc53614fe2760ed102b7f.tar.gz
plugins: Extend the pin code callback with the call number
The plugin's pin code callback doesn't know about the pairing process. It just provides a pin code based on the information provided to this function. Although limited state could be added through other new callbacks, this fix achieves this by providing more information to the callback itself. The new argument "attempt" states the pin callback attempt of the particular plugin for the current pairing of the device. This allows a plugin to try different pincodes for the same device in the same pairing process. To signal that the plugin doesn't provide any pin code for the provided device the current implementation returns 0 (an empty pin code). Analogously, with this fix, a plugin should return 0 when it doesn't have any other pin code to provide for the given device.
Diffstat (limited to 'src/adapter.h')
-rw-r--r--src/adapter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/adapter.h b/src/adapter.h
index 425a11f4b..09d80c249 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -132,7 +132,8 @@ int btd_cancel_authorization(guint id);
int btd_adapter_restore_powered(struct btd_adapter *adapter);
typedef ssize_t (*btd_adapter_pin_cb_t) (struct btd_adapter *adapter,
- struct btd_device *dev, char *out, gboolean *display);
+ struct btd_device *dev, char *out, gboolean *display,
+ unsigned int attempt);
void btd_adapter_register_pin_cb(struct btd_adapter *adapter,
btd_adapter_pin_cb_t cb);
void btd_adapter_unregister_pin_cb(struct btd_adapter *adapter,