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 bool mExplicitSuccessMessage;
29 const int mOneDayInMs = 1000 * 60 * 60 * 24;
30
31 Service();
32 ~Service() override = default;
33 void doAppUpdate(UpdateType pType, bool pForceUpdate = false);
34
35 private Q_SLOTS:
36 void onTimedUpdateTriggered();
37 void onProviderUpdateFinished();
38 void onReaderUpdateFinished();
39 void onAppcastFinished(bool pUpdateAvailable, const GlobalStatus& pError);
40
41 public:
42 void updateAppcast();
43 [[nodiscard]] bool isUpdateScheduled() const;
44 Q_INVOKABLE void runUpdateIfNeeded();
45 [[nodiscard]] const AppUpdateData& getUpdateData() const;
46
47 Q_SIGNALS:
48 void fireAppcastFinished(bool pUpdateAvailable, const GlobalStatus& pError);
50};
51
52} // namespace governikus
Definition: AppUpdateData.h:24
Definition: Env.h:42
Definition: GlobalStatus.h:22
Definition: Service.h:16
void fireAppcastFinished(bool pUpdateAvailable, const GlobalStatus &pError)
void updateAppcast()
Definition: Service.cpp:118
bool isUpdateScheduled() const
Definition: Service.cpp:124
const AppUpdateData & getUpdateData() const
Definition: Service.cpp:142
Q_INVOKABLE void runUpdateIfNeeded()
Definition: Service.cpp:130
Implementation of GeneralAuthenticate response APDUs.
Definition: CommandApdu.h:16
READER
Definition: MsgTypes.h:29