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
14
namespace
governikus
15
{
16
17
defineEnumTypeQmlExposed
(
ReaderManagerPluginType
18
,
UNKNOWN
19
,
MOCK
20
,
PCSC
21
, NFC
22
,
REMOTE_IFD
23
,
LOCAL_IFD
24
, SMART
25
,
SIMULATOR
26
)
27
28
29
class
ReaderManagerPluginInfo
30
{
31
public
:
32
enum class
Key
33
{
34
PCSC_LITE_VERSION
,
LOCAL_IFD_STATE
35
};
36
37
enum class
InitialScan
38
{
39
SUCCEEDED
,
40
FAILED
,
41
UNKNOWN
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
{
99
mAvailable
=
pAvailable
;
100
}
101
102
103
[[
nodiscard
]]
bool
isScanRunning()
const
104
{
105
return
mScanRunning
;
106
}
107
108
109
void
setScanRunning
(
bool
pScanRunning
)
110
{
111
mScanRunning
=
pScanRunning
;
112
}
113
114
115
[[
nodiscard
]]
InitialScan
getInitialScanState
()
const
116
{
117
return
mInitialScan
;
118
}
119
120
121
void
setInitialScanState(
InitialScan
pInitialScan
)
122
{
123
mInitialScan
=
pInitialScan
;
124
}
125
126
private
:
127
ReaderManagerPluginType
mType;
128
QMap<Key, QVariant>
mValues
;
129
bool
mEnabled;
130
bool
mAvailable
;
131
bool
mScanRunning
;
132
InitialScan
mInitialScan
;
133
134
};
135
136
}
// namespace governikus
EnumHelper.h
defineEnumTypeQmlExposed
#define defineEnumTypeQmlExposed(enumName,...)
Definition
EnumHelper.h:88
governikus
Defines the AccessRight and AccessRole enum.
Definition
CommandApdu.h:17
governikus::UNKNOWN
UNKNOWN
Definition
ResponseApdu.h:66
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:112
src
card
base
ReaderManagerPluginInfo.h
Erzeugt von
1.10.0