AusweisApp2
Lade ...
Suche ...
Keine Treffer
AppController.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include "EnumHelper.h"
12#include "UIPlugIn.h"
13#include "WorkflowRequest.h"
14
15#include <QAbstractNativeEventFilter>
16#include <QAuthenticator>
17#include <QNetworkProxy>
18#include <QSharedPointer>
19
20class test_AppController;
21
22namespace governikus
23{
24class WorkflowController;
25class CommandLineParser;
26
27class AppController final
28 : public QObject
29 , public QAbstractNativeEventFilter
30{
31 Q_OBJECT
32 Q_DISABLE_COPY(AppController)
33 friend class ::test_AppController;
34 friend int initApp(int&, char**);
35 friend class CommandLineParser;
36
37 private:
38 static bool cShowUi;
39 QSharedPointer<WorkflowRequest> mActiveWorkflow;
40 QSharedPointer<WorkflowRequest> mWaitingRequest;
41 bool mShutdownRunning;
42 const UIPlugIn* mUiDomination;
43 bool mRestartApplication;
44 int mExitCode;
45
46 [[nodiscard]] bool canStartNewWorkflow() const;
47 void completeShutdown();
48 void waitForNetworkConnections(const std::function<void()>& pExitFunc);
49
50 public:
52
53 bool eventFilter(QObject* pObj, QEvent* pEvent) override;
54
55#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
56 bool nativeEventFilter(const QByteArray& pEventType, void* pMessage, qintptr* pResult) override;
57#else
58 bool nativeEventFilter(const QByteArray& pEventType, void* pMessage, long* pResult) override;
59#endif
60
61 void start();
62
63 [[nodiscard]] bool shouldApplicationRestart() const;
64
65 Q_SIGNALS:
69 void fireWorkflowStarted(QSharedPointer<WorkflowContext> pContext);
70 void fireWorkflowFinished(QSharedPointer<WorkflowContext> pContext);
71 void fireShowUi(UiModule pModule);
72 void fireHideUi();
73 void fireShowUserInformation(const QString& pInformationMessage);
75 void fireProxyAuthenticationRequired(const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator);
77 void fireUiDomination(const UIPlugIn* pUi, const QString& pInformation, bool pAccepted);
79
80 private Q_SLOTS:
81 void doShutdown(int pExitCode = EXIT_SUCCESS);
82 void onUiPlugin(const UIPlugIn* pPlugin);
83 void onWorkflowFinished();
84 void onWorkflowRequested(const QSharedPointer<WorkflowRequest>& pRequest);
85 void onCloseReminderFinished(bool pDontRemindAgain);
86 void onLanguageChanged();
87 void onUiDominationRequested(const UIPlugIn* pUi, const QString& pInformation);
88 void onUiDominationRelease();
89 void onRestartApplicationRequested();
90
91 private:
92 bool startNewWorkflow(const QSharedPointer<WorkflowRequest>& pRequest);
93 static void clearCacheFolders();
94
95};
96
97} // namespace governikus
Definition AppController.h:30
bool nativeEventFilter(const QByteArray &pEventType, void *pMessage, qintptr *pResult) override
Definition AppController.cpp:499
bool shouldApplicationRestart() const
Definition AppController.cpp:178
void fireWorkflowStarted(QSharedPointer< WorkflowContext > pContext)
void fireWorkflowFinished(QSharedPointer< WorkflowContext > pContext)
void fireProxyAuthenticationRequired(const QNetworkProxy &pProxy, QAuthenticator *pAuthenticator)
void fireShowUserInformation(const QString &pInformationMessage)
void start()
Definition AppController.cpp:110
friend int initApp(int &, char **)
bool eventFilter(QObject *pObj, QEvent *pEvent) override
Definition AppController.cpp:81
void fireShowUi(UiModule pModule)
void fireUiDomination(const UIPlugIn *pUi, const QString &pInformation, bool pAccepted)
friend class ::test_AppController
Definition AppController.h:33
Definition CommandLineParser.h:18
Definition WorkflowRequest.h:25
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16