| 8 | class acl::aio_handle; |
| 9 | |
| 10 | class CHttpDownload : public acl::http_service_request |
| 11 | { |
| 12 | public: |
| 13 | CHttpDownload(const char* domain, unsigned short port, |
| 14 | acl::aio_handle* handle); |
| 15 | |
| 16 | #ifdef WIN32 |
| 17 | void SetHWnd(HWND hWnd); |
| 18 | #endif |
| 19 | |
| 20 | // ������ӿڣ����ٹ��̣��� http_service �ദ����Ϻ��Զ����øûص� |
| 21 | virtual void destroy(); |
| 22 | |
| 23 | protected: |
| 24 | ~CHttpDownload(void); |
| 25 | |
| 26 | ////////////////////////////////////////////////////////////////////////// |
| 27 | // ������ӿ� |
| 28 | |
| 29 | // ���HTTP�����������ʱ�Ļص��ӿڣ�ע��ú����ĵ��ÿռ���������������ͬ |
| 30 | // һ���߳̿ռ䣬��������ú�������������������ͬ����Դʱ��Ҫע�⻥�� |
| 31 | virtual const acl::string* get_body(); |
| 32 | // �������� HTTP ��Ӧͷʱ�Ļص��ӿ� |
| 33 | virtual void on_hdr(const char* addr, const HTTP_HDR_RES* hdr); |
| 34 | // ������ HTTP ��Ӧ��ʱ�Ļص����� |
| 35 | virtual void on_body(const char* data, size_t dlen); |
| 36 | // ���������Ӧʧ��ʱ�Ļص����� |
| 37 | virtual void on_error(acl::http_status_t errnum); |
| 38 | private: |
| 39 | acl::ofstream out_; |
| 40 | acl::aio_handle* handle_; |
| 41 | #ifdef WIN32 |
| 42 | HWND hWnd_; |
| 43 | #endif |
| 44 | http_off_t read_length_; |
| 45 | http_off_t content_length_; |
| 46 | time_t begin_; |
| 47 | }; |
no outgoing calls
no test coverage detected
searching dependent graphs…