Freeciv-3.2
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
download.h File Reference
#include "modinst.h"

Go to the source code of this file.

Macros

#define MODPACKDL_SUFFIX   ".mpdl"
 
#define MODPACK_CAPSTR   "+Freeciv-3.2-mpdl"
 
#define MODLIST_CAPSTR   "+Freeciv-3.2-modlist"
 
#define FCMP_CONTROLD   ".control"
 

Typedefs

typedef void(* dl_msg_callback) (const char *msg)
 
typedef void(* dl_pb_callback) (int downloaded, int max)
 
typedef void(* modpack_list_setup_cb) (const char *name, const char *URL, const char *version, const char *license, enum modpack_type type, const char *subtype, const char *notes)
 

Functions

const chardownload_modpack (const char *URL, const struct fcmp_params *fcmp, dl_msg_callback mcb, dl_pb_callback pbcb)
 
const chardownload_modpack_list (const struct fcmp_params *fcmp, modpack_list_setup_cb cb, dl_msg_callback mcb)
 

Macro Definition Documentation

◆ FCMP_CONTROLD

#define FCMP_CONTROLD   ".control"

Definition at line 28 of file download.h.

◆ MODLIST_CAPSTR

#define MODLIST_CAPSTR   "+Freeciv-3.2-modlist"

Definition at line 26 of file download.h.

◆ MODPACK_CAPSTR

#define MODPACK_CAPSTR   "+Freeciv-3.2-mpdl"

Definition at line 25 of file download.h.

◆ MODPACKDL_SUFFIX

#define MODPACKDL_SUFFIX   ".mpdl"

Definition at line 23 of file download.h.

Typedef Documentation

◆ dl_msg_callback

typedef void(* dl_msg_callback) (const char *msg)

Definition at line 30 of file download.h.

◆ dl_pb_callback

typedef void(* dl_pb_callback) (int downloaded, int max)

Definition at line 31 of file download.h.

◆ modpack_list_setup_cb

typedef void(* modpack_list_setup_cb) (const char *name, const char *URL, const char *version, const char *license, enum modpack_type type, const char *subtype, const char *notes)

Definition at line 38 of file download.h.

Function Documentation

◆ download_modpack()

const char * download_modpack ( const char URL,
const struct fcmp_params fcmp,
dl_msg_callback  mcb,
dl_pb_callback  pbcb 
)

Download modpack from a given URL

Definition at line 66 of file download.c.

Referenced by download_thread(), download_thread(), main(), and mpqt_worker::run().

◆ download_modpack_list()

const char * download_modpack_list ( const struct fcmp_params fcmp,
modpack_list_setup_cb  cb,
dl_msg_callback  mcb 
)

Download modpack list

Definition at line 427 of file download.c.

Referenced by main(), main(), modinst_setup_widgets(), and modinst_setup_widgets().