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
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
29
33class QNdefMessage;
34class QString;
35
36dispatch_queue_t qt_Nfc_Queue();
37
39
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;
50
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
87
88#endif // QIOSNFCNDEFSESSIONDELEFATE_P_H
The QNdefMessage class provides an NFC NDEF message.
The QNearFieldTarget class provides an interface for communicating with a target device.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
#define QT_NAMESPACE_ALIAS_OBJC_CLASS(__KLASS__)
Definition qcore_mac_p.h:58
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
dispatch_queue_t qt_Nfc_Queue()
QSharedPointer< int > strong