AusweisApp
Lade ...
Suche ...
Keine Treffer
ReaderManagerPluginInfo.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include "EnumHelper.h"
8
9#include <QMap>
10#include <QString>
11#include <QVariant>
12
13
14namespace governikus
15{
16
18 , UNKNOWN
19 , MOCK
20 , PCSC
21 , NFC
23 , LOCAL_IFD
24 , SMART
25 , SIMULATOR
26 )
27
28
30{
31 public:
32 enum class Key
33 {
35 };
36
37 enum class InitialScan
38 {
40 FAILED,
42 };
43
44 public:
45 ReaderManagerPluginInfo(ReaderManagerPluginType pType = ReaderManagerPluginType::UNKNOWN,
46 bool pEnabled = false,
47 bool pAvailable = false);
48
49 [[nodiscard]] const ReaderManagerPluginType& getPluginType() const
50 {
51 return mType;
52 }
53
54
55 [[nodiscard]] bool hasValue(Key pKey) const
56 {
57 return mValues.contains(pKey);
58 }
59
60
61 [[nodiscard]] QVariant getValue(Key pKey) const
62 {
63 return mValues.value(pKey);
64 }
65
66
67 void setValue(Key pKey, const QVariant& pValue)
68 {
69 mValues.insert(pKey, pValue);
70 }
71
72
76 [[nodiscard]] bool isEnabled() const
77 {
78 return mEnabled;
79 }
80
81
82 void setEnabled(bool pEnabled)
83 {
84 mEnabled = pEnabled;
85 }
86
87
91 [[nodiscard]] bool isAvailable() const
92 {
93 return mAvailable;
94 }
95
96
97 void setAvailable(bool pAvailable)
98 {
100 }
101
102
103 [[nodiscard]] bool isScanRunning() const
104 {
105 return mScanRunning;
106 }
107
108
110 {
112 }
113
114
116 {
117 return mInitialScan;
118 }
119
120
121 void setInitialScanState(InitialScan pInitialScan)
122 {
124 }
125
126 private:
129 bool mEnabled;
130 bool mAvailable;
131 bool mScanRunning;
133
134};
135
136} // namespace governikus
#define defineEnumTypeQmlExposed(enumName,...)
Definition EnumHelper.h:88
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17
UNKNOWN
Definition ResponseApdu.h:66
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:112