BluezQt::Adapter

Search for usage in LXR

BluezQt::Adapter Class Reference

#include <BluezQt/Adapter>

Inheritance diagram for BluezQt::Adapter:

Properties

quint32 adapterClass
 
QString address
 
QList< DevicePtrdevices
 
bool discoverable
 
quint32 discoverableTimeout
 
bool discovering
 
LEAdvertisingManagerPtr leAdvertisingManager
 
MediaPtr media
 
QString modalias
 
QString name
 
bool pairable
 
quint32 pairableTimeout
 
bool powered
 
QString systemName
 
QString ubi
 
QStringList uuids
 
- Properties inherited from QObject
 objectName
 

Signals

void adapterChanged (AdapterPtr adapter)
 
void adapterClassChanged (quint32 adapterClass)
 
void adapterRemoved (AdapterPtr adapter)
 
void deviceAdded (DevicePtr device)
 
void deviceChanged (DevicePtr device)
 
void deviceRemoved (DevicePtr device)
 
void discoverableChanged (bool discoverable)
 
void discoverableTimeoutChanged (quint32 timeout)
 
void discoveringChanged (bool discovering)
 
void gattManagerChanged (GattManagerPtr gattManager)
 
void leAdvertisingManagerChanged (LEAdvertisingManagerPtr leAdvertisingManager)
 
void mediaChanged (MediaPtr media)
 
void modaliasChanged (const QString &modalias)
 
void nameChanged (const QString &name)
 
void pairableChanged (bool pairable)
 
void pairableTimeoutChanged (quint32 timeout)
 
void poweredChanged (bool powered)
 
void systemNameChanged (const QString &systemName)
 
void uuidsChanged (const QStringList &uuids)
 

Public Member Functions

 ~Adapter () override
 
quint32 adapterClass () const
 
QString address () const
 
DevicePtr deviceForAddress (const QString &address) const
 
QList< DevicePtrdevices () const
 
quint32 discoverableTimeout () const
 
GattManagerPtr gattManager () const
 
PendingCallgetDiscoveryFilters ()
 
bool isDiscoverable () const
 
bool isDiscovering ()
 
bool isPairable () const
 
bool isPowered () const
 
LEAdvertisingManagerPtr leAdvertisingManager () const
 
MediaPtr media () const
 
QString modalias () const
 
QString name () const
 
quint32 pairableTimeout () const
 
PendingCallremoveDevice (DevicePtr device)
 
PendingCallsetDiscoverable (bool discoverable)
 
PendingCallsetDiscoverableTimeout (quint32 timeout)
 
PendingCallsetDiscoveryFilter (const QVariantMap &filter)
 
PendingCallsetName (const QString &name)
 
PendingCallsetPairable (bool pairable)
 
PendingCallsetPairableTimeout (quint32 timeout)
 
PendingCallsetPowered (bool powered)
 
PendingCallstartDiscovery ()
 
PendingCallstopDiscovery ()
 
QString systemName () const
 
AdapterPtr toSharedPtr () const
 
QString ubi () const
 
QStringList uuids () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Bluetooth adapter.

This class represents a Bluetooth adapter.

Definition at line 33 of file adapter.h.

Property Documentation

◆ adapterClass

quint32 BluezQt::Adapter::adapterClass
read

Definition at line 41 of file adapter.h.

◆ address

QString BluezQt::Adapter::address
read

Definition at line 38 of file adapter.h.

◆ devices

QList<DevicePtr> BluezQt::Adapter::devices
read

Definition at line 52 of file adapter.h.

◆ discoverable

bool BluezQt::Adapter::discoverable
readwrite

Definition at line 43 of file adapter.h.

◆ discoverableTimeout

quint32 BluezQt::Adapter::discoverableTimeout
readwrite

Definition at line 44 of file adapter.h.

◆ discovering

bool BluezQt::Adapter::discovering
read

Definition at line 47 of file adapter.h.

◆ leAdvertisingManager

LEAdvertisingManagerPtr BluezQt::Adapter::leAdvertisingManager
read

Definition at line 50 of file adapter.h.

◆ media

MediaPtr BluezQt::Adapter::media
read

Definition at line 51 of file adapter.h.

◆ modalias

QString BluezQt::Adapter::modalias
read

Definition at line 49 of file adapter.h.

◆ name

QString BluezQt::Adapter::name
readwrite

Definition at line 39 of file adapter.h.

◆ pairable

bool BluezQt::Adapter::pairable
readwrite

Definition at line 45 of file adapter.h.

◆ pairableTimeout

quint32 BluezQt::Adapter::pairableTimeout
readwrite

Definition at line 46 of file adapter.h.

◆ powered

bool BluezQt::Adapter::powered
readwrite

Definition at line 42 of file adapter.h.

◆ systemName

QString BluezQt::Adapter::systemName
read

Definition at line 40 of file adapter.h.

◆ ubi

QString BluezQt::Adapter::ubi
read

Definition at line 37 of file adapter.h.

◆ uuids

QStringList BluezQt::Adapter::uuids
read

