/usr/share/qt5/doc/qtnfc/qnearfieldtarget.html is in qtconnectivity5-doc-html 5.5.1-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qnearfieldtarget.cpp -->
<title>QNearFieldTarget Class | Qt NFC 5.5</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.5</li>
<li><a href="qtnfc-index.html">Qt NFC</a></li>
<li><a href="qtnfc-module.html">C++ Classes</a></li>
<li>QNearFieldTarget</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QNearFieldTarget Class</h1>
<!-- $$$QNearFieldTarget-brief -->
<p>The <a href="qnearfieldtarget.html">QNearFieldTarget</a> class provides an interface for communicating with a target device. <a href="#details">More...</a></p>
<!-- @@@QNearFieldTarget -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QNearFieldTarget></span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += nfc</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.2</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qobject.html">QObject</a></td></tr></table></div><ul>
<li><a href="qnearfieldtarget-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget-requestid.html">RequestId</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget-requestidprivate.html">RequestIdPrivate</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#AccessMethod-enum">AccessMethod</a></b> { UnknownAccess, NdefAccess, TagTypeSpecificAccess, LlcpAccess }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#AccessMethod-enum">AccessMethods</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#Error-enum">Error</a></b> { NoError, UnknownError, UnsupportedError, TargetOutOfRangeError, ..., NdefWriteError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#Type-enum">Type</a></b> { ProprietaryTag, NfcTagType1, NfcTagType2, NfcTagType3, NfcTagType4, MifareTag }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#QNearFieldTarget">QNearFieldTarget</a></b>(QObject *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#dtor.QNearFieldTarget">~QNearFieldTarget</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual AccessMethods </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#accessMethods">accessMethods</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#hasNdefMessage">hasNdefMessage</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#isProcessingCommand">isProcessingCommand</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual RequestId </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#readNdefMessages">readNdefMessages</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#requestResponse">requestResponse</a></b>(const RequestId &<i> id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual RequestId </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#sendCommand">sendCommand</a></b>(const QByteArray &<i> command</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual RequestId </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#sendCommands">sendCommands</a></b>(const QList<QByteArray> &<i> commands</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#setResponseForRequest">setResponseForRequest</a></b>(const QNearFieldTarget::RequestId &<i> id</i>, const QVariant &<i> response</i>, bool<i> emitRequestCompleted</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Type </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#type">type</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QByteArray </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#uid">uid</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QUrl </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#url">url</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#waitForRequestCompleted">waitForRequestCompleted</a></b>(const RequestId &<i> id</i>, int<i> msecs</i> = 5000)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual RequestId </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#writeNdefMessages">writeNdefMessages</a></b>(const QList<QNdefMessage> &<i> messages</i>)</td></tr>
</table></div>
<ul>
<li class="fn">31 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#disconnected">disconnected</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#error">error</a></b>(QNearFieldTarget::Error<i> error</i>, const QNearFieldTarget::RequestId &<i> id</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#ndefMessageRead">ndefMessageRead</a></b>(const QNdefMessage &<i> message</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#ndefMessagesWritten">ndefMessagesWritten</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#requestCompleted">requestCompleted</a></b>(const QNearFieldTarget::RequestId &<i> id</i>)</td></tr>
</table></div>
<ul>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qnearfieldtarget.html#handleResponse">handleResponse</a></b>(const QNearFieldTarget::RequestId &<i> id</i>, const QByteArray &<i> response</i>)</td></tr>
</table></div>
<ul>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QNearFieldTarget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qnearfieldtarget.html">QNearFieldTarget</a> class provides an interface for communicating with a target device.</p>
<p><a href="qnearfieldtarget.html">QNearFieldTarget</a> provides a generic interface for communicating with an NFC target device. Both NFC Forum devices and NFC Forum Tag targets are supported by this class. All target specific classes subclass this class.</p>
<p>The <a href="qnearfieldtarget.html#type">type</a>() function can be used to get the type of the target device. The <a href="qnearfieldtarget.html#uid">uid</a>() function returns the unique identifier of the target. The <a href="qnearfieldtarget.html#AccessMethod-enum">AccessMethods</a> flags returns from the <a href="qnearfieldtarget.html#accessMethods">accessMethods</a>() function can be tested to determine which access methods are supported by the target.</p>
<p>If the target supports <a href="qnearfieldtarget.html#AccessMethod-enum">NdefAccess</a>, <a href="qnearfieldtarget.html#hasNdefMessage">hasNdefMessage</a>() can be called to test if the target has a stored NDEF message, <a href="qnearfieldtarget.html#readNdefMessages">readNdefMessages</a>() and <a href="qnearfieldtarget.html#writeNdefMessages">writeNdefMessages</a>() functions can be used to get and set the NDEF message.</p>
<p>If the target supports <a href="qnearfieldtarget.html#AccessMethod-enum">TagTypeSpecificAccess</a>, <a href="qnearfieldtarget.html#sendCommand">sendCommand</a>() can be used to send a single proprietary command to the target and retrieve the response. <a href="qnearfieldtarget.html#sendCommands">sendCommands</a>() can be used to send multiple proprietary commands to the target and retrieve all of the responses.</p>
<p>If the target supports <a href="qnearfieldtarget.html#AccessMethod-enum">LlcpAccess</a>, the QLlcpSocket class can be used to connected to a service provided by the target.</p>
</div>
<!-- @@@QNearFieldTarget -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$AccessMethod$$$UnknownAccess$$$NdefAccess$$$TagTypeSpecificAccess$$$LlcpAccess -->
<h3 class="flags" id="AccessMethod-enum"><a name="AccessMethod-enum"></a>enum QNearFieldTarget::<span class="name">AccessMethod</span><br/>flags QNearFieldTarget::<span class="name">AccessMethods</span></h3>
<p>This enum describes the access methods a near field target supports.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::UnknownAccess</code></td><td class="topAlign"><code>0x00</code></td><td class="topAlign">The target supports an unknown access type.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NdefAccess</code></td><td class="topAlign"><code>0x01</code></td><td class="topAlign">The target supports reading and writing NDEF messages using <a href="qnearfieldtarget.html#readNdefMessages">readNdefMessages</a>() and <a href="qnearfieldtarget.html#writeNdefMessages">writeNdefMessages</a>().</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::TagTypeSpecificAccess</code></td><td class="topAlign"><code>0x02</code></td><td class="topAlign">The target supports sending tag type specific commands using <a href="qnearfieldtarget.html#sendCommand">sendCommand</a>() and <a href="qnearfieldtarget.html#sendCommands">sendCommands</a>().</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::LlcpAccess</code></td><td class="topAlign"><code>0x04</code></td><td class="topAlign">The target supports peer-to-peer LLCP communication.</td></tr>
</table></div>
<p>The AccessMethods type is a typedef for <a href="../qtcore/qflags.html">QFlags</a><AccessMethod>. It stores an OR combination of AccessMethod values.</p>
<!-- @@@AccessMethod -->
<!-- $$$Error$$$NoError$$$UnknownError$$$UnsupportedError$$$TargetOutOfRangeError$$$NoResponseError$$$ChecksumMismatchError$$$InvalidParametersError$$$NdefReadError$$$NdefWriteError -->
<h3 class="fn" id="Error-enum"><a name="Error-enum"></a>enum QNearFieldTarget::<span class="name">Error</span></h3>
<p>This enum describes the error codes that that a near field target reports.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NoError</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">No error has occurred.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::UnknownError</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">An unidentified error occurred.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::UnsupportedError</code></td><td class="topAlign"><code>2</code></td><td class="topAlign">The requested operation is unsupported by this near field target.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::TargetOutOfRangeError</code></td><td class="topAlign"><code>3</code></td><td class="topAlign">The target is no longer within range.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NoResponseError</code></td><td class="topAlign"><code>4</code></td><td class="topAlign">The target did not respond.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::ChecksumMismatchError</code></td><td class="topAlign"><code>5</code></td><td class="topAlign">The checksum has detected a corrupted response.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::InvalidParametersError</code></td><td class="topAlign"><code>6</code></td><td class="topAlign">Invalid parameters were passed to a tag type specific function.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NdefReadError</code></td><td class="topAlign"><code>7</code></td><td class="topAlign">Failed to read NDEF messages from the target.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NdefWriteError</code></td><td class="topAlign"><code>8</code></td><td class="topAlign">Failed to write NDEF messages to the target.</td></tr>
</table></div>
<!-- @@@Error -->
<!-- $$$Type$$$ProprietaryTag$$$NfcTagType1$$$NfcTagType2$$$NfcTagType3$$$NfcTagType4$$$MifareTag -->
<h3 class="fn" id="Type-enum"><a name="Type-enum"></a>enum QNearFieldTarget::<span class="name">Type</span></h3>
<p>This enum describes the type of tag the target is detected as.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::ProprietaryTag</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">An unidentified proprietary target tag.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NfcTagType1</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">An NFC tag type 1 target.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NfcTagType2</code></td><td class="topAlign"><code>2</code></td><td class="topAlign">An NFC tag type 2 target.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NfcTagType3</code></td><td class="topAlign"><code>3</code></td><td class="topAlign">An NFC tag type 3 target.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::NfcTagType4</code></td><td class="topAlign"><code>4</code></td><td class="topAlign">An NFC tag type 4 target.</td></tr>
<tr><td class="topAlign"><code>QNearFieldTarget::MifareTag</code></td><td class="topAlign"><code>5</code></td><td class="topAlign">A Mifare target.</td></tr>
</table></div>
<!-- @@@Type -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QNearFieldTarget[overload1]$$$QNearFieldTargetQObject* -->
<h3 class="fn" id="QNearFieldTarget"><a name="QNearFieldTarget"></a>QNearFieldTarget::<span class="name">QNearFieldTarget</span>(<span class="type"><a href="../qtcore/qobject.html#QObject">QObject</a></span> *<i> parent</i> = 0)</h3>
<p>Constructs a new near field target with <i>parent</i>.</p>
<!-- @@@QNearFieldTarget -->
<!-- $$$~QNearFieldTarget[overload1]$$$~QNearFieldTarget -->
<h3 class="fn" id="dtor.QNearFieldTarget"><a name="dtor.QNearFieldTarget"></a><code>[virtual] </code>QNearFieldTarget::<span class="name">~QNearFieldTarget</span>()</h3>
<p>Destroys the near field target.</p>
<!-- @@@~QNearFieldTarget -->
<!-- $$$accessMethods[overload1]$$$accessMethods -->
<h3 class="fn" id="accessMethods"><a name="accessMethods"></a><code>[pure virtual] </code><span class="type"><a href="qnearfieldtarget.html#AccessMethod-enum">AccessMethods</a></span> QNearFieldTarget::<span class="name">accessMethods</span>() const</h3>
<p>Returns the access methods support by this near field target.</p>
<!-- @@@accessMethods -->
<!-- $$$disconnected[overload1]$$$disconnected -->
<h3 class="fn" id="disconnected"><a name="disconnected"></a><code>[signal] </code><span class="type">void</span> QNearFieldTarget::<span class="name">disconnected</span>()</h3>
<p>This signal is emitted when the near field target moves out of proximity.</p>
<!-- @@@disconnected -->
<!-- $$$error[overload1]$$$errorQNearFieldTarget::ErrorconstQNearFieldTarget::RequestId& -->
<h3 class="fn" id="error"><a name="error"></a><code>[signal] </code><span class="type">void</span> QNearFieldTarget::<span class="name">error</span>(<span class="type"><a href="qnearfieldtarget.html#Error-enum">QNearFieldTarget::Error</a></span><i> error</i>, const <span class="type"><a href="qnearfieldtarget-requestid.html">QNearFieldTarget::RequestId</a></span> &<i> id</i>)</h3>
<p>This signal is emitted when an error occurs while processing request <i>id</i>. The <i>error</i> parameter describes the error.</p>
<!-- @@@error -->
<!-- $$$handleResponse[overload1]$$$handleResponseconstQNearFieldTarget::RequestId&constQByteArray& -->
<h3 class="fn" id="handleResponse"><a name="handleResponse"></a><code>[virtual protected] </code><span class="type">bool</span> QNearFieldTarget::<span class="name">handleResponse</span>(const <span class="type"><a href="qnearfieldtarget-requestid.html">QNearFieldTarget::RequestId</a></span> &<i> id</i>, const <span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> &<i> response</i>)</h3>
<p>Handles the <i>response</i> received for the request <i>id</i>. Returns true if the response is handled; otherwise returns false.</p>
<p>Classes reimplementing this virtual function should call the base class implementation to ensure that requests initiated by those classes are handled correctly.</p>
<p>The default implementation stores the response such that it can be retrieved by <a href="qnearfieldtarget.html#requestResponse">requestResponse</a>().</p>
<!-- @@@handleResponse -->
<!-- $$$hasNdefMessage[overload1]$$$hasNdefMessage -->
<h3 class="fn" id="hasNdefMessage"><a name="hasNdefMessage"></a><code>[virtual] </code><span class="type">bool</span> QNearFieldTarget::<span class="name">hasNdefMessage</span>()</h3>
<p>Returns true if at least one NDEF message is stored on the near field target; otherwise returns false.</p>
<!-- @@@hasNdefMessage -->
<!-- $$$isProcessingCommand[overload1]$$$isProcessingCommand -->
<h3 class="fn" id="isProcessingCommand"><a name="isProcessingCommand"></a><span class="type">bool</span> QNearFieldTarget::<span class="name">isProcessingCommand</span>() const</h3>
<p>Returns true if the target is processing commands; otherwise returns false.</p>
<!-- @@@isProcessingCommand -->
<!-- $$$ndefMessageRead[overload1]$$$ndefMessageReadconstQNdefMessage& -->
<h3 class="fn" id="ndefMessageRead"><a name="ndefMessageRead"></a><code>[signal] </code><span class="type">void</span> QNearFieldTarget::<span class="name">ndefMessageRead</span>(const <span class="type"><a href="qndefmessage.html">QNdefMessage</a></span> &<i> message</i>)</h3>
<p>This signal is emitted when a complete NDEF <i>message</i> has been read from the target.</p>
<p><b>See also </b><a href="qnearfieldtarget.html#readNdefMessages">readNdefMessages</a>().</p>
<!-- @@@ndefMessageRead -->
<!-- $$$ndefMessagesWritten[overload1]$$$ndefMessagesWritten -->
<h3 class="fn" id="ndefMessagesWritten"><a name="ndefMessagesWritten"></a><code>[signal] </code><span class="type">void</span> QNearFieldTarget::<span class="name">ndefMessagesWritten</span>()</h3>
<p>This signal is emitted when NDEF messages have been successfully written to the target.</p>
<p><b>See also </b><a href="qnearfieldtarget.html#writeNdefMessages">writeNdefMessages</a>().</p>
<!-- @@@ndefMessagesWritten -->
<!-- $$$readNdefMessages[overload1]$$$readNdefMessages -->
<h3 class="fn" id="readNdefMessages"><a name="readNdefMessages"></a><code>[virtual] </code><span class="type"><a href="qnearfieldtarget-requestid.html">RequestId</a></span> QNearFieldTarget::<span class="name">readNdefMessages</span>()</h3>
<p>Starts reading NDEF messages stored on the near field target. Returns a request id which can be used to track the completion status of the request. An invalid request id will be returned if the target does not support reading NDEF messages.</p>
<p>An <a href="qnearfieldtarget.html#ndefMessageRead">ndefMessageRead</a>() signal will be emitted for each NDEF message. The <a href="qnearfieldtarget.html#requestCompleted">requestCompleted</a>() signal will be emitted was all NDEF messages have been read. The <a href="qnearfieldtarget.html#error">error</a>() signal is emitted if an error occurs.</p>
<!-- @@@readNdefMessages -->
<!-- $$$requestCompleted[overload1]$$$requestCompletedconstQNearFieldTarget::RequestId& -->
<h3 class="fn" id="requestCompleted"><a name="requestCompleted"></a><code>[signal] </code><span class="type">void</span> QNearFieldTarget::<span class="name">requestCompleted</span>(const <span class="type"><a href="qnearfieldtarget-requestid.html">QNearFieldTarget::RequestId</a></span> &<i> id</i>)</h3>
<p>This signal is emitted when a request <i>id</i> completes.</p>
<p><b>See also </b><a href="qnearfieldtarget.html#sendCommand">sendCommand</a>().</p>
<!-- @@@requestCompleted -->
<!-- $$$requestResponse[overload1]$$$requestResponseconstRequestId& -->
<h3 class="fn" id="requestResponse"><a name="requestResponse"></a><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QNearFieldTarget::<span class="name">requestResponse</span>(const <span class="type"><a href="qnearfieldtarget-requestid.html">RequestId</a></span> &<i> id</i>)</h3>
<p>Returns the decoded response for request <i>id</i>. If the request is unknown or has not yet been completed an invalid <a href="../qtcore/qvariant.html">QVariant</a> is returned.</p>
<!-- @@@requestResponse -->
<!-- $$$sendCommand[overload1]$$$sendCommandconstQByteArray& -->
<h3 class="fn" id="sendCommand"><a name="sendCommand"></a><code>[virtual] </code><span class="type"><a href="qnearfieldtarget-requestid.html">RequestId</a></span> QNearFieldTarget::<span class="name">sendCommand</span>(const <span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> &<i> command</i>)</h3>
<p>Sends <i>command</i> to the near field target. Returns a request id which can be used to track the completion status of the request. An invalid request id will be returned if the target does not support sending tag type specific commands.</p>
<p>The <a href="qnearfieldtarget.html#requestCompleted">requestCompleted</a>() signal will be emitted on successful completion of the request; otherwise the <a href="qnearfieldtarget.html#error">error</a>() signal will be emitted.</p>
<p>Once the request completes successfully the response can be retrieved from the <a href="qnearfieldtarget.html#requestResponse">requestResponse</a>() function. The response of this request will be a <a href="../qtcore/qbytearray.html">QByteArray</a>.</p>
<p><b>See also </b><a href="qnearfieldtarget.html#requestCompleted">requestCompleted</a>() and <a href="qnearfieldtarget.html#waitForRequestCompleted">waitForRequestCompleted</a>().</p>
<!-- @@@sendCommand -->
<!-- $$$sendCommands[overload1]$$$sendCommandsconstQList<QByteArray>& -->
<h3 class="fn" id="sendCommands"><a name="sendCommands"></a><code>[virtual] </code><span class="type"><a href="qnearfieldtarget-requestid.html">RequestId</a></span> QNearFieldTarget::<span class="name">sendCommands</span>(const <span class="type"><a href="../qtcore/qlist.html">QList</a></span><<span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span>> &<i> commands</i>)</h3>
<p>Sends multiple <i>commands</i> to the near field target. Returns a request id which can be used to track the completion status of the request. An invalid request id will be returned if the target does not support sending tag type specific commands.</p>
<p>If all commands complete successfully the <a href="qnearfieldtarget.html#requestCompleted">requestCompleted</a>() signal will be emitted; otherwise the <a href="qnearfieldtarget.html#error">error</a>() signal will be emitted. If a command fails succeeding commands from this call will not be processed.</p>
<p>Once the request completes the response for successfully completed requests can be retrieved from the <a href="qnearfieldtarget.html#requestResponse">requestResponse</a>() function. The response of this request will be a <a href="../qtcore/qlist.html">QList</a><<a href="../qtcore/qbytearray.html">QByteArray</a>>.</p>
<p><b>See also </b><a href="qnearfieldtarget.html#requestCompleted">requestCompleted</a>() and <a href="qnearfieldtarget.html#waitForRequestCompleted">waitForRequestCompleted</a>().</p>
<!-- @@@sendCommands -->
<!-- $$$setResponseForRequest[overload1]$$$setResponseForRequestconstQNearFieldTarget::RequestId&constQVariant&bool -->
<h3 class="fn" id="setResponseForRequest"><a name="setResponseForRequest"></a><span class="type">void</span> QNearFieldTarget::<span class="name">setResponseForRequest</span>(const <span class="type"><a href="qnearfieldtarget-requestid.html">QNearFieldTarget::RequestId</a></span> &<i> id</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &<i> response</i>, <span class="type">bool</span><i> emitRequestCompleted</i> = true)</h3>
<p>Sets the decoded response for request <i>id</i> to <i>response</i>. If <i>emitRequestCompleted</i> is true the <a href="qnearfieldtarget.html#requestCompleted">requestCompleted</a>() signal will be emitted for <i>id</i>; otherwise no signal will be emitted.</p>
<p><b>See also </b><a href="qnearfieldtarget.html#requestResponse">requestResponse</a>().</p>
<!-- @@@setResponseForRequest -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><code>[pure virtual] </code><span class="type"><a href="qnearfieldtarget.html#Type-enum">Type</a></span> QNearFieldTarget::<span class="name">type</span>() const</h3>
<p>Returns the type of tag type of this near field target.</p>
<!-- @@@type -->
<!-- $$$uid[overload1]$$$uid -->
<h3 class="fn" id="uid"><a name="uid"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qbytearray.html">QByteArray</a></span> QNearFieldTarget::<span class="name">uid</span>() const</h3>
<p>Returns the UID of the near field target.</p>
<!-- @@@uid -->
<!-- $$$url[overload1]$$$url -->
<h3 class="fn" id="url"><a name="url"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qurl.html">QUrl</a></span> QNearFieldTarget::<span class="name">url</span>() const</h3>
<p>Returns the URL of the near field target.</p>
<!-- @@@url -->
<!-- $$$waitForRequestCompleted[overload1]$$$waitForRequestCompletedconstRequestId&int -->
<h3 class="fn" id="waitForRequestCompleted"><a name="waitForRequestCompleted"></a><code>[virtual] </code><span class="type">bool</span> QNearFieldTarget::<span class="name">waitForRequestCompleted</span>(const <span class="type"><a href="qnearfieldtarget-requestid.html">RequestId</a></span> &<i> id</i>, <span class="type">int</span><i> msecs</i> = 5000)</h3>
<p>Waits up to <i>msecs</i> milliseconds for the request <i>id</i> to complete. Returns true if the request completes successfully and the requestCompeted() signal is emitted; otherwise returns false.</p>
<!-- @@@waitForRequestCompleted -->
<!-- $$$writeNdefMessages[overload1]$$$writeNdefMessagesconstQList<QNdefMessage>& -->
<h3 class="fn" id="writeNdefMessages"><a name="writeNdefMessages"></a><code>[virtual] </code><span class="type"><a href="qnearfieldtarget-requestid.html">RequestId</a></span> QNearFieldTarget::<span class="name">writeNdefMessages</span>(const <span class="type"><a href="../qtcore/qlist.html">QList</a></span><<span class="type"><a href="qndefmessage.html">QNdefMessage</a></span>> &<i> messages</i>)</h3>
<p>Writes the NDEF messages in <i>messages</i> to the target. Returns a request id which can be used to track the completion status of the request. An invalid request id will be returned if the target does not support reading NDEF messages.</p>
<p>The <a href="qnearfieldtarget.html#ndefMessagesWritten">ndefMessagesWritten</a>() signal will be emitted when the write operation completes successfully; otherwise the <a href="qnearfieldtarget.html#error">error</a>() signal is emitted.</p>
<!-- @@@writeNdefMessages -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2015 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|