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
qnearfieldtarget_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 QNEARFIELDTARGET_ANDROID_P_H
5#define QNEARFIELDTARGET_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
19#include "qnearfieldtarget_p.h"
20#include "qndefmessage.h"
21#include "qlist.h"
22#include "qstringlist.h"
23#include <QTimer>
24
25#include <QtCore/QJniObject>
26#include <QtCore/QJniEnvironment>
27
29
31{
33public:
35 const QByteArray uid,
36 QObject *parent = nullptr);
38
39 QByteArray uid() const override;
40 QNearFieldTarget::Type type() const override;
41 QNearFieldTarget::AccessMethods accessMethods() const override;
42
43 bool disconnect() override;
44
45 bool hasNdefMessage() override;
47 QNearFieldTarget::RequestId writeNdefMessages(const QList<QNdefMessage> &messages) override;
48
49 int maxCommandLength() const override;
50 QNearFieldTarget::RequestId sendCommand(const QByteArray &command) override;
51
52 void setIntent(QJniObject intent);
53
58
59protected slots:
60 void checkIsTargetLost();
61
62protected:
63 void releaseIntent();
64 void updateTechList();
65 void updateType();
68 void handleTargetLost();
69 QJniObject getTagTechnology(const QString &tech) const;
70 bool setTagTechnology(const QStringList &technologies);
71 bool connect();
72 bool setCommandTimeout(int timeout);
73 QByteArray jbyteArrayToQByteArray(const jbyteArray &byteArray) const;
74
75protected:
79
84};
85
87
88#endif // QNEARFIELDTARGET_ANDROID_P_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
The QNdefMessage class provides an NFC NDEF message.
void targetDestroyed(const QByteArray &tagId)
QJniObject getTagTechnology(const QString &tech) const
void targetLost(QNearFieldTargetPrivateImpl *target)
QNearFieldTarget::RequestId writeNdefMessages(const QList< QNdefMessage > &messages) override
bool setTagTechnology(const QStringList &technologies)
QNearFieldTarget::Type getTagType() const
QNearFieldTarget::RequestId readNdefMessages() override
QNearFieldTargetPrivateImpl(QJniObject intent, const QByteArray uid, QObject *parent=nullptr)
void ndefMessageRead(const QNdefMessage &message, const QNearFieldTarget::RequestId &id)
QNearFieldTarget::Type type() const override
QNearFieldTarget::RequestId sendCommand(const QByteArray &command) override
QByteArray jbyteArrayToQByteArray(const jbyteArray &byteArray) const
QNearFieldTarget::AccessMethods accessMethods() const override
QByteArray uid() const override
\inmodule QtNfc \inheaderfile QNearFieldTarget
Type
This enum describes the type of tag the target is detected as.
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qtimer.h:20
Combined button and popup list for selecting options.
GLbitfield GLuint64 timeout
[4]
GLenum target
GLuint GLsizei const GLchar * message
GLint tagId
#define Q_OBJECT
#define slots
#define signals