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
androidmainnewintentlistener_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 BasysKom GmbH
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef ANDROIDMAINNEWINTENTLISTENER_P_H_
5#define ANDROIDMAINNEWINTENTLISTENER_P_H_
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/private/qjnihelpers_p.h>
19
20#include "qlist.h"
21#include "qreadwritelock.h"
22
24
25class QJniObject;
26
28{
29public:
30 virtual ~QAndroidNfcListenerInterface() = default;
31 virtual void newIntent(QJniObject intent) = 0;
32};
33
36{
37public:
40
41 //QtAndroidPrivate::NewIntentListener
42 bool handleNewIntent(JNIEnv *env, jobject intent);
43
46
47 //QtAndroidPrivate::ResumePauseListener
48 void handleResume();
49 void handlePause();
50
51private:
52 void updateReceiveState();
53
54 QList<QAndroidNfcListenerInterface *> listeners;
55 QReadWriteLock listenersLock;
56 bool paused;
57 bool receiving;
58};
59
61
62#endif /* ANDROIDMAINNEWINTENTLISTENER_P_H_ */
virtual ~QAndroidNfcListenerInterface()=default
virtual void newIntent(QJniObject intent)=0
\inmodule QtCore
bool registerListener(QAndroidNfcListenerInterface *listener)
bool unregisterListener(QAndroidNfcListenerInterface *listener)
bool handleNewIntent(JNIEnv *env, jobject intent)
\inmodule QtCore
Combined button and popup list for selecting options.