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