AusweisApp2
ReaderManagerPlugInInfo.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "EnumHelper.h"
10 
11 #include <QMap>
12 #include <QString>
13 #include <QVariant>
14 
15 namespace governikus
16 {
17 
18 defineEnumType(ReaderManagerPlugInType, UNKNOWN, PCSC, BLUETOOTH, NFC, REMOTE)
19 
20 
21 class ReaderManagerPlugInInfo
22 {
23  public:
24  enum class Key
25  {
26  PCSC_LITE_VERSION,
27  };
28 
29  public:
30  ReaderManagerPlugInInfo(ReaderManagerPlugInType pType = ReaderManagerPlugInType::UNKNOWN,
31  bool pEnabled = false,
32  bool pAvailable = false);
33 
34  const ReaderManagerPlugInType& getPlugInType() const
35  {
36  return mType;
37  }
38 
39 
40  bool hasValue(Key pKey)
41  {
42  return mValues.contains(pKey);
43  }
44 
45 
46  QVariant getValue(Key pKey) const
47  {
48  return mValues.value(pKey);
49  }
50 
51 
52  void setValue(Key pKey, const QVariant& pValue)
53  {
54  mValues.insert(pKey, pValue);
55  }
56 
57 
61  bool isEnabled() const
62  {
63  return mEnabled;
64  }
65 
66 
67  void setEnabled(bool pEnabled)
68  {
69  mEnabled = pEnabled;
70  }
71 
72 
76  bool isAvailable() const
77  {
78  return mAvailable;
79  }
80 
81 
82  void setAvailable(bool pAvailable)
83  {
84  mAvailable = pAvailable;
85  }
86 
87 
88  bool isResponding() const
89  {
90  return mResponding;
91  }
92 
93 
94  void setResponding(bool pResponding)
95  {
96  mResponding = pResponding;
97  }
98 
99  private:
100  ReaderManagerPlugInType mType;
101  QMap<Key, QVariant> mValues;
102  bool mEnabled;
103  bool mAvailable;
104  bool mResponding;
105 };
106 
107 } // namespace governikus
governikus::UNKNOWN
UNKNOWN
Definition: SmartCardDefinitions.h:18
Initializer.h
ReaderManagerPlugInInfo.h
moc_ReaderManagerPlugInInfo.cpp
governikus
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
governikus::defineEnumType
defineEnumType(KeyAgreementType, DH, ECDH) defineEnumType(MappingType
Method used for key agreement:
EnumHelper.h
governikus::Initializer::Entry
Definition: Initializer.h:31