5#ifndef DEVICEDISCOVERYBROADCASTRECEIVER_H
6#define DEVICEDISCOVERYBROADCASTRECEIVER_H
19#include "android/androidbroadcastreceiver_p.h"
20#include <QtBluetooth/QBluetoothDeviceDiscoveryAgent>
24class QBluetoothDeviceInfo;
31 virtual void onReceive(JNIEnv *env, jobject context, jobject intent);
32 virtual void onReceiveLeScan(JNIEnv *env, jobject jBluetoothDevice, jint rssi,
33 jbyteArray scanRecord);
41 QBluetoothDeviceInfo retrieveDeviceInfo(
const QJniObject& bluetoothDevice,
42 int rssi, jbyteArray scanRecord =
nullptr);
virtual void onReceiveLeScan(JNIEnv *env, jobject jBluetoothDevice, jint rssi, jbyteArray scanRecord)
virtual void onReceive(JNIEnv *env, jobject context, jobject intent)
static QBitArray initializeMinorCaches()
static constexpr quint8 minorIndexSizes[]
QHash< jint, QBluetoothDeviceInfo::MajorDeviceClass > JCachedMajorTypes
static const char javaBluetoothClassDeviceClassName[]
static const char javaBluetoothClassDeviceMajorClassName[]
int mappingIndexForMajor(QBluetoothDeviceInfo::MajorDeviceClass major)
QT_BEGIN_NAMESPACE typedef QHash< jint, QBluetoothDeviceInfo::CoreConfigurations > JCachedBtTypes
static const char javaDeviceTypeLE[]
static const char javaDeviceTypeClassic[]
static const char javaDeviceTypeDual[]
QBluetoothDeviceInfo::MajorDeviceClass resolveAndroidMajorClass(jint javaType)
quint8 resolveAndroidMinorClass(QBluetoothDeviceInfo::MajorDeviceClass major, jint javaMinor)
static constexpr MajorClassJavaToQtMapping majorMappings[]
QHash< jint, quint8 > JCachedMinorTypes
static const char javaDeviceTypeUnknown[]
static const MinorClassJavaToQtMapping minorMappings[]
@ ADType16BitUuidComplete
@ ADType16BitUuidIncomplete
@ ADType32BitUuidComplete
@ ADType32BitUuidIncomplete
@ ADTypeShortenedLocalName
@ ADType128BitUuidIncomplete
@ ADTypeCompleteLocalName
@ ADType128BitUuidComplete
@ ADTypeManufacturerSpecificData
@ ADTypeServiceData128Bit
void triggerCachingOfMinorsForMajor(QBluetoothDeviceInfo::MajorDeviceClass major)
QBluetoothDeviceInfo::CoreConfigurations qtBtTypeForJavaBtType(jint javaType)
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher)
Q_GLOBAL_STATIC(QReadWriteLock, g_updateMutex)
Q_GLOBAL_STATIC_WITH_ARGS(PermissionStatusHash, g_permissionStatusHash,({ { qMetaTypeId< QCameraPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QMicrophonePermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QBluetoothPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QContactsPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QCalendarPermission >(), Qt::PermissionStatus::Undetermined }, { qMetaTypeId< QLocationPermission >(), Qt::PermissionStatus::Undetermined } }))
const char javaFieldName[14]
QBluetoothDeviceInfo::MajorDeviceClass qtMajor
char const * javaFieldName