AusweisApp
Lade ...
Suche ...
Keine Treffer
CardInfo.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
12#include "asn1/SecurityInfos.h"
13
14#include <QSharedPointer>
15
16namespace governikus
17{
18
24{
25 Q_DECLARE_TR_FUNCTIONS(governikus::CardInfo)
26 friend class Reader;
27 friend QDebug operator<<(QDebug, const CardInfo&);
28
29 public:
30 enum class TagType
31 {
32 UNKNOWN,
33 NFC_4A,
34 NFC_4B
35 };
36
37 private:
38 CardType mCardType;
39 QSharedPointer<const EFCardAccess> mEfCardAccess;
40 int mRetryCounter;
41 bool mPinDeactivated;
42 bool mPukInoperative;
43 bool mPinInitial;
44 TagType mTagType;
45 static const int UNDEFINED_RETRY_COUNTER;
46
47 public:
48 CardInfo(CardType pCardType, const QSharedPointer<const EFCardAccess>& = QSharedPointer<const EFCardAccess>(),
49 int pRetryCounter = UNDEFINED_RETRY_COUNTER, bool pPinDeactivated = false, bool pPukInoperative = false, bool pPinInitial = false);
50
51 void setCardType(CardType pCardType);
52 [[nodiscard]] CardType getCardType() const;
53 [[nodiscard]] QString getCardTypeString() const;
54
55 [[nodiscard]] QSharedPointer<const EFCardAccess> getEfCardAccess() const;
56 [[nodiscard]] MobileEidType getMobileEidType() const;
57
58 [[nodiscard]] int getRetryCounter() const;
59 void setRetryCounter(int pRetryCounter);
60
61 [[nodiscard]] TagType getTagType() const;
62 void setTagType(TagType pTagType);
63
64 [[nodiscard]] bool isRetryCounterDetermined() const;
65
69 [[nodiscard]] bool isPinDeactivated() const;
70
74 [[nodiscard]] bool isPukInoperative() const;
75
76 [[nodiscard]] bool isPinInitial() const;
77};
78
79QDebug operator<<(QDebug pDbg, const CardInfo& pCardInfo);
80
81
82} // namespace governikus
Holds smart card information.
Definition: CardInfo.h:24
void setCardType(CardType pCardType)
Definition: CardInfo.cpp:39
MobileEidType getMobileEidType() const
Definition: CardInfo.cpp:130
void setRetryCounter(int pRetryCounter)
Definition: CardInfo.cpp:88
QString getCardTypeString() const
Definition: CardInfo.cpp:51
bool isPukInoperative() const
The PUK is inoperative.
Definition: CardInfo.cpp:106
bool isPinDeactivated() const
The eID function has not been activated by the competent authority.
Definition: CardInfo.cpp:100
int getRetryCounter() const
Definition: CardInfo.cpp:82
CardType getCardType() const
Definition: CardInfo.cpp:45
void setTagType(TagType pTagType)
Definition: CardInfo.cpp:124
TagType getTagType() const
Definition: CardInfo.cpp:118
bool isRetryCounterDetermined() const
Definition: CardInfo.cpp:94
TagType
Definition: CardInfo.h:31
QSharedPointer< const EFCardAccess > getEfCardAccess() const
Definition: CardInfo.cpp:76
bool isPinInitial() const
Definition: CardInfo.cpp:112
Definition: Reader.h:20
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16
QDebug operator<<(QDebug pDbg, const CommandApdu &pCommandApdu)
Definition: CommandApdu.h:94