Definition at line 48 of file adapter.h.

Constructor & Destructor Documentation

◆ ~Adapter()

BluezQt::Adapter::~Adapter ( )
overridedefault

Destroys an Adapter object.

Member Function Documentation

◆ adapterChanged

void BluezQt::Adapter::adapterChanged ( AdapterPtr adapter)
signal

Indicates that at least one of the adapter's properties have changed.

◆ adapterClass()

quint32 BluezQt::Adapter::adapterClass ( ) const

Returns a class of the adapter.

Returns
class of adapter

Definition at line 55 of file adapter.cpp.

◆ adapterClassChanged

void BluezQt::Adapter::adapterClassChanged ( quint32 adapterClass)
signal

Indicates that adapter's class have changed.

◆ adapterRemoved

void BluezQt::Adapter::adapterRemoved ( AdapterPtr adapter)
signal

Indicates that the adapter was removed.

◆ address()

QString BluezQt::Adapter::address ( ) const

Returns an address of the adapter.

Example address: "1C:E5:C3:BC:94:7E"

Returns
address of adapter

Definition at line 35 of file adapter.cpp.

◆ deviceAdded

void BluezQt::Adapter::deviceAdded ( DevicePtr device)
signal

Indicates that a new device was added (eg.

found by discovery).

◆ deviceChanged

void BluezQt::Adapter::deviceChanged ( DevicePtr device)
signal

Indicates that at least one of the device's properties have changed.

◆ deviceForAddress()

DevicePtr BluezQt::Adapter::deviceForAddress ( const QString & address) const

Returns a device for specified address.

Parameters
addressaddress of device (eg. "40:79:6A:0C:39:75")
Returns
null if there is no device with specified address

Definition at line 145 of file adapter.cpp.

◆ deviceRemoved

void BluezQt::Adapter::deviceRemoved ( DevicePtr device)
signal

Indicates that a device was removed.

◆ devices()

QList< DevicePtr > BluezQt::Adapter::devices ( ) const

Returns list of devices known by the adapter.

Returns
list of devices

Definition at line 140 of file adapter.cpp.

◆ discoverableChanged

void BluezQt::Adapter::discoverableChanged ( bool discoverable)
signal

Indicates that adapter's discoverable state have changed.

◆ discoverableTimeout()

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.

Returns
discoverable timeout of adapter

Definition at line 80 of file adapter.cpp.

◆ discoverableTimeoutChanged

void BluezQt::Adapter::discoverableTimeoutChanged ( quint32 timeout)
signal

Indicates that adapter's discoverable timeout have changed.

◆ discoveringChanged

void BluezQt::Adapter::discoveringChanged ( bool discovering)
signal

Indicates that adapter's discovering state have changed.

◆ gattManager()

GattManagerPtr BluezQt::Adapter::gattManager ( ) const

Returns the GATT manager interface for the adapter.

Returns
null if adapter have no GATT manager

Definition at line 125 of file adapter.cpp.

◆ gattManagerChanged

void BluezQt::Adapter::gattManagerChanged ( GattManagerPtr gattManager)
signal

Indicates that adapter's GATT manager have changed.

◆ getDiscoveryFilters()

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

Returns
string list pending call

Definition at line 175 of file adapter.cpp.

◆ isDiscoverable()

bool BluezQt::Adapter::isDiscoverable ( ) const

Returns whether the adapter is discoverable by other devices.

Returns
true if adapter is discoverable

Definition at line 70 of file adapter.cpp.

◆ isDiscovering()

bool BluezQt::Adapter::isDiscovering ( )

Returns whether the adapter is discovering for other devices.

Returns
true if adapter is discovering

Definition at line 110 of file adapter.cpp.

◆ isPairable()

bool BluezQt::Adapter::isPairable ( ) const

Returns whether the adapter is pairable with other devices.

Returns
true if adapter is pairable

Definition at line 90 of file adapter.cpp.

◆ isPowered()

bool BluezQt::Adapter::isPowered ( ) const

Returns whether the adapter is powered on.

Returns
true if adapter is powered on

Definition at line 60 of file adapter.cpp.

◆ leAdvertisingManager()

LEAdvertisingManagerPtr BluezQt::Adapter::leAdvertisingManager ( ) const

Returns the LE advertising manager interface for the adapter.

Returns
null if adapter have no Bluetooth LE

Definition at line 130 of file adapter.cpp.

◆ leAdvertisingManagerChanged

void BluezQt::Adapter::leAdvertisingManagerChanged ( LEAdvertisingManagerPtr leAdvertisingManager)
signal

Indicates that adapter's LE advertising manager have changed.

◆ media()

MediaPtr BluezQt::Adapter::media ( ) const

Returns the media interface for the adapter.

Returns
null if adapter have no media

Definition at line 135 of file adapter.cpp.

◆ mediaChanged

void BluezQt::Adapter::mediaChanged ( MediaPtr media)
signal

Indicates that adapter's media have changed.

◆ modalias()

QString BluezQt::Adapter::modalias ( ) const

