-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: Add a callback for notifying the previous bond state. #66
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* // Handle bond state change | ||
* } | ||
*/ | ||
typedef void (*on_bond_state_changed_callback_v2)(void* cookie, bt_address_t* addr, bt_transport_t transport, bond_state_t previous_state, bond_state_t current_state, bool is_ctkd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter is enough?
service/src/adapter_service.c
Outdated
/* callback bonding */ | ||
CALLBACK_FOREACH(CBLIST, adapter_callbacks_t, on_bond_state_changed, | ||
addr, BT_TRANSPORT_BREDR, BOND_STATE_BONDING, false); | ||
CALLBACK_FOREACH(CBLIST, adapter_callbacks_t, on_bond_state_changed_v2, | ||
addr, BT_TRANSPORT_BREDR, previous_state, BOND_STATE_BONDING, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- initial value;
- power on;
- recommand v2 before v1.
- notify bonding once or bonding to bonding.
@@ -512,6 +534,7 @@ typedef struct { | |||
on_connect_request_callback on_connect_request; | |||
on_connection_state_changed_callback on_connection_state_changed; | |||
on_bond_state_changed_callback on_bond_state_changed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
client notify twice in different callback
f665d1b
to
42ce98e
Compare
bug: v/54141 Signed-off-by: chejinxian1 <[email protected]>
bug: v/54141 Signed-off-by: chejinxian1 <[email protected]>
bug: v/54141