Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qnearfieldtarget_android_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Centria research and development
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 QNEARFIELDTARGET_ANDROID_P_H
5#define QNEARFIELDTARGET_ANDROID_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 "android/androidjninfc_p.h"
20#include "qndefmessage.h"
21#include "qlist.h"
22#include "qstringlist.h"
23#include <QTimer>
24
25#include <QtCore/QJniObject>
26#include <QtCore/QJniEnvironment>
27
29
31{
33public:
35 const QByteArray uid,
36 QObject *parent = nullptr);
38
39 QByteArray uid() const override;
40 QNearFieldTarget::Type type() const override;
42
44
47 QNearFieldTarget::RequestId writeNdefMessages(const QList<QNdefMessage> &messages) override;
48
50 QNearFieldTarget::RequestId sendCommand(const QByteArray &command) override;
51
52 void setIntent(QJniObject intent);
53
57 void ndefMessageRead(const QNdefMessage &message, const QNearFieldTarget::RequestId &id);
58
59protected slots:
60 void checkIsTargetLost();
61
62protected:
63 void releaseIntent();
64 void updateTechList();
65 void updateType();
66 QNearFieldTarget::Type getTagType() const;
68 void handleTargetLost();
69 QJniObject getTagTechnology(const QString &tech) const;
70 bool setTagTechnology(const QStringList &technologies);
71 bool connect();
72 bool setCommandTimeout(int timeout);
73
74protected:
77 QTimer *targetCheckTimer;
78
81 QNearFieldTarget::Type tagType;
83};
84
85QT_END_NAMESPACE
86
87#endif // QNEARFIELDTARGET_ANDROID_P_H
Definition qlist.h:80
QByteArray getUid(const QJniObject &intent)
bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override
bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod) override
void newIntent(QJniObject intent) override
void stopTargetDetection(const QString &errorMessage) override
QJniObject getTagTechnology(const QString &tech) const
void targetLost(QNearFieldTargetPrivateImpl *target)
bool setTagTechnology(const QStringList &technologies)
QNearFieldTarget::RequestId readNdefMessages() override
void ndefMessageRead(const QNdefMessage &message, const QNearFieldTarget::RequestId &id)
QNearFieldTarget::Type type() const override
QNearFieldTarget::RequestId sendCommand(const QByteArray &command) override
QNearFieldTarget::AccessMethods accessMethods() const override
QByteArray uid() const override
bool isEnabled()
bool isSupported()