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
qpcscmanager_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 QPCSCMANAGER_P_H
5#define QPCSCMANAGER_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 "qpcsc_p.h"
20
21QT_BEGIN_NAMESPACE
22
23class QPcscSlot;
24class QPcscCard;
25class QTimer;
26
27class QPcscManager : public QObject
28{
30public:
31 explicit QPcscManager(QObject *parent = nullptr);
33
34 QPcscCard *connectToCard(QPcscSlot *slot);
35
36private:
37 QTimer *m_stateUpdateTimer;
38 bool m_targetDetectionRunning = false;
39 bool m_hasContext = false;
40 SCARDCONTEXT m_context;
41 QMap<QPcscSlotName, QPcscSlot *> m_slots;
42 QList<SCARD_READERSTATE> m_slotStates;
44
45 [[nodiscard]] bool establishContext();
46 void processSlotUpdates();
47 void updateSlotList();
48 void removeSlots();
49 void retryCardDetection(const QPcscSlot *slot);
50
51public Q_SLOTS:
54
55private Q_SLOTS:
56 void onStateUpdate();
57
61};
62
63QT_END_NAMESPACE
64
65#endif // QPCSCMANAGER_P_H
void onStopTargetDetectionRequest()
~QPcscManager() override
QPcscCard * connectToCard(QPcscSlot *slot)
static constexpr int DefaultPollIntervalMs
#define LIST_READER_BUFFER_EXTRA