Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qndefrecord.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
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
QNDEFRECORD_H
5
#
define
QNDEFRECORD_H
6
7
#
include
<
QtCore
/
QSharedDataPointer
>
8
#
include
<
QtCore
/
QByteArray
>
9
#
include
<
QtNfc
/
qtnfcglobal
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
class
QNdefRecordPrivate;
14
15
class
Q_NFC_EXPORT
QNdefRecord
16
{
17
public
:
18
enum
TypeNameFormat {
19
Empty = 0x00,
20
NfcRtd = 0x01,
21
Mime = 0x02,
22
Uri = 0x03,
23
ExternalRtd = 0x04,
24
Unknown = 0x05
25
};
26
27
QNdefRecord();
28
~QNdefRecord();
29
30
QNdefRecord(
const
QNdefRecord &other);
31
QNdefRecord &operator=(
const
QNdefRecord &other);
32
33
void
setTypeNameFormat(TypeNameFormat typeNameFormat);
34
TypeNameFormat typeNameFormat()
const
;
35
36
void
setType(
const
QByteArray &type);
37
QByteArray type()
const
;
38
39
void
setId(
const
QByteArray &id);
40
QByteArray id()
const
;
41
42
void
setPayload(
const
QByteArray &payload);
43
QByteArray payload()
const
;
44
45
bool
isEmpty()
const
;
46
47
template
<
typename
T>
48
inline
bool
isRecordType()
const
49
{
50
T dummy;
51
return
(typeNameFormat() == dummy.typeNameFormat() && type() == dummy.type());
52
}
53
54
bool
operator==(
const
QNdefRecord &other)
const
;
55
inline
bool
operator!=(
const
QNdefRecord &other)
const
{
return
!operator==(other); }
56
57
void
clear();
58
59
protected
:
60
QNdefRecord(
const
QNdefRecord &other, TypeNameFormat typeNameFormat,
const
QByteArray &type);
61
QNdefRecord(
const
QNdefRecord &other, TypeNameFormat typeNameFormat);
62
QNdefRecord(TypeNameFormat typeNameFormat,
const
QByteArray &type);
63
64
private
:
65
QSharedDataPointer<QNdefRecordPrivate> d;
66
};
67
68
#
define
Q_DECLARE_NDEF_RECORD
(
className
,
typeNameFormat
,
type
,
initialPayload
)
69
className
(
)
:
QNdefRecord
(
typeNameFormat
,
type
)
{
setPayload
(
initialPayload
)
;
}
70
className
(
const
QNdefRecord
&
other
)
:
QNdefRecord
(
other
,
typeNameFormat
,
type
)
{
}
71
72
#
define
Q_DECLARE_ISRECORDTYPE_FOR_NDEF_RECORD
(
className
,
typeNameFormat_
,
type_
)
73
QT_BEGIN_NAMESPACE
74
template
<
>
inline
bool
QNdefRecord
::
isRecordType
<
className
>
(
)
const
75
{
76
return
(
typeNameFormat
(
)
==
typeNameFormat_
&&
type
(
)
==
type_
)
;
77
}
78
QT_END_NAMESPACE
79
80
Q_NFC_EXPORT size_t qHash(
const
QNdefRecord &key);
81
82
QT_END_NAMESPACE
83
84
#
endif
// QNDEFRECORD_H
QNdefRecord
The QNdefRecord class provides an NFC NDEF record.
Definition
qndefrecord.h:16
QNearFieldManagerPrivateImpl
Definition
qnearfieldmanager_ios_p.h:36
QNearFieldManagerPrivateImpl::isEnabled
bool isEnabled() const override
Definition
qnearfieldmanager_ios_p.h:43
QNearFieldManagerPrivateImpl::didInvalidateWithError
void didInvalidateWithError(bool doRestart)
QNearFieldManagerPrivateImpl::isSupported
bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override
Definition
qnearfieldmanager_android.cpp:64
QNearFieldManagerPrivateImpl::startTargetDetection
bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod) override
Definition
qnearfieldmanager_android.cpp:72
QNearFieldManagerPrivateImpl::setUserInformation
void setUserInformation(const QString &message) override
Definition
qnearfieldmanager_ios.mm:216
QNearFieldManagerPrivateImpl::~QNearFieldManagerPrivateImpl
~QNearFieldManagerPrivateImpl()
Definition
qnearfieldmanager_android.cpp:39
QNearFieldManagerPrivateImpl::stopTargetDetection
void stopTargetDetection(const QString &errorMessage) override
Definition
qnearfieldmanager_android.cpp:86
QNearFieldManagerPrivate
Definition
qnearfieldmanager_p.h:31
QNearFieldTargetPrivateImpl
Definition
qnearfieldtarget_ios_p.h:61
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
API_AVAILABLE
API_AVAILABLE(ios(13.4)) Qt
Definition
qapplekeymapper.mm:654
Q_FORWARD_DECLARE_OBJC_CLASS
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(RunLoopModeTracker))
QT_NAMESPACE_ALIAS_OBJC_CLASS
QT_NAMESPACE_ALIAS_OBJC_CLASS(QIosNfcNdefSessionDelegate)
qtconnectivity
src
nfc
qndefrecord.h
Generated on
for Qt by
1.18.0