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
qnearfieldmanager_android_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Centria research and development
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 QNEARFIELDMANAGER_ANDROID_P_H
5#define QNEARFIELDMANAGER_ANDROID_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
20#include "android/androidjninfc_p.h"
21#include "android/androidmainnewintentlistener_p.h"
22
23#include <QHash>
24#include <QtCore/QJniObject>
25
27
28class QByteArray;
31{
33
34public:
37
38 bool isEnabled() const override;
39 bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override;
40 bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod) override;
41 void stopTargetDetection(const QString &errorMessage) override;
42 void newIntent(QJniObject intent) override;
43 QByteArray getUid(const QJniObject &intent);
44
45private:
46 bool detecting;
47 QNearFieldTarget::AccessMethod requestedMethod;
48 QHash<QByteArray, QNearFieldTargetPrivateImpl*> detectedTargets;
49
50 QJniObject broadcastReceiver;
51
52private slots:
54 void onTargetDestroyed(const QByteArray &uid);
55 void onTargetDetected(QNearFieldTargetPrivateImpl *target);
56 void onTargetLost(QNearFieldTargetPrivateImpl *target);
57};
58
59QT_END_NAMESPACE
60
61#endif // QNEARFIELDMANAGER_ANDROID_P_H
QByteArray getUid(const QJniObject &intent)
bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override
bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod) override
void newIntent(QJniObject intent) override
void stopTargetDetection(const QString &errorMessage) override
void targetLost(QNearFieldTargetPrivateImpl *target)
bool isEnabled()
bool isSupported()