summaryrefslogtreecommitdiffstats
path: root/tests/auto/nfccommons/qnearfieldmanager_emulator_p.h
blob: c842e75fc496d0fec3ef6890acbb8059d35632ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QNEARFIELDMANAGER_EMULATOR_H
#define QNEARFIELDMANAGER_EMULATOR_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include <QtNfc/private/qnearfieldmanager_p.h>
#include <QtNfc/private/qnearfieldtarget_p.h>
#include <QtNfc/qndeffilter.h>

#include <QtCore/QMetaMethod>
#include <QtCore/QObject>
#include <QtCore/QPointer>

QT_BEGIN_NAMESPACE

class TagBase;
class QNearFieldManagerPrivateImpl : public QNearFieldManagerPrivate
{
    Q_OBJECT

public:
    QNearFieldManagerPrivateImpl();
    ~QNearFieldManagerPrivateImpl() override;

    bool isEnabled() const override;

    bool isSupported(QNearFieldTarget::AccessMethod accessMethod) const override;

    bool startTargetDetection(QNearFieldTarget::AccessMethod accessMethod) override;
    void stopTargetDetection(const QString &message) override;
    void setUserInformation(const QString &message) override;

    void reset();

signals:
    void userInformationChanged(const QString &message);

private slots:
    void tagActivated(TagBase *tag);
    void tagDeactivated(TagBase *tag);

private:
    QMap<TagBase *, QPointer<QNearFieldTargetPrivate> > targets;

};

QT_END_NAMESPACE

#endif // QNEARFIELDMANAGER_EMULATOR_H