5#ifndef QBLUETOOTHDEVICEDISCOVERYAGENT_P_H
6#define QBLUETOOTHDEVICEDISCOVERYAGENT_P_H
20#ifdef QT_ANDROID_BLUETOOTH
21#include <QtCore/QJniObject>
23#include <QtCore/QTimer>
31#include <QtCore/QVariantMap>
33#include <QtBluetooth/QBluetoothAddress>
34#include <QtBluetooth/QBluetoothLocalDevice>
39class OrgBluezManagerInterface;
40class OrgBluezAdapterInterface;
51#ifdef QT_WINRT_BLUETOOTH
52#include <QtCore/QPointer>
53#include <QtCore/QTimer>
55using ManufacturerData = QHash<quint16, QByteArray>;
56using ServiceData = QHash<QBluetoothUuid, QByteArray>;
63#ifdef QT_WINRT_BLUETOOTH
68#
if defined(QT_ANDROID_BLUETOOTH) || defined(QT_WINRT_BLUETOOTH) \
69 || defined(Q_OS_DARWIN)
71#if defined(Q_OS_MACOS)
72 ,
public DarwinBluetooth::DeviceInquiryDelegate
86 void start(QBluetoothDeviceDiscoveryAgent::DiscoveryMethods
methods);
93 void _q_discoveryFinished();
102 QList<QBluetoothDeviceInfo> discoveredDevices;
108#ifdef QT_ANDROID_BLUETOOTH
110 void processSdpDiscoveryFinished();
113 void stopLowEnergyScan();
116 void startLowEnergyScan();
117 void classicDiscoveryStartFail();
118 bool setErrorIfPowerOff();
124 QTimer *leScanTimeout =
nullptr;
125 QTimer *deviceDiscoveryStartTimeout =
nullptr;
126 short deviceDiscoveryStartAttemptsLeft;
128 bool pendingCancel =
false;
129 bool pendingStart =
false;
130#elif QT_CONFIG(bluez)
131 bool pendingCancel =
false;
132 bool pendingStart =
false;
135 QTimer *discoveryTimer =
nullptr;
136 QList<OrgFreedesktopDBusPropertiesInterface *> propertyMonitors;
140 QMap<QString, QVariantMap> devicesProperties;
143#ifdef QT_WINRT_BLUETOOTH
147 qint16 rssi, ManufacturerData manufacturerData, ServiceData serviceData);
149 void onScanFinished();
152 void disconnectAndClearWorker();
153 std::shared_ptr<QWinRTBluetoothDeviceDiscoveryWorker> worker =
nullptr;
165 void inquiryFinished()
override;
167 void classicDeviceFound(
void *
device)
override;
174 void LEinquiryFinished();
176 void LEnotSupported();
191 bool startPending =
false;
192 bool stopPending =
false;
205 int lowEnergySearchTimeout = 40000;
206 QBluetoothDeviceDiscoveryAgent::DiscoveryMethods requestedMethods;
static JNINativeMethod methods[]
IOBluetoothDevice * device
~QBluetoothDeviceDiscoveryAgentPrivate()
QBluetoothDeviceDiscoveryAgentPrivate(const QBluetoothAddress &deviceAdapter, QBluetoothDeviceDiscoveryAgent *parent)
Error
Indicates all possible error conditions found during Bluetooth device discovery.
\macro QT_RESTRICTED_CAST_FROM_ASCII
void QtBluetoothLE_leScanResult(JNIEnv *env, jobject, jlong qtObject, QtJniTypes::BluetoothDevice bluetoothDevice, jint rssi, jbyteArray scanRecord)
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char * interface
DBusConnection const char DBusError * error
GLuint GLuint64EXT address
GLsizei const GLchar *const * path
static void setError(QJsonObject *response, const QString &msg)
if(qFloatDistance(a, b)<(1<< 7))
[0]
QNetworkAccessManager manager