| 126 | } |
| 127 | |
| 128 | size_t writeTaskHttpData(void *buffer, size_t size, size_t nmemb, void *user_p) |
| 129 | { |
| 130 | DownloadTask *task = reinterpret_cast<DownloadTask *>(user_p); |
| 131 | if (NULL != task) |
| 132 | { |
| 133 | return task->writeData(buffer, size, nmemb); |
| 134 | } |
| 135 | |
| 136 | return 0; |
| 137 | } |
| 138 | |
| 139 | DownloadTask::DownloadTask(const std::string &url, const std::string& output, const std::string& defaultFile, time_t mtime, const std::string& name/* = ""*/) : m_url(url), m_output(output), m_default(defaultFile), m_mtime(mtime), m_retries(0), m_name(name) |
| 140 | { |