29 #ifndef CURL_STATICLIB
30 #define CURL_STATICLIB
32 #include <curl/curl.h>
67 bool HTTP_Encode(
const char* url,
char* out,
size_t outLength);
70 bool HTTP_PutFile(
const char* formName,
const char* fileName,
const char* url,
const upparam_t* params);
74 bool HTTP_ExtractComponents(
const char* url,
char* scheme,
size_t schemeLength,
char* host,
size_t hostLength,
char* path,
size_t pathLength,
int*
port);
bool HTTP_Encode(const char *url, char *out, size_t outLength)
This function converts the given url to an URL encoded string. All input characters that are not a-z...
bool HTTP_ExtractComponents(const char *url, char *scheme, size_t schemeLength, char *host, size_t hostLength, char *path, size_t pathLength, int *port)
Extract the servername, the port and the path part of the given url.
struct upparam_s upparam_t
void HTTP_Cleanup(void)
UFO is exiting or we're changing servers. Clean up.
size_t HTTP_Recv(void *ptr, size_t size, size_t nmemb, void *stream)
libcurl callback for HTTP_GetURL
struct dlqueue_s dlqueue_t
void(* http_callback_t)(const char *response, void *userdata)
char filePath[MAX_OSPATH]
bool HTTP_GetToFile(const char *url, FILE *file, const char *postfields=nullptr)
Downloads the given url into the given file.
size_t HTTP_Header(void *ptr, size_t size, size_t nmemb, void *stream)
libcurl callback to update header info.
bool HTTP_PutFile(const char *formName, const char *fileName, const char *url, const upparam_t *params)
const GLuint *typedef void(APIENTRY *GenRenderbuffersEXT_t)(GLsizei
bool HTTP_GetURL(const char *url, http_callback_t callback, void *userdata=nullptr, const char *postfields=nullptr)
Downloads the given url and return the data to the callback (optional)
definitions common between client and server, but not game lib
struct dlhandle_s dlhandle_t