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
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
18#include "qnearfieldmanager_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
45protected:
47
48private:
49 bool detecting;
50 QNearFieldTarget::AccessMethod requestedMethod;
51 QHash<QByteArray, QNearFieldTargetPrivateImpl*> detectedTargets;
52
53 QJniObject broadcastReceiver;
54
55private slots:
56 void onTargetDiscovered(QJniObject intent);
57 void onTargetDestroyed(const QByteArray &uid);
58 void onTargetDetected(QNearFieldTargetPrivateImpl *target);
59 void onTargetLost(QNearFieldTargetPrivateImpl *target);
60};
61
63
64#endif // QNEARFIELDMANAGER_ANDROID_P_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
QByteArray getUid(const QJniObject &intent)
bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override
bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod) override
void newIntent(QJniObject intent) override
static QByteArray getUidforTag(const QJniObject &tag)
void stopTargetDetection(const QString &errorMessage) override
AccessMethod
This enum describes the access methods a near field target supports.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
AudioChannelLayoutTag tag
GLenum target
#define Q_OBJECT
#define slots
static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &errorSource, qsizetype errorPosition)
Definition qurl.cpp:3517