Freeciv-3.2
Loading...
Searching...
No Matches
netfile.h
Go to the documentation of this file.
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.
7
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
14#ifndef FC__NETFILE_H
15#define FC__NETFILE_H
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
21/* utility */
22#include "support.h" /* bool */
23
24struct netfile_post;
25
27{
28 char *mem;
29 int size;
30};
31
32typedef void (*nf_errmsg)(const char *msg, void *data);
33
34struct section_file *netfile_get_section_file(const char *URL,
35 nf_errmsg cb, void *data);
36
37bool netfile_download_file(const char *URL, const char *filename,
38 nf_errmsg cb, void *data);
39
42 const char *name, const char *val);
44 const char *name, const int val);
46
47bool netfile_send_post(const char *URL, struct netfile_post *post,
49 const char *addr);
50
51void netfile_free(void);
52
53#ifdef __cplusplus
54}
55#endif /* __cplusplus */
56
57#endif /* FC__NETFILE_H */
char * incite_cost
Definition comments.c:75
const char * name
Definition inputfile.c:127
void netfile_close_post(struct netfile_post *post)
Definition netfile.c:244
struct netfile_post * netfile_start_post(void)
Definition netfile.c:197
bool netfile_send_post(const char *URL, struct netfile_post *post, FILE *reply_fp, struct netfile_write_cb_data *mem_data, const char *addr)
Definition netfile.c:268
void(* nf_errmsg)(const char *msg, void *data)
Definition netfile.h:32
void netfile_free(void)
Definition netfile.c:327
struct section_file * netfile_get_section_file(const char *URL, nf_errmsg cb, void *data)
Definition netfile.c:146
void netfile_add_form_int(struct netfile_post *post, const char *name, const int val)
Definition netfile.c:232
void netfile_add_form_str(struct netfile_post *post, const char *name, const char *val)
Definition netfile.c:211
bool netfile_download_file(const char *URL, const char *filename, nf_errmsg cb, void *data)
Definition netfile.c:168
Definition netfile.c:39