AusweisApp
Lade ...
Suche ...
Keine Treffer
SmartModel.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "Env.h"
13#include "SingletonCreator.h"
15
16#include <QObject>
17#include <QSharedPointer>
18#include <QVariant>
19#include <QtQml/qqmlregistration.h>
20
21
22class test_SmartModel;
23
24
25namespace governikus
26{
27
29 : public QObject
30 , public SingletonCreator<SmartModel>
31{
32 Q_OBJECT
33 Q_CLASSINFO("RegisterEnumClassesUnscoped", "false")
34 QML_ELEMENT
35 QML_SINGLETON
36
37 friend class Env;
38 friend class ::test_SmartModel;
39
40 Q_PROPERTY(State state READ getState NOTIFY fireStateChanged)
41 Q_PROPERTY(QString errorString READ getErrorString NOTIFY fireErrorStringChanged)
42 Q_PROPERTY(int progress READ getProgress NOTIFY fireProgressChanged)
43 Q_PROPERTY(bool isScanRunning READ isScanRunning NOTIFY fireScanRunningChanged)
44
45 public:
46 enum class State
47 {
53 READY
54 };
55 Q_ENUM(State)
56
57 private:
58 SmartModel();
59 State mStatus;
60 QString mErrorString;
61 CardInfo mCachedCardInfo;
62 int mProgress;
63
64 void updateStatus();
65 void setErrorString(const QString& pError);
66 void updatePinStatus();
67 void setProgress(int pProgress);
68 void setStatus(State pNewStatus);
69
70 [[nodiscard]] bool isScanRunning() const;
71
72 private Q_SLOTS:
73 void onUpdateSupportInfoDone(const QVariant& pResult);
74 void onDeletePersonalizationDone(const QVariant& pResult);
75 void onDeleteSmartDone(const QVariant& pResult);
76 void onUpdateStatusDone(const QVariant& pResult);
77 void onUpdatePinStatusDone(const ReaderInfo& pInfo);
78 void onStatusChanged(const ReaderManagerPluginInfo& pInfo);
79
80 public:
81 State getState() const;
82 [[nodiscard]] QString getErrorString() const;
83 [[nodiscard]] int getProgress() const;
84
85 void workflowFinished(QSharedPointer<WorkflowContext> pContext);
86
87 [[nodiscard]] MobileEidType getMobileEidType() const;
88
89 Q_INVOKABLE void updateSupportInfo();
90 Q_INVOKABLE void deletePersonalization();
91 Q_INVOKABLE void deleteSmart();
92
93 Q_SIGNALS:
96 void fireDeletePersonalizationDone(bool pSuccess);
100};
101
102} // namespace governikus
Holds smart card information.
Definition CardInfo.h:26
Definition Env.h:42
Definition ReaderInfo.h:18
Definition SingletonCreator.h:22
Definition SmartModel.h:31
int getProgress() const
Definition SmartModel.cpp:298
QString errorString
Definition SmartModel.h:41
void fireDeletePersonalizationDone(bool pSuccess)
Q_INVOKABLE void updateSupportInfo()
Definition SmartModel.cpp:372
Q_INVOKABLE void deleteSmart()
Definition SmartModel.cpp:401
int progress
Definition SmartModel.h:42
State getState() const
Definition SmartModel.cpp:337
State
Definition SmartModel.h:47
MobileEidType getMobileEidType() const
Definition SmartModel.cpp:422
QString getErrorString() const
Definition SmartModel.cpp:348
bool isScanRunning
Definition SmartModel.h:43
Q_INVOKABLE void deletePersonalization()
Definition SmartModel.cpp:389
void workflowFinished(QSharedPointer< WorkflowContext > pContext)
Definition SmartModel.cpp:354
state
Definition http_parser.cpp:280
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17