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
qiosnfcndefsessiondelegate_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 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
QIOSNFCNDEFSESSIONDELEFATE_P_H
5
#
define
QIOSNFCNDEFSESSIONDELEFATE_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
<
QtCore
/
qglobal
.
h
>
19
20
#
include
<
QtCore
/
private
/
qcore_mac_p
.
h
>
21
22
#
include
"qnearfieldmanager.h"
23
#
include
"qnearfieldtarget.h"
24
25
#
include
<
Foundation
/
Foundation
.
h
>
26
#
include
<
CoreNFC
/
CoreNFC
.
h
>
27
28
QT_BEGIN_NAMESPACE
29
30
class
QNearFieldManagerPrivateImpl;
31
class
QNfcNdefNotifier
;
32
class
QNearFieldTarget;
33
class
QNdefMessage
;
34
class
QString;
35
36
dispatch_queue_t
qt_Nfc_Queue
();
37
38
QT_END_NAMESPACE
39
40
QT_USE_NAMESPACE
41
42
@interface QT_MANGLE_NAMESPACE(QIosNfcNdefSessionDelegate) : NSObject<NFCNDEFReaderSessionDelegate>
43
44
@property (strong, nonatomic) NFCNDEFReaderSession *session;
45
@property (strong, nonatomic) id<NFCNDEFTag> ndefTag;
46
47
48
-(instancetype)initWithNotifier:(QNfcNdefNotifier *)aNotifier;
49
-(
void
)dealloc;
50
51
-(QNfcNdefNotifier *)ndefNotifier;
52
53
-(
void
)setAlertMessage:(
const
QString &)message;
54
55
// Those methods to be called on the session.sessionQueue:
56
-(
bool
)startSession;
57
-(
void
)stopSession:(
const
QString &)message;
58
-(
void
)abort;
59
60
// Delegate's methods, implementing the protocol NFCNDEFReaderSessionDelegate.
61
// Those methods not to be called by the Qt.
62
63
// "Gets called when a session becomes invalid. At this point the client is expected to
64
// discard the returned session object."
65
-(
void
)readerSession:(NFCNDEFReaderSession *)session
66
didInvalidateWithError:(NSError *)error;
67
68
// "Gets called when the reader detects NFC tag(s) with NDEF messages in the polling sequence.
69
// Polling is automatically restarted once the detected tag is removed from the reader's read
70
// range. This method is only get call if the optional -readerSession:didDetectTags: method
71
// is not implemented."
72
-(
void
)readerSession:(NFCNDEFReaderSession *)session
73
didDetectNDEFs:(NSArray<NFCNDEFMessage *> *)messages;
74
75
// "Gets called when the reader detects NDEF tag(s) in the RF field. Presence of this method
76
// overrides -readerSession:didDetectNDEFs: and enables read-write capability for the session."
77
-(
void
)readerSession:(NFCNDEFReaderSession *)session
78
didDetectTags:(NSArray<__kindof id<NFCNDEFTag>> *)tags;
79
80
// "Gets called when the NFC reader session has become active. RF is enabled and reader is
81
// scanning for tags."
82
-(
void
)readerSessionDidBecomeActive:(NFCNDEFReaderSession *)session;
83
84
@end
85
86
QT_NAMESPACE_ALIAS_OBJC_CLASS(QIosNfcNdefSessionDelegate);
87
88
#
endif
// QIOSNFCNDEFSESSIONDELEFATE_P_H
QNdefMessage
The QNdefMessage class provides an NFC NDEF message.
Definition
qndefmessage.h:23
QNfcNdefNotifier
Definition
qiosndefnotifier_p.h:32
qt_Nfc_Queue
dispatch_queue_t qt_Nfc_Queue()
Definition
qiosnfcndefsessiondelegate.mm:18
qtconnectivity
src
nfc
ios
qiosnfcndefsessiondelegate_p.h
Generated on
for Qt by
1.18.0