-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Define scanCompleteCB with using std::function #343
Define scanCompleteCB with using std::function #343
Conversation
Sorry for the delay. This is a good idea but we have a problem. This will break the API for users that do not provide the In order to support this correctly another solution is needed. If we are going to break the API, I think the best way would be to have a I'm open to other suggestions, this is just my first thoughts. Note: merging this will need to wait until the other breaking changes I have in mind are implemented with the upcoming 2.0 releases. |
Thank you for the response.
I agree passing a class instance for a function because we can support additional callback easily.
I see, thanks. |
Thank you for updating but it seems renaming m_pAdvertisedDeviceCallbacks to m_pScanCallbacks and reuse it as m_scanCompleteCB. |
Sorry, I need to update an examples to make it clearer. The advertised device callback class has been replaced with the scan callback class which contains the virtual function |
Thank you for the explanation. |
You got it 😄 |
This request is satisfied by onScanEnd callback on #389. |
I want to use bind for scanCompleteCB like this.
Related issue: #342