#define FAKE_DOWNLOAD
| 21 | |
| 22 | // #define FAKE_DOWNLOAD |
| 23 | size_t writeHttpDataToBuffer(void *buffer, size_t size, size_t nmemb, void *user_p) |
| 24 | { |
| 25 | std::vector<unsigned char>* body = reinterpret_cast<std::vector<unsigned char> *>(user_p); |
| 26 | if (NULL != body) |
| 27 | { |
| 28 | size_t bytes = size * nmemb; |
| 29 | |
| 30 | unsigned char *ptr = reinterpret_cast<unsigned char *>(buffer); |
| 31 | std::copy(ptr, ptr + bytes, back_inserter(*body)); |
| 32 | return bytes; |
| 33 | } |
| 34 | |
| 35 | return 0; |
| 36 | } |
| 37 | |
| 38 | void DownloadTask::initialize() |
| 39 | { |
nothing calls this directly
no outgoing calls
no test coverage detected