23 #ifndef NET_DOWNLOAD_H
24 #define NET_DOWNLOAD_H
28 #include <curl/curl.h>
38 const size_t remaining);
52 const std::string &
url,
54 const bool ignoreError,
62 void addHeader(
const std::string &header);
69 void setFile(
const std::string &filename,
70 const int64_t adler32);
97 size_t nmemb,
void *stream);
104 static void addProxy(CURL *
const curl);
120 double dlnow,
double ultotal,
static std::string mUploadResponse
void setFile(const std::string &filename, const int64_t adler32)
static unsigned long fadler32(FILE *const file)
void addHeader(const std::string &header)
static void addCommonFlags(CURL *const curl)
static void secureCurl(CURL *const curl)
static unsigned long adlerBuffer(const char *const buffer, int size)
static void addProxy(CURL *const curl)
std::queue< std::string > mUrlQueue
void addMirror(const std::string &str)
void setWriteFunction(WriteFunction write)
void setIgnoreError(const bool n)
WriteFunction mWriteFunction
static void prepareForm(curl_httppost **form, const std::string &fileName)
struct Net::Download::@15 mOptions
const char * getError() const
curl_httppost * mFormPost
Download(void *const ptr, const std::string &url, const DownloadUpdate updateFunction, const bool ignoreError, const bool isUpload, const bool isXml)
static std::string getUploadResponse()
static void addHeaders(CURL *const curl)
static int downloadThread(void *ptr)
DownloadUpdate mUpdateFunction
static size_t writeFunction(void *ptr, size_t size, size_t nmemb, void *stream)
static int downloadProgress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
int(* DownloadUpdate)(void *ptr, const DownloadStatusT status, size_t total, const size_t remaining)
size_t(* WriteFunction)(void *ptr, size_t size, size_t nmemb, void *stream)
DownloadStatus ::T DownloadStatusT
#define A_DELETE_COPY(func)
bool url(InputEvent &event)
int64_t write(File *const file, const void *const buffer, const uint32_t objSize, const uint32_t objCount)