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)
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 ***********************************************************************/
19 #endif /* __cplusplus */
23 struct netfile_write_cb_data
29 typedef void (*nf_errmsg
)(const char *msg
, void *data
);
31 struct section_file
*netfile_get_section_file(const char *URL
,
32 nf_errmsg cb
, void *data
);
34 bool netfile_download_file(const char *URL
, const char *filename
,
35 nf_errmsg cb
, void *data
);
37 struct netfile_post
*netfile_start_post(void);
38 void netfile_add_form_str(struct netfile_post
*post
,
39 const char *name
, const char *val
);
40 void netfile_add_form_int(struct netfile_post
*post
,
41 const char *name
, const int val
);
42 void netfile_close_post(struct netfile_post
*post
);
44 bool netfile_send_post(const char *URL
, struct netfile_post
*post
,
45 FILE *reply_fp
, struct netfile_write_cb_data
*mem_data
,
50 #endif /* __cplusplus */
52 #endif /* FC__NETFILE_H */