9#ifndef BLUEZQT_ADAPTER_H
10#define BLUEZQT_ADAPTER_H
16#include "bluezqt_export.h"
18#include "leadvertisingmanager.h"
32class BLUEZQT_EXPORT
Adapter :
public QObject
36 Q_PROPERTY(QString ubi READ ubi)
37 Q_PROPERTY(QString address READ address)
38 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
39 Q_PROPERTY(QString systemName READ systemName NOTIFY systemNameChanged)
40 Q_PROPERTY(quint32 adapterClass READ adapterClass NOTIFY adapterClassChanged)
41 Q_PROPERTY(
bool powered READ isPowered WRITE setPowered NOTIFY poweredChanged)
42 Q_PROPERTY(
bool discoverable READ isDiscoverable WRITE setDiscoverable NOTIFY discoverableChanged)
43 Q_PROPERTY(quint32 discoverableTimeout READ discoverableTimeout WRITE setDiscoverableTimeout NOTIFY discoverableTimeoutChanged)
44 Q_PROPERTY(
bool pairable READ isPairable WRITE setPairable NOTIFY pairableChanged)
45 Q_PROPERTY(quint32 pairableTimeout READ pairableTimeout WRITE setPairableTimeout NOTIFY pairableTimeoutChanged)
46 Q_PROPERTY(
bool discovering READ isDiscovering NOTIFY discoveringChanged)
47 Q_PROPERTY(QStringList uuids READ uuids NOTIFY uuidsChanged)
48 Q_PROPERTY(QString modalias READ modalias NOTIFY modaliasChanged)
49 Q_PROPERTY(LEAdvertisingManagerPtr leAdvertisingManager READ leAdvertisingManager NOTIFY leAdvertisingManagerChanged)
50 Q_PROPERTY(MediaPtr media READ media NOTIFY mediaChanged)
51 Q_PROPERTY(QList<DevicePtr> devices READ devices)
410 BLUEZQT_NO_EXPORT
explicit Adapter(
const QString &path,
const QVariantMap &properties);
412 class AdapterPrivate *
const d;
414 friend class AdapterPrivate;
415 friend class ManagerPrivate;
416 friend class InitAdaptersJobPrivate;
Bluetooth adapter.
Definition adapter.h:33
~Adapter() override
Destroys an Adapter object.
void deviceChanged(DevicePtr device)
Indicates that at least one of the device's properties have changed.
void adapterChanged(AdapterPtr adapter)
Indicates that at least one of the adapter's properties have changed.
void systemNameChanged(const QString &systemName)
Indicates that adapter's system name have changed.
PendingCall * getDiscoveryFilters()
Get the discovery filters for the caller.
bool isPairable() const
Returns whether the adapter is pairable with other devices.
void nameChanged(const QString &name)
Indicates that adapter's name have changed.
PendingCall * setPowered(bool powered)
Sets the powered state of the adapter.
void deviceRemoved(DevicePtr device)
Indicates that a device was removed.
quint32 discoverableTimeout() const
Returns the discoverable timeout in seconds of the adapter.
void mediaChanged(MediaPtr media)
Indicates that adapter's media have changed.
PendingCall * startDiscovery()
Starts device discovery.
void uuidsChanged(const QStringList &uuids)
Indicates that adapter's UUIDs have changed.
PendingCall * setPairable(bool pairable)
Sets the pairable state of the adapter.
QString systemName() const
Returns a system name (hostname) of the adapter.
MediaPtr media() const
Returns the media interface for the adapter.
void discoveringChanged(bool discovering)
Indicates that adapter's discovering state have changed.
void adapterClassChanged(quint32 adapterClass)
Indicates that adapter's class have changed.
QList< DevicePtr > devices() const
Returns list of devices known by the adapter.
QString name() const
Returns a name of the adapter.
AdapterPtr toSharedPtr() const
Returns a shared pointer from this.
void gattManagerChanged(GattManagerPtr gattManager)
Indicates that adapter's GATT manager have changed.
LEAdvertisingManagerPtr leAdvertisingManager() const
Returns the LE advertising manager interface for the adapter.
quint32 adapterClass() const
Returns a class of the adapter.
DevicePtr deviceForAddress(const QString &address) const
Returns a device for specified address.
quint32 pairableTimeout() const
Returns the pairable timeout in seconds of the adapter.
bool isDiscoverable() const
Returns whether the adapter is discoverable by other devices.
QString address() const
Returns an address of the adapter.
void pairableTimeoutChanged(quint32 timeout)
Indicates that adapter's pairable timeout have changed.
void poweredChanged(bool powered)
Indicates that adapter's powered state have changed.
void discoverableTimeoutChanged(quint32 timeout)
Indicates that adapter's discoverable timeout have changed.
void pairableChanged(bool pairable)
Indicates that adapter's pairable state have changed.
QString modalias() const
Returns local device ID in modalias format.
PendingCall * removeDevice(DevicePtr device)
Removes the specified device.
PendingCall * setDiscoveryFilter(const QVariantMap &filter)
Set the discovery filter for the caller.
void leAdvertisingManagerChanged(LEAdvertisingManagerPtr leAdvertisingManager)
Indicates that adapter's LE advertising manager have changed.
void deviceAdded(DevicePtr device)
Indicates that a new device was added (eg.
bool isPowered() const
Returns whether the adapter is powered on.
QString ubi() const
Returns an UBI of the adapter.
void adapterRemoved(AdapterPtr adapter)
Indicates that the adapter was removed.
GattManagerPtr gattManager() const
Returns the GATT manager interface for the adapter.
PendingCall * setDiscoverable(bool discoverable)
Sets the discoverable state of the adapter.
bool isDiscovering()
Returns whether the adapter is discovering for other devices.
PendingCall * setName(const QString &name)
Sets the name of the adapter.
PendingCall * stopDiscovery()
Stops device discovery.
void modaliasChanged(const QString &modalias)
Indicates that adapter's modalias have changed.
PendingCall * setDiscoverableTimeout(quint32 timeout)
Sets the discoverable timeout of the adapter.
PendingCall * setPairableTimeout(quint32 timeout)
Sets the pairable timeout of the adapter.
QStringList uuids() const
Returns UUIDs of supported services by the adapter.
void discoverableChanged(bool discoverable)
Indicates that adapter's discoverable state have changed.
Pending method call.
Definition pendingcall.h:33