Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
devicediscoverybroadcastreceiver_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Lauri Laanmets (Proekspert AS) <lauri.laanmets@eesti.ee>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef DEVICEDISCOVERYBROADCASTRECEIVER_H
6#define DEVICEDISCOVERYBROADCASTRECEIVER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "android/androidbroadcastreceiver_p.h"
20#include <QtBluetooth/QBluetoothDeviceDiscoveryAgent>
21
23
24class QBluetoothDeviceInfo;
25
27{
29public:
31 virtual void onReceive(JNIEnv *env, jobject context, jobject intent);
32 virtual void onReceiveLeScan(JNIEnv *env, jobject jBluetoothDevice, jint rssi,
33 jbyteArray scanRecord);
34
38 void finished();
39
40private:
41 QBluetoothDeviceInfo retrieveDeviceInfo(const QJniObject& bluetoothDevice,
42 int rssi, jbyteArray scanRecord = nullptr);
43};
44
45QT_END_NAMESPACE
46#endif // DEVICEDISCOVERYBROADCASTRECEIVER_H
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[]
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 } }))
QBluetoothDeviceInfo::MajorDeviceClass qtMajor