Returns local device ID in modalias format.

Returns
adapter modalias

Definition at line 120 of file adapter.cpp.

◆ modaliasChanged

void BluezQt::Adapter::modaliasChanged ( const QString & modalias)
signal

Indicates that adapter's modalias have changed.

◆ name()

QString BluezQt::Adapter::name ( ) const

Returns a name of the adapter.

Returns
name of adapter

Definition at line 40 of file adapter.cpp.

◆ nameChanged

void BluezQt::Adapter::nameChanged ( const QString & name)
signal

Indicates that adapter's name have changed.

◆ pairableChanged

void BluezQt::Adapter::pairableChanged ( bool pairable)
signal

Indicates that adapter's pairable state have changed.

◆ pairableTimeout()

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.

Returns
pairable timeout of adapter

Definition at line 100 of file adapter.cpp.

◆ pairableTimeoutChanged

void BluezQt::Adapter::pairableTimeoutChanged ( quint32 timeout)
signal

Indicates that adapter's pairable timeout have changed.

◆ poweredChanged

void BluezQt::Adapter::poweredChanged ( bool powered)
signal

Indicates that adapter's powered state have changed.

◆ removeDevice()

PendingCall * BluezQt::Adapter::removeDevice ( DevicePtr device)

Removes the specified device.

It will also remove the pairing information.

Possible errors: PendingCall::InvalidArguments, PendingCall::Failed

Parameters
devicedevice to be removed
Returns
void pending call

Definition at line 165 of file adapter.cpp.

◆ setDiscoverable()

PendingCall * BluezQt::Adapter::setDiscoverable ( bool discoverable)

Sets the discoverable state of the adapter.

Parameters
discoverablediscoverable state
Returns
void pending call

Definition at line 75 of file adapter.cpp.

◆ setDiscoverableTimeout()

PendingCall * BluezQt::Adapter::setDiscoverableTimeout ( quint32 timeout)

Sets the discoverable timeout of the adapter.

Parameters
timeouttimeout in seconds
Returns
void pending call

Definition at line 85 of file adapter.cpp.

◆ setDiscoveryFilter()

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

Parameters
filteroptions dictionary
Returns
void pending call

Definition at line 170 of file adapter.cpp.

◆ setName()

PendingCall * BluezQt::Adapter::setName ( const QString & name)

Sets the name of the adapter.

Parameters
namename of adapter
Returns
void pending call

Definition at line 45 of file adapter.cpp.

◆ setPairable()

PendingCall * BluezQt::Adapter::setPairable ( bool pairable)

Sets the pairable state of the adapter.

Parameters
pairablepairable state
Returns
void pending call

Definition at line 95 of file adapter.cpp.

◆ setPairableTimeout()

PendingCall * BluezQt::Adapter::setPairableTimeout ( quint32 timeout)

Sets the pairable timeout of the adapter.

Parameters
timeouttimeout in seconds
Returns
void pending call

Definition at line 105 of file adapter.cpp.

◆ setPowered()

PendingCall * BluezQt::Adapter::setPowered ( bool powered)

Sets the powered state of the adapter.

Parameters
poweredpowered state
Returns
void pending call

Definition at line 65 of file adapter.cpp.

◆ startDiscovery()

PendingCall * BluezQt::Adapter::startDiscovery ( )

Starts device discovery.

Possible errors: PendingCall::NotReady, PendingCall::Failed

Returns
void pending call
See also
discoverableTimeout() const

Definition at line 155 of file adapter.cpp.

◆ stopDiscovery()

PendingCall * BluezQt::Adapter::stopDiscovery ( )

Stops device discovery.

Possible errors: PendingCall::NotReady, PendingCall::Failed, PendingCall::NotAuthorized

Returns
void pending call

Definition at line 160 of file adapter.cpp.

◆ systemName()

QString BluezQt::Adapter::systemName ( ) const

Returns a system name (hostname) of the adapter.

Returns
system name of adapter

Definition at line 50 of file adapter.cpp.

◆ systemNameChanged

void BluezQt::Adapter::systemNameChanged ( const QString & systemName)
signal

Indicates that adapter's system name have changed.

◆ toSharedPtr()

AdapterPtr BluezQt::Adapter::toSharedPtr ( ) const

Returns a shared pointer from this.

Returns
AdapterPtr

Definition at line 25 of file adapter.cpp.

◆ ubi()

QString BluezQt::Adapter::ubi ( ) const

Returns an UBI of the adapter.

Example UBI: "/org/bluez/hci0"

Returns
UBI of adapter

Definition at line 30 of file adapter.cpp.

◆ uuids()

QStringList BluezQt::Adapter::uuids ( ) const

Returns UUIDs of supported services by the adapter.

UUIDs will always be returned in uppercase.

Returns
UUIDs of supported services

Definition at line 115 of file adapter.cpp.

◆ uuidsChanged

void BluezQt::Adapter::uuidsChanged ( const QStringList & uuids)
signal

Indicates that adapter's UUIDs have changed.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:58:39 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.