You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now Adapter::bluetooth_enabled() can conflate multiple states, especially on macOS where CoreBluetooth authorization and adapter power are both folded into one boolean. That makes it hard for applications to tell users whether they need to enable Bluetooth, grant permissions, or handle an unsupported/unknown state.
We should design a clearer cross-platform API that separates:
adapter powered/enabled state
Bluetooth permission/authorization state
unsupported/unavailable/unknown states where the OS exposes them
A reasonable shape might be a small adapter status enum/struct plus docs explaining which backends can report which states. Existing bluetooth_enabled() can remain as a compatibility convenience if needed, but new code should have a precise way to distinguish permissions from power.
This replaces the narrower macOS-specific report in #242.
Right now
Adapter::bluetooth_enabled()can conflate multiple states, especially on macOS where CoreBluetooth authorization and adapter power are both folded into one boolean. That makes it hard for applications to tell users whether they need to enable Bluetooth, grant permissions, or handle an unsupported/unknown state.We should design a clearer cross-platform API that separates:
A reasonable shape might be a small adapter status enum/struct plus docs explaining which backends can report which states. Existing
bluetooth_enabled()can remain as a compatibility convenience if needed, but new code should have a precise way to distinguish permissions from power.This replaces the narrower macOS-specific report in #242.
-- Riley