C++ Pixels Library For Windows
Enable communications with Pixels dice using Bluetooth Low Energy.
Loading...
Searching...
No Matches
BluetoothLE.h
Go to the documentation of this file.
1
6#pragma once
7
9{
11 enum class BleAdapterState
12 {
15
18
21
24 };
25
31 std::future<BleAdapterState> getAdapterStateAsync();
32
39 std::future<bool> subscribeAdapterStateChangedAsync(const std::function<void(BleAdapterState)>& onStateChanged);
40}
A collection of C++ classes that provides a simplified access to Bluetooth Low Energy peripherals.
Definition: BleTypes.h:38
BleAdapterState
Bluetooth adapter states.
Definition: BluetoothLE.h:12
@ Enabled
The radio of the default Bluetooth adapter is enabled and ready for use..
@ Unavailable
The radio of the default Bluetooth adapter is in a uncontrollable state.
@ Unsupported
The system doesn't have a compatible Bluetooth adapter.
@ Disabled
The radio of the default Bluetooth adapter is disabled or powered off.
std::future< bool > subscribeAdapterStateChangedAsync(const std::function< void(BleAdapterState)> &onStateChanged)
Subscribe to the default Bluetooth adapter radio state events.
std::future< BleAdapterState > getAdapterStateAsync()
Returns the default Bluetooth adapter state.