1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef NETWORK_H
- #define NETWORK_H
- #include <QUrl>
- #include <QFile>
- #include <QNetworkReply>
- class MainWindow;
- class ANetwork : public QObject {
- Q_OBJECT
- private:
- ANetwork();
- public:
- static ANetwork* getInstance() {
- static ANetwork network;
- return &network;
- }
- QString query(QUrl url);
- QByteArray query_binary(QUrl url);
- public slots:
- void getPatches();
- void getCoupon();
- void getServers();
- void getFootMessage();
- void getMicroPatch(int timestamp);
- signals:
- void getPatchFinished(QString patchname, QString date);
- void getCouponFinished(QString coupon);
- void getServersFinished(QString server);
- void getFootMessageFinished(QString msg);
- void getMicroPatchFinished(QString filename);
- void updatePatchDates(QString name, QString date);
- private:
- int getVersion(QString string);
- QNetworkReply* currentDownload;
- QFile output;
-
-
- };
- #endif
|