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  protected:
40  ~AuthModel() override = default;
41  static AuthModel& getInstance();
42 
43  public:
44  void resetContext(const QSharedPointer<AuthContext>& pContext = QSharedPointer<AuthContext>());
45 
46  const QString& getTransactionInfo() const;
47  int getProgressValue() const;
48  const QString getProgressMessage() const;
49  QString getErrorHeader() const;
50  QString getErrorText() const;
51  QString getStatusCode() const;
52 
53  Q_INVOKABLE void setSkipRedirect(bool pSkipRedirect);
54 
55  private Q_SLOTS:
56  void onDidAuthenticateEac1Changed();
57 
58  Q_SIGNALS:
61 };
62 
63 
64 } // 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
const QString & getTransactionInfo() const
Definition: AuthModel.cpp:45
int getProgressValue() const
Definition: AuthModel.cpp:51
QString getStatusCode() const
Definition: AuthModel.cpp:104
QString getErrorHeader() const
Definition: AuthModel.cpp:73
QString errorHeader
Definition: AuthModel.h:30
~AuthModel() override=default
const QString getProgressMessage() const
Definition: AuthModel.cpp:62
void resetContext(const QSharedPointer< AuthContext > &pContext=QSharedPointer< AuthContext >())
Definition: AuthModel.cpp:23
Q_INVOKABLE void setSkipRedirect(bool pSkipRedirect)
Definition: AuthModel.cpp:133
QString getErrorText() const
Definition: AuthModel.cpp:85
QString transactionInfo
Definition: AuthModel.h:27
QString progressMessage
Definition: AuthModel.h:29
static AuthModel & getInstance()
Definition: AuthModel.cpp:111
Definition: Env.h:39
Definition: WorkflowModel.h:23
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15