AusweisApp2
PcscReaderFeature.h
gehe zur Dokumentation dieser Datei
1 
5 #pragma once
6 
7 #include "EnumHelper.h"
8 #include "PcscUtils.h"
9 
10 #include <QMap>
11 
12 namespace governikus
13 {
14 defineEnumType(FeatureID,
15  VERIFY_PIN_START = 0x1,
16  VERIFY_PIN_FINISH = 0x2,
17  MODIFY_PIN_START = 0x3,
18  MODIFY_PIN_FINISH = 0x4,
19  GET_KEY_PRESSED = 0x5,
20  VERIFY_PIN_DIRECT = 0x6,
21  MODIFY_PIN_DIRECT = 0x7,
22  MCT_READERDIRECT = 0x8,
23  MCT_UNIVERSAL = 0x9,
24  IFD_PIN_PROP = 0xa,
25  ABORT = 0xb,
26  SET_SPE_MESSAGE = 0x0c,
27  VERIFY_PIN_DIRECT_APP_ID = 0x0d,
28  MODIFY_PIN_DIRECT_APP_ID = 0x0e,
29  WRITE_DISPLAY = 0x0f,
30  GET_KEY = 0x10,
31  IFD_DISPLAY_PROPERTIES = 0x11,
32  TLV_PROPERTIES = 0x12,
33  CCID_ESC_COMMAND = 0x13,
34  EXECUTE_PACE = 0x20)
35 
36 class PcscReaderFeature
37 {
38  private:
39  QMap<FeatureID, PCSC_INT> mFeatures;
40 
41  friend QDebug operator<<(QDebug, const PcscReaderFeature&);
42 
43  public:
44  PcscReaderFeature(const char* const pFeaturesTLV, PCSC_INT pLength = 0);
45 
46  [[nodiscard]] bool contains(FeatureID pFeatureID) const;
47 
52  [[nodiscard]] PCSC_INT getValue(FeatureID pFeatureID) const;
53 };
54 
55 
56 inline QDebug operator<<(QDebug pDbg, const governikus::PcscReaderFeature& pPcscReaderFeature)
57 {
58  QDebugStateSaver saver(pDbg);
59  pDbg << pPcscReaderFeature.mFeatures.keys();
60  return pDbg;
61 }
62 
63 
64 } // namespace governikus
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
QDebug operator<<(QDebug pDbg, const CardInfo &pCardInfo)
Definition: CardInfo.cpp:287
defineEnumType(ActivationType, UNKNOWN, SHOWUI, STATUS, TCTOKENURL) defineEnumType(StatusFormat
Format types for status responses.