AusweisApp
 
Lade ...
Suche ...
Keine Treffer
IfdCard.h
gehe zur Dokumentation dieser Datei
1
4
5#pragma once
6
7#include "Card.h"
10
11#include <QMutex>
12#include <QSharedPointer>
13#include <QString>
14#include <QWaitCondition>
15
16
17class test_IfdCard;
18
19
20namespace governikus
21{
22
24 : public Card
25{
26 Q_OBJECT
27
28 friend class ::test_IfdCard;
29
30 private:
31 bool mWaitingForAnswer;
32 QWaitCondition mWaitCondition;
33 QMutex mResponseAvailable;
34 QMutex mProcessResponse;
35
36 IfdMessageType mExpectedAnswerType;
37 QJsonObject mResponse;
38 const QSharedPointer<IfdDispatcherClient> mDispatcher;
39 QString mReaderName;
40 QString mSlotHandle;
41 bool mConnected;
42 QString mProgressMessage;
43 bool mCardRemoved;
44
45 bool sendMessage(const QSharedPointer<const IfdMessage>& pMessage, IfdMessageType pExpectedAnswer, unsigned long pExtraTimeout = 0);
46
47 private Q_SLOTS:
48 void onMessageReceived(IfdMessageType pMessageType, const QJsonObject& pJsonObject);
49 void onDispatcherClosed(GlobalStatus::Code pCloseCode, const QByteArray& pId);
50
51 Q_SIGNALS:
53
54 public:
55 IfdCard(const QSharedPointer<IfdDispatcherClient>& pDispatcher, const QString& pReaderName);
56 ~IfdCard() override;
57
58 CardReturnCode establishConnection() override;
59 CardReturnCode releaseConnection() override;
60 bool isConnected() const override;
61 void setProgressMessage(const QString& pMessage, int pProgress = -1) override;
62 void setErrorMessage(const QString& pMessage) override;
63
64 ResponseApduResult transmit(const CommandApdu& pCmd) override;
65
66 EstablishPaceChannelOutput establishPaceChannel(PacePasswordId pPasswordId, int pPreferredPinLength, const QByteArray& pChat, const QByteArray& pCertificateDescription) override;
67
68 CardReturnCode destroyPaceChannel() override;
69
70 ResponseApduResult setEidPin(quint8 pTimeoutSeconds) override;
71};
72
73} // namespace governikus
Card()
Definition Card.cpp:15
Definition EstablishPaceChannelOutput.h:45
EstablishPaceChannelOutput establishPaceChannel(PacePasswordId pPasswordId, int pPreferredPinLength, const QByteArray &pChat, const QByteArray &pCertificateDescription) override
Establishes a PACE channel, i.e.
Definition IfdCard.cpp:243
ResponseApduResult setEidPin(quint8 pTimeoutSeconds) override
Sets a new eID PIN, i.e.
Definition IfdCard.cpp:306
IfdCard(const QSharedPointer< IfdDispatcherClient > &pDispatcher, const QString &pReaderName)
Definition IfdCard.cpp:120
ResponseApduResult transmit(const CommandApdu &pCmd) override
Performs a transmit to the smart card.
Definition IfdCard.cpp:215
bool isConnected() const override
Is the smart card connected, i.e.
Definition IfdCard.cpp:197
void setErrorMessage(const QString &pMessage) override
Definition IfdCard.cpp:209
void setProgressMessage(const QString &pMessage, int pProgress=-1) override
Sets the current workflow progress message.
Definition IfdCard.cpp:203
CardReturnCode destroyPaceChannel() override
Destroys an existing PACE channel, i.e.
Definition IfdCard.cpp:283
CardReturnCode establishConnection() override
Establish a connection to the smart card.
Definition IfdCard.cpp:148
~IfdCard() override
Definition IfdCard.cpp:142
CardReturnCode releaseConnection() override
Destroys the previously established connection to the smart card.
Definition IfdCard.cpp:173
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17
quint8
Definition ResponseApdu.h:65
Definition ResponseApdu.h:116