Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorServiceBluetooth::BluetoothAdapter Class Reference

One BlueZ adapter (org.bluez.Adapter1), e.g. More...

#include <PhosphorServiceBluetooth/BluetoothAdapter.h>

Inheritance diagram for PhosphorServiceBluetooth::BluetoothAdapter:
[legend]

Signals

void operationFinished (const QString &operation, const QString &errorName)
 Completion of a write request; state follows BlueZ properties.
void addressChanged ()
void nameChanged ()
void aliasChanged ()
void poweredChanged ()
void discoverableChanged ()
void pairableChanged ()
void discoveringChanged ()

Public Member Functions

 BluetoothAdapter (QDBusConnection connection, const QString &dbusPath, const QVariantMap &initialProperties, QObject *parent=nullptr)
 ~BluetoothAdapter () override
QString dbusPath () const
QString address () const
QString name () const
QString alias () const
bool powered () const
bool discoverable () const
bool pairable () const
bool discovering () const
void setPowered (bool powered)
 Power the adapter on/off (org.bluez.Adapter1.Powered).
void setDiscoverable (bool discoverable)
 Toggle inbound discoverability (org.bluez.Adapter1.Discoverable).
void startDiscovery ()
 Begin/end scanning for nearby devices (StartDiscovery / StopDiscovery).
void stopDiscovery ()
void removeDevice (const QString &devicePath)
 Forget a device under this adapter (org.bluez.Adapter1.RemoveDevice), dropping its pairing/cache.

Detailed Description

One BlueZ adapter (org.bluez.Adapter1), e.g.

/org/bluez/hci0.

Initial properties are supplied by BluetoothHost from the ObjectManager enumeration (no construction-time round-trip); subsequent changes arrive via PropertiesChanged. The power / discoverable / discovery write surface is exposed via setPowered / setDiscoverable / startDiscovery / stopDiscovery / removeDevice (fire-and-forget; cached state moves on the PropertiesChanged echo).

Owned by BluetoothHost; never constructed from QML.

Constructor & Destructor Documentation

◆ BluetoothAdapter()

PhosphorServiceBluetooth::BluetoothAdapter::BluetoothAdapter ( QDBusConnection connection,
const QString & dbusPath,
const QVariantMap & initialProperties,
QObject * parent = nullptr )

◆ ~BluetoothAdapter()

PhosphorServiceBluetooth::BluetoothAdapter::~BluetoothAdapter ( )
override

Member Function Documentation

◆ address()

QString PhosphorServiceBluetooth::BluetoothAdapter::address ( ) const
nodiscard

◆ addressChanged

void PhosphorServiceBluetooth::BluetoothAdapter::addressChanged ( )
signal

◆ alias()

QString PhosphorServiceBluetooth::BluetoothAdapter::alias ( ) const
nodiscard

◆ aliasChanged

void PhosphorServiceBluetooth::BluetoothAdapter::aliasChanged ( )
signal

◆ dbusPath()

QString PhosphorServiceBluetooth::BluetoothAdapter::dbusPath ( ) const
nodiscard

◆ discoverable()

bool PhosphorServiceBluetooth::BluetoothAdapter::discoverable ( ) const
nodiscard

◆ discoverableChanged

void PhosphorServiceBluetooth::BluetoothAdapter::discoverableChanged ( )
signal

◆ discovering()

bool PhosphorServiceBluetooth::BluetoothAdapter::discovering ( ) const
nodiscard

◆ discoveringChanged

void PhosphorServiceBluetooth::BluetoothAdapter::discoveringChanged ( )
signal

◆ name()

QString PhosphorServiceBluetooth::BluetoothAdapter::name ( ) const
nodiscard

◆ nameChanged

void PhosphorServiceBluetooth::BluetoothAdapter::nameChanged ( )
signal

◆ operationFinished

void PhosphorServiceBluetooth::BluetoothAdapter::operationFinished ( const QString & operation,
const QString & errorName )
signal

Completion of a write request; state follows BlueZ properties.

◆ pairable()

bool PhosphorServiceBluetooth::BluetoothAdapter::pairable ( ) const
nodiscard

◆ pairableChanged

void PhosphorServiceBluetooth::BluetoothAdapter::pairableChanged ( )
signal

◆ powered()

bool PhosphorServiceBluetooth::BluetoothAdapter::powered ( ) const
nodiscard

◆ poweredChanged

void PhosphorServiceBluetooth::BluetoothAdapter::poweredChanged ( )
signal

◆ removeDevice()

void PhosphorServiceBluetooth::BluetoothAdapter::removeDevice ( const QString & devicePath)

Forget a device under this adapter (org.bluez.Adapter1.RemoveDevice), dropping its pairing/cache.

Fire-and-forget; the device disappears from BluetoothHost via InterfacesRemoved.

◆ setDiscoverable()

void PhosphorServiceBluetooth::BluetoothAdapter::setDiscoverable ( bool discoverable)

Toggle inbound discoverability (org.bluez.Adapter1.Discoverable).

Fire-and-forget, same echo semantics as setPowered.

◆ setPowered()

void PhosphorServiceBluetooth::BluetoothAdapter::setPowered ( bool powered)

Power the adapter on/off (org.bluez.Adapter1.Powered).

Fire-and- forget: the cached powered updates when BlueZ echoes PropertiesChanged, never optimistically.

◆ startDiscovery()

void PhosphorServiceBluetooth::BluetoothAdapter::startDiscovery ( )

Begin/end scanning for nearby devices (StartDiscovery / StopDiscovery).

discovering reflects the live state via PropertiesChanged; new devices surface through BluetoothHost.

◆ stopDiscovery()

void PhosphorServiceBluetooth::BluetoothAdapter::stopDiscovery ( )

The documentation for this class was generated from the following file: