-
Notifications
You must be signed in to change notification settings - Fork 3k
[BLE] Update parameters passed to onDataSent, onUpdatesEnabled/Disabled, and onConfirmationReceived callbacks #13727
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
Conversation
…d onConfirmationReceived callbacks
@AGlass0fMilk, thank you for your changes. |
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.
I'm not in favor of doing a breaking change right now.
To move this PR forward can you add callbacks into the EventHandler
class and mark the onXXX
as deprecated ?
@pan- I have implemented changes to deprecate the individual callback-registering functions in |
2374595
to
2457934
Compare
2457934
to
452a815
Compare
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.
@AGlass0fMilk Thank you for the PR. It all looks good except for one thing. Can you use const references instead of const pointers for callback parameters in EventHandler
?
I would prefer to remain consistent with what has been done in Gap::EventHandler
See 862669c |
.connHandle = connHandle, | ||
.attHandle = attributeHandle | ||
}); | ||
eventHandler->onUpdatesEnabled(¶ms); |
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.
You probably want to update the call site too. Passing pointers won't work.
Merging this with #13734 since they are closely tied. |
Summary of changes
Update parameters passed to onDataSent, onUpdatesEnabled/Disabled, and onConfirmationReceived callbacks.
Each of these callbacks are now given the related connection ID and attribute handle.
Individual callback-registering functions in the
GattServer
API are deprecated by this PR.Resolves #13726
Impact of changes
Any use of
GattServer::onDataSent
,GattServer::onUpdatesEnabled
,GattServer::onUpdatesDisabled
,GattServer::onConfirmationReceived
is now deprecated and will be removed in a future release.Migration actions required
Update applications calling the deprecated functions to use the new
GattServer::EventHandler
API.Documentation
None
Pull request type
Test results
Reviewers
@pan- @paul-szczepanek-arm