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_neard_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 BlackBerry Limited, Copyright (C) 2016 BasysKom GmbH
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_NEARD_P_H
5#define QNEARFIELDTARGET_NEARD_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 <QDBusObjectPath>
19#include <QDBusVariant>
20
21#include <qnearfieldtarget.h>
22#include <qnearfieldtarget_p.h>
23#include <qndefrecord.h>
24#include <qndefmessage.h>
25
27#include "properties_interface.h"
28#include "objectmanager_interface.h"
29#include "tag_interface.h"
30
32
34
36{
37public:
39
41
42 bool isValid();
43 QByteArray uid() const override;
44
45 QNearFieldTarget::Type type() const override;
46 QNearFieldTarget::AccessMethods accessMethods() const override;
47
48 bool hasNdefMessage() override;
51 QNearFieldTarget::RequestId writeNdefMessages(const QList<QNdefMessage> &messages) override;
52
53private:
54 QNdefRecord readRecord(const QDBusObjectPath &path);
55 void handleRecordFound(const QDBusObjectPath &path);
56 void createNdefMessage();
57 void handleReadError();
58 void handleWriteRequest();
59
60 QDBusObjectPath m_tagPath;
62 QList<QDBusObjectPath> m_recordPaths;
63 QTimer m_recordPathsCollectedTimer;
64 QTimer m_readErrorTimer;
65 QTimer m_delayedWriteTimer;
67 bool m_readRequested;
68 QNearFieldTarget::RequestId m_currentReadRequestId;
69 QNearFieldTarget::RequestId m_currentWriteRequestId;
70 QVariantMap m_currentWriteRequestData;
71};
72
74
75#endif // QNEARFIELDTARGET_NEARD_P_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtDBus
The QNdefRecord class provides an NFC NDEF record.
Definition qndefrecord.h:16
QNearFieldTarget::RequestId writeNdefMessages(const QList< QNdefMessage > &messages) override
QNearFieldTarget::RequestId readNdefMessages() override
QNearFieldTargetPrivateImpl(QJniObject intent, const QByteArray uid, QObject *parent=nullptr)
QNearFieldTarget::Type type() const override
QNearFieldTarget::RequestId sendCommand(const QByteArray &command) override
QNearFieldTarget::AccessMethods accessMethods() const override
bool hasNdefMessage() override
QByteArray uid() const override
\inmodule QtNfc \inheaderfile QNearFieldTarget
Type
This enum describes the type of tag the target is detected as.
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
Definition qtimer.h:20
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLsizei const GLchar *const * path