8#include <QtCore/QString>
11#include <QtCore/QDebug>
13#include <QCoreApplication>
175 return d->ref.loadRelaxed();
185 return std::less<const RequestIdPrivate*>()(
d.constData(),
other.d.constData());
263 return d->accessMethods();
281 return d->disconnect();
292 return d->hasNdefMessage();
312 return d->readNdefMessages();
327 return d->writeNdefMessages(messages);
342 return d->maxCommandLength();
362 return d->sendCommand(command);
374 return d->waitForRequestCompleted(
id, msecs);
385 return d->requestResponse(
id);
399 qRegisterMetaType<QNearFieldTarget::RequestId>();
400 qRegisterMetaType<QNearFieldTarget::Error>();
401 qRegisterMetaType<QNdefMessage>();
415#include "moc_qnearfieldtarget.cpp"
void error(QNearFieldTarget::Error error, const QNearFieldTarget::RequestId &id)
void ndefMessageRead(const QNdefMessage &message)
void requestCompleted(const QNearFieldTarget::RequestId &id)
\inmodule QtNfc \inheaderfile QNearFieldTarget
bool operator==(const RequestId &other) const
RequestId & operator=(const RequestId &other)
Assigns a copy of other to this request id and returns a reference to this request id.
bool isValid() const
Returns true if this is a valid request id; otherwise returns false.
~RequestId()
Destroys the request id handle.
int refCount() const
Returns the current reference count of the request id.
bool operator<(const RequestId &other) const
RequestId()
Constructs a new invalid request id handle.
bool operator!=(const RequestId &other) const
The QNearFieldTarget class provides an interface for communicating with a target device.
Type type() const
Returns the type of tag type of this near field target.
void error(QNearFieldTarget::Error error, const QNearFieldTarget::RequestId &id)
This signal is emitted when an error occurs while processing request id.
bool waitForRequestCompleted(const RequestId &id, int msecs=5000)
Waits up to msecs milliseconds for the request id to complete.
bool hasNdefMessage()
Returns true if at least one NDEF message is stored on the near field target; otherwise returns false...
RequestId readNdefMessages()
Starts reading NDEF messages stored on the near field target.
Type
This enum describes the type of tag the target is detected as.
AccessMethods accessMethods() const
Returns the access methods supported by this near field target.
RequestId sendCommand(const QByteArray &command)
Sends command to the near field target.
QByteArray uid() const
Returns the UID of the near field target.
void requestCompleted(const QNearFieldTarget::RequestId &id)
This signal is emitted when a request id completes.
void disconnected()
This signal is emitted when the near field target moves out of proximity.
void ndefMessageRead(const QNdefMessage &message)
This signal is emitted when a complete NDEF message has been read from the target.
RequestId writeNdefMessages(const QList< QNdefMessage > &messages)
Writes the NDEF messages in messages to the target.
~QNearFieldTarget()
Destroys the near field target.
QNearFieldTarget(QObject *parent=nullptr)
Constructs a new near field target with parent.
QVariant requestResponse(const RequestId &id) const
Returns the decoded response for request id.
int maxCommandLength() const
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Combined button and popup list for selecting options.
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent