![]() |
Qt 6.x
The Qt SDK
|
#include "android/devicediscoverybroadcastreceiver_p.h"
#include <QCoreApplication>
#include <QtCore/QtEndian>
#include <QtCore/QLoggingCategory>
#include <QtBluetooth/QBluetoothAddress>
#include <QtBluetooth/QBluetoothDeviceInfo>
#include <QtBluetooth/QBluetoothUuid>
#include "android/jni_android_p.h"
#include <QtCore/QHash>
#include <QtCore/qbitarray.h>
#include <algorithm>
Go to the source code of this file.
Classes | |
struct | MajorClassJavaToQtMapping |
struct | MinorClassJavaToQtMapping |
Typedefs | |
typedef QHash< jint, QBluetoothDeviceInfo::MajorDeviceClass > | JCachedMajorTypes |
typedef QHash< jint, quint8 > | JCachedMinorTypes |
Enumerations | |
enum | ADType { ADType16BitUuidIncomplete = 0x02 , ADType16BitUuidComplete = 0x03 , ADType32BitUuidIncomplete = 0x04 , ADType32BitUuidComplete = 0x05 , ADType128BitUuidIncomplete = 0x06 , ADType128BitUuidComplete = 0x07 , ADTypeShortenedLocalName = 0x08 , ADTypeCompleteLocalName = 0x09 , ADTypeServiceData16Bit = 0x16 , ADTypeServiceData32Bit = 0x20 , ADTypeServiceData128Bit = 0x21 , ADTypeManufacturerSpecificData = 0xff } |
Functions | |
static QBitArray | initializeMinorCaches () |
Q_GLOBAL_STATIC_WITH_ARGS (QBitArray, initializedCacheTracker,(initializeMinorCaches())) static const char javaBluetoothDeviceClassName[] | |
QUuid::Id128Bytes | qbswap (const QUuid::Id128Bytes src) |
QBluetoothDeviceInfo::CoreConfigurations | qtBtTypeForJavaBtType (jint javaType) |
QBluetoothDeviceInfo::MajorDeviceClass | resolveAndroidMajorClass (jint javaType) |
int | mappingIndexForMajor (QBluetoothDeviceInfo::MajorDeviceClass major) |
void | triggerCachingOfMinorsForMajor (QBluetoothDeviceInfo::MajorDeviceClass major) |
quint8 | resolveAndroidMinorClass (QBluetoothDeviceInfo::MajorDeviceClass major, jint javaMinor) |
Variables | |
QT_BEGIN_NAMESPACE typedef QHash< jint, QBluetoothDeviceInfo::CoreConfigurations > | JCachedBtTypes |
static const char | javaBluetoothClassDeviceMajorClassName [] = "android/bluetooth/BluetoothClass$Device$Major" |
static const char | javaBluetoothClassDeviceClassName [] = "android/bluetooth/BluetoothClass$Device" |
static const char | javaDeviceTypeClassic [] = "DEVICE_TYPE_CLASSIC" |
static const char | javaDeviceTypeDual [] = "DEVICE_TYPE_DUAL" |
static const char | javaDeviceTypeLE [] = "DEVICE_TYPE_LE" |
static const char | javaDeviceTypeUnknown [] = "DEVICE_TYPE_UNKNOWN" |
static constexpr MajorClassJavaToQtMapping | majorMappings [] |
static constexpr quint8 | minorIndexSizes [] |
static const MinorClassJavaToQtMapping | minorMappings [] |
typedef QHash<jint, QBluetoothDeviceInfo::MajorDeviceClass> JCachedMajorTypes |
Definition at line 23 of file devicediscoverybroadcastreceiver.cpp.
typedef QHash<jint, quint8> JCachedMinorTypes |
Definition at line 26 of file devicediscoverybroadcastreceiver.cpp.
enum ADType |
Definition at line 208 of file devicediscoverybroadcastreceiver.cpp.
|
static |
Definition at line 29 of file devicediscoverybroadcastreceiver.cpp.
References QBluetoothDeviceInfo::AudioVideoDevice, QBluetoothDeviceInfo::ComputerDevice, QBluetoothDeviceInfo::HealthDevice, QBluetoothDeviceInfo::ImagingDevice, QBluetoothDeviceInfo::MiscellaneousDevice, QBluetoothDeviceInfo::NetworkDevice, QBluetoothDeviceInfo::PeripheralDevice, QBluetoothDeviceInfo::PhoneDevice, qCWarning, QBluetoothDeviceInfo::ToyDevice, QBluetoothDeviceInfo::UncategorizedDevice, and QBluetoothDeviceInfo::WearableDevice.
int mappingIndexForMajor | ( | QBluetoothDeviceInfo::MajorDeviceClass | major | ) |
Definition at line 303 of file devicediscoverybroadcastreceiver.cpp.
References QBluetoothDeviceInfo::HealthDevice, Q_ASSERT, and QBluetoothDeviceInfo::UncategorizedDevice.
Referenced by resolveAndroidMinorClass(), and triggerCachingOfMinorsForMajor().
Q_GLOBAL_STATIC_WITH_ARGS | ( | QBitArray | , |
initializedCacheTracker | , | ||
(initializeMinorCaches()) | |||
) | const |
|
inline |
Definition at line 225 of file devicediscoverybroadcastreceiver.cpp.
References i.
QBluetoothDeviceInfo::CoreConfigurations qtBtTypeForJavaBtType | ( | jint | javaType | ) |
Definition at line 233 of file devicediscoverybroadcastreceiver.cpp.
References QBluetoothDeviceInfo::BaseRateAndLowEnergyCoreConfiguration, QBluetoothDeviceInfo::BaseRateCoreConfiguration, QSet< T >::find(), it, javaDeviceTypeClassic, javaDeviceTypeDual, javaDeviceTypeLE, javaDeviceTypeUnknown, QBluetoothDeviceInfo::LowEnergyCoreConfiguration, qCWarning, and QBluetoothDeviceInfo::UnknownCoreConfiguration.
QBluetoothDeviceInfo::MajorDeviceClass resolveAndroidMajorClass | ( | jint | javaType | ) |
Definition at line 267 of file devicediscoverybroadcastreceiver.cpp.
References QSet< T >::find(), it, javaBluetoothClassDeviceMajorClassName, majorMappings, qCWarning, and QBluetoothDeviceInfo::UncategorizedDevice.
quint8 resolveAndroidMinorClass | ( | QBluetoothDeviceInfo::MajorDeviceClass | major, |
jint | javaMinor | ||
) |
Definition at line 335 of file devicediscoverybroadcastreceiver.cpp.
References at, QSet< T >::find(), it, mappingIndexForMajor(), and triggerCachingOfMinorsForMajor().
void triggerCachingOfMinorsForMajor | ( | QBluetoothDeviceInfo::MajorDeviceClass | major | ) |
Definition at line 317 of file devicediscoverybroadcastreceiver.cpp.
References javaBluetoothClassDeviceClassName, mappingIndexForMajor(), minorIndexSizes, minorMappings, and Q_ASSERT.
Referenced by resolveAndroidMinorClass().
|
static |
Definition at line 61 of file devicediscoverybroadcastreceiver.cpp.
Referenced by triggerCachingOfMinorsForMajor().
|
static |
Definition at line 60 of file devicediscoverybroadcastreceiver.cpp.
Referenced by resolveAndroidMajorClass().
|
static |
Definition at line 64 of file devicediscoverybroadcastreceiver.cpp.
Referenced by qtBtTypeForJavaBtType().
|
static |
Definition at line 65 of file devicediscoverybroadcastreceiver.cpp.
Referenced by qtBtTypeForJavaBtType().
|
static |
Definition at line 66 of file devicediscoverybroadcastreceiver.cpp.
Referenced by qtBtTypeForJavaBtType().
|
static |
Definition at line 67 of file devicediscoverybroadcastreceiver.cpp.
Referenced by qtBtTypeForJavaBtType().
QT_BEGIN_NAMESPACE typedef QHash<jint, QBluetoothDeviceInfo::CoreConfigurations> JCachedBtTypes |
Definition at line 21 of file devicediscoverybroadcastreceiver.cpp.
|
staticconstexpr |
Definition at line 76 of file devicediscoverybroadcastreceiver.cpp.
Referenced by resolveAndroidMajorClass().
|
staticconstexpr |
Definition at line 92 of file devicediscoverybroadcastreceiver.cpp.
Referenced by triggerCachingOfMinorsForMajor().
|
static |
Definition at line 112 of file devicediscoverybroadcastreceiver.cpp.
Referenced by triggerCachingOfMinorsForMajor().