1 | // Copyright (C) 2016 - 2012 Research In Motion |
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 QNDEFNFCSMARTPOSTERRECORD_P_H |
5 | #define QNDEFNFCSMARTPOSTERRECORD_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 | QT_BEGIN_NAMESPACE |
19 | |
20 | class QNdefNfcActRecord : public QNdefRecord |
21 | { |
22 | public: |
23 | Q_DECLARE_NDEF_RECORD(QNdefNfcActRecord, QNdefRecord::NfcRtd, "act" , QByteArray(0, char(0))) |
24 | |
25 | void setAction(QNdefNfcSmartPosterRecord::Action action); |
26 | QNdefNfcSmartPosterRecord::Action action() const; |
27 | }; |
28 | |
29 | class QNdefNfcSizeRecord : public QNdefRecord |
30 | { |
31 | public: |
32 | Q_DECLARE_NDEF_RECORD(QNdefNfcSizeRecord, QNdefRecord::NfcRtd, "s" , QByteArray(0, char(0))) |
33 | |
34 | void setSize(quint32 size); |
35 | quint32 size() const; |
36 | }; |
37 | |
38 | class QNdefNfcTypeRecord : public QNdefRecord |
39 | { |
40 | public: |
41 | Q_DECLARE_NDEF_RECORD(QNdefNfcTypeRecord, QNdefRecord::NfcRtd, "t" , QByteArray(0, char(0))) |
42 | |
43 | void setTypeInfo(const QString &type); |
44 | QString typeInfo() const; |
45 | }; |
46 | |
47 | class QNdefNfcSmartPosterRecordPrivate : public QSharedData |
48 | { |
49 | public: |
50 | QNdefNfcSmartPosterRecordPrivate() {} |
51 | |
52 | public: |
53 | QList<QNdefNfcTextRecord> m_titleList; |
54 | QNdefNfcUriRecord *m_uri = nullptr; |
55 | QNdefNfcActRecord *m_action = nullptr; |
56 | QList<QNdefNfcIconRecord> m_iconList; |
57 | QNdefNfcSizeRecord *m_size = nullptr; |
58 | QNdefNfcTypeRecord *m_type = nullptr; |
59 | }; |
60 | |
61 | QT_END_NAMESPACE |
62 | |
63 | Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(QNdefNfcActRecord, QNdefRecord::NfcRtd, "act" ) |
64 | Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(QNdefNfcSizeRecord, QNdefRecord::NfcRtd, "s" ) |
65 | Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD(QNdefNfcTypeRecord, QNdefRecord::NfcRtd, "t" ) |
66 | |
67 | #endif // QNDEFNFCSMARTPOSTERRECORD_P_H |
68 | |