AusweisApp
Lade ...
Suche ...
Keine Treffer
SmartModel.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "Env.h"
14
15#include <QObject>
16#include <QSharedPointer>
17#include <QVariant>
18
19
20class test_SmartModel;
21
22
23namespace governikus
24{
25
27 : public QObject
28{
29 Q_OBJECT
30 friend class Env;
31 friend class ::test_SmartModel;
32
34 Q_PROPERTY(QString errorString READ getErrorString NOTIFY fireErrorStringChanged)
35 Q_PROPERTY(int progress READ getProgress NOTIFY fireProgressChanged)
36 Q_PROPERTY(bool isScanRunning READ isScanRunning NOTIFY fireScanRunningChanged)
37
38 public:
39 enum class QmlSmartState
40 {
47 };
48 Q_ENUM(QmlSmartState)
49
50 private:
51 SmartModel();
52 QmlSmartState mStatus;
53 QString mErrorString;
54 CardInfo mCachedCardInfo;
55 int mProgress;
56
57 void updateStatus();
58 void setErrorString(const QString& pError);
59 void updatePinStatus();
60 void setProgress(int pProgress);
61 void setStatus(QmlSmartState pNewStatus);
62
63 [[nodiscard]] bool isScanRunning() const;
64
65 private Q_SLOTS:
66 void onUpdateSupportInfoDone(const QVariant& pResult);
67 void onDeletePersonalizationDone(const QVariant& pResult);
68 void onDeleteSmartDone(const QVariant& pResult);
69 void onUpdateStatusDone(const QVariant& pResult);
70 void onUpdatePinStatusDone(const ReaderInfo& pInfo);
71 void onStatusChanged(const ReaderManagerPlugInInfo& pInfo);
72
73 public:
75 [[nodiscard]] QString getErrorString() const;
76 [[nodiscard]] int getProgress() const;
77
78 void workflowFinished(QSharedPointer<WorkflowContext> pContext);
79
80 [[nodiscard]] MobileEidType getMobileEidType() const;
81
82 Q_INVOKABLE void updateSupportInfo();
83 Q_INVOKABLE void deletePersonalization();
84 Q_INVOKABLE void deleteSmart();
85
86 Q_SIGNALS:
89 void fireDeletePersonalizationDone(bool pSuccess);
93};
94
95} // namespace governikus
Holds smart card information.
Definition: CardInfo.h:24
Definition: Env.h:42
Definition: ReaderInfo.h:18
Definition: SmartModel.h:28
int getProgress() const
Definition: SmartModel.cpp:298
QString errorString
Definition: SmartModel.h:34
void fireDeletePersonalizationDone(bool pSuccess)
QmlSmartState
Definition: SmartModel.h:40
Q_INVOKABLE void updateSupportInfo()
Definition: SmartModel.cpp:372
Q_INVOKABLE void deleteSmart()
Definition: SmartModel.cpp:401
QmlSmartState smartState
Definition: SmartModel.h:33
int progress
Definition: SmartModel.h:35
QmlSmartState getSmartState() const
Definition: SmartModel.cpp:337
MobileEidType getMobileEidType() const
Definition: SmartModel.cpp:422
QString getErrorString() const
Definition: SmartModel.cpp:348
bool isScanRunning
Definition: SmartModel.h:36
Q_INVOKABLE void deletePersonalization()
Definition: SmartModel.cpp:389
void workflowFinished(QSharedPointer< WorkflowContext > pContext)
Definition: SmartModel.cpp:354
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16