-
Notifications
You must be signed in to change notification settings - Fork 185
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
Rename getAll* methods with get* #40
Comments
Thanks for filing the standalone issue! @mounirlamouri @marcoscaceres As the web-standard experts here, do you have an opinion on this naming question? We have |
You're welcome! Got your point, I'll let the experts speak then. Please be aware we might also add Primary to the name, i.e. getPrimaryService(s) (see issue #41 ). Cheers. |
It feels to me that |
becomes
The performance difference may not exist if the UA discovers the full service tree before returning the device. If the UA discovers things lazily, the difference depends on how many services a device defines and how many a webpage uses. In the case that makes The case that makes I suspect
|
Thanks @marcoscaceres and @jyasskin for your replies! Though we're mixing another issue there (see #39). Sorry to have created 2 separate issues. This one is more about naming, hence for what is about function signatures I'll reply in #39. |
After some discussion, I think we should take this change. |
Thanks @jyasskin ! |
My feeling is that 'All' in getAll* methods is overkill.
I would then replace all of getAll* by get*, e.g.:
BluetoothDevice.getServices
BluetoothGATTService.getCharacteristics
BluetoothGATTService.getIncludedServices
BluetoothGATTCharacteristic.getDescriptors
This would also be aligned with most existing native APIs (e.g. Android)
The text was updated successfully, but these errors were encountered: