AusweisApp
Lade ...
Suche ...
Keine Treffer
Service.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include "AppUpdateData.h"
8#include "Env.h"
9
10#include <QTimer>
11
12namespace governikus
13{
15 : public QObject
16{
17 Q_OBJECT
18 friend class Env;
19
20 private:
21 enum class UpdateType
22 {
23 APPCAST, PROVIDER, READER, RELEASEINFORMATION
24 };
25
26 QTimer mTimer;
27 bool mUpdateScheduled;
28 const int mOneDayInMs = 1000 * 60 * 60 * 24;
29
30 Service();
31 ~Service() override = default;
32 void doAppUpdate(UpdateType pType, bool pForceUpdate = false);
33
34 private Q_SLOTS:
35 void onTimedUpdateTriggered();
36 void onProviderUpdateFinished();
37 void onReaderUpdateFinished();
38 void onAppcastFinished(bool pUpdateAvailable, const GlobalStatus& pError);
39
40 public:
41 void updateAppcast();
42 [[nodiscard]] bool isUpdateScheduled() const;
43 void runUpdateIfNeeded(bool pSkipProxy = false);
44 [[nodiscard]] const AppUpdateData& getUpdateData() const;
45
46 Q_SIGNALS:
47 void fireAppcastFinished(bool pUpdateAvailable);
49};
50
51} // namespace governikus
Definition AppUpdateData.h:20
Definition Env.h:40
Definition GlobalStatus.h:19
Definition Service.h:16
void runUpdateIfNeeded(bool pSkipProxy=false)
Definition Service.cpp:126
void updateAppcast()
Definition Service.cpp:114
bool isUpdateScheduled() const
Definition Service.cpp:120
const AppUpdateData & getUpdateData() const
Definition Service.cpp:148
void fireAppcastFinished(bool pUpdateAvailable)
Defines the AccessRight and AccessRole enum.
Definition CommandApdu.h:17
READER
Definition MsgTypes.h:26