webperimental: killstack decides stack protects.
[freeciv.git] / tools / download.h
blob61973038705d1d08093828fa3023bcc2e19477d2
1 /***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__MODPACK_DOWNLOAD_H
14 #define FC__MODPACK_DOWNLOAD_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 /* modinst */
21 #include "modinst.h"
23 #define MODPACKDL_SUFFIX ".mpdl"
25 #define MODPACK_CAPSTR "+Freeciv-modpack-Devel-2016.Feb.05"
26 #define MODLIST_CAPSTR "+Freeciv-modlist-Devel-2016.Feb.05"
28 #define FCMP_CONTROLD ".control"
30 typedef void (*dl_msg_callback)(const char *msg);
31 typedef void (*dl_pb_callback)(int downloaded, int max);
33 const char *download_modpack(const char *URL,
34 const struct fcmp_params *fcmp,
35 dl_msg_callback mcb,
36 dl_pb_callback pbcb);
38 typedef void (*modpack_list_setup_cb)(const char *name, const char *URL,
39 const char *version,
40 const char *license,
41 enum modpack_type type,
42 const char *subtype,
43 const char *notes);
45 const char *download_modpack_list(const struct fcmp_params *fcmp,
46 modpack_list_setup_cb cb,
47 dl_msg_callback mcb);
49 #ifdef __cplusplus
51 #endif /* __cplusplus */
53 #endif /* FC__MODPACK_DOWNLOAD_H */