AusweisApp
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 bool nativeEventFilter(const QByteArray& pEventType, void* pMessage, qintptr* pResult) override;
55
56 void start();
57
58 [[nodiscard]] bool shouldApplicationRestart() const;
59
60 Q_SIGNALS:
64 void fireWorkflowStarted(const QSharedPointer<WorkflowRequest>& pRequest);
65 void fireWorkflowFinished(const QSharedPointer<WorkflowRequest>& pRequest);
66 void fireWorkflowUnhandled(const QSharedPointer<WorkflowRequest>& pRequest);
67 void fireShowUi(UiModule pModule);
68 void fireHideUi();
69 void fireShowUserInformation(const QString& pInformationMessage);
71 void fireProxyAuthenticationRequired(const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator);
73 void fireUiDomination(const UIPlugIn* pUi, const QString& pInformation, bool pAccepted);
75
76 private Q_SLOTS:
77 void doShutdown(int pExitCode = EXIT_SUCCESS);
78 void onUiPlugin(const UIPlugIn* pPlugin);
79 void onWorkflowFinished();
80 void onWorkflowRequested(const QSharedPointer<WorkflowRequest>& pRequest);
81 void onCloseReminderFinished(bool pDontRemindAgain);
82 void onLanguageChanged();
83 void onUiDominationRequested(const UIPlugIn* pUi, const QString& pInformation);
84 void onUiDominationRelease();
85 void onRestartApplicationRequested();
86
87 private:
88 bool startNewWorkflow(const QSharedPointer<WorkflowRequest>& pRequest);
89 static void clearCacheFolders();
90
91};
92
93} // namespace governikus
Definition AppController.h:30
bool nativeEventFilter(const QByteArray &pEventType, void *pMessage, qintptr *pResult) override
Definition AppController.cpp:483
bool shouldApplicationRestart() const
Definition AppController.cpp:177
void fireWorkflowStarted(const QSharedPointer< WorkflowRequest > &pRequest)
void fireProxyAuthenticationRequired(const QNetworkProxy &pProxy, QAuthenticator *pAuthenticator)
void fireShowUserInformation(const QString &pInformationMessage)
void start()
Definition AppController.cpp:109
void fireWorkflowFinished(const QSharedPointer< WorkflowRequest > &pRequest)
friend int initApp(int &, char **)
bool eventFilter(QObject *pObj, QEvent *pEvent) override
Definition AppController.cpp:80
void fireWorkflowUnhandled(const QSharedPointer< WorkflowRequest > &pRequest)
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:26
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:16