AusweisApp2
AuthModel.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "context/AuthContext.h"
10 #include "Env.h"
11 #include "WorkflowModel.h"
12 
13 #include <QObject>
14 #include <QQmlEngine>
15 #include <QSharedPointer>
16 #include <QString>
17 
18 namespace governikus
19 {
20 
21 class AuthModel
22  : public WorkflowModel
23 {
24  Q_OBJECT
25  friend class Env;
26 
27  Q_PROPERTY(QString transactionInfo READ getTransactionInfo NOTIFY fireTransactionInfoChanged)
28  Q_PROPERTY(int progressValue READ getProgressValue NOTIFY fireProgressChanged)
29  Q_PROPERTY(QString progressMessage READ getProgressMessage NOTIFY fireProgressChanged)
30  Q_PROPERTY(QString errorHeader READ getErrorHeader NOTIFY fireResultChanged)
31  Q_PROPERTY(QString errorText READ getErrorText NOTIFY fireResultChanged)
32  Q_PROPERTY(QString statusCode READ getStatusCode NOTIFY fireResultChanged)
33 
34  private:
35  QSharedPointer<AuthContext> mContext;
36  QString mTransactionInfo;
37 
38  AuthModel();
39  ~AuthModel() override = default;
40 
41  public:
42  void resetAuthContext(const QSharedPointer<AuthContext>& pContext = QSharedPointer<AuthContext>());
43 
44  const QString& getTransactionInfo() const;
45  int getProgressValue() const;
46  QString getProgressMessage() const;
47  QString getErrorHeader() const;
48  QString getErrorText() const;
49  QString getStatusCode() const;
50 
51  Q_INVOKABLE void requestTransportPinChange();
52 
53  private Q_SLOTS:
54  void onDidAuthenticateEac1Changed();
55 
56  Q_SIGNALS:
59 };
60 
61 
62 } // namespace governikus
Definition: AuthModel.h:23
int progressValue
Definition: AuthModel.h:28
void fireTransactionInfoChanged()
QString errorText
Definition: AuthModel.h:31
QString statusCode
Definition: AuthModel.h:32
QString getProgressMessage() const
Definition: AuthModel.cpp:58
const QString & getTransactionInfo() const
Definition: AuthModel.cpp:41
int getProgressValue() const
Definition: AuthModel.cpp:47
void resetAuthContext(const QSharedPointer< AuthContext > &pContext=QSharedPointer< AuthContext >())
Definition: AuthModel.cpp:19
QString getStatusCode() const
Definition: AuthModel.cpp:100
QString getErrorHeader() const
Definition: AuthModel.cpp:69
QString errorHeader
Definition: AuthModel.h:30
Q_INVOKABLE void requestTransportPinChange()
Definition: AuthModel.cpp:107
QString getErrorText() const
Definition: AuthModel.cpp:81
QString transactionInfo
Definition: AuthModel.h:27
QString progressMessage
Definition: AuthModel.h:29
Definition: Env.h:44
Definition: WorkflowModel.h:23
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15