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
localdevicebroadcastreceiver_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "android/androidbroadcastreceiver_p.h"
5#include <QtBluetooth/QBluetoothAddress>
6#include <QtBluetooth/QBluetoothLocalDevice>
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#ifndef LOCALDEVICEBROADCASTRECEIVER_H
20#define LOCALDEVICEBROADCASTRECEIVER_H
21
23
25{
27public:
28 explicit LocalDeviceBroadcastReceiver(QObject *parent = nullptr);
30 virtual void onReceive(JNIEnv *env, jobject context, jobject intent);
31 virtual void onReceiveLeScan(JNIEnv *, jobject, jint, jbyteArray) {}
32
35 void pairingStateChanged(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing);
36 void connectDeviceChanges(const QBluetoothAddress &address, bool isConnectEvent);
37
38private:
39 int previousScanMode;
40 QJniObject pairingDevice;
41
42 int bondingModePreset[3];
43 int hostModePreset[3];
44};
45
46QT_END_NAMESPACE
47
48#endif // LOCALDEVICEBROADCASTRECEIVER_H
void pairingStateChanged(const QBluetoothAddress &address, QBluetoothLocalDevice::Pairing pairing)
void connectDeviceChanges(const QBluetoothAddress &address, bool isConnectEvent)
virtual void onReceiveLeScan(JNIEnv *, jobject, jint, jbyteArray)
virtual void onReceive(JNIEnv *env, jobject context, jobject intent)
const char * bondModes[]