AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
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 
19 defineEnumType(ReaderManagerPlugInType, UNKNOWN, PCSC, BLUETOOTH, NFC, REMOTE)
20 
21 
23 {
24  public:
25  enum class Key
26  {
27  PCSC_LITE_VERSION,
28  };
29 
30  public:
31  ReaderManagerPlugInInfo(ReaderManagerPlugInType pType = ReaderManagerPlugInType::UNKNOWN,
32  bool pEnabled = false,
33  bool pAvailable = false);
34 
35  const ReaderManagerPlugInType& getPlugInType() const
36  {
37  return mType;
38  }
39 
40 
41  bool hasValue(Key pKey)
42  {
43  return mValues.contains(pKey);
44  }
45 
46 
47  QVariant getValue(Key pKey) const
48  {
49  return mValues.value(pKey);
50  }
51 
52 
53  void setValue(Key pKey, const QVariant& pValue)
54  {
55  mValues.insert(pKey, pValue);
56  }
57 
58 
62  bool isEnabled() const
63  {
64  return mEnabled;
65  }
66 
67 
68  void setEnabled(bool pEnabled)
69  {
70  mEnabled = pEnabled;
71  }
72 
73 
77  bool isAvailable() const
78  {
79  return mAvailable;
80  }
81 
82 
83  void setAvailable(bool pAvailable)
84  {
85  mAvailable = pAvailable;
86  }
87 
88 
89  bool isResponding() const
90  {
91  return mResponding;
92  }
93 
94 
95  void setResponding(bool pResponding)
96  {
97  mResponding = pResponding;
98  }
99 
100 
101  private:
102  ReaderManagerPlugInType mType;
103  QMap<Key, QVariant> mValues;
104  bool mEnabled;
105  bool mAvailable;
106  bool mResponding;
107 };
108 
109 } /* namespace governikus */
const ReaderManagerPlugInType & getPlugInType() const
Definition: ReaderManagerPlugInInfo.h:35
bool isResponding() const
Definition: ReaderManagerPlugInInfo.h:89
bool isEnabled() const
Is the interface / daemon process etc.
Definition: ReaderManagerPlugInInfo.h:62
UNKNOWN
Definition: SelfAuthenticationData.h:32
Key
Definition: ReaderManagerPlugInInfo.h:25
void setResponding(bool pResponding)
Definition: ReaderManagerPlugInInfo.h:95
void setAvailable(bool pAvailable)
Definition: ReaderManagerPlugInInfo.h:83
bool hasValue(Key pKey)
Definition: ReaderManagerPlugInInfo.h:41
Definition: ReaderManagerPlugInInfo.h:22
void setEnabled(bool pEnabled)
Definition: ReaderManagerPlugInInfo.h:68
void setValue(Key pKey, const QVariant &pValue)
Definition: ReaderManagerPlugInInfo.h:53
defineEnumType(UiModule, CURRENT, DEFAULT, IDENTIFY, SETTINGS, PINMANAGEMENT) defineEnumType(StatusFormat
UI modules that can be requested to show.
bool isAvailable() const
Is there a device/interface?
Definition: ReaderManagerPlugInInfo.h:77
QVariant getValue(Key pKey) const
Definition: ReaderManagerPlugInInfo.h:47