1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the QtNfc module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#include "qnearfieldtagtype4_p.h"
41
42QT_BEGIN_NAMESPACE
43
44/*!
45 \class QNearFieldTagType4
46 \brief The QNearFieldTagType4 class provides an interface for communicating with an NFC Tag
47 Type 4 tag.
48
49 \ingroup connectivity-nfc
50 \inmodule QtNfc
51 \internal
52*/
53
54/*!
55 \fn Type QNearFieldTagType4::type() const
56 \reimp
57*/
58
59/*!
60 Constructs a new tag type 4 near field target with \a parent.
61*/
62QNearFieldTagType4::QNearFieldTagType4(QObject *parent)
63: QNearFieldTarget(parent)
64{
65}
66
67/*!
68 Destroys the tag type 4 near field target.
69*/
70QNearFieldTagType4::~QNearFieldTagType4()
71{
72}
73
74/*!
75 Returns the NFC Tag Type 4 specification version number that the tag supports.
76*/
77quint8 QNearFieldTagType4::version()
78{
79 return 0;
80}
81
82/*!
83 Requests that the file specified by \a name be selected. Upon success calls to read() and
84 write() will act on the selected file. Returns a request id which can be used to track the
85 completion status of the request.
86
87 Once the request completes the response can be retrieved from the requestResponse() function.
88 The response of this request will be a boolean value, true for success; otherwise false.
89
90 \sa requestCompleted(), waitForRequestCompleted()
91*/
92QNearFieldTarget::RequestId QNearFieldTagType4::select(const QByteArray &name)
93{
94 Q_UNUSED(name);
95
96 return RequestId();
97}
98
99/*!
100 Requests that the file specified by \a fileIdentifier be selected. Upon success calls to read()
101 and write() will act on the selected file. Returns a request id which can be used to track the
102 completion status of the request.
103
104 Once the request completes the response can be retrieved from the requestResponse() function.
105 The response of this request will be a boolean value, true for success; otherwise false.
106
107 \sa requestCompleted(), waitForRequestCompleted()
108*/
109QNearFieldTarget::RequestId QNearFieldTagType4::select(quint16 fileIdentifier)
110{
111 Q_UNUSED(fileIdentifier);
112
113 return RequestId();
114}
115
116/*!
117 Requests that \a length bytes be read from the currently selected file starting from
118 \a startOffset. If \a length is 0 all data or the maximum read size bytes will be read,
119 whichever is smaller. Returns a request id which can be used to track the completion status of
120 the request.
121
122 Once the request completes successfully the response can be retrieved from the
123 requestResponse() function. The response of this request will be a QByteArray.
124
125 \sa requestCompleted(), waitForRequestCompleted()
126*/
127QNearFieldTarget::RequestId QNearFieldTagType4::read(quint16 length, quint16 startOffset)
128{
129 Q_UNUSED(length);
130 Q_UNUSED(startOffset);
131
132 return RequestId();
133}
134
135/*!
136 Writes \a data to the currently selected file starting at \a startOffset. Returns a request id
137 which can be used to track the completion status of the request.
138
139 Once the request completes the response can be retrieved from the requestResponse() function.
140 The response of this request will be a boolean value, true for success; otherwise false.
141
142 \sa requestCompleted(), waitForRequestCompleted()
143*/
144QNearFieldTarget::RequestId QNearFieldTagType4::write(const QByteArray &data, quint16 startOffset)
145{
146 Q_UNUSED(data);
147 Q_UNUSED(startOffset);
148
149 return RequestId();
150}
151
152/*!
153 \reimp
154*/
155bool QNearFieldTagType4::handleResponse(const QNearFieldTarget::RequestId &id,
156 const QByteArray &response)
157{
158 return QNearFieldTarget::handleResponse(id, response);
159}
160
161QT_END_NAMESPACE
162

source code of qtconnectivity/src/nfc/qnearfieldtagtype4.cpp