40typedef struct dlqueue_s {
46typedef struct dlhandle_s {
59typedef struct upparam_s {
67bool HTTP_Encode(
const char* url,
char* out,
size_t outLength);
70bool HTTP_PutFile(
const char* formName,
const char* fileName,
const char* url,
const upparam_t* params);
74bool HTTP_ExtractComponents(
const char* url,
char* scheme,
size_t schemeLength,
char* host,
size_t hostLength,
char* path,
size_t pathLength,
int*
port);
definitions common between client and server, but not game lib
void(* http_callback_t)(const char *response, void *userdata)
bool HTTP_PutFile(const char *formName, const char *fileName, const char *url, const upparam_t *params)
bool HTTP_GetToFile(const char *url, FILE *file, const char *postfields=nullptr)
Downloads the given url into the given file.
size_t HTTP_Recv(void *ptr, size_t size, size_t nmemb, void *stream)
libcurl callback for HTTP_GetURL
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.
void HTTP_Cleanup(void)
UFO is exiting or we're changing servers. Clean up.
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).
size_t HTTP_Header(void *ptr, size_t size, size_t nmemb, void *stream)
libcurl callback to update header info.
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,...
QGL_EXTERN void(APIENTRY *qglActiveTexture)(GLenum texture)
char filePath[MAX_OSPATH]