AusweisApp
Lade ...
Suche ...
Keine Treffer
IfdCard.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "Card.h"
12#include "IfdDispatcherClient.h"
13#include "messages/IfdMessage.h"
14
15#include <QMutex>
16#include <QSharedPointer>
17#include <QString>
18#include <QWaitCondition>
19
20
21namespace governikus
22{
23
25 : public Card
26{
27 Q_OBJECT
28
29 private:
30 bool mWaitingForAnswer;
31 QWaitCondition mWaitCondition;
32 QMutex mResponseAvailable;
33 QMutex mProcessResponse;
34
35 IfdMessageType mExpectedAnswerType;
36 QJsonObject mResponse;
37 const QSharedPointer<IfdDispatcherClient> mDispatcher;
38 QString mReaderName;
39 QString mSlotHandle;
40 bool mConnected;
41 QString mProgressMessage;
42
43 bool sendMessage(const QSharedPointer<const IfdMessage>& pMessage, IfdMessageType pExpectedAnswer, unsigned long pTimeout);
44
45 private Q_SLOTS:
46 void onMessageReceived(IfdMessageType pMessageTpe, const QJsonObject& pJsonObject);
47 void onDispatcherClosed(GlobalStatus::Code pCloseCode, const QString& pId);
48
49 Q_SIGNALS:
51
52 public:
53 IfdCard(const QSharedPointer<IfdDispatcherClient>& pDispatcher, const QString& pReaderName);
54 ~IfdCard() override;
55
56 CardReturnCode establishConnection() override;
57 CardReturnCode releaseConnection() override;
58 bool isConnected() const override;
59 void setProgressMessage(const QString& pMessage, int pProgress = -1) override;
60 void setErrorMessage(const QString& pMessage) override;
61
62 ResponseApduResult transmit(const CommandApdu& pCmd) override;
63
64 EstablishPaceChannelOutput establishPaceChannel(PacePasswordId pPasswordId, int pPreferredPinLength, const QByteArray& pChat, const QByteArray& pCertificateDescription) override;
65
66 CardReturnCode destroyPaceChannel() override;
67
68 ResponseApduResult setEidPin(quint8 pTimeoutSeconds) override;
69};
70
71} // namespace governikus
Definition Card.h:47
Definition EstablishPaceChannelOutput.h:49
Code
Definition GlobalStatus.h:30
Definition IfdCard.h:26
EstablishPaceChannelOutput establishPaceChannel(PacePasswordId pPasswordId, int pPreferredPinLength, const QByteArray &pChat, const QByteArray &pCertificateDescription) override
Establishes a PACE channel, i.e.
Definition IfdCard.cpp:225
ResponseApduResult setEidPin(quint8 pTimeoutSeconds) override
Sets a new eID PIN, i.e.
Definition IfdCard.cpp:283
IfdCard(const QSharedPointer< IfdDispatcherClient > &pDispatcher, const QString &pReaderName)
Definition IfdCard.cpp:103
ResponseApduResult transmit(const CommandApdu &pCmd) override
Performs a transmit to the smart card.
Definition IfdCard.cpp:197
bool isConnected() const override
Is the smart card connected, i.e.
Definition IfdCard.cpp:179
void setErrorMessage(const QString &pMessage) override
Definition IfdCard.cpp:191
void setProgressMessage(const QString &pMessage, int pProgress=-1) override
Sets the current workflow progress message.
Definition IfdCard.cpp:185
CardReturnCode destroyPaceChannel() override
Destroys an existing PACE channel, i.e.
Definition IfdCard.cpp:260
CardReturnCode establishConnection() override
Establish a connection to the smart card.
Definition IfdCard.cpp:130
~IfdCard() override
Definition IfdCard.cpp:124
CardReturnCode releaseConnection() override
Destroys the previously established connection to the smart card.
Definition IfdCard.cpp:155
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
quint8
Definition ResponseApdu.h:64
Definition ResponseApdu.h:115