9#ifndef BLUEZQT_MANAGER_H
10#define BLUEZQT_MANAGER_H
15#include "bluezqt_export.h"
77class BLUEZQT_EXPORT
Manager :
public QObject
81 Q_PROPERTY(
bool initialized READ isInitialized)
82 Q_PROPERTY(
bool operational READ isOperational NOTIFY operationalChanged)
83 Q_PROPERTY(
bool bluetoothOperational READ isBluetoothOperational NOTIFY bluetoothOperationalChanged)
84 Q_PROPERTY(
bool bluetoothBlocked READ isBluetoothBlocked WRITE setBluetoothBlocked NOTIFY bluetoothBlockedChanged)
85 Q_PROPERTY(AdapterPtr usableAdapter READ usableAdapter NOTIFY usableAdapterChanged)
86 Q_PROPERTY(QList<AdapterPtr> adapters READ adapters)
87 Q_PROPERTY(QList<DevicePtr> devices READ devices)
88 Q_PROPERTY(Rfkill *rfkill READ rfkill CONSTANT)
96 explicit Manager(QObject *parent =
nullptr);
287#if BLUEZQT_ENABLE_DEPRECATED_SINCE(5, 57)
294 BLUEZQT_DEPRECATED_VERSION(5, 57,
"Use Adapter::media()")
295 MediaPtr media() const;
298 Rfkill *rfkill()
const;
357 class ManagerPrivate *
const d;
359 friend class ManagerPrivate;
360 friend class InitManagerJobPrivate;
Bluetooth agent.
Definition agent.h:37
Init manager job.
Definition initmanagerjob.h:27
Bluetooth manager.
Definition manager.h:78
PendingCall * unregisterAgent(Agent *agent)
Unregisters agent.
void deviceAdded(DevicePtr device)
Indicates that a new device was added (eg.
void adapterChanged(AdapterPtr adapter)
Indicates that at least one of the adapter's properties have changed.
bool setBluetoothBlocked(bool blocked)
Sets a Bluetooth blocked state.
QList< AdapterPtr > adapters() const
Returns a list of all adapters.
~Manager() override
Destroys a Manager object.
PendingCall * registerProfile(Profile *profile)
Registers profile.
AdapterPtr adapterForUbi(const QString &ubi) const
Returns an adapter for specified UBI.
void adapterRemoved(AdapterPtr adapter)
Indicates that adapter was removed.
DevicePtr deviceForAddress(const QString &address) const
Returns a device for specified address.
AdapterPtr usableAdapter() const
Returns a usable adapter.
void bluetoothOperationalChanged(bool operational)
Indicates that Bluetooth operational state have changed.
QList< DevicePtr > devices() const
Returns a list of all devices.
PendingCall * requestDefaultAgent(Agent *agent)
Requests default agent.
Manager(QObject *parent=nullptr)
Creates a new Manager object.
bool isBluetoothBlocked() const
Returns whether Bluetooth is blocked.
void operationalChanged(bool operational)
Indicates that operational state have changed.
InitManagerJob * init()
Creates a new init job.
void usableAdapterChanged(AdapterPtr adapter)
Indicates that usable adapter have changed.
DevicePtr deviceForUbi(const QString &ubi) const
Returns a device for specified UBI.
AdapterPtr adapterForAddress(const QString &address) const
Returns an adapter for specified address.
static PendingCall * startService()
Attempts to start org.bluez service by D-Bus activation.
bool isBluetoothOperational() const
Returns whether Bluetooth is operational.
PendingCall * unregisterProfile(Profile *profile)
Unregisters profile.
void bluetoothBlockedChanged(bool blocked)
Indicates that Bluetooth blocked state have changed.
void deviceChanged(DevicePtr device)
Indicates that at least one of the device's properties have changed.
PendingCall * registerAgent(Agent *agent)
Registers agent.
bool isInitialized() const
Returns whether the manager is initialized.
void deviceRemoved(DevicePtr device)
Indicates that a device was removed.
void adapterAdded(AdapterPtr adapter)
Indicates that adapter was added.
void allAdaptersRemoved()
Indicates that all adapters were removed.
bool isOperational() const
Returns whether the manager is operational.
Pending method call.
Definition pendingcall.h:33
Bluetooth profile.
Definition profile.h:47