| 71 | } |
| 72 | |
| 73 | virtual void OnFinish(long httpOrErrorCode, int64_t, int64_t) |
| 74 | { |
| 75 | if (httpOrErrorCode == 200) |
| 76 | { |
| 77 | m_status = DownloadStatus::Completed; |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | auto const message = non_http_error_code::DebugPrint(httpOrErrorCode); |
| 82 | LOG(LWARNING, ("HttpRequest error:", message)); |
| 83 | if (httpOrErrorCode == 404) |
| 84 | m_status = DownloadStatus::FileNotFound; |
| 85 | else |
| 86 | m_status = DownloadStatus::Failed; |
| 87 | } |
| 88 | |
| 89 | m_onFinish(*this); |
| 90 | } |
| 91 | |
| 92 | public: |
| 93 | MemoryHttpRequest(string const & url, Callback && onFinish, Callback && onProgress) |
nothing calls this directly
no test coverage detected