7#include <QtGui/QGuiApplication>
8#include <QtCore/QJniObject>
26 QtJniTypes::Intent intent = intentObject;
31 listenersLock.lockForRead();
32 for (
auto listener : std::as_const(listeners))
33 listener->newIntent(intent);
34 listenersLock.unlock();
40 static bool firstListener =
true;
47 firstListener =
false;
48 listenersLock.lockForWrite();
51 listenersLock.unlock();
58 listenersLock.lockForWrite();
60 listenersLock.unlock();
77void QMainNfcNewIntentListener::updateReceiveState()
89 listenersLock.lockForRead();
91 if (!listeners.
isEmpty() && !receiving)
95 if (listeners.
isEmpty() && receiving) {
99 listenersLock.unlock();
virtual void newIntent(QJniObject intent)=0
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
bool isEmpty() const noexcept
bool removeOne(const AT &t)
void push_back(parameter_type t)
bool registerListener(QAndroidNfcListenerInterface *listener)
bool unregisterListener(QAndroidNfcListenerInterface *listener)
~QMainNfcNewIntentListener()
bool handleNewIntent(JNIEnv *env, jobject intent)
QMainNfcNewIntentListener()
Combined button and popup list for selecting options.
Q_CORE_EXPORT void unregisterNewIntentListener(NewIntentListener *listener)
Q_CORE_EXPORT void registerNewIntentListener(NewIntentListener *listener)
Q_CORE_EXPORT void unregisterResumePauseListener(ResumePauseListener *listener)
Q_CORE_EXPORT void registerResumePauseListener(ResumePauseListener *listener)
QtJniTypes::Intent getStartIntent()
QtJniTypes::Parcelable getTag(const QtJniTypes::Intent &intent)
bool contains(const AT &t) const noexcept