network.h 744 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef NETWORK_H
  2. #define NETWORK_H
  3. #include <QUrl>
  4. #include <QNetworkAccessManager>
  5. #include <QtNetwork/QNetworkReply>
  6. #include <QProgressBar>
  7. #include <QFile>
  8. class MainWindow;
  9. class ANetwork {
  10. public:
  11. ANetwork();
  12. ANetwork( const ANetwork&);
  13. ANetwork& operator=( ANetwork& );
  14. QNetworkReply* currentDownload;
  15. QFile output;
  16. void getUrl();
  17. QString getCoupon();
  18. void getPaths();
  19. QString getServers();
  20. QString getFootMessage();
  21. QString getMicroPath(int timestamp);
  22. QString query(QUrl url);
  23. QByteArray query_binary(QUrl url);
  24. QString micropatch;
  25. private slots:
  26. void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
  27. void downloadFinished();
  28. };
  29. #endif // NETWORK_H