AusweisApp2
 Alle Klassen Namensbereiche Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Propertys Freundbeziehungen Makrodefinitionen
Service.h
gehe zur Dokumentation dieser Datei
1 
5 #pragma once
6 
7 #include "AppUpdater.h"
8 
9 #include <QTimer>
10 
11 namespace governikus
12 {
13 class Service
14  : public QObject
15 {
16  Q_OBJECT
17 
18  private:
19  QTimer mTimer;
20  bool mUpdateScheduled;
21  bool mExplicitSuccessMessage;
22  AppUpdater mAppUpdater;
23  const int mOneDayInMs = 1000 * 60 * 60 * 24;
24 
25  protected:
26  Service();
27  ~Service() = default;
28 
29  private Q_SLOTS:
30  void doConfigurationsUpdate();
31  void doAppUpdate(bool pIgnoreNextVersionskip);
32  void onTimedUpdateTriggered();
33  void onAppUpdateFinished(bool pUpdateAvailable, const GlobalStatus& pError);
34 
35  public:
36  static Service& getInstance();
37  void updateConfigurations();
38  void updateApp(bool pIgnoreNextVersionskip = false);
39  bool isUpdateScheduled();
40  void runUpdateIfNeeded();
41  const AppUpdateData& getUpdateData() const;
42 
43  Q_SIGNALS:
44  void fireAppUpdateFinished(bool pUpdateAvailable, const GlobalStatus& pError);
45  void fireUpdateScheduled();
46 };
47 
48 } /* namespace governikus */
Definition: GlobalStatus.h:18
bool isUpdateScheduled()
Definition: Service.cpp:81
Definition: AppUpdater.h:15
Definition: Service.h:13
Service()
Definition: Service.cpp:23
Definition: AppUpdateData.h:19
void fireAppUpdateFinished(bool pUpdateAvailable, const GlobalStatus &pError)
void runUpdateIfNeeded()
Definition: Service.cpp:87
const AppUpdateData & getUpdateData() const
Definition: Service.cpp:100
void updateApp(bool pIgnoreNextVersionskip=false)
Definition: Service.cpp:49
static Service & getInstance()
Definition: Service.cpp:37
void updateConfigurations()
Definition: Service.cpp:43