|
| virtual | ~BaseBluetooth () noexcept=default |
| | Virtual destructor for proper cleanup of derived classes.
|
| |
| virtual hf_bluetooth_err_t | Initialize (hf_bluetooth_mode_t mode) noexcept=0 |
| | Initialize the Bluetooth subsystem.
|
| |
| virtual hf_bluetooth_err_t | Deinitialize () noexcept=0 |
| | Deinitialize the Bluetooth subsystem.
|
| |
| virtual bool | IsInitialized () const noexcept=0 |
| | Check if Bluetooth is initialized.
|
| |
| virtual hf_bluetooth_err_t | Enable () noexcept=0 |
| | Enable Bluetooth.
|
| |
| virtual hf_bluetooth_err_t | Disable () noexcept=0 |
| | Disable Bluetooth.
|
| |
| virtual bool | IsEnabled () const noexcept=0 |
| | Check if Bluetooth is enabled.
|
| |
| virtual hf_bluetooth_err_t | SetMode (hf_bluetooth_mode_t mode) noexcept=0 |
| | Set Bluetooth operating mode.
|
| |
| virtual hf_bluetooth_mode_t | GetMode () const noexcept=0 |
| | Get current Bluetooth operating mode.
|
| |
| virtual hf_bluetooth_err_t | GetLocalAddress (hf_bluetooth_address_t &address) const noexcept=0 |
| | Get local Bluetooth address.
|
| |
| virtual hf_bluetooth_err_t | SetDeviceName (const std::string &name) noexcept=0 |
| | Set local device name.
|
| |
| virtual std::string | GetDeviceName () const noexcept=0 |
| | Get local device name.
|
| |
| virtual hf_bluetooth_err_t | ConfigureClassic (const hf_bluetooth_classic_config_t &config) noexcept=0 |
| | Configure Bluetooth Classic parameters.
|
| |
| virtual hf_bluetooth_err_t | SetDiscoverable (bool discoverable, uint32_t timeout_ms=0) noexcept=0 |
| | Make device discoverable.
|
| |
| virtual bool | IsDiscoverable () const noexcept=0 |
| | Check if device is discoverable.
|
| |
| virtual hf_bluetooth_err_t | ConfigureBle (const hf_bluetooth_ble_config_t &config) noexcept=0 |
| | Configure Bluetooth Low Energy parameters.
|
| |
| virtual hf_bluetooth_err_t | StartAdvertising () noexcept=0 |
| | Start BLE advertising.
|
| |
| virtual hf_bluetooth_err_t | StopAdvertising () noexcept=0 |
| | Stop BLE advertising.
|
| |
| virtual bool | IsAdvertising () const noexcept=0 |
| | Check if BLE advertising is active.
|
| |
| virtual hf_bluetooth_err_t | StartScan (uint32_t duration_ms=0, hf_bluetooth_scan_type_t type=hf_bluetooth_scan_type_t::HF_BLUETOOTH_SCAN_TYPE_ACTIVE) noexcept=0 |
| | Start device discovery/scanning.
|
| |
| virtual hf_bluetooth_err_t | StopScan () noexcept=0 |
| | Stop device discovery/scanning.
|
| |
| virtual bool | IsScanning () const noexcept=0 |
| | Check if scanning is in progress.
|
| |
| virtual hf_bluetooth_err_t | GetDiscoveredDevices (std::vector< hf_bluetooth_device_info_t > &devices) noexcept=0 |
| | Get discovered devices.
|
| |
| virtual hf_bluetooth_err_t | ClearDiscoveredDevices () noexcept=0 |
| | Clear discovered devices list.
|
| |
| virtual hf_bluetooth_err_t | Connect (const hf_bluetooth_address_t &address, uint32_t timeout_ms=0) noexcept=0 |
| | Connect to a remote device.
|
| |
| virtual hf_bluetooth_err_t | Disconnect (const hf_bluetooth_address_t &address) noexcept=0 |
| | Disconnect from a remote device.
|
| |
| virtual bool | IsConnected (const hf_bluetooth_address_t &address) const noexcept=0 |
| | Check if connected to a device.
|
| |
| virtual hf_bluetooth_err_t | GetConnectedDevices (std::vector< hf_bluetooth_device_info_t > &devices) noexcept=0 |
| | Get list of connected devices.
|
| |
| virtual hf_bluetooth_err_t | Pair (const hf_bluetooth_address_t &address, const std::string &pin="") noexcept=0 |
| | Pair with a remote device.
|
| |
| virtual hf_bluetooth_err_t | Unpair (const hf_bluetooth_address_t &address) noexcept=0 |
| | Unpair from a remote device.
|
| |
| virtual bool | IsPaired (const hf_bluetooth_address_t &address) const noexcept=0 |
| | Check if paired with a device.
|
| |
| virtual hf_bluetooth_err_t | GetPairedDevices (std::vector< hf_bluetooth_device_info_t > &devices) noexcept=0 |
| | Get list of paired devices.
|
| |
| virtual hf_bluetooth_err_t | SendData (const hf_bluetooth_address_t &address, const std::vector< uint8_t > &data) noexcept=0 |
| | Send data to a connected device.
|
| |
| virtual int | GetAvailableData (const hf_bluetooth_address_t &address) const noexcept=0 |
| | Check if data is available to read.
|
| |
| virtual hf_bluetooth_err_t | ReadData (const hf_bluetooth_address_t &address, std::vector< uint8_t > &data, size_t max_bytes=0) noexcept=0 |
| | Read available data from a connected device.
|
| |
| virtual hf_bluetooth_err_t | DiscoverServices (const hf_bluetooth_address_t &address, std::vector< hf_bluetooth_gatt_service_t > &services) noexcept=0 |
| | Discover GATT services on a connected device.
|
| |
| virtual hf_bluetooth_err_t | DiscoverCharacteristics (const hf_bluetooth_address_t &address, const std::string &service_uuid, std::vector< hf_bluetooth_gatt_characteristic_t > &characteristics) noexcept=0 |
| | Discover GATT characteristics for a service.
|
| |
| virtual hf_bluetooth_err_t | ReadCharacteristic (const hf_bluetooth_address_t &address, const std::string &service_uuid, const std::string &characteristic_uuid, std::vector< uint8_t > &value) noexcept=0 |
| | Read GATT characteristic value.
|
| |
| virtual hf_bluetooth_err_t | WriteCharacteristic (const hf_bluetooth_address_t &address, const std::string &service_uuid, const std::string &characteristic_uuid, const std::vector< uint8_t > &value, bool with_response=true) noexcept=0 |
| | Write GATT characteristic value.
|
| |
| virtual hf_bluetooth_err_t | SubscribeCharacteristic (const hf_bluetooth_address_t &address, const std::string &service_uuid, const std::string &characteristic_uuid, bool enable) noexcept=0 |
| | Subscribe to GATT characteristic notifications.
|
| |
| virtual hf_bluetooth_state_t | GetState () const noexcept=0 |
| | Get current Bluetooth state.
|
| |
| virtual int8_t | GetRssi (const hf_bluetooth_address_t &address) const noexcept=0 |
| | Get signal strength for a connected device.
|
| |
| virtual hf_bluetooth_err_t | RegisterEventCallback (hf_bluetooth_event_callback_t callback) noexcept=0 |
| | Register event callback.
|
| |
| virtual hf_bluetooth_err_t | UnregisterEventCallback () noexcept=0 |
| | Unregister event callback.
|
| |
| virtual hf_bluetooth_err_t | RegisterDataCallback (hf_bluetooth_data_callback_t callback) noexcept=0 |
| | Register data received callback.
|
| |
| virtual hf_bluetooth_err_t | UnregisterDataCallback () noexcept=0 |
| | Unregister data received callback.
|
| |
Abstract base class for Bluetooth functionality.
This class provides the interface for Bluetooth operations including:
- Bluetooth Classic and BLE operations
- Device discovery and scanning
- Pairing and bonding management
- Connection management
- Data transmission and reception
- GATT operations (for BLE)
- Event handling and callbacks