AusweisApp
Lade ...
Suche ...
Keine Treffer
Downloader.h
gehe zur Dokumentation dieser Datei
1
10#pragma once
11
12#include "Env.h"
13#include "GlobalStatus.h"
14
15#include <QNetworkReply>
16#include <QNetworkRequest>
17#include <QQueue>
18#include <QSharedPointer>
19#include <QSslCipher>
20#include <QUrl>
21
22namespace governikus
23{
25 : public QObject
26{
28 friend class Env;
29
30 private:
32 QQueue<QNetworkRequest> mPendingRequests;
33
34 void scheduleDownload(const QNetworkRequest& pDownloadRequest);
35 void startDownloadIfPending();
36
37 protected:
38 Downloader();
39 ~Downloader() override;
40
41 private Q_SLOTS:
42 void onMetadataChanged();
43 void onNetworkReplyFinished();
44 void onNetworkReplyProgress(qint64 pBytesReceived, qint64 pBytesTotal);
45
46 public:
47 bool abort(const QUrl& pUpdateUrl);
48 virtual void download(const QUrl& pUpdateUrl, const QDateTime& pCurrentTimestamp = QDateTime());
49
55};
56
57} // namespace governikus
Definition Downloader.h:26
~Downloader() override
Definition Downloader.cpp:149
Downloader()
Definition Downloader.cpp:142
void fireDownloadProgress(const QUrl &pUpdateUrl, qint64 pBytesReceived, qint64 pBytesTotal)
void fireDownloadUnnecessary(const QUrl &pUpdateUrl)
virtual void download(const QUrl &pUpdateUrl, const QDateTime &pCurrentTimestamp=QDateTime())
Definition Downloader.cpp:190
bool abort(const QUrl &pUpdateUrl)
Definition Downloader.cpp:159
void fireDownloadSuccess(const QUrl &pUpdateUrl, const QDateTime &pNewTimestamp, const QByteArray &pData)
void fireDownloadFailed(const QUrl &pUpdateUrl, GlobalStatus::Code pErrorCode)
Definition Env.h:42
Code
Definition GlobalStatus.h:30
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114