#include "common.h"
#include <curl/curl.h>
Go to the source code of this file.
Data Structures | |
struct | dlqueue_s |
struct | dlhandle_s |
Defines | |
#define | CURL_STATICLIB |
Typedefs | |
typedef struct dlqueue_s | dlqueue_t |
typedef struct dlhandle_s | dlhandle_t |
Enumerations | |
enum | dlq_state { DLQ_STATE_NOT_STARTED, DLQ_STATE_RUNNING, DLQ_STATE_DONE } |
Functions | |
char * | HTTP_GetURL (const char *url) |
Gets a specific url and store into. | |
size_t | HTTP_Recv (void *ptr, size_t size, size_t nmemb, void *stream) |
libcurl callback for HTTP_GetURL | |
size_t | HTTP_Header (void *ptr, size_t size, size_t nmemb, void *stream) |
libcurl callback to update header info. | |
void | HTTP_Cleanup (void) |
UFO is exiting or we're changing servers. Clean up. |
Definition in file http.h.
typedef struct dlhandle_s dlhandle_t |
enum dlq_state |
void HTTP_Cleanup | ( | void | ) |
UFO is exiting or we're changing servers. Clean up.
Definition at line 137 of file http.c.
Referenced by Qcommon_Shutdown().
char* HTTP_GetURL | ( | const char * | url | ) |
Gets a specific url and store into.
Definition at line 94 of file http.c.
References Com_Printf(), dlhandle_s::curl, Cvar_GetString(), HTTP_Header(), http_proxy, HTTP_Recv(), http_timeout, cvar_s::integer, Q_strncpyz(), qfalse, qtrue, cvar_s::string, dlhandle_s::tempBuffer, and dlhandle_s::URL.
Referenced by CL_QueryMasterServerThread(), Master_HeartbeatThread(), Master_Shutdown(), and SV_SetMaster_f().
size_t HTTP_Header | ( | void * | ptr, | |
size_t | size, | |||
size_t | nmemb, | |||
void * | stream | |||
) |
libcurl callback to update header info.
Definition at line 27 of file http.c.
References dlhandle_s::file, dlhandle_s::fileSize, len, Q_strncasecmp(), and Q_strncpyz().
Referenced by CL_StartHTTPDownload(), and HTTP_GetURL().
size_t HTTP_Recv | ( | void * | ptr, | |
size_t | size, | |||
size_t | nmemb, | |||
void * | stream | |||
) |
libcurl callback for HTTP_GetURL
Definition at line 60 of file http.c.
References dlhandle_s::fileSize, Mem_Alloc, Mem_Free, dlhandle_s::position, and dlhandle_s::tempBuffer.
Referenced by CL_StartHTTPDownload(), and HTTP_GetURL().