The QNearFieldTagType2 class provides an interface for communicating with an NFC Tag Type 2 tag. More...
#include <QNearFieldTagType2>
Inherits: QNearFieldTarget.
This class was introduced in Qt Mobility 1.2.
QNearFieldTagType2 ( QObject * parent = 0 ) | |
~QNearFieldTagType2 () | |
int | memorySize () |
virtual RequestId | readBlock ( quint8 blockAddress ) |
virtual RequestId | selectSector ( quint8 sector ) |
quint8 | version () |
virtual RequestId | writeBlock ( quint8 blockAddress, const QByteArray & data ) |
virtual bool | hasNdefMessage () |
virtual RequestId | readNdefMessages () |
virtual Type | type () const |
virtual bool | waitForRequestCompleted ( const RequestId & id, int msecs = 5000 ) |
virtual RequestId | writeNdefMessages ( const QList<QNdefMessage> & messages ) |
virtual bool | handleResponse ( const QNearFieldTarget::RequestId & id, const QByteArray & response ) |
The QNearFieldTagType2 class provides an interface for communicating with an NFC Tag Type 2 tag.
Constructs a new tag type 2 near field target with parent.
Destroys the tag type 2 near field target.
Reimplemented from QNearFieldTarget::handleResponse().
Reimplemented from QNearFieldTarget::hasNdefMessage().
Returns the memory size in bytes of the tag.
Requests 16 bytes of data starting at blockAddress. Returns a request id which can be used to track the completion status of the request.
Once the request completes successfully the response can be retrieved from the requestResponse() function. The response of this request will be a QByteArray.
See also requestCompleted() and waitForRequestCompleted().
Reimplemented from QNearFieldTarget::readNdefMessages().
Selects the sector upon which subsequent readBlock() and writeBlock() operations will act.
Returns a request id which can be used to track the completion status of the request.
Once the request completes the response can be retrieved from the requestResponse() function. The response of this request will be a boolean value, true for success; otherwise false.
Note: this request has a passive acknowledgement mechanism. The operation is deemed successful if no response is received within 1ms. It will therefore take a minimum of 1 millisecond for the requestCompleted() signal to be emitted and calling waitForRequestCompleted() on the returned request id may cause the current thread to block for up to 1 millisecond.
Reimplemented from QNearFieldTarget::type().
Returns the NFC Tag Type 2 specification version number that the tag supports.
Reimplemented from QNearFieldTarget::waitForRequestCompleted().
Writes 4 bytes of data to the block at blockAddress. Returns a request id which can be used to track the completion status of the request.
Once the request completes the response can be retrieved from the requestResponse() function. The response of this request will be a boolean value, true for success; otherwise false.
Returns true on success; otherwise returns false.
Reimplemented from QNearFieldTarget::writeNdefMessages().