AusweisApp
Lade ...
Suche ...
Keine Treffer
IfdCard.h
gehe zur Dokumentation dieser Datei
1
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
44 bool sendMessage(const QSharedPointer<const IfdMessage>& pMessage, IfdMessageType pExpectedAnswer, unsigned long pExtraTimeout = 0);
45
46 private Q_SLOTS:
47 void onMessageReceived(IfdMessageType pMessageTpe, const QJsonObject& pJsonObject);
48 void onDispatcherClosed(GlobalStatus::Code pCloseCode, const QByteArray& pId);
49
50 Q_SIGNALS:
52
53 public:
54 IfdCard(const QSharedPointer<IfdDispatcherClient>& pDispatcher, const QString& pReaderName);
55 ~IfdCard() override;
56
57 CardReturnCode establishConnection() override;
58 CardReturnCode releaseConnection() override;
59 bool isConnected() const override;
60 void setProgressMessage(const QString& pMessage, int pProgress = -1) override;
61 void setErrorMessage(const QString& pMessage) override;
62
63 ResponseApduResult transmit(const CommandApdu& pCmd) override;
64
65 EstablishPaceChannelOutput establishPaceChannel(PacePasswordId pPasswordId, int pPreferredPinLength, const QByteArray& pChat, const QByteArray& pCertificateDescription) override;
66
67 CardReturnCode destroyPaceChannel() override;
68
69 ResponseApduResult setEidPin(quint8 pTimeoutSeconds) override;
70};
71
72} // namespace governikus
Definition Card.h:43
Definition EstablishPaceChannelOutput.h:45
Code
Definition GlobalStatus.h:25
Definition IfdCard.h:25
EstablishPaceChannelOutput establishPaceChannel(PacePasswordId pPasswordId, int pPreferredPinLength, const QByteArray &pChat, const QByteArray &pCertificateDescription) override
Establishes a PACE channel, i.e.
Definition IfdCard.cpp:230
ResponseApduResult setEidPin(quint8 pTimeoutSeconds) override
Sets a new eID PIN, i.e.
Definition IfdCard.cpp:288
IfdCard(const QSharedPointer< IfdDispatcherClient > &pDispatcher, const QString &pReaderName)
Definition IfdCard.cpp:108
ResponseApduResult transmit(const CommandApdu &pCmd) override
Performs a transmit to the smart card.
Definition IfdCard.cpp:202
bool isConnected() const override
Is the smart card connected, i.e.
Definition IfdCard.cpp:184
void setErrorMessage(const QString &pMessage) override
Definition IfdCard.cpp:196
void setProgressMessage(const QString &pMessage, int pProgress=-1) override
Sets the current workflow progress message.
Definition IfdCard.cpp:190
CardReturnCode destroyPaceChannel() override
Destroys an existing PACE channel, i.e.
Definition IfdCard.cpp:265
CardReturnCode establishConnection() override
Establish a connection to the smart card.
Definition IfdCard.cpp:135
~IfdCard() override
Definition IfdCard.cpp:129
CardReturnCode releaseConnection() override
Destroys the previously established connection to the smart card.
Definition IfdCard.cpp:160
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17
quint8
Definition ResponseApdu.h:65
Definition ResponseApdu.h:116