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_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
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_P_H
5#define QNEARFIELDTARGET_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 "qnearfieldtarget.h"
19
20#include <QtCore/QByteArray>
21#include <QtCore/QList>
22#include <QtCore/QObject>
23#include <QtCore/QSharedData>
24#include <QtCore/QVariant>
25#include <QtCore/QMap>
26
28
32
34{
36
37public:
39
40 explicit QNearFieldTargetPrivate(QObject *parent = nullptr);
41 virtual ~QNearFieldTargetPrivate() = default;
42
43 virtual QByteArray uid() const;
44 virtual QNearFieldTarget::Type type() const;
45 virtual QNearFieldTarget::AccessMethods accessMethods() const;
46
47 virtual bool disconnect();
48
49 // NdefAccess
50 virtual bool hasNdefMessage();
51 virtual QNearFieldTarget::RequestId readNdefMessages();
52 virtual QNearFieldTarget::RequestId writeNdefMessages(const QList<QNdefMessage> &messages);
53
54 // TagTypeSpecificAccess
55 virtual int maxCommandLength() const;
56 virtual QNearFieldTarget::RequestId sendCommand(const QByteArray &command);
57
58 bool waitForRequestCompleted(const QNearFieldTarget::RequestId &id, int msecs = 5000);
59 QVariant requestResponse(const QNearFieldTarget::RequestId &id) const;
60
63
65
67
69
70protected:
71 QMap<QNearFieldTarget::RequestId, QVariant> m_decodedResponses;
72
73 virtual void setResponseForRequest(const QNearFieldTarget::RequestId &id,
74 const QVariant &response,
75 bool emitRequestCompleted = true);
76
78};
79
81
82#endif // QNEARFIELDTARGET_P_H
\inmodule QtCore
Definition qbytearray.h:57
The QNdefMessage class provides an NFC NDEF message.
virtual ~QNearFieldTargetPrivate()=default
void error(QNearFieldTarget::Error error, const QNearFieldTarget::RequestId &id)
QMap< QNearFieldTarget::RequestId, QVariant > m_decodedResponses
void ndefMessageRead(const QNdefMessage &message)
void requestCompleted(const QNearFieldTarget::RequestId &id)
\inmodule QtNfc \inheaderfile QNearFieldTarget
The QNearFieldTarget class provides an interface for communicating with a target device.
Type
This enum describes the type of tag the target is detected as.
Error
This enum describes the error codes that a near field target reports.
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore
Definition qshareddata.h:19
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLenum type
GLuint GLsizei const GLchar * message
#define Q_AUTOTEST_EXPORT
#define Q_OBJECT
#define Q_SIGNALS
myObject disconnect()
[26]