26 #ifndef FILEDOWNLOAD_H 27 #define FILEDOWNLOAD_H 30 #include <curl/curl.h> 32 #include "string_utils.h" 33 #include "file_utils.h" 55 FileDownload(std::string url, std::string dirName, std::string fileName,
bool progress);
66 FileDownload(std::string url, std::string dirName, std::string fileName, std::string MD5Sum ,
bool progress);
75 FileDownload(std::vector<InfoFile> destinationFiles,
bool progress);
82 curl_slist_free_all(m_slist);
83 curl_global_cleanup();
84 curl_easy_cleanup(m_curl);
99 static int updateProgressHandle(
void *p,
double dltotal,
double dlnow,
double ultotal,
double ulnow);
100 static size_t writeToStreamHandle(
void *buffer,
size_t size,
size_t nmemb,
void *stream);
101 int updateProgress(
void *p,
double dltotal,
double dlnow,
double ultotal,
double ulnow);
102 size_t writeToStream(
void *buffer,
size_t size,
size_t nmemb,
void *stream);
103 void initFileToDownload(std::string _url, std::string _file);
108 bool checkUpToDate();
114 struct curl_slist *m_slist;
115 void updateProgress();
119 dwlProgress m_downloadProgress;
122 std::string m_downloadFileName;
125 std::string m_MD5Sum;
FileDownload(std::string url, std::string dirName, std::string fileName, bool progress)
Definition: file_download.cxx:57
File Download class.
Definition: file_download.h:43
Definition: file_utils.h:53
~FileDownload()
Definition: file_download.h:80