wac_download_http_receiver.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef NULLSOFT_WAC_DOWNLOAD_HTTP_RECEIVER_H
  2. #define NULLSOFT_WAC_NETWORK_HTTP_RECEIVER_H
  3. #include <atomic>
  4. #include <QtCore>
  5. //#include <QAuthenticator>
  6. //#include <QNetworkAccessManager>
  7. #include <QNetworkRequest>
  8. #include <QNetworkReply>
  9. #include <QUrl>
  10. #include <QUrlQuery>
  11. //#include "wac_downloadManager_Headers.h"
  12. #include "wac_download_http_receiver_api.h"
  13. namespace wa
  14. {
  15. namespace Components
  16. {
  17. class WAC_Download_HTTP_Receiver : public QObject, public api_wac_download_manager_http_receiver
  18. {
  19. Q_OBJECT
  20. public:
  21. WAC_Download_HTTP_Receiver();
  22. ~WAC_Download_HTTP_Receiver();
  23. void open( api_dns *p_dns = API_DNS_AUTODNS, size_t p_recvbufsize = PACKET_SIZE, const char *p_proxy = NULL );
  24. std::size_t AddRef();
  25. std::size_t Release();
  26. protected:
  27. RECVS_DISPATCH;
  28. private:
  29. volatile std::atomic<std::size_t> _reference_count = 1;
  30. };
  31. }
  32. }
  33. #endif // !NULLSOFT_WAC_NETWORK_HTTP_RECEIVER_H