Skip to content

Conversation

@lulf
Copy link
Contributor

@lulf lulf commented Jun 30, 2025

Breaks the public API a bit, let me know if it should be preserved. Also I put unsafe on creating the config on android, this way the with_config on the adapter could still be the same for all platforms.

@alexmoon
Copy link
Owner

I'm ok with the API breakage. I'd like to see the Linux and Windows versions of AdapterConfig include an optional device name to open.

@lulf lulf force-pushed the feat/power_dialog branch from 0d2354b to add2fa7 Compare June 30, 2025 19:31
@lulf
Copy link
Contributor Author

lulf commented Jul 1, 2025

@alexmoon Ready for review. I don't have a linux/windows host to test on right now.

src/adapter.rs Outdated
Comment on lines 23 to 35
/// Creates an interface to the default Bluetooth adapter for the system.
#[cfg(not(target_os = "android"))]
pub async fn default() -> Result<Self> {
sys::adapter::AdapterImpl::default().await.map(Adapter)
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I wasn't clear. I want to keep this method but change it to:

    pub async fn default() -> Result<Self> {
        sys::adapter::AdapterImpl::with_config(AdapterConfig::default()).await.map(Adapter)
    }

@alexmoon
Copy link
Owner

@lulf are you still working on this? The clippy errors should be resolved by rebasing on main.

@lulf lulf force-pushed the feat/power_dialog branch from ecaf203 to cc915f7 Compare July 28, 2025 10:12
@alexmoon alexmoon merged commit 3238f01 into alexmoon:main Jul 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants