AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
AppController.h
gehe zur Dokumentation dieser Datei
1 
7 #pragma once
8 
9 #include "ActivationHandler.h"
10 #include "EnumHelper.h"
11 
12 #include <QSharedPointer>
13 
14 class QAuthenticator;
15 class QNetworkProxy;
16 
17 namespace governikus
18 {
19 
20 defineEnumType(Action,
21  NONE,
22  AUTH,
23  SELF,
24  PIN,
25  READER_SETTINGS,
26  REMOTE_SERVICE)
27 
28 
29 class UIPlugIn;
30 class WorkflowContext;
31 class WorkflowController;
32 class WorkflowRequest;
33 
34 
36  : public QObject
37 {
38  Q_OBJECT
39 
40  private:
41  Q_DISABLE_COPY(AppController)
42 
43  friend class SignalHandler;
44 
45  Action mCurrentAction;
46  QScopedPointer<WorkflowRequest> mWaitingRequest;
47  QScopedPointer<WorkflowController> mActiveController;
48 
49  bool canStartNewAction();
50 
51  public:
52  AppController();
53  virtual ~AppController() override;
54 
55  virtual bool eventFilter(QObject* pObj, QEvent* pEvent) override;
56 
57  bool start();
58 
59  Q_SIGNALS:
60  void fireStarted();
61  void fireShutdown();
62  void fireWorkflowStarted(QSharedPointer<WorkflowContext> pContext);
63  void fireWorkflowFinished(QSharedPointer<WorkflowContext> pContext);
64  void fireShowUi(UiModule pModule);
65  void fireShowUserInformation(const QString& pInformationMessage);
66  void fireShowReaderSettings();
67 #ifndef QT_NO_NETWORKPROXY
68  void fireProxyAuthenticationRequired(const QNetworkProxy& pProxy, QAuthenticator* pAuthenticator);
69 #endif
70 
71  private Q_SLOTS:
72  void doShutdown();
73  void onUiPlugin(UIPlugIn* pPlugin);
74  void onWorkflowFinished();
75  void onCloseReminderFinished(bool pDontRemindAgain);
76  void onChangePinRequested();
77  void onSwitchToReaderSettingsRequested();
78  void onSelfAuthenticationRequested();
79  void onAuthenticationRequest(const QSharedPointer<ActivationContext>& pActivationContext);
80  void onRemoteServiceRequested();
81  void onSettingsChanged();
82 
83  private:
84  template<typename Controller, typename Context> bool startNewWorkflow(Action pAction, const QSharedPointer<Context>& pContext);
85 
86 };
87 
88 } /* namespace governikus */
Definition: AppController.h:35
defineEnumType(UiModule, CURRENT, DEFAULT, IDENTIFY, SETTINGS, PINMANAGEMENT) defineEnumType(StatusFormat
UI modules that can be requested to show.
Definition: SignalHandler.h:23
AUTH
Definition: MsgTypes.h:16