AusweisApp
Lade ...
Suche ...
Keine Treffer
IfdDispatcher.h
gehe zur Dokumentation dieser Datei
1
11#pragma once
12
13#include "DataChannel.h"
14#include "GlobalStatus.h"
15#include "messages/IfdMessage.h"
16#include "messages/IfdVersion.h"
17
18#include <QObject>
19#include <QSharedPointer>
20
21
22namespace governikus
23{
24
26 : public QObject
27{
29
30 private:
31 const QSharedPointer<DataChannel> mDataChannel;
32 IfdVersion::Version mVersion;
33 QString mContextHandle;
34
35 virtual bool processContext(IfdMessageType pMsgType, const QJsonObject& pMsgObject) = 0;
36
37 private Q_SLOTS:
38 void onReceived(const QByteArray& pDataBlock);
39 void onClosed(GlobalStatus::Code pCloseCode);
40
41 protected:
42 void setContextHandle(const QString& pHandle);
44
45 public:
47 ~IfdDispatcher() override;
48
49 [[nodiscard]] virtual bool isPairingConnection() const;
50 [[nodiscard]] virtual QString getId() const;
51 [[nodiscard]] virtual const QString& getContextHandle() const;
53 void saveRemoteNameInSettings(const QString& pName) const;
54
55 void close();
57
61};
62
63} // namespace governikus
Code
Definition GlobalStatus.h:30
Definition IfdDispatcher.h:27
void setVersion(IfdVersion::Version pVersion)
Definition IfdDispatcher.cpp:85
void fireReceived(IfdMessageType pMessageType, const QJsonObject &pJsonObject, const QString &pId)
IfdDispatcher(IfdVersion::Version pVersion, const QSharedPointer< DataChannel > &pDataChannel)
Definition IfdDispatcher.cpp:20
void fireClosed(GlobalStatus::Code pCloseCode, const QString &pId)
virtual bool isPairingConnection() const
Definition IfdDispatcher.cpp:91
IfdVersion::Version getVersion() const
Definition IfdDispatcher.cpp:119
virtual Q_INVOKABLE void send(const QSharedPointer< const IfdMessage > &pMessage)
Definition IfdDispatcher.cpp:134
virtual const QString & getContextHandle() const
Definition IfdDispatcher.cpp:113
void saveRemoteNameInSettings(const QString &pName) const
Definition IfdDispatcher.cpp:125
~IfdDispatcher() override
Definition IfdDispatcher.cpp:33
void setContextHandle(const QString &pHandle)
Definition IfdDispatcher.cpp:79
void close()
Definition IfdDispatcher.cpp:150
virtual QString getId() const
Definition IfdDispatcher.cpp:102
Version
Definition IfdVersion.h:17
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114