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
qnearfieldmanager_ios_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 Governikus GmbH & Co. KG
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 QNEARFIELDMANAGER_IOS_P_H
5#define QNEARFIELDMANAGER_IOS_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#include <QtCore/private/qcore_mac_p.h>
18
19#include "qnearfieldmanager_p.h"
20
21#include <QTimer>
22
23#import <os/availability.h>
24
26
29
31
33
35{
37
38public:
41
42 bool isEnabled() const override
43 {
44 return true;
45 }
46
47 bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override;
48
51
52 void setUserInformation(const QString &message) override;
53
55 void tagDiscovered(void *tag);
56 void didInvalidateWithError(bool doRestart);
57
58private:
59 QT_MANGLE_NAMESPACE(QIosTagReaderDelegate) *delegate API_AVAILABLE(ios(13.0)) = nullptr;
60 QIosNfcNdefSessionDelegate *ndefDelegate = nullptr;
61 bool detectionRunning = false;
62 bool isSessionScheduled = false;
63 QTimer sessionTimer;
64 QList<QNearFieldTargetPrivateImpl *> detectedTargets;
66
67 bool scheduleSession(QNearFieldTarget::AccessMethod accessMethod);
68 void startSession();
69 bool startNdefSession();
70 void stopSession(const QString &error);
71 void stopNdefSession(const QString &error);
72 void clearTargets();
73
74private Q_SLOTS:
75 void onTagDiscovered(void *target);
76 void onTargetLost(QNearFieldTargetPrivateImpl *target);
77 void onDidInvalidateWithError(bool doRestart);
78 void onSessionTimer();
79};
80
81
83
84#endif // QNEARFIELDMANAGER_IOS_P_H
void didInvalidateWithError(bool doRestart)
bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override
void tagDiscovered(void *tag)
bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod) override
void setUserInformation(const QString &message) override
void stopTargetDetection(const QString &errorMessage) override
AccessMethod
This enum describes the access methods a near field target supports.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qtimer.h:20
Combined button and popup list for selecting options.
API_AVAILABLE(ios(13.4)) Qt
#define QT_NAMESPACE_ALIAS_OBJC_CLASS(__KLASS__)
Definition qcore_mac_p.h:58
AudioChannelLayoutTag tag
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
DBusConnection const char DBusError * error
GLenum target
GLuint GLsizei const GLchar * message
#define QT_MANGLE_NAMESPACE(name)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
static QString errorMessage(QUrlPrivate::ErrorCode errorCode, const QString &errorSource, qsizetype errorPosition)
Definition qurl.cpp:3517