153 if (!deviceAdapter.isNull()) {
156 if (hostInfo.address() == deviceAdapter)
160 d_ptr->
errorString =
tr(
"Invalid Bluetooth adapter address");
196 return d->discoveredServices;
212 d->uuidFilter = uuids;
229 d->uuidFilter.clear();
230 d->uuidFilter.append(uuid);
242 return d->uuidFilter;
262 d_ptr->singleDevice =
true;
275 if (d_ptr->singleDevice ==
true)
298#ifdef QT_OSX_BLUETOOTH
308 d->foundHostAdapterPath.clear();
310 d->setDiscoveryMode(
mode);
313 d->errorString.clear();
314 if (
d->deviceAddress.isNull()) {
315 d->startDeviceDiscovery();
318 d->startServiceDiscovery();
334 switch (
d->discoveryState()) {
336 d->stopDeviceDiscovery();
339 d->stopServiceDiscovery();
344 d->discoveredDevices.clear();
361 d->discoveredDevices.clear();
362 d->discoveredServices.clear();
363 d->uuidFilter.clear();
405 return d->errorString;
423 if (!deviceDiscoveryAgent) {
457 deviceDiscoveryAgent->
stop();
458 delete deviceDiscoveryAgent;
459 deviceDiscoveryAgent =
nullptr;
483 delete deviceDiscoveryAgent;
484 deviceDiscoveryAgent =
nullptr;
492 const auto addressEquals = [](
const auto &
a) {
493 return [
a](
const auto &
info) {
return info.address() ==
a; };
508 deviceDiscoveryAgent->
stop();
509 delete deviceDiscoveryAgent;
510 deviceDiscoveryAgent =
nullptr;
554bool QBluetoothServiceDiscoveryAgentPrivate::isDuplicatedService(
571#include "moc_qbluetoothservicediscoveryagent.cpp"
void errorOccurred(QBluetoothDeviceDiscoveryAgent::Error error)
This signal is emitted when an error occurs during Bluetooth device discovery.
QString errorString() const
Returns a human-readable description of the last error.
void start()
Starts Bluetooth device discovery, if it is not already started.
void finished()
This signal is emitted when Bluetooth device discovery completes.
Error error() const
Returns the last error.
void deviceDiscovered(const QBluetoothDeviceInfo &info)
This signal is emitted when the Bluetooth device described by info is discovered.
void stop()
Stops Bluetooth device discovery.
Error
Indicates all possible error conditions found during Bluetooth device discovery.
QBluetoothAddress address() const
Returns the address of the device.
static QList< QBluetoothHostInfo > allDevices()
Returns a list of all available local Bluetooth devices.
QBluetoothAddress deviceAddress
void _q_deviceDiscovered(const QBluetoothDeviceInfo &info)
void startDeviceDiscovery()
Starts device discovery.
void setDiscoveryState(DiscoveryState s)
QList< QBluetoothServiceInfo > discoveredServices
void _q_serviceDiscoveryFinished()
QList< QBluetoothDeviceInfo > discoveredDevices
void stopDeviceDiscovery()
Stops device discovery.
void _q_deviceDiscoveryFinished()
Called when device discovery finishes.
QBluetoothServiceDiscoveryAgent::Error error
void startServiceDiscovery()
Starts service discovery for the next device.
void stopServiceDiscovery()
Stops service discovery.
QBluetoothAddress m_deviceAdapterAddress
void _q_deviceDiscoveryError(QBluetoothDeviceDiscoveryAgent::Error)
void stop()
Stops the service discovery process.
QBluetoothServiceDiscoveryAgent(QObject *parent=nullptr)
Constructs a new QBluetoothServiceDiscoveryAgent with parent.
DiscoveryMode
This enum describes the service discovery mode.
void start(DiscoveryMode mode=MinimalDiscovery)
Starts service discovery.
QList< QBluetoothServiceInfo > discoveredServices() const
Returns the list of all discovered services.
Error error() const
Returns the type of error that last occurred.
bool setRemoteAddress(const QBluetoothAddress &address)
Sets the remote device address to address.
~QBluetoothServiceDiscoveryAgent()
Destructor for QBluetoothServiceDiscoveryAgent.
QList< QBluetoothUuid > uuidFilter() const
Returns the UUID filter.
QString errorString() const
Returns a human-readable description of the last error that occurred during the service discovery.
bool isActive() const
Returns true if the service discovery is currently active; otherwise returns false.
void clear()
Clears the results of previous service discoveries and resets \l uuidFilter().
QBluetoothAddress remoteAddress() const
Returns the remote device address.
Error
This enum describes errors that can occur during service discovery.
@ InvalidBluetoothAdapterError
void setUuidFilter(const QList< QBluetoothUuid > &uuids)
Sets the UUID filter to uuids.
QBluetoothUuid serviceUuid() const
This is a convenience function.
int serverChannel() const
This is a convenience function.
QList< QBluetoothUuid > serviceClassUuids() const
Returns a list of UUIDs describing the service classes that this service conforms to.
QBluetoothDeviceInfo device() const
Returns the address of the Bluetooth device that provides this service.
void removeFirst() noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
void prepend(rvalue_ref t)
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
void qt_test_iobluetooth_runloop()
Combined button and popup list for selecting options.
qsizetype erase_if(QByteArray &ba, Predicate pred)
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLuint64EXT address
GLdouble GLdouble GLdouble GLdouble q
QFileInfo info(fileName)
[8]
myObject disconnect()
[26]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent