wac_download_http_receiver.cpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #include "wac_download_http_receiver.h"
  2. wa::Components::WAC_Download_HTTP_Receiver::WAC_Download_HTTP_Receiver()
  3. {}
  4. wa::Components::WAC_Download_HTTP_Receiver::~WAC_Download_HTTP_Receiver()
  5. {}
  6. void wa::Components::WAC_Download_HTTP_Receiver::open( api_dns * p_dns, size_t p_recvbufsize, const char *p_proxy )
  7. {
  8. Q_UNUSED( p_dns )
  9. Q_UNUSED( p_recvbufsize )
  10. Q_UNUSED( p_proxy )
  11. }
  12. std::size_t wa::Components::WAC_Download_HTTP_Receiver::AddRef()
  13. {
  14. return this->_reference_count.fetch_add( 1 );
  15. }
  16. std::size_t wa::Components::WAC_Download_HTTP_Receiver::Release()
  17. {
  18. std::size_t l_reference_count = this->_reference_count.fetch_sub( 1 );
  19. if ( l_reference_count == 0 )
  20. delete this;
  21. return l_reference_count;
  22. }
  23. #ifdef CBCLASS
  24. #undef CBCLASS
  25. #endif
  26. #define CBCLASS wa::Components::WAC_Download_HTTP_Receiver
  27. START_DISPATCH;
  28. CB( ADDREF, AddRef )
  29. CB( RELEASE, Release )
  30. VCB( API_HTTPRECEIVER_OPEN, open )
  31. //VCB( API_HTTPRECEIVER_ADDHEADER, addheader )
  32. //VCB( API_HTTPRECEIVER_ADDHEADERVALUE, addheadervalue )
  33. //VCB( API_HTTPRECEIVER_CONNECT, connect )
  34. //CB( API_HTTPRECEIVER_RUN, run )
  35. //CB( API_HTTPRECEIVER_GETSTATUS, get_status )
  36. //CB( API_HTTPRECEIVER_GETBYTESAVAILABLE, bytes_available )
  37. //CB( API_HTTPRECEIVER_GETBYTES, get_bytes )
  38. //CB( API_HTTPRECEIVER_PEEKBYTES, peek_bytes )
  39. //CB( API_HTTPRECEIVER_GETHEADER, getheader )
  40. //CB( API_HTTPRECEIVER_GETCONTENTLENGTH, content_length )
  41. //CB( API_HTTPRECEIVER_GETALLHEADERS, getallheaders )
  42. //CB( API_HTTPRECEIVER_GETREPLYCODE, getreplycode )
  43. //CB( API_HTTPRECEIVER_GETREPLY, getreply )
  44. //CB( API_HTTPRECEIVER_GETERROR, geterrorstr )
  45. //CB( API_HTTPRECEIVER_GETCONNECTION, get_con )
  46. //VCB( API_HTTPRECEIVER_ALLOW_COMPRESSION, AllowCompression )
  47. //VCB( API_HTTPRECEIVER_RESET_HEADERS, reset_headers )
  48. //CB( API_HTTPRECEIVER_GET_URL, get_url )
  49. //VCB( API_HTTPRECEIVER_SET_SENDBUFSIZE, set_sendbufsize )
  50. //VCB( API_HTTPRECEIVER_SET_ACCEPT_ALL_REPLY_CODES, set_accept_all_reply_codes )
  51. //VCB( API_HTTPRECEIVER_SET_PERSISTENT, set_persistent )
  52. END_DISPATCH;
  53. #undef CBCLASS