|
UFO: Alien Invasion
|
UFOAI web interface management. c(lient)game related stuff. More...

Go to the source code of this file.
Functions | |
| bool | WEB_CGameUpload (const char *cgameId, int category, const char *filename) |
| Uploads a file to the server. | |
| bool | WEB_CGameDelete (const char *cgameId, int category, const char *filename) |
| Deletes a user owned file on the server. | |
| bool | WEB_CGameDownloadFromUser (const char *cgameId, int category, const char *filename, int userId=-1) |
| Downloads a file from the server and store it in the user directory. | |
| int | WEB_CGameListForUser (const char *cgameId, int category, int userId=-1) |
| Shows the uploaded files for the particular cgame category and the given userid. | |
| void | WEB_CGameCvars (void) |
| void | WEB_CGameCommands (void) |
UFOAI web interface management. c(lient)game related stuff.
Definition in file web_cgame.h.
Definition at line 411 of file web_cgame.cpp.
References Cmd_AddCommand(), WEB_DeleteCGame_f(), WEB_DownloadCGame_f(), WEB_ListCGame_f(), and WEB_UploadCGame_f().
Referenced by WEB_InitStartup().
Definition at line 403 of file web_cgame.cpp.
References Cvar_Get(), WEB_API_SERVER, web_cgamedeleteurl, web_cgamedownloadurl, web_cgamelisturl, and web_cgameuploadurl.
Referenced by WEB_InitStartup().
| bool WEB_CGameDelete | ( | const char * | cgameId, |
| int | category, | ||
| const char * | filename ) |
Deletes a user owned file on the server.
| [in] | cgameId | The cgame id that is used to get the file. |
| [in] | category | The category of the cgame. |
| [in] | filename | The filename to replace in the URL. |
true if the deletion of the file was successful, false otherwise. Definition at line 152 of file web_cgame.cpp.
References Com_Printf(), Com_SkipPath(), Com_StripExtension(), MAX_VAR, UI_ExecuteConfunc(), URL_SIZE, web_cgamedeleteurl, WEB_CGameGetURL(), WEB_CheckAuth(), WEB_GetURL(), and web_userid.
Referenced by GAME_WebDelete(), TEST_F(), and WEB_DeleteCGame_f().
| bool WEB_CGameDownloadFromUser | ( | const char * | cgameId, |
| int | category, | ||
| const char * | filename, | ||
| int | userId ) |
Downloads a file from the server and store it in the user directory.
| [in] | cgameId | The cgame id that is used to get the file. |
| [in] | category | The category of the cgame. |
| [in] | filename | The filename to replace in the URL. |
| [in] | userId | The user id to get the file for. If this is -1 (the default), the current authenticated user will be taken. |
true if the download of the file was successful, false otherwise. Definition at line 187 of file web_cgame.cpp.
References Com_Printf(), f, FILE_WRITE, FS_OpenFile(), GAME_GetRelativeSavePath(), HTTP_GetToFile(), MAX_OSPATH, Q_strcat(), URL_SIZE, web_cgamedownloadurl, and WEB_CGameGetURL().
Referenced by GAME_WebDownloadFromUser(), TEST_F(), and WEB_DownloadCGame_f().
Shows the uploaded files for the particular cgame category and the given userid.
| [in] | cgameId | The cgame id that is used to get a filelist for. |
| [in] | category | The category of the cgame. |
| [in] | userId | The user id to get the file list for. If this is -1 (the default), the current authenticated user will be taken. |
-1 on error. Definition at line 310 of file web_cgame.cpp.
References Com_Printf(), count, UI_ExecuteConfunc(), URL_SIZE, WEB_CGameGetURL(), web_cgamelisturl, WEB_CheckAuth(), WEB_GetURL(), WEB_ListCGameFilesCallback(), and web_userid.
Referenced by GAME_WebListForUser(), TEST_F(), and WEB_ListCGame_f().
| bool WEB_CGameUpload | ( | const char * | cgameId, |
| int | category, | ||
| const char * | filename ) |
Uploads a file to the server.
| [in] | cgameId | The cgame id that is used to upload the file. |
| [in] | category | The category of the cgame. |
| [in] | filename | The filename part below the gamedir |
true if the upload of the file was successful, false otherwise. Definition at line 106 of file web_cgame.cpp.
References Com_Printf(), FS_FileExists(), FS_Gamedir(), Q_strnull(), UI_ExecuteConfunc(), URL_SIZE, va(), WEB_CGameGetURL(), web_cgameuploadurl, WEB_CheckAuth(), and WEB_PutFile().
Referenced by GAME_WebUpload(), TEST_F(), and WEB_UploadCGame_f().