X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=libcurl.h;h=ed05551c10bf27d31043951425b9a584bc7787cc;hb=8b0fbc64175362acf3ea872029a423012b76a4f8;hp=5b861278f4a5763dd892714ebd5fe090ebcf0f2d;hpb=aed8b84afc34596c6ec9e4dd35ada467539fbd8c;p=xonotic%2Fdarkplaces.git diff --git a/libcurl.h b/libcurl.h index 5b861278..ed05551c 100644 --- a/libcurl.h +++ b/libcurl.h @@ -9,22 +9,27 @@ enum typedef void (*curl_callback_t) (int status, size_t length_received, unsigned char *buffer, void *cbdata); // code is one of the CURLCBSTATUS constants, or the HTTP error code (when > 0). -void Curl_Run(); -qboolean Curl_Running(); -qboolean Curl_Begin_ToFile(const char *URL, const char *name, qboolean ispak, qboolean forthismap); -qboolean Curl_Begin_ToMemory(const char *URL, unsigned char *buf, size_t bufsize, curl_callback_t callback, void *cbdata); - // NOTE: if it returns false, the callback will NOT get called, so free your buffer then! -void Curl_Init(); -void Curl_Init_Commands(); -void Curl_Shutdown(); -void Curl_CancelAll(); -void Curl_Clear_forthismap(); -qboolean Curl_Have_forthismap(); -void Curl_Register_predownload(); +void Curl_Run(void); +qboolean Curl_Running(void); +qboolean Curl_Begin_ToFile(const char *URL, double maxspeed, const char *name, qboolean ispak, qboolean forthismap); -void Curl_ClearRequirements(); +qboolean Curl_Begin_ToMemory(const char *URL, double maxspeed, unsigned char *buf, size_t bufsize, curl_callback_t callback, void *cbdata); +qboolean Curl_Begin_ToMemory_POST(const char *URL, const char *extraheaders, double maxspeed, const char *post_content_type, const unsigned char *postbuf, size_t postbufsize, unsigned char *buf, size_t bufsize, curl_callback_t callback, void *cbdata); + // NOTE: if these return false, the callback will NOT get called, so free your buffer then! +void Curl_Cancel_ToMemory(curl_callback_t callback, void *cbdata); + // removes all downloads with the given callback and cbdata (this does NOT call the callbacks!) + +void Curl_Init(void); +void Curl_Init_Commands(void); +void Curl_Shutdown(void); +void Curl_CancelAll(void); +void Curl_Clear_forthismap(void); +qboolean Curl_Have_forthismap(void); +void Curl_Register_predownload(void); + +void Curl_ClearRequirements(void); void Curl_RequireFile(const char *filename); -void Curl_SendRequirements(); +void Curl_SendRequirements(void); typedef struct Curl_downloadinfo_s {