comparison mupdf-source/thirdparty/curl/src/tool_cfgable.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 #ifndef HEADER_CURL_TOOL_CFGABLE_H
2 #define HEADER_CURL_TOOL_CFGABLE_H
3 /***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
11 *
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at https://curl.haxx.se/docs/copyright.html.
15 *
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ***************************************************************************/
24 #include "tool_setup.h"
25
26 #include "tool_sdecls.h"
27
28 #include "tool_metalink.h"
29
30 #include "tool_formparse.h"
31
32 typedef enum {
33 ERR_NONE,
34 ERR_BINARY_TERMINAL = 1, /* binary to terminal detected */
35 ERR_LAST
36 } curl_error;
37
38 struct GlobalConfig;
39
40 struct OperationConfig {
41 bool remote_time;
42 char *random_file;
43 char *egd_file;
44 char *useragent;
45 char *cookie; /* single line with specified cookies */
46 char *cookiejar; /* write to this file */
47 char *cookiefile; /* read from this file */
48 char *altsvc; /* alt-svc cache file name */
49 bool cookiesession; /* new session? */
50 bool encoding; /* Accept-Encoding please */
51 bool tr_encoding; /* Transfer-Encoding please */
52 unsigned long authtype; /* auth bitmask */
53 bool use_resume;
54 bool resume_from_current;
55 bool disable_epsv;
56 bool disable_eprt;
57 bool ftp_pret;
58 long proto;
59 bool proto_present;
60 long proto_redir;
61 bool proto_redir_present;
62 char *proto_default;
63 curl_off_t resume_from;
64 char *postfields;
65 curl_off_t postfieldsize;
66 char *referer;
67 double timeout;
68 double connecttimeout;
69 long maxredirs;
70 curl_off_t max_filesize;
71 char *headerfile;
72 char *ftpport;
73 char *iface;
74 long localport;
75 long localportrange;
76 unsigned short porttouse;
77 char *range;
78 long low_speed_limit;
79 long low_speed_time;
80 char *dns_servers; /* dot notation: 1.1.1.1;2.2.2.2 */
81 char *dns_interface; /* interface name */
82 char *dns_ipv4_addr; /* dot notation */
83 char *dns_ipv6_addr; /* dot notation */
84 char *userpwd;
85 char *login_options;
86 char *tls_username;
87 char *tls_password;
88 char *tls_authtype;
89 char *proxy_tls_username;
90 char *proxy_tls_password;
91 char *proxy_tls_authtype;
92 char *proxyuserpwd;
93 char *proxy;
94 int proxyver; /* set to CURLPROXY_HTTP* define */
95 char *noproxy;
96 char *mail_from;
97 struct curl_slist *mail_rcpt;
98 char *mail_auth;
99 char *sasl_authzid; /* Authorisation identity (identity to use) */
100 bool sasl_ir; /* Enable/disable SASL initial response */
101 bool proxytunnel;
102 bool ftp_append; /* APPE on ftp */
103 bool use_ascii; /* select ascii or text transfer */
104 bool autoreferer; /* automatically set referer */
105 bool failonerror; /* fail on (HTTP) errors */
106 bool show_headers; /* show headers to data output */
107 bool no_body; /* don't get the body */
108 bool dirlistonly; /* only get the FTP dir list */
109 bool followlocation; /* follow http redirects */
110 bool unrestricted_auth; /* Continue to send authentication (user+password)
111 when following ocations, even when hostname
112 changed */
113 bool netrc_opt;
114 bool netrc;
115 char *netrc_file;
116 struct getout *url_list; /* point to the first node */
117 struct getout *url_last; /* point to the last/current node */
118 struct getout *url_get; /* point to the node to fill in URL */
119 struct getout *url_out; /* point to the node to fill in outfile */
120 struct getout *url_ul; /* point to the node to fill in upload */
121 char *doh_url;
122 char *cipher_list;
123 char *proxy_cipher_list;
124 char *cipher13_list;
125 char *proxy_cipher13_list;
126 char *cert;
127 char *proxy_cert;
128 char *cert_type;
129 char *proxy_cert_type;
130 char *cacert;
131 char *proxy_cacert;
132 char *capath;
133 char *proxy_capath;
134 char *crlfile;
135 char *proxy_crlfile;
136 char *pinnedpubkey;
137 char *proxy_pinnedpubkey;
138 char *key;
139 char *proxy_key;
140 char *key_type;
141 char *proxy_key_type;
142 char *key_passwd;
143 char *proxy_key_passwd;
144 char *pubkey;
145 char *hostpubmd5;
146 char *engine;
147 bool crlf;
148 char *customrequest;
149 char *krblevel;
150 char *request_target;
151 long httpversion;
152 bool http09_allowed;
153 bool nobuffer;
154 bool readbusy; /* set when reading input returns EAGAIN */
155 bool globoff;
156 bool use_httpget;
157 bool insecure_ok; /* set TRUE to allow insecure SSL connects */
158 bool proxy_insecure_ok; /* set TRUE to allow insecure SSL connects
159 for proxy */
160 bool terminal_binary_ok;
161 bool verifystatus;
162 bool create_dirs;
163 bool ftp_create_dirs;
164 bool ftp_skip_ip;
165 bool proxynegotiate;
166 bool proxyntlm;
167 bool proxydigest;
168 bool proxybasic;
169 bool proxyanyauth;
170 char *writeout; /* %-styled format string to output */
171 struct curl_slist *quote;
172 struct curl_slist *postquote;
173 struct curl_slist *prequote;
174 long ssl_version;
175 long ssl_version_max;
176 long proxy_ssl_version;
177 long ip_version;
178 curl_TimeCond timecond;
179 curl_off_t condtime;
180 struct curl_slist *headers;
181 struct curl_slist *proxyheaders;
182 tool_mime *mimeroot;
183 tool_mime *mimecurrent;
184 curl_mime *mimepost;
185 struct curl_slist *telnet_options;
186 struct curl_slist *resolve;
187 struct curl_slist *connect_to;
188 HttpReq httpreq;
189
190 /* for bandwidth limiting features: */
191 curl_off_t sendpersecond; /* send to peer */
192 curl_off_t recvpersecond; /* receive from peer */
193
194 bool ftp_ssl;
195 bool ftp_ssl_reqd;
196 bool ftp_ssl_control;
197 bool ftp_ssl_ccc;
198 int ftp_ssl_ccc_mode;
199 char *preproxy;
200 int socks5_gssapi_nec; /* The NEC reference server does not protect the
201 encryption type exchange */
202 unsigned long socks5_auth;/* auth bitmask for socks5 proxies */
203 char *proxy_service_name; /* set authentication service name for HTTP and
204 SOCKS5 proxies */
205 char *service_name; /* set authentication service name for DIGEST-MD5,
206 Kerberos 5 and SPNEGO */
207
208 bool tcp_nodelay;
209 bool tcp_fastopen;
210 long req_retry; /* number of retries */
211 bool retry_connrefused; /* set connection refused as a transient error */
212 long retry_delay; /* delay between retries (in seconds) */
213 long retry_maxtime; /* maximum time to keep retrying */
214
215 char *ftp_account; /* for ACCT */
216 char *ftp_alternative_to_user; /* send command if USER/PASS fails */
217 int ftp_filemethod;
218 long tftp_blksize; /* TFTP BLKSIZE option */
219 bool tftp_no_options; /* do not send TFTP options requests */
220 bool ignorecl; /* --ignore-content-length */
221 bool disable_sessionid;
222
223 bool raw;
224 bool post301;
225 bool post302;
226 bool post303;
227 bool nokeepalive; /* for keepalive needs */
228 long alivetime;
229 bool content_disposition; /* use Content-disposition filename */
230
231 int default_node_flags; /* default flags to search for each 'node', which
232 is basically each given URL to transfer */
233
234 bool xattr; /* store metadata in extended attributes */
235 long gssapi_delegation;
236 bool ssl_allow_beast; /* allow this SSL vulnerability */
237 bool proxy_ssl_allow_beast; /* allow this SSL vulnerability for proxy*/
238
239 bool ssl_no_revoke; /* disable SSL certificate revocation checks */
240 /*bool proxy_ssl_no_revoke; */
241
242 bool use_metalink; /* process given URLs as metalink XML file */
243 metalinkfile *metalinkfile_list; /* point to the first node */
244 metalinkfile *metalinkfile_last; /* point to the last/current node */
245 char *oauth_bearer; /* OAuth 2.0 bearer token */
246 bool nonpn; /* enable/disable TLS NPN extension */
247 bool noalpn; /* enable/disable TLS ALPN extension */
248 char *unix_socket_path; /* path to Unix domain socket */
249 bool abstract_unix_socket; /* path to an abstract Unix domain socket */
250 bool falsestart;
251 bool path_as_is;
252 double expect100timeout;
253 bool suppress_connect_headers; /* suppress proxy CONNECT response headers
254 from user callbacks */
255 curl_error synthetic_error; /* if non-zero, it overrides any libcurl
256 error */
257 bool ssh_compression; /* enable/disable SSH compression */
258 long happy_eyeballs_timeout_ms; /* happy eyeballs timeout in milliseconds.
259 0 is valid. default: CURL_HET_DEFAULT. */
260 bool haproxy_protocol; /* whether to send HAProxy protocol v1 */
261 bool disallow_username_in_url; /* disallow usernames in URLs */
262 struct GlobalConfig *global;
263 struct OperationConfig *prev;
264 struct OperationConfig *next; /* Always last in the struct */
265 };
266
267 struct GlobalConfig {
268 int showerror; /* -1 == unset, default => show errors
269 0 => -s is used to NOT show errors
270 1 => -S has been used to show errors */
271 bool mute; /* don't show messages, --silent given */
272 bool noprogress; /* don't show progress bar --silent given */
273 bool isatty; /* Updated internally if output is a tty */
274 FILE *errors; /* Error stream, defaults to stderr */
275 bool errors_fopened; /* Whether error stream isn't stderr */
276 char *trace_dump; /* file to dump the network trace to */
277 FILE *trace_stream;
278 bool trace_fopened;
279 trace tracetype;
280 bool tracetime; /* include timestamp? */
281 int progressmode; /* CURL_PROGRESS_BAR / CURL_PROGRESS_STATS */
282 char *libcurl; /* Output libcurl code to this file name */
283 bool fail_early; /* exit on first transfer error */
284 bool styled_output; /* enable fancy output style detection */
285 #ifdef CURLDEBUG
286 bool test_event_based;
287 #endif
288 bool parallel;
289 long parallel_max;
290 struct OperationConfig *first;
291 struct OperationConfig *current;
292 struct OperationConfig *last; /* Always last in the struct */
293 };
294
295 void config_init(struct OperationConfig *config);
296 void config_free(struct OperationConfig *config);
297
298 #endif /* HEADER_CURL_TOOL_CFGABLE_H */