diff options
Diffstat (limited to 'InternetUpdater.h')
-rw-r--r-- | InternetUpdater.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/InternetUpdater.h b/InternetUpdater.h new file mode 100644 index 0000000..25b13f4 --- /dev/null +++ b/InternetUpdater.h @@ -0,0 +1,33 @@ +#ifndef INTERNETUPDATER_H +#define INTERNETUPDATER_H + +#include "Environment.h" + +#include <QObject> +#include <QString> +#include <QTimer> +#include <QNetworkAccessManager> +#include <QNetworkReply> + +#ifdef ULTRACOPIER_INTERNET_SUPPORT + +class InternetUpdater : public QObject +{ + Q_OBJECT +public: + explicit InternetUpdater(QObject *parent = 0); +signals: + void newUpdate(const std::string &version) const; +private: + QTimer newUpdateTimer; + QTimer firstUpdateTimer; + QNetworkAccessManager qnam; + QNetworkReply *reply; +private slots: + void downloadFile(); + void httpFinished(); +}; + +#endif + +#endif // INTERNETUPDATER_H |