BluezQt 5.109.0
|
Bluetooth adapter. More...
#include <BluezQt/Adapter>
Signals | |
void | adapterChanged (AdapterPtr adapter) |
Indicates that at least one of the adapter's properties have changed. | |
void | adapterClassChanged (quint32 adapterClass) |
Indicates that adapter's class have changed. | |
void | adapterRemoved (AdapterPtr adapter) |
Indicates that the adapter was removed. | |
void | deviceAdded (DevicePtr device) |
Indicates that a new device was added (eg. | |
void | deviceChanged (DevicePtr device) |
Indicates that at least one of the device's properties have changed. | |
void | deviceRemoved (DevicePtr device) |
Indicates that a device was removed. | |
void | discoverableChanged (bool discoverable) |
Indicates that adapter's discoverable state have changed. | |
void | discoverableTimeoutChanged (quint32 timeout) |
Indicates that adapter's discoverable timeout have changed. | |
void | discoveringChanged (bool discovering) |
Indicates that adapter's discovering state have changed. | |
void | gattManagerChanged (GattManagerPtr gattManager) |
Indicates that adapter's GATT manager have changed. | |
void | leAdvertisingManagerChanged (LEAdvertisingManagerPtr leAdvertisingManager) |
Indicates that adapter's LE advertising manager have changed. | |
void | mediaChanged (MediaPtr media) |
Indicates that adapter's media have changed. | |
void | modaliasChanged (const QString &modalias) |
Indicates that adapter's modalias have changed. | |
void | nameChanged (const QString &name) |
Indicates that adapter's name have changed. | |
void | pairableChanged (bool pairable) |
Indicates that adapter's pairable state have changed. | |
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 | systemNameChanged (const QString &systemName) |
Indicates that adapter's system name have changed. | |
void | uuidsChanged (const QStringList &uuids) |
Indicates that adapter's UUIDs have changed. | |
Public Member Functions | |
~Adapter () override | |
Destroys an Adapter object. | |
quint32 | adapterClass () const |
Returns a class of the adapter. | |
QString | address () const |
Returns an address of the adapter. | |
DevicePtr | deviceForAddress (const QString &address) const |
Returns a device for specified address. | |
QList< DevicePtr > | devices () const |
Returns list of devices known by the adapter. | |
quint32 | discoverableTimeout () const |
Returns the discoverable timeout in seconds of the adapter. | |
GattManagerPtr | gattManager () const |
Returns the GATT manager interface for the adapter. | |
PendingCall * | getDiscoveryFilters () |
Get the discovery filters for the caller. | |
bool | isDiscoverable () const |
Returns whether the adapter is discoverable by other devices. | |
bool | isDiscovering () |
Returns whether the adapter is discovering for other devices. | |
bool | isPairable () const |
Returns whether the adapter is pairable with other devices. | |
bool | isPowered () const |
Returns whether the adapter is powered on. | |
LEAdvertisingManagerPtr | leAdvertisingManager () const |
Returns the LE advertising manager interface for the adapter. | |
MediaPtr | media () const |
Returns the media interface for the adapter. | |
QString | modalias () const |
Returns local device ID in modalias format. | |
QString | name () const |
Returns a name of the adapter. | |
quint32 | pairableTimeout () const |
Returns the pairable timeout in seconds of the adapter. | |
PendingCall * | removeDevice (DevicePtr device) |
Removes the specified device. | |
PendingCall * | setDiscoverable (bool discoverable) |
Sets the discoverable state of the adapter. | |
PendingCall * | setDiscoverableTimeout (quint32 timeout) |
Sets the discoverable timeout of the adapter. | |
PendingCall * | setDiscoveryFilter (const QVariantMap &filter) |
Set the discovery filter for the caller. | |
PendingCall * | setName (const QString &name) |
Sets the name of the adapter. | |
PendingCall * | setPairable (bool pairable) |
Sets the pairable state of the adapter. | |
PendingCall * | setPairableTimeout (quint32 timeout) |
Sets the pairable timeout of the adapter. | |
PendingCall * | setPowered (bool powered) |
Sets the powered state of the adapter. | |
PendingCall * | startDiscovery () |
Starts device discovery. | |
PendingCall * | stopDiscovery () |
Stops device discovery. | |
QString | systemName () const |
Returns a system name (hostname) of the adapter. | |
AdapterPtr | toSharedPtr () const |
Returns a shared pointer from this. | |
QString | ubi () const |
Returns an UBI of the adapter. | |
QStringList | uuids () const |
Returns UUIDs of supported services by the adapter. | |
Bluetooth adapter.
This class represents a Bluetooth adapter.
|
override |
Destroys an Adapter object.
|
signal |
Indicates that at least one of the adapter's properties have changed.
quint32 BluezQt::Adapter::adapterClass | ( | ) | const |
Returns a class of the adapter.
|
signal |
Indicates that adapter's class have changed.
|
signal |
Indicates that the adapter was removed.
QString BluezQt::Adapter::address | ( | ) | const |
Returns an address of the adapter.
Example address: "1C:E5:C3:BC:94:7E"
|
signal |
Indicates that a new device was added (eg.
found by discovery).
|
signal |
Indicates that at least one of the device's properties have changed.
DevicePtr BluezQt::Adapter::deviceForAddress | ( | const QString & | address | ) | const |
Returns a device for specified address.
address | address of device (eg. "40:79:6A:0C:39:75") |
|
signal |
Indicates that a device was removed.
QList< DevicePtr > BluezQt::Adapter::devices | ( | ) | const |
Returns list of devices known by the adapter.
|
signal |
Indicates that adapter's discoverable state have changed.
quint32 BluezQt::Adapter::discoverableTimeout | ( | ) | const |
Returns the discoverable timeout in seconds of the adapter.
Discoverable timeout defines how long the adapter stays in discoverable state after calling setDiscoverable(true).
Timeout 0 means infinitely.
|
signal |
Indicates that adapter's discoverable timeout have changed.
|
signal |
Indicates that adapter's discovering state have changed.
GattManagerPtr BluezQt::Adapter::gattManager | ( | ) | const |
Returns the GATT manager interface for the adapter.
|
signal |
Indicates that adapter's GATT manager have changed.
PendingCall * BluezQt::Adapter::getDiscoveryFilters | ( | ) |
Get the discovery filters for the caller.
This returns the available filters that can be given to setDiscoveryFilter, for details see Bluez documentation for Adapter object
Possible errors: PendingCall::Failed
bool BluezQt::Adapter::isDiscoverable | ( | ) | const |
Returns whether the adapter is discoverable by other devices.
bool BluezQt::Adapter::isDiscovering | ( | ) |
Returns whether the adapter is discovering for other devices.
bool BluezQt::Adapter::isPairable | ( | ) | const |
Returns whether the adapter is pairable with other devices.
bool BluezQt::Adapter::isPowered | ( | ) | const |
Returns whether the adapter is powered on.
LEAdvertisingManagerPtr BluezQt::Adapter::leAdvertisingManager | ( | ) | const |
Returns the LE advertising manager interface for the adapter.
|
signal |
Indicates that adapter's LE advertising manager have changed.
MediaPtr BluezQt::Adapter::media | ( | ) | const |
Returns the media interface for the adapter.
|
signal |
Indicates that adapter's media have changed.
QString BluezQt::Adapter::modalias | ( | ) | const |
Returns local device ID in modalias format.
|
signal |
Indicates that adapter's modalias have changed.
QString BluezQt::Adapter::name | ( | ) | const |
Returns a name of the adapter.
|
signal |
Indicates that adapter's name have changed.
|
signal |
Indicates that adapter's pairable state have changed.
quint32 BluezQt::Adapter::pairableTimeout | ( | ) | const |
Returns the pairable timeout in seconds of the adapter.
Pairable timeout defines how long the adapter stays in pairable state after calling setPairable(true).
Timeout 0 means infinitely.
|
signal |
Indicates that adapter's pairable timeout have changed.
|
signal |
Indicates that adapter's powered state have changed.
PendingCall * BluezQt::Adapter::removeDevice | ( | DevicePtr | device | ) |
Removes the specified device.
It will also remove the pairing information.
Possible errors: PendingCall::InvalidArguments, PendingCall::Failed
device | device to be removed |
PendingCall * BluezQt::Adapter::setDiscoverable | ( | bool | discoverable | ) |
Sets the discoverable state of the adapter.
discoverable | discoverable state |
PendingCall * BluezQt::Adapter::setDiscoverableTimeout | ( | quint32 | timeout | ) |
Sets the discoverable timeout of the adapter.
timeout | timeout in seconds |
PendingCall * BluezQt::Adapter::setDiscoveryFilter | ( | const QVariantMap & | filter | ) |
Set the discovery filter for the caller.
When this method is called with no filter parameter, the filter is removed.
For details and available filter options, see Bluez documentation for Adapter object
Possible errors: PendingCall::InvalidArguments, PendingCall::Failed
filter | options dictionary |
PendingCall * BluezQt::Adapter::setName | ( | const QString & | name | ) |
Sets the name of the adapter.
name | name of adapter |
PendingCall * BluezQt::Adapter::setPairable | ( | bool | pairable | ) |
Sets the pairable state of the adapter.
pairable | pairable state |
PendingCall * BluezQt::Adapter::setPairableTimeout | ( | quint32 | timeout | ) |
Sets the pairable timeout of the adapter.
timeout | timeout in seconds |
PendingCall * BluezQt::Adapter::setPowered | ( | bool | powered | ) |
Sets the powered state of the adapter.
powered | powered state |
PendingCall * BluezQt::Adapter::startDiscovery | ( | ) |
Starts device discovery.
Possible errors: PendingCall::NotReady, PendingCall::Failed
PendingCall * BluezQt::Adapter::stopDiscovery | ( | ) |
Stops device discovery.
Possible errors: PendingCall::NotReady, PendingCall::Failed, PendingCall::NotAuthorized
QString BluezQt::Adapter::systemName | ( | ) | const |
Returns a system name (hostname) of the adapter.
|
signal |
Indicates that adapter's system name have changed.
AdapterPtr BluezQt::Adapter::toSharedPtr | ( | ) | const |
Returns a shared pointer from this.
QString BluezQt::Adapter::ubi | ( | ) | const |
Returns an UBI of the adapter.
Example UBI: "/org/bluez/hci0"
QStringList BluezQt::Adapter::uuids | ( | ) | const |
Returns UUIDs of supported services by the adapter.
UUIDs will always be returned in uppercase.
|
signal |
Indicates that adapter's UUIDs have changed.