curl tool: reviewed code moved to tool_*.[ch] files
[platform/upstream/curl.git] / src / tool_cfgable.h
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 - 2011, 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 http://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 "setup.h"
25
26 #include "tool_sdecls.h"
27
28 struct Configurable {
29   CURL *easy;               /* once we have one, we keep it here */
30   bool remote_time;
31   char *random_file;
32   char *egd_file;
33   char *useragent;
34   char *cookie;             /* single line with specified cookies */
35   char *cookiejar;          /* write to this file */
36   char *cookiefile;         /* read from this file */
37   bool cookiesession;       /* new session? */
38   bool encoding;            /* Accept-Encoding please */
39   bool tr_encoding;         /* Transfer-Encoding please */
40   long authtype;            /* auth bitmask */
41   bool use_resume;
42   bool resume_from_current;
43   bool disable_epsv;
44   bool disable_eprt;
45   bool ftp_pret;
46   long proto;
47   bool proto_present;
48   long proto_redir;
49   bool proto_redir_present;
50   curl_off_t resume_from;
51   char *postfields;
52   curl_off_t postfieldsize;
53   char *referer;
54   long timeout;
55   long connecttimeout;
56   long maxredirs;
57   curl_off_t max_filesize;
58   char *headerfile;
59   char *ftpport;
60   char *iface;
61   int localport;
62   int localportrange;
63   unsigned short porttouse;
64   char *range;
65   long low_speed_limit;
66   long low_speed_time;
67   bool showerror;
68   char *userpwd;
69   char *tls_username;
70   char *tls_password;
71   char *tls_authtype;
72   char *proxyuserpwd;
73   char *proxy;
74   int proxyver;             /* set to CURLPROXY_HTTP* define */
75   char *noproxy;
76   char *mail_from;
77   struct curl_slist *mail_rcpt;
78   bool proxytunnel;
79   bool ftp_append;          /* APPE on ftp */
80   bool mute;                /* don't show messages, --silent given */
81   bool use_ascii;           /* select ascii or text transfer */
82   bool autoreferer;         /* automatically set referer */
83   bool failonerror;         /* fail on (HTTP) errors */
84   bool include_headers;     /* send headers to data output */
85   bool no_body;             /* don't get the body */
86   bool dirlistonly;         /* only get the FTP dir list */
87   bool followlocation;      /* follow http redirects */
88   bool unrestricted_auth;   /* Continue to send authentication (user+password)
89                                when following ocations, even when hostname
90                                changed */
91   bool netrc_opt;
92   bool netrc;
93   char *netrc_file;
94   bool noprogress;
95   bool isatty;              /* updated internally only if output is a tty */
96   struct getout *url_list;  /* point to the first node */
97   struct getout *url_last;  /* point to the last/current node */
98   struct getout *url_get;   /* point to the node to fill in URL */
99   struct getout *url_out;   /* point to the node to fill in outfile */
100   char *cipher_list;
101   char *cert;
102   char *cert_type;
103   char *cacert;
104   char *capath;
105   char *crlfile;
106   char *key;
107   char *key_type;
108   char *key_passwd;
109   char *pubkey;
110   char *hostpubmd5;
111   char *engine;
112   bool list_engines;
113   bool crlf;
114   char *customrequest;
115   char *krblevel;
116   char *trace_dump;         /* file to dump the network trace to, or NULL */
117   FILE *trace_stream;
118   bool trace_fopened;
119   trace tracetype;
120   bool tracetime;           /* include timestamp? */
121   long httpversion;
122   int progressmode;
123   bool nobuffer;
124   bool readbusy;            /* set when reading input returns EAGAIN */
125   bool globoff;
126   bool use_httpget;
127   bool insecure_ok;         /* set TRUE to allow insecure SSL connects */
128   bool create_dirs;
129   bool ftp_create_dirs;
130   bool ftp_skip_ip;
131   bool proxynegotiate;
132   bool proxyntlm;
133   bool proxydigest;
134   bool proxybasic;
135   bool proxyanyauth;
136   char *writeout;           /* %-styled format string to output */
137   bool writeenv;            /* write results to environment, if available */
138   FILE *errors;             /* errors stream, defaults to stderr */
139   bool errors_fopened;      /* whether errors stream isn't stderr */
140   struct curl_slist *quote;
141   struct curl_slist *postquote;
142   struct curl_slist *prequote;
143   long ssl_version;
144   long ip_version;
145   curl_TimeCond timecond;
146   time_t condtime;
147   struct curl_slist *headers;
148   struct curl_httppost *httppost;
149   struct curl_httppost *last_post;
150   struct curl_slist *telnet_options;
151   struct curl_slist *resolve;
152   HttpReq httpreq;
153
154   /* for bandwidth limiting features: */
155   curl_off_t sendpersecond; /* send to peer */
156   curl_off_t recvpersecond; /* receive from peer */
157
158   bool ftp_ssl;
159   bool ftp_ssl_reqd;
160   bool ftp_ssl_control;
161   bool ftp_ssl_ccc;
162   int ftp_ssl_ccc_mode;
163
164   char *socksproxy;         /* set to server string */
165   int socksver;             /* set to CURLPROXY_SOCKS* define */
166   char *socks5_gssapi_service;  /* set service name for gssapi principal
167                                  * default rcmd */
168   int socks5_gssapi_nec ;   /* The NEC reference server does not protect
169                              * the encryption type exchange */
170
171   bool tcp_nodelay;
172   long req_retry;           /* number of retries */
173   long retry_delay;         /* delay between retries (in seconds) */
174   long retry_maxtime;       /* maximum time to keep retrying */
175
176   char *ftp_account;        /* for ACCT */
177   char *ftp_alternative_to_user;  /* send command if USER/PASS fails */
178   int ftp_filemethod;
179   long tftp_blksize;        /* TFTP BLKSIZE option */
180   bool ignorecl;            /* --ignore-content-length */
181   bool disable_sessionid;
182
183   char *libcurl;            /* output libcurl code to this file name */
184   bool raw;
185   bool post301;
186   bool post302;
187   bool nokeepalive;         /* for keepalive needs */
188   long alivetime;
189   bool content_disposition; /* use Content-disposition filename */
190
191   int default_node_flags;   /* default flags to search for each 'node', which
192                                is basically each given URL to transfer */
193   struct OutStruct *outs;
194   bool xattr;               /* store metadata in extended attributes */
195   long gssapi_delegation;
196
197 }; /* struct Configurable */
198
199 void free_config_fields(struct Configurable *config);
200
201 #endif /* HEADER_CURL_TOOL_CFGABLE_H */
202