15#include <QBluetoothUuid>
90 qCDebug(d->lc).noquote() <<
tr(
"Scanning for Bluetooth Low Energy devices.");
100 qCDebug(d->lc).noquote() <<
tr(
"Scanning for Bluetooth Low Energy devices.");
138 #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
144 #
if (QT_VERSION < QT_VERSION_CHECK(6, 2, 0))
147 &QBluetoothDeviceDiscoveryAgent::errorOccurred,
160 qCDebug(lc).noquote() <<
tr(
"Pokit device scan cancelled.");
172 qCDebug(lc).noquote() <<
tr(R
"(Discovered Pokit device "%1" at %2.)")
174 Q_EMIT q->pokitDeviceDiscovered(info);
177#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
190 qCDebug(lc).noquote() <<
tr(R
"(Pokit device "%1" at %2 updated with RSSI %3.)")
192 Q_EMIT q->pokitDeviceUpdated(info, updatedFields);
201 qCWarning(lc).noquote() <<
tr(
"Pokit device scan error:") <<
error;
209 qCDebug(lc).noquote() <<
tr(
"Pokit device scan finished.");
The PokitDiscoveryAgentPrivate class provides private implementation for PokitDiscoveryAgent.
void canceled() const
Handle scan canceled signals, by simply logging the event for diagnostic purposes.
PokitDiscoveryAgentPrivate(PokitDiscoveryAgent *const q)
void finished() const
Handle scan finished signals, by simply logging the event for diagnostic purposes.
void error(const QBluetoothDeviceDiscoveryAgent::Error error) const
Handle scan errors, by simply logging error for diagnostic purposes.
void deviceDiscovered(const QBluetoothDeviceInfo &info)
Handle deviceDiscovered signals.
void deviceUpdated(const QBluetoothDeviceInfo &info, QBluetoothDeviceInfo::Fields updatedFields)
Handle deviceUpdated signals.
The PokitDiscoveryAgent class discovers nearby Pokit devices.
PokitDiscoveryAgent(const QBluetoothAddress &deviceAdapter, QObject *parent=nullptr)
Constructs a new Pokit device discovery agent with parent, using deviceAdapter for the search device.
void start()
Starts Pokit device discovery.
virtual ~PokitDiscoveryAgent()
Destroys this PokitDiscoveryAgent object.
PokitDiscoveryAgentPrivate * d_ptr
Internal d-pointer.
Declares the PokitDiscoveryAgent class.
Declares the PokitDiscoveryAgentPrivate class.
Declares the PokitProduct enumeration, and related helper functions.
QTPOKIT_EXPORT bool isPokitProduct(const QBluetoothDeviceInfo &info)
Returns true if info describes a Pokit device.
QString toString() const const
void deviceDiscovered(const QBluetoothDeviceInfo &info)
void deviceUpdated(const QBluetoothDeviceInfo &info, QBluetoothDeviceInfo::Fields updatedFields)
QBluetoothDeviceDiscoveryAgent::Error error() const const
QBluetoothAddress address() const const
QString name() const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString tr(const char *sourceText, const char *disambiguation, int n)
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
Declares the StatusService class.