AusweisApp
Lade ...
Suche ...
Keine Treffer
ReaderManagerPluginInfo.h
gehe zur Dokumentation dieser Datei
1
9
#pragma once
10
11
#include "
EnumHelper.h
"
12
13
#include <QMap>
14
#include <QString>
15
#include <QVariant>
16
17
namespace
governikus
18
{
19
20
defineEnumTypeQmlExposed
(
ReaderManagerPluginType
21
,
UNKNOWN
22
,
MOCK
23
,
PCSC
24
, NFC
25
,
REMOTE_IFD
26
,
LOCAL_IFD
27
, SMART
28
,
SIMULATOR
29
)
30
31
32
class
ReaderManagerPluginInfo
33
{
34
public
:
35
enum class
Key
36
{
37
PCSC_LITE_VERSION
,
LOCAL_IFD_STATE
38
};
39
40
enum class
InitialScan
41
{
42
SUCCEEDED
,
43
FAILED
,
44
UNKNOWN
45
};
46
47
public
:
48
ReaderManagerPluginInfo
(
ReaderManagerPluginType
pType
= ReaderManagerPluginType::UNKNOWN,
49
bool
pEnabled
=
false
,
50
bool
pAvailable
=
false
);
51
52
[[
nodiscard
]]
const
ReaderManagerPluginType
& getPluginType()
const
53
{
54
return
mType;
55
}
56
57
58
[[
nodiscard
]]
bool
hasValue
(
Key
pKey
)
const
59
{
60
return
mValues
.contains(
pKey
);
61
}
62
63
64
[[
nodiscard
]]
QVariant
getValue(
Key
pKey
)
const
65
{
66
return
mValues
.value(
pKey
);
67
}
68
69
70
void
setValue(
Key
pKey
,
const
QVariant
&
pValue
)
71
{
72
mValues
.insert(
pKey
,
pValue
);
73
}
74
75
79
[[
nodiscard
]]
bool
isEnabled()
const
80
{
81
return
mEnabled;
82
}
83
84
85
void
setEnabled(
bool
pEnabled
)
86
{
87
mEnabled =
pEnabled
;
88
}
89
90
94
[[
nodiscard
]]
bool
isAvailable
()
const
95
{
96
return
mAvailable
;
97
}
98
99
100
void
setAvailable
(
bool
pAvailable
)
101
{
102
mAvailable
=
pAvailable
;
103
}
104
105
106
[[
nodiscard
]]
bool
isScanRunning()
const
107
{
108
return
mScanRunning
;
109
}
110
111
112
void
setScanRunning
(
bool
pScanRunning
)
113
{
114
mScanRunning
=
pScanRunning
;
115
}
116
117
118
[[
nodiscard
]]
InitialScan
getInitialScanState
()
const
119
{
120
return
mInitialScan
;
121
}
122
123
124
void
setInitialScanState(
InitialScan
pInitialScan
)
125
{
126
mInitialScan
=
pInitialScan
;
127
}
128
129
private
:
130
ReaderManagerPluginType
mType;
131
QMap<Key, QVariant>
mValues
;
132
bool
mEnabled;
133
bool
mAvailable
;
134
bool
mScanRunning
;
135
InitialScan
mInitialScan
;
136
137
};
138
139
}
// namespace governikus
EnumHelper.h
defineEnumTypeQmlExposed
#define defineEnumTypeQmlExposed(enumName,...)
Definition
EnumHelper.h:92
governikus
Implementation of GeneralAuthenticate response APDUs.
Definition
CommandApdu.h:17
governikus::UNKNOWN
UNKNOWN
Definition
ResponseApdu.h:65
governikus::KeyAgreementStatus::FAILED
@ FAILED
governikus::decodeObject
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition
ASN1TemplateUtil.h:114
src
card
base
ReaderManagerPluginInfo.h
Erzeugt von
1.10.0