-
Notifications
You must be signed in to change notification settings - Fork 0
/
updater.h
44 lines (37 loc) · 880 Bytes
/
updater.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef UPDATER_H
#define UPDATER_H
#include <QObject>
#include <QtNetwork>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>
#include <QFile>
#include <QTimer>
#include <QTextStream>
#include <QDataStream>
class Updater : public QObject
{
Q_OBJECT
public:
Updater();
public slots:
void replyFinished();
void slotReadyRead();
void updateDownloadProgress(qint64, qint64);
void processIncomingData();
void downloadSignatures();
signals:
void resultReady(const QString);
void currentProgress(qint64,qint64);
void currentProgressFiles(int);
void dataSize(int);
void state(QString);
private:
QNetworkAccessManager *manager;
QNetworkRequest request;
QNetworkReply *networkResponse;
QTimer *fileDownloader;
int incomingDataSize;
};
#endif // UPDATER_H