UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cl_http.h File Reference

cURL header More...

#include "../common/http.h"

Go to the source code of this file.

Functions

void CL_CancelHTTPDownloads (bool permKill)
 Cancel all downloads and nuke the queue. More...
 
bool CL_QueueHTTPDownload (const char *ufoPath)
 Called from the precache check to queue a download. More...
 
void CL_RunHTTPDownloads (void)
 This calls curl_multi_perform do actually do stuff. Called every frame while connecting to minimise latency. Also starts new downloads if we're not doing the maximum already. More...
 
bool CL_PendingHTTPDownloads (void)
 See if we're still busy with some downloads. Called by precacher just before it loads the map since we could be downloading the map. If we're busy still, it'll wait and CL_FinishHTTPDownload will pick up from where it left. More...
 
void CL_SetHTTPServer (const char *URL)
 A new server is specified, so we nuke all our state. More...
 
void CL_HTTP_Cleanup (void)
 UFO is exiting or we're changing servers. Clean up. More...
 
void CL_RequestNextDownload (void)
 
bool CL_CheckOrDownloadFile (const char *filename)
 
void HTTP_InitStartup (void)
 

Detailed Description

cURL header

Definition in file cl_http.h.

Function Documentation

void CL_CancelHTTPDownloads ( bool  permKill)
bool CL_CheckOrDownloadFile ( const char *  filename)
Returns
true if the file exists, otherwise it attempts to start a download via curl
See also
CL_CheckAndQueueDownload
CL_RequestNextDownload

Definition at line 341 of file cl_http.cpp.

References CL_QueueHTTPDownload(), Com_Printf(), FS_LoadFile(), MAX_OSPATH, Q_streq, Q_strncpyz(), and Q_strnull().

Referenced by CL_CheckAndQueueDownload(), CL_DownloadMap(), and CL_DownloadUMPMap().

void CL_HTTP_Cleanup ( void  )

UFO is exiting or we're changing servers. Clean up.

Definition at line 532 of file cl_http.cpp.

References cls, dlhandle_s::curl, dlhandle_s::file, dlhandle_s::filePath, client_static_s::HTTPHandles, i, Mem_Free, multi, dlhandle_s::queueEntry, Sys_Remove(), and dlhandle_s::tempBuffer.

Referenced by CL_SetHTTPServer(), and CL_Shutdown().

bool CL_PendingHTTPDownloads ( void  )

See if we're still busy with some downloads. Called by precacher just before it loads the map since we could be downloading the map. If we're busy still, it'll wait and CL_FinishHTTPDownload will pick up from where it left.

Definition at line 328 of file cl_http.cpp.

References cls, client_static_s::downloadServer, handleCount, and pendingCount.

Referenced by CL_CanMultiplayerStart(), and CL_FinishHTTPDownload().

void CL_RunHTTPDownloads ( void  )

This calls curl_multi_perform do actually do stuff. Called every frame while connecting to minimise latency. Also starts new downloads if we're not doing the maximum already.

See also
CL_Frame

Definition at line 751 of file cl_http.cpp.

References abortDownloads, CL_CancelHTTPDownloads(), CL_FinishHTTPDownload(), CL_StartNextHTTPDownload(), cls, Com_Printf(), downloadingPK3, client_static_s::downloadServer, handleCount, HTTPDL_ABORT_NONE, multi, and pendingCount.

Referenced by CL_Frame().

void CL_SetHTTPServer ( const char *  URL)
void HTTP_InitStartup ( void  )

Definition at line 787 of file cl_http.cpp.

References Cvar_Get().

Referenced by CL_InitLocal().