Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
androidbroadcastreceiver_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 Lauri Laanmets (Proekspert AS) <lauri.laanmets@eesti.ee>
2// Copyright (C) 2021 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 JNIBROADCASTRECEIVER_H
6#define JNIBROADCASTRECEIVER_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 <jni.h>
20#include <QtCore/QObject>
21#include <QtCore/private/qglobal_p.h>
22#include <android/log.h>
24#include <QtCore/QJniObject>
25
27
28void QtBroadcastReceiver_jniOnReceive(JNIEnv *, jobject, jlong,
29 QtJniTypes::Context, QtJniTypes::Intent);
30
32{
34public:
37
38 void addAction(const QJniObject &filter);
39 bool isValid() const;
40 void unregisterReceiver();
41
42protected:
43 friend void QtBroadcastReceiver_jniOnReceive(JNIEnv *, jobject, jlong, QtJniTypes::Context,
44 QtJniTypes::Intent);
45 virtual void onReceive(JNIEnv *env, jobject context, jobject intent) = 0;
46 friend void QtBluetoothLE_leScanResult(JNIEnv *, jobject, jlong, QtJniTypes::BluetoothDevice,
47 jint, jbyteArray);
48 virtual void onReceiveLeScan(JNIEnv *env, jobject jBluetoothDevice, jint rssi, jbyteArray scanRecord) = 0;
49
50
54 bool valid;
55};
56
58#endif // JNIBROADCASTRECEIVER_H
QT_BEGIN_NAMESPACE void QtBroadcastReceiver_jniOnReceive(JNIEnv *, jobject, jlong, QtJniTypes::Context, QtJniTypes::Intent)
quint8 rssi
AndroidBroadcastReceiver(QObject *parent=nullptr)
virtual void onReceive(JNIEnv *env, jobject context, jobject intent)=0
virtual void onReceiveLeScan(JNIEnv *env, jobject jBluetoothDevice, jint rssi, jbyteArray scanRecord)=0
friend void QtBroadcastReceiver_jniOnReceive(JNIEnv *, jobject, jlong, QtJniTypes::Context, QtJniTypes::Intent)
friend void QtBluetoothLE_leScanResult(JNIEnv *, jobject, jlong, QtJniTypes::BluetoothDevice, jint, jbyteArray)
void addAction(const QJniObject &filter)
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
Combined button and popup list for selecting options.
static void * context
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
#define Q_OBJECT