1 | #![allow (bad_style)] |
2 | #![doc (html_root_url = "https://docs.rs/curl-sys/0.4" )] |
3 | |
4 | // These `extern crate` are required for conditional linkages of curl. |
5 | #[cfg (link_libnghttp2)] |
6 | extern crate libnghttp2_sys; |
7 | #[cfg (link_libz)] |
8 | extern crate libz_sys; |
9 | #[cfg (link_openssl)] |
10 | extern crate openssl_sys; |
11 | #[cfg (feature = "rustls" )] |
12 | extern crate rustls_ffi; |
13 | |
14 | use libc::c_ulong; |
15 | use libc::{c_char, c_double, c_int, c_long, c_short, c_uint, c_void, size_t, time_t}; |
16 | |
17 | #[cfg (unix)] |
18 | pub use libc::fd_set; |
19 | #[cfg (windows)] |
20 | use winapi::shared::ws2def::SOCKADDR; |
21 | #[cfg (windows)] |
22 | pub use winapi::um::winsock2::fd_set; |
23 | |
24 | #[cfg (target_env = "msvc" )] |
25 | #[doc (hidden)] |
26 | pub type __enum_ty = libc::c_int; |
27 | #[cfg (not(target_env = "msvc" ))] |
28 | #[doc (hidden)] |
29 | pub type __enum_ty = libc::c_uint; |
30 | |
31 | pub type CURLINFO = __enum_ty; |
32 | pub type CURLoption = __enum_ty; |
33 | pub type CURLcode = __enum_ty; |
34 | pub type CURLversion = __enum_ty; |
35 | pub type curl_off_t = i64; |
36 | |
37 | pub enum CURL {} |
38 | |
39 | #[cfg (unix)] |
40 | pub type curl_socket_t = libc::c_int; |
41 | #[cfg (unix)] |
42 | pub const CURL_SOCKET_BAD: curl_socket_t = -1; |
43 | #[cfg (all(windows, target_pointer_width = "32" ))] |
44 | pub type curl_socket_t = libc::c_uint; |
45 | #[cfg (all(windows, target_pointer_width = "64" ))] |
46 | pub type curl_socket_t = u64; |
47 | #[cfg (windows)] |
48 | pub const CURL_SOCKET_BAD: curl_socket_t = !0; |
49 | |
50 | pub enum curl_httppost { |
51 | // Note that this changed in some versions of libcurl, so we currently don't |
52 | // bind the fields as they're apparently not stable. |
53 | // pub next: *mut curl_httppost, |
54 | // pub name: *mut c_char, |
55 | // pub namelength: c_long, |
56 | // pub contents: *mut c_char, |
57 | // pub contentslength: c_long, |
58 | // pub buffer: *mut c_char, |
59 | // pub bufferlength: c_long, |
60 | // pub contenttype: *mut c_char, |
61 | // pub contentheader: *mut curl_slist, |
62 | // pub more: *mut curl_httppost, |
63 | // pub flags: c_long, |
64 | // pub showfilename: *mut c_char, |
65 | // pub userp: *mut c_void, |
66 | } |
67 | |
68 | // pub const HTTPPOST_FILENAME: c_long = 1 << 0; |
69 | // pub const HTTPPOST_READFILE: c_long = 1 << 1; |
70 | // pub const HTTPPOST_PTRNAME: c_long = 1 << 2; |
71 | // pub const HTTPPOST_PTRCONTENTS: c_long = 1 << 3; |
72 | // pub const HTTPPOST_BUFFER: c_long = 1 << 4; |
73 | // pub const HTTPPOST_PTRBUFFER: c_long = 1 << 5; |
74 | // pub const HTTPPOST_CALLBACK: c_long = 1 << 6; |
75 | |
76 | pub type curl_progress_callback = |
77 | extern "C" fn(*mut c_void, c_double, c_double, c_double, c_double) -> c_int; |
78 | // pub type curl_xferinfo_callback = extern fn(*mut c_void, |
79 | // curl_off_t, |
80 | // curl_off_t, |
81 | // curl_off_t, |
82 | // curl_off_t) -> c_int; |
83 | |
84 | pub const CURL_WRITEFUNC_PAUSE: size_t = 0x10000001; |
85 | |
86 | pub type curl_write_callback = extern "C" fn(*mut c_char, size_t, size_t, *mut c_void) -> size_t; |
87 | |
88 | pub type curlfiletype = __enum_ty; |
89 | pub const CURLFILETYPE_FILE: curlfiletype = 0; |
90 | pub const CURLFILETYPE_DIRECTORY: curlfiletype = 1; |
91 | pub const CURLFILETYPE_SYMLINK: curlfiletype = 2; |
92 | pub const CURLFILETYPE_DEVICE_BLOCK: curlfiletype = 3; |
93 | pub const CURLFILETYPE_DEVICE_CHAR: curlfiletype = 4; |
94 | pub const CURLFILETYPE_NAMEDPIPE: curlfiletype = 5; |
95 | pub const CURLFILETYPE_SOCKET: curlfiletype = 6; |
96 | pub const CURLFILETYPE_DOOR: curlfiletype = 7; |
97 | pub const CURLFILETYPE_UNKNOWN: curlfiletype = 8; |
98 | |
99 | pub const CURLFINFOFLAG_KNOWN_FILENAME: c_uint = 1 << 0; |
100 | pub const CURLFINFOFLAG_KNOWN_FILETYPE: c_uint = 1 << 1; |
101 | pub const CURLFINFOFLAG_KNOWN_TIME: c_uint = 1 << 2; |
102 | pub const CURLFINFOFLAG_KNOWN_PERM: c_uint = 1 << 3; |
103 | pub const CURLFINFOFLAG_KNOWN_UID: c_uint = 1 << 4; |
104 | pub const CURLFINFOFLAG_KNOWN_GID: c_uint = 1 << 5; |
105 | pub const CURLFINFOFLAG_KNOWN_SIZE: c_uint = 1 << 6; |
106 | pub const CURLFINFOFLAG_KNOWN_HLINKCOUNT: c_uint = 1 << 7; |
107 | |
108 | #[repr (C)] |
109 | pub struct curl_fileinfo { |
110 | pub filename: *mut c_char, |
111 | pub filetype: curlfiletype, |
112 | pub time: time_t, |
113 | pub perm: c_uint, |
114 | pub uid: c_int, |
115 | pub gid: c_int, |
116 | pub size: curl_off_t, |
117 | pub hardlinks: c_long, |
118 | |
119 | pub strings_time: *mut c_char, |
120 | pub strings_perm: *mut c_char, |
121 | pub strings_user: *mut c_char, |
122 | pub strings_group: *mut c_char, |
123 | pub strings_target: *mut c_char, |
124 | |
125 | pub flags: c_uint, |
126 | pub b_data: *mut c_char, |
127 | pub b_size: size_t, |
128 | pub b_used: size_t, |
129 | } |
130 | |
131 | pub const CURL_BLOB_NOCOPY: c_uint = 0; |
132 | pub const CURL_BLOB_COPY: c_uint = 1; |
133 | |
134 | #[repr (C)] |
135 | pub struct curl_blob { |
136 | pub data: *mut c_void, |
137 | pub len: size_t, |
138 | pub flags: c_uint, |
139 | } |
140 | |
141 | pub const CURL_CHUNK_BGN_FUNC_OK: c_long = 0; |
142 | pub const CURL_CHUNK_BGN_FUNC_FAIL: c_long = 1; |
143 | pub const CURL_CHUNK_BGN_FUNC_SKIP: c_long = 2; |
144 | pub type curl_chunk_bgn_callback = extern "C" fn(*const c_void, *mut c_void, c_int) -> c_long; |
145 | |
146 | pub const CURL_CHUNK_END_FUNC_OK: c_long = 0; |
147 | pub const CURL_CHUNK_END_FUNC_FAIL: c_long = 1; |
148 | pub type curl_chunk_end_callback = extern "C" fn(*mut c_void) -> c_long; |
149 | |
150 | pub const CURL_FNMATCHFUNC_MATCH: c_int = 0; |
151 | pub const CURL_FNMATCHFUNC_NOMATCH: c_int = 1; |
152 | pub const CURL_FNMATCHFUNC_FAIL: c_int = 2; |
153 | pub type curl_fnmatch_callback = extern "C" fn(*mut c_void, *const c_char, *const c_char) -> c_int; |
154 | |
155 | pub const CURL_SEEKFUNC_OK: c_int = 0; |
156 | pub const CURL_SEEKFUNC_FAIL: c_int = 1; |
157 | pub const CURL_SEEKFUNC_CANTSEEK: c_int = 2; |
158 | pub type curl_seek_callback = extern "C" fn(*mut c_void, curl_off_t, c_int) -> c_int; |
159 | |
160 | pub const CURL_READFUNC_ABORT: size_t = 0x10000000; |
161 | pub const CURL_READFUNC_PAUSE: size_t = 0x10000001; |
162 | pub type curl_read_callback = extern "C" fn(*mut c_char, size_t, size_t, *mut c_void) -> size_t; |
163 | |
164 | // pub const CURL_SOCKOPT_OK: c_int = 0; |
165 | // pub const CURL_SOCKOPT_ERROR: c_int = 1; |
166 | // pub const CURL_SOCKOPT_ALREADY_CONNECTED: c_int = 2; |
167 | // pub type curl_sockopt_callback = extern fn(*mut c_void, |
168 | // curl_socket_t, |
169 | // curlsocktype) -> c_int; |
170 | |
171 | pub type curlioerr = __enum_ty; |
172 | pub const CURLIOE_OK: curlioerr = 0; |
173 | pub const CURLIOE_UNKNOWNCMD: curlioerr = 1; |
174 | pub const CURLIOE_FAILRESTART: curlioerr = 2; |
175 | |
176 | pub type curliocmd = __enum_ty; |
177 | pub const CURLIOCMD_NOP: curliocmd = 0; |
178 | pub const CURLIOCMD_RESTARTREAD: curliocmd = 1; |
179 | |
180 | pub type curl_ioctl_callback = extern "C" fn(*mut CURL, c_int, *mut c_void) -> curlioerr; |
181 | |
182 | pub type curl_malloc_callback = extern "C" fn(size_t) -> *mut c_void; |
183 | pub type curl_free_callback = extern "C" fn(*mut c_void); |
184 | pub type curl_realloc_callback = extern "C" fn(*mut c_void, size_t) -> *mut c_void; |
185 | pub type curl_strdup_callback = extern "C" fn(*const c_char) -> *mut c_char; |
186 | pub type curl_calloc_callback = extern "C" fn(size_t, size_t) -> *mut c_void; |
187 | |
188 | pub type curl_infotype = __enum_ty; |
189 | pub const CURLINFO_TEXT: curl_infotype = 0; |
190 | pub const CURLINFO_HEADER_IN: curl_infotype = 1; |
191 | pub const CURLINFO_HEADER_OUT: curl_infotype = 2; |
192 | pub const CURLINFO_DATA_IN: curl_infotype = 3; |
193 | pub const CURLINFO_DATA_OUT: curl_infotype = 4; |
194 | pub const CURLINFO_SSL_DATA_IN: curl_infotype = 5; |
195 | pub const CURLINFO_SSL_DATA_OUT: curl_infotype = 6; |
196 | |
197 | pub type curl_debug_callback = |
198 | extern "C" fn(*mut CURL, curl_infotype, *mut c_char, size_t, *mut c_void) -> c_int; |
199 | |
200 | pub const CURLE_OK: CURLcode = 0; |
201 | pub const CURLE_UNSUPPORTED_PROTOCOL: CURLcode = 1; |
202 | pub const CURLE_FAILED_INIT: CURLcode = 2; |
203 | pub const CURLE_URL_MALFORMAT: CURLcode = 3; |
204 | // pub const CURLE_NOT_BUILT_IN: CURLcode = 4; |
205 | pub const CURLE_COULDNT_RESOLVE_PROXY: CURLcode = 5; |
206 | pub const CURLE_COULDNT_RESOLVE_HOST: CURLcode = 6; |
207 | pub const CURLE_COULDNT_CONNECT: CURLcode = 7; |
208 | pub const CURLE_FTP_WEIRD_SERVER_REPLY: CURLcode = 8; |
209 | pub const CURLE_REMOTE_ACCESS_DENIED: CURLcode = 9; |
210 | // pub const CURLE_FTP_ACCEPT_FAILED: CURLcode = 10; |
211 | pub const CURLE_FTP_WEIRD_PASS_REPLY: CURLcode = 11; |
212 | // pub const CURLE_FTP_ACCEPT_TIMEOUT: CURLcode = 12; |
213 | pub const CURLE_FTP_WEIRD_PASV_REPLY: CURLcode = 13; |
214 | pub const CURLE_FTP_WEIRD_227_FORMAT: CURLcode = 14; |
215 | pub const CURLE_FTP_CANT_GET_HOST: CURLcode = 15; |
216 | pub const CURLE_HTTP2: CURLcode = 16; |
217 | pub const CURLE_FTP_COULDNT_SET_TYPE: CURLcode = 17; |
218 | pub const CURLE_PARTIAL_FILE: CURLcode = 18; |
219 | pub const CURLE_FTP_COULDNT_RETR_FILE: CURLcode = 19; |
220 | pub const CURLE_OBSOLETE20: CURLcode = 20; |
221 | pub const CURLE_QUOTE_ERROR: CURLcode = 21; |
222 | pub const CURLE_HTTP_RETURNED_ERROR: CURLcode = 22; |
223 | pub const CURLE_WRITE_ERROR: CURLcode = 23; |
224 | pub const CURLE_OBSOLETE24: CURLcode = 24; |
225 | pub const CURLE_UPLOAD_FAILED: CURLcode = 25; |
226 | pub const CURLE_READ_ERROR: CURLcode = 26; |
227 | pub const CURLE_OUT_OF_MEMORY: CURLcode = 27; |
228 | pub const CURLE_OPERATION_TIMEDOUT: CURLcode = 28; |
229 | pub const CURLE_OBSOLETE29: CURLcode = 29; |
230 | pub const CURLE_FTP_PORT_FAILED: CURLcode = 30; |
231 | pub const CURLE_FTP_COULDNT_USE_REST: CURLcode = 31; |
232 | pub const CURLE_OBSOLETE32: CURLcode = 32; |
233 | pub const CURLE_RANGE_ERROR: CURLcode = 33; |
234 | pub const CURLE_HTTP_POST_ERROR: CURLcode = 34; |
235 | pub const CURLE_SSL_CONNECT_ERROR: CURLcode = 35; |
236 | pub const CURLE_BAD_DOWNLOAD_RESUME: CURLcode = 36; |
237 | pub const CURLE_FILE_COULDNT_READ_FILE: CURLcode = 37; |
238 | pub const CURLE_LDAP_CANNOT_BIND: CURLcode = 38; |
239 | pub const CURLE_LDAP_SEARCH_FAILED: CURLcode = 39; |
240 | pub const CURLE_OBSOLETE40: CURLcode = 40; |
241 | pub const CURLE_FUNCTION_NOT_FOUND: CURLcode = 41; |
242 | pub const CURLE_ABORTED_BY_CALLBACK: CURLcode = 42; |
243 | pub const CURLE_BAD_FUNCTION_ARGUMENT: CURLcode = 43; |
244 | pub const CURLE_OBSOLETE44: CURLcode = 44; |
245 | pub const CURLE_INTERFACE_FAILED: CURLcode = 45; |
246 | pub const CURLE_OBSOLETE46: CURLcode = 46; |
247 | pub const CURLE_TOO_MANY_REDIRECTS: CURLcode = 47; |
248 | pub const CURLE_UNKNOWN_OPTION: CURLcode = 48; |
249 | pub const CURLE_TELNET_OPTION_SYNTAX: CURLcode = 49; |
250 | pub const CURLE_OBSOLETE50: CURLcode = 50; |
251 | pub const CURLE_PEER_FAILED_VERIFICATION: CURLcode = 60; |
252 | pub const CURLE_GOT_NOTHING: CURLcode = 52; |
253 | pub const CURLE_SSL_ENGINE_NOTFOUND: CURLcode = 53; |
254 | pub const CURLE_SSL_ENGINE_SETFAILED: CURLcode = 54; |
255 | pub const CURLE_SEND_ERROR: CURLcode = 55; |
256 | pub const CURLE_RECV_ERROR: CURLcode = 56; |
257 | pub const CURLE_OBSOLETE57: CURLcode = 57; |
258 | pub const CURLE_SSL_CERTPROBLEM: CURLcode = 58; |
259 | pub const CURLE_SSL_CIPHER: CURLcode = 59; |
260 | pub const CURLE_SSL_CACERT: CURLcode = 60; |
261 | pub const CURLE_BAD_CONTENT_ENCODING: CURLcode = 61; |
262 | pub const CURLE_LDAP_INVALID_URL: CURLcode = 62; |
263 | pub const CURLE_FILESIZE_EXCEEDED: CURLcode = 63; |
264 | pub const CURLE_USE_SSL_FAILED: CURLcode = 64; |
265 | pub const CURLE_SEND_FAIL_REWIND: CURLcode = 65; |
266 | pub const CURLE_SSL_ENGINE_INITFAILED: CURLcode = 66; |
267 | pub const CURLE_LOGIN_DENIED: CURLcode = 67; |
268 | pub const CURLE_TFTP_NOTFOUND: CURLcode = 68; |
269 | pub const CURLE_TFTP_PERM: CURLcode = 69; |
270 | pub const CURLE_REMOTE_DISK_FULL: CURLcode = 70; |
271 | pub const CURLE_TFTP_ILLEGAL: CURLcode = 71; |
272 | pub const CURLE_TFTP_UNKNOWNID: CURLcode = 72; |
273 | pub const CURLE_REMOTE_FILE_EXISTS: CURLcode = 73; |
274 | pub const CURLE_TFTP_NOSUCHUSER: CURLcode = 74; |
275 | pub const CURLE_CONV_FAILED: CURLcode = 75; |
276 | pub const CURLE_CONV_REQD: CURLcode = 76; |
277 | pub const CURLE_SSL_CACERT_BADFILE: CURLcode = 77; |
278 | pub const CURLE_REMOTE_FILE_NOT_FOUND: CURLcode = 78; |
279 | pub const CURLE_SSH: CURLcode = 79; |
280 | pub const CURLE_SSL_SHUTDOWN_FAILED: CURLcode = 80; |
281 | pub const CURLE_AGAIN: CURLcode = 81; |
282 | pub const CURLE_SSL_CRL_BADFILE: CURLcode = 82; |
283 | pub const CURLE_SSL_ISSUER_ERROR: CURLcode = 83; |
284 | pub const CURLE_FTP_PRET_FAILED: CURLcode = 84; |
285 | pub const CURLE_RTSP_CSEQ_ERROR: CURLcode = 85; |
286 | pub const CURLE_RTSP_SESSION_ERROR: CURLcode = 86; |
287 | pub const CURLE_FTP_BAD_FILE_LIST: CURLcode = 87; |
288 | pub const CURLE_CHUNK_FAILED: CURLcode = 88; |
289 | pub const CURLE_NO_CONNECTION_AVAILABLE: CURLcode = 89; |
290 | pub const CURLE_SSL_PINNEDPUBKEYNOTMATCH: CURLcode = 90; |
291 | pub const CURLE_SSL_INVALIDCERTSTATUS: CURLcode = 91; |
292 | pub const CURLE_HTTP2_STREAM: CURLcode = 92; |
293 | pub const CURLE_RECURSIVE_API_CALL: CURLcode = 93; |
294 | |
295 | pub type curl_conv_callback = extern "C" fn(*mut c_char, size_t) -> CURLcode; |
296 | pub type curl_ssl_ctx_callback = extern "C" fn(*mut CURL, *mut c_void, *mut c_void) -> CURLcode; |
297 | |
298 | pub type curl_proxytype = __enum_ty; |
299 | pub const CURLPROXY_HTTP: curl_proxytype = 0; |
300 | pub const CURLPROXY_HTTP_1_0: curl_proxytype = 1; |
301 | pub const CURLPROXY_SOCKS4: curl_proxytype = 4; |
302 | pub const CURLPROXY_SOCKS5: curl_proxytype = 5; |
303 | pub const CURLPROXY_SOCKS4A: curl_proxytype = 6; |
304 | pub const CURLPROXY_SOCKS5_HOSTNAME: curl_proxytype = 7; |
305 | |
306 | pub const CURLAUTH_NONE: c_ulong = 0; |
307 | pub const CURLAUTH_BASIC: c_ulong = 1 << 0; |
308 | pub const CURLAUTH_DIGEST: c_ulong = 1 << 1; |
309 | pub const CURLAUTH_GSSNEGOTIATE: c_ulong = 1 << 2; |
310 | pub const CURLAUTH_NTLM: c_ulong = 1 << 3; |
311 | pub const CURLAUTH_DIGEST_IE: c_ulong = 1 << 4; |
312 | pub const CURLAUTH_NTLM_WB: c_ulong = 1 << 5; |
313 | pub const CURLAUTH_AWS_SIGV4: c_ulong = 1 << 7; |
314 | // pub const CURLAUTH_ONLY: c_ulong = 1 << 31; |
315 | pub const CURLAUTH_ANY: c_ulong = !CURLAUTH_DIGEST_IE; |
316 | pub const CURLAUTH_ANYSAFE: c_ulong = !(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE); |
317 | |
318 | // pub const CURLSSH_AUTH_ANY: c_ulong = !0; |
319 | // pub const CURLSSH_AUTH_NONE: c_ulong = 0; |
320 | // pub const CURLSSH_AUTH_PUBLICKEY: c_ulong = 1 << 0; |
321 | // pub const CURLSSH_AUTH_PASSWORD: c_ulong = 1 << 1; |
322 | // pub const CURLSSH_AUTH_HOST: c_ulong = 1 << 2; |
323 | // pub const CURLSSH_AUTH_KEYBOARD: c_ulong = 1 << 3; |
324 | // pub const CURLSSH_AUTH_AGENT: c_ulong = 1 << 4; |
325 | // pub const CURLSSH_AUTH_DEFAULT: c_ulong = CURLSSH_AUTH_ANY; |
326 | |
327 | pub const CURLGSSAPI_DELEGATION_NONE: c_ulong = 0; |
328 | pub const CURLGSSAPI_DELEGATION_POLICY_FLAG: c_ulong = 1 << 0; |
329 | pub const CURLGSSAPI_DELEGATION_FLAG: c_ulong = 1 << 1; |
330 | |
331 | // pub type curl_khtype = __enum_ty; |
332 | // pub const CURLKHTYPE_UNKNOWN: curl_khtype = 0; |
333 | // pub const CURLKHTYPE_RSA1: curl_khtype = 1; |
334 | // pub const CURLKHTYPE_RSA: curl_khtype = 2; |
335 | // pub const CURLKHTYPE_DSS: curl_khtype = 3; |
336 | |
337 | // #[repr(C)] |
338 | // pub struct curl_khkey { |
339 | // pub key: *const c_char, |
340 | // pub len: size_t, |
341 | // pub keytype: curl_khtype, |
342 | // } |
343 | |
344 | // pub type curl_khstat = __enum_ty; |
345 | // pub const CURLKHSTAT_FINE_ADD_TO_FILE: curl_khstat = 0; |
346 | // pub const CURLKHSTAT_FINE: curl_khstat = 1; |
347 | // pub const CURLKHSTAT_REJECT: curl_khstat = 2; |
348 | // pub const CURLKHSTAT_DEFER: curl_khstat = 3; |
349 | // |
350 | // pub type curl_khmatch = __enum_ty; |
351 | // pub const CURLKHMATCH_OK: curl_khmatch = 0; |
352 | // pub const CURLKHMATCH_MISMATCH: curl_khmatch = 1; |
353 | // pub const CURLKHMATCH_MISSING: curl_khmatch = 2; |
354 | |
355 | // pub type curl_sshkeycallback = extern fn(*mut CURL, |
356 | // *const curl_khkey, |
357 | // *const curl_khkey, |
358 | // curl_khmatch, |
359 | // *mut c_void) -> c_int; |
360 | |
361 | pub const CURL_NETRC_IGNORED: c_ulong = 0; |
362 | pub const CURL_NETRC_OPTIONAL: c_ulong = 1; |
363 | pub const CURL_NETRC_REQUIRED: c_ulong = 2; |
364 | |
365 | pub type curl_usessl = __enum_ty; |
366 | pub const CURLUSESSL_NONE: curl_usessl = 0; |
367 | pub const CURLUSESSL_TRY: curl_usessl = 1; |
368 | pub const CURLUSESSL_CONTROL: curl_usessl = 2; |
369 | pub const CURLUSESSL_ALL: curl_usessl = 3; |
370 | |
371 | pub const CURLPROTO_HTTP: c_int = 1 << 0; |
372 | pub const CURLPROTO_HTTPS: c_int = 1 << 1; |
373 | pub const CURLPROTO_FILE: c_int = 1 << 10; |
374 | |
375 | pub const CURLOPTTYPE_LONG: CURLoption = 0; |
376 | pub const CURLOPTTYPE_OBJECTPOINT: CURLoption = 10_000; |
377 | pub const CURLOPTTYPE_FUNCTIONPOINT: CURLoption = 20_000; |
378 | pub const CURLOPTTYPE_OFF_T: CURLoption = 30_000; |
379 | pub const CURLOPTTYPE_BLOB: CURLoption = 40_000; |
380 | const CURLOPTTYPE_VALUES: CURLoption = CURLOPTTYPE_LONG; |
381 | |
382 | pub const CURLOPT_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 1; |
383 | pub const CURLOPT_URL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 2; |
384 | pub const CURLOPT_PORT: CURLoption = CURLOPTTYPE_LONG + 3; |
385 | pub const CURLOPT_PROXY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 4; |
386 | pub const CURLOPT_USERPWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 5; |
387 | pub const CURLOPT_PROXYUSERPWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 6; |
388 | pub const CURLOPT_RANGE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 7; |
389 | pub const CURLOPT_INFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 9; |
390 | pub const CURLOPT_ERRORBUFFER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 10; |
391 | pub const CURLOPT_WRITEFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 11; |
392 | pub const CURLOPT_READFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 12; |
393 | pub const CURLOPT_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 13; |
394 | pub const CURLOPT_INFILESIZE: CURLoption = CURLOPTTYPE_LONG + 14; |
395 | pub const CURLOPT_POSTFIELDS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 15; |
396 | pub const CURLOPT_REFERER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 16; |
397 | pub const CURLOPT_FTPPORT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 17; |
398 | pub const CURLOPT_USERAGENT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 18; |
399 | pub const CURLOPT_LOW_SPEED_LIMIT: CURLoption = CURLOPTTYPE_LONG + 19; |
400 | pub const CURLOPT_LOW_SPEED_TIME: CURLoption = CURLOPTTYPE_LONG + 20; |
401 | pub const CURLOPT_RESUME_FROM: CURLoption = CURLOPTTYPE_LONG + 21; |
402 | pub const CURLOPT_COOKIE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 22; |
403 | pub const CURLOPT_HTTPHEADER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 23; |
404 | pub const CURLOPT_HTTPPOST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 24; |
405 | pub const CURLOPT_SSLCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 25; |
406 | pub const CURLOPT_KEYPASSWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 26; |
407 | pub const CURLOPT_CRLF: CURLoption = CURLOPTTYPE_LONG + 27; |
408 | pub const CURLOPT_QUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 28; |
409 | pub const CURLOPT_WRITEHEADER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 29; |
410 | pub const CURLOPT_COOKIEFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 31; |
411 | pub const CURLOPT_SSLVERSION: CURLoption = CURLOPTTYPE_LONG + 32; |
412 | pub const CURLOPT_TIMECONDITION: CURLoption = CURLOPTTYPE_LONG + 33; |
413 | pub const CURLOPT_TIMEVALUE: CURLoption = CURLOPTTYPE_LONG + 34; |
414 | pub const CURLOPT_CUSTOMREQUEST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 36; |
415 | pub const CURLOPT_STDERR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 37; |
416 | pub const CURLOPT_POSTQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 39; |
417 | pub const CURLOPT_WRITEINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 40; |
418 | pub const CURLOPT_VERBOSE: CURLoption = CURLOPTTYPE_LONG + 41; |
419 | pub const CURLOPT_HEADER: CURLoption = CURLOPTTYPE_LONG + 42; |
420 | pub const CURLOPT_NOPROGRESS: CURLoption = CURLOPTTYPE_LONG + 43; |
421 | pub const CURLOPT_NOBODY: CURLoption = CURLOPTTYPE_LONG + 44; |
422 | pub const CURLOPT_FAILONERROR: CURLoption = CURLOPTTYPE_LONG + 45; |
423 | pub const CURLOPT_UPLOAD: CURLoption = CURLOPTTYPE_LONG + 46; |
424 | pub const CURLOPT_POST: CURLoption = CURLOPTTYPE_LONG + 47; |
425 | pub const CURLOPT_DIRLISTONLY: CURLoption = CURLOPTTYPE_LONG + 48; |
426 | pub const CURLOPT_APPEND: CURLoption = CURLOPTTYPE_LONG + 50; |
427 | pub const CURLOPT_NETRC: CURLoption = CURLOPTTYPE_LONG + 51; |
428 | pub const CURLOPT_FOLLOWLOCATION: CURLoption = CURLOPTTYPE_LONG + 52; |
429 | pub const CURLOPT_TRANSFERTEXT: CURLoption = CURLOPTTYPE_LONG + 53; |
430 | pub const CURLOPT_PUT: CURLoption = CURLOPTTYPE_LONG + 54; |
431 | pub const CURLOPT_PROGRESSFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 56; |
432 | pub const CURLOPT_PROGRESSDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 57; |
433 | pub const CURLOPT_AUTOREFERER: CURLoption = CURLOPTTYPE_LONG + 58; |
434 | pub const CURLOPT_PROXYPORT: CURLoption = CURLOPTTYPE_LONG + 59; |
435 | pub const CURLOPT_POSTFIELDSIZE: CURLoption = CURLOPTTYPE_LONG + 60; |
436 | pub const CURLOPT_HTTPPROXYTUNNEL: CURLoption = CURLOPTTYPE_LONG + 61; |
437 | pub const CURLOPT_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 62; |
438 | pub const CURLOPT_KRBLEVEL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 63; |
439 | pub const CURLOPT_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 64; |
440 | pub const CURLOPT_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 65; |
441 | pub const CURLOPT_MAXREDIRS: CURLoption = CURLOPTTYPE_LONG + 68; |
442 | pub const CURLOPT_FILETIME: CURLoption = CURLOPTTYPE_LONG + 69; |
443 | pub const CURLOPT_TELNETOPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 70; |
444 | pub const CURLOPT_MAXCONNECTS: CURLoption = CURLOPTTYPE_LONG + 71; |
445 | pub const CURLOPT_CLOSEPOLICY: CURLoption = CURLOPTTYPE_LONG + 72; |
446 | pub const CURLOPT_FRESH_CONNECT: CURLoption = CURLOPTTYPE_LONG + 74; |
447 | pub const CURLOPT_FORBID_REUSE: CURLoption = CURLOPTTYPE_LONG + 75; |
448 | pub const CURLOPT_RANDOM_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 76; |
449 | pub const CURLOPT_EGDSOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 77; |
450 | pub const CURLOPT_CONNECTTIMEOUT: CURLoption = CURLOPTTYPE_LONG + 78; |
451 | pub const CURLOPT_HEADERFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 79; |
452 | pub const CURLOPT_HTTPGET: CURLoption = CURLOPTTYPE_LONG + 80; |
453 | pub const CURLOPT_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 81; |
454 | pub const CURLOPT_COOKIEJAR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 82; |
455 | pub const CURLOPT_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 83; |
456 | pub const CURLOPT_HTTP_VERSION: CURLoption = CURLOPTTYPE_LONG + 84; |
457 | pub const CURLOPT_FTP_USE_EPSV: CURLoption = CURLOPTTYPE_LONG + 85; |
458 | pub const CURLOPT_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 86; |
459 | pub const CURLOPT_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 87; |
460 | pub const CURLOPT_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 88; |
461 | pub const CURLOPT_SSLENGINE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 89; |
462 | pub const CURLOPT_SSLENGINE_DEFAULT: CURLoption = CURLOPTTYPE_LONG + 90; |
463 | pub const CURLOPT_DNS_USE_GLOBAL_CACHE: CURLoption = CURLOPTTYPE_LONG + 91; |
464 | pub const CURLOPT_DNS_CACHE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 92; |
465 | pub const CURLOPT_PREQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 93; |
466 | pub const CURLOPT_DEBUGFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 94; |
467 | pub const CURLOPT_DEBUGDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 95; |
468 | pub const CURLOPT_COOKIESESSION: CURLoption = CURLOPTTYPE_LONG + 96; |
469 | pub const CURLOPT_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 97; |
470 | pub const CURLOPT_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 98; |
471 | pub const CURLOPT_NOSIGNAL: CURLoption = CURLOPTTYPE_LONG + 99; |
472 | pub const CURLOPT_SHARE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 100; |
473 | pub const CURLOPT_PROXYTYPE: CURLoption = CURLOPTTYPE_LONG + 101; |
474 | pub const CURLOPT_ACCEPT_ENCODING: CURLoption = CURLOPTTYPE_OBJECTPOINT + 102; |
475 | pub const CURLOPT_PRIVATE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 103; |
476 | pub const CURLOPT_HTTP200ALIASES: CURLoption = CURLOPTTYPE_OBJECTPOINT + 104; |
477 | pub const CURLOPT_UNRESTRICTED_AUTH: CURLoption = CURLOPTTYPE_LONG + 105; |
478 | pub const CURLOPT_FTP_USE_EPRT: CURLoption = CURLOPTTYPE_LONG + 106; |
479 | pub const CURLOPT_HTTPAUTH: CURLoption = CURLOPTTYPE_LONG + 107; |
480 | pub const CURLOPT_SSL_CTX_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 108; |
481 | pub const CURLOPT_SSL_CTX_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 109; |
482 | pub const CURLOPT_FTP_CREATE_MISSING_DIRS: CURLoption = CURLOPTTYPE_LONG + 110; |
483 | pub const CURLOPT_PROXYAUTH: CURLoption = CURLOPTTYPE_LONG + 111; |
484 | pub const CURLOPT_FTP_RESPONSE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 112; |
485 | pub const CURLOPT_IPRESOLVE: CURLoption = CURLOPTTYPE_LONG + 113; |
486 | pub const CURLOPT_MAXFILESIZE: CURLoption = CURLOPTTYPE_LONG + 114; |
487 | pub const CURLOPT_INFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 115; |
488 | pub const CURLOPT_RESUME_FROM_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 116; |
489 | pub const CURLOPT_MAXFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 117; |
490 | pub const CURLOPT_NETRC_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 118; |
491 | pub const CURLOPT_USE_SSL: CURLoption = CURLOPTTYPE_LONG + 119; |
492 | pub const CURLOPT_POSTFIELDSIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 120; |
493 | pub const CURLOPT_TCP_NODELAY: CURLoption = CURLOPTTYPE_LONG + 121; |
494 | pub const CURLOPT_FTPSSLAUTH: CURLoption = CURLOPTTYPE_LONG + 129; |
495 | pub const CURLOPT_IOCTLFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 130; |
496 | pub const CURLOPT_IOCTLDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 131; |
497 | pub const CURLOPT_FTP_ACCOUNT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 134; |
498 | pub const CURLOPT_COOKIELIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 135; |
499 | pub const CURLOPT_IGNORE_CONTENT_LENGTH: CURLoption = CURLOPTTYPE_LONG + 136; |
500 | pub const CURLOPT_FTP_SKIP_PASV_IP: CURLoption = CURLOPTTYPE_LONG + 137; |
501 | pub const CURLOPT_FTP_FILEMETHOD: CURLoption = CURLOPTTYPE_LONG + 138; |
502 | pub const CURLOPT_LOCALPORT: CURLoption = CURLOPTTYPE_LONG + 139; |
503 | pub const CURLOPT_LOCALPORTRANGE: CURLoption = CURLOPTTYPE_LONG + 140; |
504 | pub const CURLOPT_CONNECT_ONLY: CURLoption = CURLOPTTYPE_LONG + 141; |
505 | pub const CURLOPT_CONV_FROM_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 142; |
506 | pub const CURLOPT_CONV_TO_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 143; |
507 | pub const CURLOPT_CONV_FROM_UTF8_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 144; |
508 | pub const CURLOPT_MAX_SEND_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 145; |
509 | pub const CURLOPT_MAX_RECV_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 146; |
510 | pub const CURLOPT_FTP_ALTERNATIVE_TO_USER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 147; |
511 | pub const CURLOPT_SOCKOPTFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 148; |
512 | pub const CURLOPT_SOCKOPTDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 149; |
513 | pub const CURLOPT_SSL_SESSIONID_CACHE: CURLoption = CURLOPTTYPE_LONG + 150; |
514 | pub const CURLOPT_SSH_AUTH_TYPES: CURLoption = CURLOPTTYPE_LONG + 151; |
515 | pub const CURLOPT_SSH_PUBLIC_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 152; |
516 | pub const CURLOPT_SSH_PRIVATE_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 153; |
517 | pub const CURLOPT_FTP_SSL_CCC: CURLoption = CURLOPTTYPE_LONG + 154; |
518 | pub const CURLOPT_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 155; |
519 | pub const CURLOPT_CONNECTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 156; |
520 | pub const CURLOPT_HTTP_TRANSFER_DECODING: CURLoption = CURLOPTTYPE_LONG + 157; |
521 | pub const CURLOPT_HTTP_CONTENT_DECODING: CURLoption = CURLOPTTYPE_LONG + 158; |
522 | pub const CURLOPT_NEW_FILE_PERMS: CURLoption = CURLOPTTYPE_LONG + 159; |
523 | pub const CURLOPT_NEW_DIRECTORY_PERMS: CURLoption = CURLOPTTYPE_LONG + 160; |
524 | pub const CURLOPT_POSTREDIR: CURLoption = CURLOPTTYPE_LONG + 161; |
525 | pub const CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: CURLoption = CURLOPTTYPE_OBJECTPOINT + 162; |
526 | pub const CURLOPT_OPENSOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 163; |
527 | pub const CURLOPT_OPENSOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 164; |
528 | pub const CURLOPT_COPYPOSTFIELDS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 165; |
529 | pub const CURLOPT_PROXY_TRANSFER_MODE: CURLoption = CURLOPTTYPE_LONG + 166; |
530 | pub const CURLOPT_SEEKFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 167; |
531 | pub const CURLOPT_SEEKDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 168; |
532 | pub const CURLOPT_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 169; |
533 | pub const CURLOPT_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 170; |
534 | pub const CURLOPT_ADDRESS_SCOPE: CURLoption = CURLOPTTYPE_LONG + 171; |
535 | pub const CURLOPT_CERTINFO: CURLoption = CURLOPTTYPE_LONG + 172; |
536 | pub const CURLOPT_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 173; |
537 | pub const CURLOPT_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 174; |
538 | pub const CURLOPT_PROXYUSERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 175; |
539 | pub const CURLOPT_PROXYPASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 176; |
540 | pub const CURLOPT_NOPROXY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 177; |
541 | pub const CURLOPT_TFTP_BLKSIZE: CURLoption = CURLOPTTYPE_LONG + 178; |
542 | pub const CURLOPT_SOCKS5_GSSAPI_SERVICE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 179; |
543 | pub const CURLOPT_SOCKS5_GSSAPI_NEC: CURLoption = CURLOPTTYPE_LONG + 180; |
544 | pub const CURLOPT_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 181; |
545 | pub const CURLOPT_REDIR_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 182; |
546 | pub const CURLOPT_SSH_KNOWNHOSTS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 183; |
547 | pub const CURLOPT_SSH_KEYFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 184; |
548 | pub const CURLOPT_SSH_KEYDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 185; |
549 | pub const CURLOPT_MAIL_FROM: CURLoption = CURLOPTTYPE_OBJECTPOINT + 186; |
550 | pub const CURLOPT_MAIL_RCPT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 187; |
551 | pub const CURLOPT_FTP_USE_PRET: CURLoption = CURLOPTTYPE_LONG + 188; |
552 | pub const CURLOPT_RTSP_REQUEST: CURLoption = CURLOPTTYPE_LONG + 189; |
553 | pub const CURLOPT_RTSP_SESSION_ID: CURLoption = CURLOPTTYPE_OBJECTPOINT + 190; |
554 | pub const CURLOPT_RTSP_STREAM_URI: CURLoption = CURLOPTTYPE_OBJECTPOINT + 191; |
555 | pub const CURLOPT_RTSP_TRANSPORT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 192; |
556 | pub const CURLOPT_RTSP_CLIENT_CSEQ: CURLoption = CURLOPTTYPE_LONG + 193; |
557 | pub const CURLOPT_RTSP_SERVER_CSEQ: CURLoption = CURLOPTTYPE_LONG + 194; |
558 | pub const CURLOPT_INTERLEAVEDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 195; |
559 | pub const CURLOPT_INTERLEAVEFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 196; |
560 | pub const CURLOPT_WILDCARDMATCH: CURLoption = CURLOPTTYPE_LONG + 197; |
561 | pub const CURLOPT_CHUNK_BGN_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 198; |
562 | pub const CURLOPT_CHUNK_END_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 199; |
563 | pub const CURLOPT_FNMATCH_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 200; |
564 | pub const CURLOPT_CHUNK_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 201; |
565 | pub const CURLOPT_FNMATCH_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 202; |
566 | pub const CURLOPT_RESOLVE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 203; |
567 | pub const CURLOPT_TLSAUTH_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 204; |
568 | pub const CURLOPT_TLSAUTH_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 205; |
569 | pub const CURLOPT_TLSAUTH_TYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 206; |
570 | pub const CURLOPT_TRANSFER_ENCODING: CURLoption = CURLOPTTYPE_LONG + 207; |
571 | pub const CURLOPT_CLOSESOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 208; |
572 | pub const CURLOPT_CLOSESOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 209; |
573 | pub const CURLOPT_GSSAPI_DELEGATION: CURLoption = CURLOPTTYPE_LONG + 210; |
574 | pub const CURLOPT_DNS_SERVERS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 211; |
575 | // pub const CURLOPT_ACCEPTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 212; |
576 | pub const CURLOPT_TCP_KEEPALIVE: CURLoption = CURLOPTTYPE_LONG + 213; |
577 | pub const CURLOPT_TCP_KEEPIDLE: CURLoption = CURLOPTTYPE_LONG + 214; |
578 | pub const CURLOPT_TCP_KEEPINTVL: CURLoption = CURLOPTTYPE_LONG + 215; |
579 | pub const CURLOPT_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 216; |
580 | // pub const CURLOPT_MAIL_AUTH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 217; |
581 | // pub const CURLOPT_SASL_IR: CURLoption = CURLOPTTYPE_LONG + 218; |
582 | // pub const CURLOPT_XFERINFOFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 219; |
583 | // pub const CURLOPT_XOAUTH2_BEARER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 220; |
584 | // pub const CURLOPT_DNS_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 221; |
585 | // pub const CURLOPT_DNS_LOCAL_IP4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 222; |
586 | // pub const CURLOPT_DNS_LOCAL_IP6: CURLoption = CURLOPTTYPE_OBJECTPOINT + 223; |
587 | // pub const CURLOPT_LOGIN_OPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 224; |
588 | pub const CURLOPT_EXPECT_100_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 227; |
589 | pub const CURLOPT_PINNEDPUBLICKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 230; |
590 | pub const CURLOPT_UNIX_SOCKET_PATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 231; |
591 | pub const CURLOPT_PATH_AS_IS: CURLoption = CURLOPTTYPE_LONG + 234; |
592 | pub const CURLOPT_PIPEWAIT: CURLoption = CURLOPTTYPE_LONG + 237; |
593 | pub const CURLOPT_CONNECT_TO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 243; |
594 | pub const CURLOPT_PROXY_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 246; |
595 | pub const CURLOPT_PROXY_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 247; |
596 | pub const CURLOPT_PROXY_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 248; |
597 | pub const CURLOPT_PROXY_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 249; |
598 | pub const CURLOPT_PROXY_SSLVERSION: CURLoption = CURLOPTTYPE_VALUES + 250; |
599 | pub const CURLOPT_PROXY_SSLCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 254; |
600 | pub const CURLOPT_PROXY_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 255; |
601 | pub const CURLOPT_PROXY_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 256; |
602 | pub const CURLOPT_PROXY_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 257; |
603 | pub const CURLOPT_PROXY_KEYPASSWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 258; |
604 | pub const CURLOPT_PROXY_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 259; |
605 | pub const CURLOPT_PROXY_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 260; |
606 | pub const CURLOPT_PROXY_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 261; |
607 | |
608 | pub const CURLOPT_ABSTRACT_UNIX_SOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 264; |
609 | |
610 | pub const CURLOPT_DOH_URL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 279; |
611 | pub const CURLOPT_UPLOAD_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 280; |
612 | |
613 | pub const CURLOPT_HTTP09_ALLOWED: CURLoption = CURLOPTTYPE_LONG + 285; |
614 | |
615 | pub const CURLOPT_MAXAGE_CONN: CURLoption = CURLOPTTYPE_LONG + 288; |
616 | |
617 | pub const CURLOPT_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 291; |
618 | pub const CURLOPT_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 292; |
619 | pub const CURLOPT_PROXY_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 293; |
620 | pub const CURLOPT_PROXY_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 294; |
621 | pub const CURLOPT_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 295; |
622 | |
623 | pub const CURLOPT_PROXY_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 296; |
624 | pub const CURLOPT_PROXY_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 297; |
625 | |
626 | pub const CURLOPT_AWS_SIGV4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 305; |
627 | |
628 | pub const CURLOPT_DOH_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 306; |
629 | pub const CURLOPT_DOH_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 307; |
630 | pub const CURLOPT_DOH_SSL_VERIFYSTATUS: CURLoption = CURLOPTTYPE_LONG + 308; |
631 | pub const CURLOPT_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 309; |
632 | pub const CURLOPT_PROXY_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 310; |
633 | |
634 | pub const CURL_IPRESOLVE_WHATEVER: c_int = 0; |
635 | pub const CURL_IPRESOLVE_V4: c_int = 1; |
636 | pub const CURL_IPRESOLVE_V6: c_int = 2; |
637 | |
638 | pub const CURLSSLOPT_ALLOW_BEAST: c_long = 1 << 0; |
639 | pub const CURLSSLOPT_NO_REVOKE: c_long = 1 << 1; |
640 | pub const CURLSSLOPT_NO_PARTIALCHAIN: c_long = 1 << 2; |
641 | pub const CURLSSLOPT_REVOKE_BEST_EFFORT: c_long = 1 << 3; |
642 | pub const CURLSSLOPT_NATIVE_CA: c_long = 1 << 4; |
643 | pub const CURLSSLOPT_AUTO_CLIENT_CERT: c_long = 1 << 5; |
644 | |
645 | /// These enums are for use with the CURLOPT_HTTP_VERSION option. |
646 | /// |
647 | /// Setting this means we don't care, and that we'd like the library to choose |
648 | /// the best possible for us! |
649 | pub const CURL_HTTP_VERSION_NONE: c_int = 0; |
650 | /// Please use HTTP 1.0 in the request |
651 | pub const CURL_HTTP_VERSION_1_0: c_int = 1; |
652 | /// Please use HTTP 1.1 in the request |
653 | pub const CURL_HTTP_VERSION_1_1: c_int = 2; |
654 | /// Please use HTTP 2 in the request |
655 | /// (Added in CURL 7.33.0) |
656 | pub const CURL_HTTP_VERSION_2_0: c_int = 3; |
657 | /// Use version 2 for HTTPS, version 1.1 for HTTP |
658 | /// (Added in CURL 7.47.0) |
659 | pub const CURL_HTTP_VERSION_2TLS: c_int = 4; |
660 | /// Please use HTTP 2 without HTTP/1.1 Upgrade |
661 | /// (Added in CURL 7.49.0) |
662 | pub const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE: c_int = 5; |
663 | /// Makes use of explicit HTTP/3 without fallback. |
664 | /// (Added in CURL 7.66.0) |
665 | pub const CURL_HTTP_VERSION_3: c_int = 30; |
666 | |
667 | // Note that the type here is wrong, it's just intended to just be an enum. |
668 | pub const CURL_SSLVERSION_DEFAULT: CURLoption = 0; |
669 | pub const CURL_SSLVERSION_TLSv1: CURLoption = 1; |
670 | pub const CURL_SSLVERSION_SSLv2: CURLoption = 2; |
671 | pub const CURL_SSLVERSION_SSLv3: CURLoption = 3; |
672 | pub const CURL_SSLVERSION_TLSv1_0: CURLoption = 4; |
673 | pub const CURL_SSLVERSION_TLSv1_1: CURLoption = 5; |
674 | pub const CURL_SSLVERSION_TLSv1_2: CURLoption = 6; |
675 | pub const CURL_SSLVERSION_TLSv1_3: CURLoption = 7; |
676 | |
677 | pub const CURLOPT_READDATA: CURLoption = CURLOPT_INFILE; |
678 | pub const CURLOPT_WRITEDATA: CURLoption = CURLOPT_FILE; |
679 | pub const CURLOPT_HEADERDATA: CURLoption = CURLOPT_WRITEHEADER; |
680 | |
681 | pub type curl_TimeCond = __enum_ty; |
682 | pub const CURL_TIMECOND_NONE: curl_TimeCond = 0; |
683 | pub const CURL_TIMECOND_IFMODSINCE: curl_TimeCond = 1; |
684 | pub const CURL_TIMECOND_IFUNMODSINCE: curl_TimeCond = 2; |
685 | pub const CURL_TIMECOND_LASTMOD: curl_TimeCond = 3; |
686 | |
687 | pub type CURLformoption = __enum_ty; |
688 | pub const CURLFORM_NOTHING: CURLformoption = 0; |
689 | pub const CURLFORM_COPYNAME: CURLformoption = 1; |
690 | pub const CURLFORM_PTRNAME: CURLformoption = 2; |
691 | pub const CURLFORM_NAMELENGTH: CURLformoption = 3; |
692 | pub const CURLFORM_COPYCONTENTS: CURLformoption = 4; |
693 | pub const CURLFORM_PTRCONTENTS: CURLformoption = 5; |
694 | pub const CURLFORM_CONTENTSLENGTH: CURLformoption = 6; |
695 | pub const CURLFORM_FILECONTENT: CURLformoption = 7; |
696 | pub const CURLFORM_ARRAY: CURLformoption = 8; |
697 | pub const CURLFORM_OBSOLETE: CURLformoption = 9; |
698 | pub const CURLFORM_FILE: CURLformoption = 10; |
699 | pub const CURLFORM_BUFFER: CURLformoption = 11; |
700 | pub const CURLFORM_BUFFERPTR: CURLformoption = 12; |
701 | pub const CURLFORM_BUFFERLENGTH: CURLformoption = 13; |
702 | pub const CURLFORM_CONTENTTYPE: CURLformoption = 14; |
703 | pub const CURLFORM_CONTENTHEADER: CURLformoption = 15; |
704 | pub const CURLFORM_FILENAME: CURLformoption = 16; |
705 | pub const CURLFORM_END: CURLformoption = 17; |
706 | pub const CURLFORM_STREAM: CURLformoption = 19; |
707 | |
708 | pub type CURLFORMcode = __enum_ty; |
709 | pub const CURL_FORMADD_OK: CURLFORMcode = 0; |
710 | pub const CURL_FORMADD_MEMORY: CURLFORMcode = 1; |
711 | pub const CURL_FORMADD_OPTION_TWICE: CURLFORMcode = 2; |
712 | pub const CURL_FORMADD_NULL: CURLFORMcode = 3; |
713 | pub const CURL_FORMADD_UNKNOWN_OPTION: CURLFORMcode = 4; |
714 | pub const CURL_FORMADD_INCOMPLETE: CURLFORMcode = 5; |
715 | pub const CURL_FORMADD_ILLEGAL_ARRAY: CURLFORMcode = 6; |
716 | pub const CURL_FORMADD_DISABLED: CURLFORMcode = 7; |
717 | |
718 | pub const CURL_REDIR_POST_301: c_ulong = 1; |
719 | pub const CURL_REDIR_POST_302: c_ulong = 2; |
720 | pub const CURL_REDIR_POST_303: c_ulong = 4; |
721 | pub const CURL_REDIR_POST_ALL: c_ulong = |
722 | CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303; |
723 | |
724 | #[repr (C)] |
725 | pub struct curl_forms { |
726 | pub option: CURLformoption, |
727 | pub value: *const c_char, |
728 | } |
729 | |
730 | pub type curl_formget_callback = extern "C" fn(*mut c_void, *const c_char, size_t) -> size_t; |
731 | |
732 | #[repr (C)] |
733 | pub struct curl_slist { |
734 | pub data: *mut c_char, |
735 | pub next: *mut curl_slist, |
736 | } |
737 | |
738 | #[repr (C)] |
739 | pub struct curl_certinfo { |
740 | pub num_of_certs: c_int, |
741 | pub certinfo: *mut *mut curl_slist, |
742 | } |
743 | |
744 | // pub type curl_sslbackend = __enum_ty; |
745 | // pub const CURLSSLBACKEND_NONE: curl_sslbackend = 0; |
746 | // pub const CURLSSLBACKEND_OPENSSL: curl_sslbackend = 1; |
747 | // pub const CURLSSLBACKEND_GNUTLS: curl_sslbackend = 2; |
748 | // pub const CURLSSLBACKEND_NSS: curl_sslbackend = 3; |
749 | // pub const CURLSSLBACKEND_QSOSSL: curl_sslbackend = 4; |
750 | // pub const CURLSSLBACKEND_GSKIT: curl_sslbackend = 5; |
751 | // pub const CURLSSLBACKEND_POLARSSL: curl_sslbackend = 6; |
752 | // pub const CURLSSLBACKEND_CYASSL: curl_sslbackend = 7; |
753 | // pub const CURLSSLBACKEND_SCHANNEL: curl_sslbackend = 8; |
754 | // pub const CURLSSLBACKEND_DARWINSSL: curl_sslbackend = 9; |
755 | |
756 | // #[repr(C)] |
757 | // pub struct curl_tlssessioninfo { |
758 | // pub backend: curl_sslbackend, |
759 | // pub internals: *mut c_void, |
760 | // } |
761 | |
762 | pub const CURLINFO_STRING: CURLINFO = 0x100000; |
763 | pub const CURLINFO_LONG: CURLINFO = 0x200000; |
764 | pub const CURLINFO_DOUBLE: CURLINFO = 0x300000; |
765 | pub const CURLINFO_SLIST: CURLINFO = 0x400000; |
766 | pub const CURLINFO_MASK: CURLINFO = 0x0fffff; |
767 | pub const CURLINFO_TYPEMASK: CURLINFO = 0xf00000; |
768 | |
769 | pub const CURLINFO_EFFECTIVE_URL: CURLINFO = CURLINFO_STRING + 1; |
770 | pub const CURLINFO_RESPONSE_CODE: CURLINFO = CURLINFO_LONG + 2; |
771 | pub const CURLINFO_TOTAL_TIME: CURLINFO = CURLINFO_DOUBLE + 3; |
772 | pub const CURLINFO_NAMELOOKUP_TIME: CURLINFO = CURLINFO_DOUBLE + 4; |
773 | pub const CURLINFO_CONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 5; |
774 | pub const CURLINFO_PRETRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 6; |
775 | pub const CURLINFO_SIZE_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 7; |
776 | pub const CURLINFO_SIZE_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 8; |
777 | pub const CURLINFO_SPEED_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 9; |
778 | pub const CURLINFO_SPEED_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 10; |
779 | pub const CURLINFO_HEADER_SIZE: CURLINFO = CURLINFO_LONG + 11; |
780 | pub const CURLINFO_REQUEST_SIZE: CURLINFO = CURLINFO_LONG + 12; |
781 | pub const CURLINFO_SSL_VERIFYRESULT: CURLINFO = CURLINFO_LONG + 13; |
782 | pub const CURLINFO_FILETIME: CURLINFO = CURLINFO_LONG + 14; |
783 | pub const CURLINFO_CONTENT_LENGTH_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 15; |
784 | pub const CURLINFO_CONTENT_LENGTH_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 16; |
785 | pub const CURLINFO_STARTTRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 17; |
786 | pub const CURLINFO_CONTENT_TYPE: CURLINFO = CURLINFO_STRING + 18; |
787 | pub const CURLINFO_REDIRECT_TIME: CURLINFO = CURLINFO_DOUBLE + 19; |
788 | pub const CURLINFO_REDIRECT_COUNT: CURLINFO = CURLINFO_LONG + 20; |
789 | pub const CURLINFO_PRIVATE: CURLINFO = CURLINFO_STRING + 21; |
790 | pub const CURLINFO_HTTP_CONNECTCODE: CURLINFO = CURLINFO_LONG + 22; |
791 | pub const CURLINFO_HTTPAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 23; |
792 | pub const CURLINFO_PROXYAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 24; |
793 | pub const CURLINFO_OS_ERRNO: CURLINFO = CURLINFO_LONG + 25; |
794 | pub const CURLINFO_NUM_CONNECTS: CURLINFO = CURLINFO_LONG + 26; |
795 | pub const CURLINFO_SSL_ENGINES: CURLINFO = CURLINFO_SLIST + 27; |
796 | pub const CURLINFO_COOKIELIST: CURLINFO = CURLINFO_SLIST + 28; |
797 | pub const CURLINFO_LASTSOCKET: CURLINFO = CURLINFO_LONG + 29; |
798 | pub const CURLINFO_FTP_ENTRY_PATH: CURLINFO = CURLINFO_STRING + 30; |
799 | pub const CURLINFO_REDIRECT_URL: CURLINFO = CURLINFO_STRING + 31; |
800 | pub const CURLINFO_PRIMARY_IP: CURLINFO = CURLINFO_STRING + 32; |
801 | pub const CURLINFO_APPCONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 33; |
802 | pub const CURLINFO_CERTINFO: CURLINFO = CURLINFO_SLIST + 34; |
803 | pub const CURLINFO_CONDITION_UNMET: CURLINFO = CURLINFO_LONG + 35; |
804 | pub const CURLINFO_RTSP_SESSION_ID: CURLINFO = CURLINFO_STRING + 36; |
805 | pub const CURLINFO_RTSP_CLIENT_CSEQ: CURLINFO = CURLINFO_LONG + 37; |
806 | pub const CURLINFO_RTSP_SERVER_CSEQ: CURLINFO = CURLINFO_LONG + 38; |
807 | pub const CURLINFO_RTSP_CSEQ_RECV: CURLINFO = CURLINFO_LONG + 39; |
808 | pub const CURLINFO_PRIMARY_PORT: CURLINFO = CURLINFO_LONG + 40; |
809 | pub const CURLINFO_LOCAL_IP: CURLINFO = CURLINFO_STRING + 41; |
810 | pub const CURLINFO_LOCAL_PORT: CURLINFO = CURLINFO_LONG + 42; |
811 | // pub const CURLINFO_TLS_SESSION: CURLINFO = CURLINFO_SLIST + 43; |
812 | |
813 | pub type curl_closepolicy = __enum_ty; |
814 | pub const CURLCLOSEPOLICY_NONE: curl_closepolicy = 0; |
815 | pub const CURLCLOSEPOLICY_OLDEST: curl_closepolicy = 1; |
816 | pub const CURLCLOSEPOLICY_LEAST_RECENTLY_USED: curl_closepolicy = 2; |
817 | pub const CURLCLOSEPOLICY_LEAST_TRAFFIC: curl_closepolicy = 3; |
818 | pub const CURLCLOSEPOLICY_SLOWEST: curl_closepolicy = 4; |
819 | pub const CURLCLOSEPOLICY_CALLBACK: curl_closepolicy = 5; |
820 | |
821 | pub const CURL_GLOBAL_SSL: c_long = 1 << 0; |
822 | pub const CURL_GLOBAL_WIN32: c_long = 1 << 1; |
823 | pub const CURL_GLOBAL_ALL: c_long = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32; |
824 | pub const CURL_GLOBAL_NOTHING: c_long = 0; |
825 | pub const CURL_GLOBAL_DEFAULT: c_long = CURL_GLOBAL_ALL; |
826 | // pub const CURL_GLOBAL_ACK_EINTR: c_long = 1 << 2; |
827 | |
828 | pub type curl_lock_data = __enum_ty; |
829 | pub const CURL_LOCK_DATA_NONE: curl_lock_data = 0; |
830 | pub const CURL_LOCK_DATA_SHARE: curl_lock_data = 1; |
831 | pub const CURL_LOCK_DATA_COOKIE: curl_lock_data = 2; |
832 | pub const CURL_LOCK_DATA_DNS: curl_lock_data = 3; |
833 | pub const CURL_LOCK_DATA_SSL_SESSION: curl_lock_data = 4; |
834 | pub const CURL_LOCK_DATA_CONNECT: curl_lock_data = 5; |
835 | |
836 | pub type curl_lock_access = __enum_ty; |
837 | pub const CURL_LOCK_ACCESS_NONE: curl_lock_access = 0; |
838 | pub const CURL_LOCK_ACCESS_SHARED: curl_lock_access = 1; |
839 | pub const CURL_LOCK_ACCESS_SINGLE: curl_lock_access = 2; |
840 | |
841 | pub type curl_lock_function = |
842 | extern "C" fn(*mut CURL, curl_lock_data, curl_lock_access, *mut c_void); |
843 | pub type curl_unlock_function = extern "C" fn(*mut CURL, curl_lock_data, *mut c_void); |
844 | |
845 | pub enum CURLSH {} |
846 | |
847 | pub type CURLSHcode = __enum_ty; |
848 | pub const CURLSHE_OK: CURLSHcode = 0; |
849 | pub const CURLSHE_BAD_OPTION: CURLSHcode = 1; |
850 | pub const CURLSHE_IN_USE: CURLSHcode = 2; |
851 | pub const CURLSHE_INVALID: CURLSHcode = 3; |
852 | pub const CURLSHE_NOMEM: CURLSHcode = 4; |
853 | // pub const CURLSHE_NOT_BUILT_IN: CURLSHcode = 5; |
854 | |
855 | pub type CURLSHoption = __enum_ty; |
856 | pub const CURLSHOPT_NONE: CURLSHoption = 0; |
857 | pub const CURLSHOPT_SHARE: CURLSHoption = 1; |
858 | pub const CURLSHOPT_UNSHARE: CURLSHoption = 2; |
859 | pub const CURLSHOPT_LOCKFUNC: CURLSHoption = 3; |
860 | pub const CURLSHOPT_UNLOCKFUNC: CURLSHoption = 4; |
861 | pub const CURLSHOPT_USERDATA: CURLSHoption = 5; |
862 | |
863 | pub const CURLVERSION_FIRST: CURLversion = 0; |
864 | pub const CURLVERSION_SECOND: CURLversion = 1; |
865 | pub const CURLVERSION_THIRD: CURLversion = 2; |
866 | pub const CURLVERSION_FOURTH: CURLversion = 3; |
867 | pub const CURLVERSION_FIFTH: CURLversion = 4; |
868 | pub const CURLVERSION_SIXTH: CURLversion = 5; |
869 | pub const CURLVERSION_SEVENTH: CURLversion = 6; |
870 | pub const CURLVERSION_EIGHTH: CURLversion = 7; |
871 | pub const CURLVERSION_NINTH: CURLversion = 8; |
872 | pub const CURLVERSION_TENTH: CURLversion = 9; |
873 | pub const CURLVERSION_ELEVENTH: CURLversion = 10; |
874 | pub const CURLVERSION_NOW: CURLversion = CURLVERSION_ELEVENTH; |
875 | |
876 | #[repr (C)] |
877 | pub struct curl_version_info_data { |
878 | pub age: CURLversion, |
879 | pub version: *const c_char, |
880 | pub version_num: c_uint, |
881 | pub host: *const c_char, |
882 | pub features: c_int, |
883 | pub ssl_version: *const c_char, |
884 | pub ssl_version_num: c_long, |
885 | pub libz_version: *const c_char, |
886 | pub protocols: *const *const c_char, |
887 | pub ares: *const c_char, |
888 | pub ares_num: c_int, |
889 | pub libidn: *const c_char, |
890 | pub iconv_ver_num: c_int, |
891 | pub libssh_version: *const c_char, |
892 | pub brotli_ver_num: c_uint, |
893 | pub brotli_version: *const c_char, |
894 | pub nghttp2_ver_num: c_uint, |
895 | pub nghttp2_version: *const c_char, |
896 | pub quic_version: *const c_char, |
897 | pub cainfo: *const c_char, |
898 | pub capath: *const c_char, |
899 | pub zstd_ver_num: c_uint, |
900 | pub zstd_version: *const c_char, |
901 | pub hyper_version: *const c_char, |
902 | pub gsasl_version: *const c_char, |
903 | pub feature_names: *const *const c_char, |
904 | } |
905 | |
906 | pub const CURL_VERSION_IPV6: c_int = 1 << 0; |
907 | pub const CURL_VERSION_KERBEROS4: c_int = 1 << 1; |
908 | pub const CURL_VERSION_SSL: c_int = 1 << 2; |
909 | pub const CURL_VERSION_LIBZ: c_int = 1 << 3; |
910 | pub const CURL_VERSION_NTLM: c_int = 1 << 4; |
911 | pub const CURL_VERSION_GSSNEGOTIATE: c_int = 1 << 5; |
912 | pub const CURL_VERSION_DEBUG: c_int = 1 << 6; |
913 | pub const CURL_VERSION_ASYNCHDNS: c_int = 1 << 7; |
914 | pub const CURL_VERSION_SPNEGO: c_int = 1 << 8; |
915 | pub const CURL_VERSION_LARGEFILE: c_int = 1 << 9; |
916 | pub const CURL_VERSION_IDN: c_int = 1 << 10; |
917 | pub const CURL_VERSION_SSPI: c_int = 1 << 11; |
918 | pub const CURL_VERSION_CONV: c_int = 1 << 12; |
919 | pub const CURL_VERSION_CURLDEBUG: c_int = 1 << 13; |
920 | pub const CURL_VERSION_TLSAUTH_SRP: c_int = 1 << 14; |
921 | pub const CURL_VERSION_NTLM_WB: c_int = 1 << 15; |
922 | pub const CURL_VERSION_HTTP2: c_int = 1 << 16; |
923 | pub const CURL_VERSION_UNIX_SOCKETS: c_int = 1 << 19; |
924 | pub const CURL_VERSION_HTTPS_PROXY: c_int = 1 << 21; |
925 | pub const CURL_VERSION_BROTLI: c_int = 1 << 23; |
926 | pub const CURL_VERSION_ALTSVC: c_int = 1 << 24; |
927 | pub const CURL_VERSION_HTTP3: c_int = 1 << 25; |
928 | pub const CURL_VERSION_ZSTD: c_int = 1 << 26; |
929 | pub const CURL_VERSION_UNICODE: c_int = 1 << 27; |
930 | pub const CURL_VERSION_HSTS: c_int = 1 << 28; |
931 | pub const CURL_VERSION_GSASL: c_int = 1 << 29; |
932 | |
933 | pub const CURLPAUSE_RECV: c_int = 1 << 0; |
934 | pub const CURLPAUSE_RECV_CONT: c_int = 0; |
935 | pub const CURLPAUSE_SEND: c_int = 1 << 2; |
936 | pub const CURLPAUSE_SEND_CONT: c_int = 0; |
937 | |
938 | pub enum CURLM {} |
939 | |
940 | pub type CURLMcode = c_int; |
941 | pub const CURLM_CALL_MULTI_PERFORM: CURLMcode = -1; |
942 | pub const CURLM_OK: CURLMcode = 0; |
943 | pub const CURLM_BAD_HANDLE: CURLMcode = 1; |
944 | pub const CURLM_BAD_EASY_HANDLE: CURLMcode = 2; |
945 | pub const CURLM_OUT_OF_MEMORY: CURLMcode = 3; |
946 | pub const CURLM_INTERNAL_ERROR: CURLMcode = 4; |
947 | pub const CURLM_BAD_SOCKET: CURLMcode = 5; |
948 | pub const CURLM_UNKNOWN_OPTION: CURLMcode = 6; |
949 | // pub const CURLM_ADDED_ALREADY: CURLMcode = 7; |
950 | |
951 | pub type CURLMSG = __enum_ty; |
952 | pub const CURLMSG_NONE: CURLMSG = 0; |
953 | pub const CURLMSG_DONE: CURLMSG = 1; |
954 | |
955 | #[repr (C)] |
956 | pub struct CURLMsg { |
957 | pub msg: CURLMSG, |
958 | pub easy_handle: *mut CURL, |
959 | pub data: *mut c_void, |
960 | } |
961 | |
962 | pub const CURL_WAIT_POLLIN: c_short = 0x1; |
963 | pub const CURL_WAIT_POLLPRI: c_short = 0x2; |
964 | pub const CURL_WAIT_POLLOUT: c_short = 0x4; |
965 | |
966 | #[repr (C)] |
967 | pub struct curl_waitfd { |
968 | pub fd: curl_socket_t, |
969 | pub events: c_short, |
970 | pub revents: c_short, |
971 | } |
972 | |
973 | pub const CURL_POLL_NONE: c_int = 0; |
974 | pub const CURL_POLL_IN: c_int = 1; |
975 | pub const CURL_POLL_OUT: c_int = 2; |
976 | pub const CURL_POLL_INOUT: c_int = 3; |
977 | pub const CURL_POLL_REMOVE: c_int = 4; |
978 | pub const CURL_CSELECT_IN: c_int = 1; |
979 | pub const CURL_CSELECT_OUT: c_int = 2; |
980 | pub const CURL_CSELECT_ERR: c_int = 4; |
981 | pub const CURL_SOCKET_TIMEOUT: curl_socket_t = CURL_SOCKET_BAD; |
982 | |
983 | pub type curl_socket_callback = |
984 | extern "C" fn(*mut CURL, curl_socket_t, c_int, *mut c_void, *mut c_void) -> c_int; |
985 | pub type curl_multi_timer_callback = extern "C" fn(*mut CURLM, c_long, *mut c_void) -> c_int; |
986 | |
987 | pub type CURLMoption = __enum_ty; |
988 | pub const CURLMOPT_SOCKETFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 1; |
989 | pub const CURLMOPT_SOCKETDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 2; |
990 | pub const CURLMOPT_PIPELINING: CURLMoption = CURLOPTTYPE_LONG + 3; |
991 | pub const CURLMOPT_TIMERFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 4; |
992 | pub const CURLMOPT_TIMERDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 5; |
993 | pub const CURLMOPT_MAXCONNECTS: CURLMoption = CURLOPTTYPE_LONG + 6; |
994 | pub const CURLMOPT_MAX_HOST_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 7; |
995 | pub const CURLMOPT_MAX_PIPELINE_LENGTH: CURLMoption = CURLOPTTYPE_LONG + 8; |
996 | pub const CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 9; |
997 | pub const CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 10; |
998 | pub const CURLMOPT_PIPELINING_SITE_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 11; |
999 | pub const CURLMOPT_PIPELINING_SERVER_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 12; |
1000 | pub const CURLMOPT_MAX_TOTAL_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 13; |
1001 | |
1002 | // These enums are for use with the CURLMOPT_PIPELINING option. |
1003 | pub const CURLPIPE_NOTHING: c_long = 0; |
1004 | pub const CURLPIPE_HTTP1: c_long = 1; |
1005 | pub const CURLPIPE_MULTIPLEX: c_long = 2; |
1006 | |
1007 | pub const CURL_ERROR_SIZE: usize = 256; |
1008 | |
1009 | pub type curl_opensocket_callback = |
1010 | extern "C" fn(*mut c_void, curlsocktype, *mut curl_sockaddr) -> curl_socket_t; |
1011 | pub type curlsocktype = __enum_ty; |
1012 | pub const CURLSOCKTYPE_IPCXN: curlsocktype = 0; |
1013 | pub const CURLSOCKTYPE_ACCEPT: curlsocktype = 1; |
1014 | pub const CURLSOCKTYPE_LAST: curlsocktype = 2; |
1015 | |
1016 | #[repr (C)] |
1017 | pub struct curl_sockaddr { |
1018 | pub family: c_int, |
1019 | pub socktype: c_int, |
1020 | pub protocol: c_int, |
1021 | pub addrlen: c_uint, |
1022 | #[cfg (unix)] |
1023 | pub addr: libc::sockaddr, |
1024 | #[cfg (windows)] |
1025 | pub addr: SOCKADDR, |
1026 | } |
1027 | |
1028 | extern "C" { |
1029 | pub fn curl_formadd( |
1030 | httppost: *mut *mut curl_httppost, |
1031 | last_post: *mut *mut curl_httppost, |
1032 | ... |
1033 | ) -> CURLFORMcode; |
1034 | pub fn curl_formget( |
1035 | form: *mut curl_httppost, |
1036 | arg: *mut c_void, |
1037 | append: curl_formget_callback, |
1038 | ) -> c_int; |
1039 | pub fn curl_formfree(form: *mut curl_httppost); |
1040 | |
1041 | pub fn curl_version() -> *mut c_char; |
1042 | |
1043 | pub fn curl_easy_escape(handle: *mut CURL, string: *const c_char, length: c_int) |
1044 | -> *mut c_char; |
1045 | pub fn curl_easy_unescape( |
1046 | handle: *mut CURL, |
1047 | string: *const c_char, |
1048 | length: c_int, |
1049 | outlength: *mut c_int, |
1050 | ) -> *mut c_char; |
1051 | pub fn curl_free(p: *mut c_void); |
1052 | |
1053 | pub fn curl_global_init(flags: c_long) -> CURLcode; |
1054 | pub fn curl_global_init_mem( |
1055 | flags: c_long, |
1056 | m: curl_malloc_callback, |
1057 | f: curl_free_callback, |
1058 | r: curl_realloc_callback, |
1059 | s: curl_strdup_callback, |
1060 | c: curl_calloc_callback, |
1061 | ) -> CURLcode; |
1062 | pub fn curl_global_cleanup(); |
1063 | |
1064 | pub fn curl_slist_append(list: *mut curl_slist, val: *const c_char) -> *mut curl_slist; |
1065 | pub fn curl_slist_free_all(list: *mut curl_slist); |
1066 | |
1067 | pub fn curl_getdate(p: *const c_char, _: *const time_t) -> time_t; |
1068 | |
1069 | pub fn curl_share_init() -> *mut CURLSH; |
1070 | pub fn curl_share_setopt(sh: *mut CURLSH, opt: CURLSHoption, ...) -> CURLSHcode; |
1071 | pub fn curl_share_cleanup(sh: *mut CURLSH) -> CURLSHcode; |
1072 | |
1073 | pub fn curl_version_info(t: CURLversion) -> *mut curl_version_info_data; |
1074 | |
1075 | pub fn curl_easy_strerror(code: CURLcode) -> *const c_char; |
1076 | pub fn curl_share_strerror(code: CURLSHcode) -> *const c_char; |
1077 | pub fn curl_easy_pause(handle: *mut CURL, bitmask: c_int) -> CURLcode; |
1078 | |
1079 | pub fn curl_easy_init() -> *mut CURL; |
1080 | pub fn curl_easy_setopt(curl: *mut CURL, option: CURLoption, ...) -> CURLcode; |
1081 | pub fn curl_easy_perform(curl: *mut CURL) -> CURLcode; |
1082 | pub fn curl_easy_cleanup(curl: *mut CURL); |
1083 | pub fn curl_easy_getinfo(curl: *mut CURL, info: CURLINFO, ...) -> CURLcode; |
1084 | pub fn curl_easy_duphandle(curl: *mut CURL) -> *mut CURL; |
1085 | pub fn curl_easy_reset(curl: *mut CURL); |
1086 | pub fn curl_easy_recv( |
1087 | curl: *mut CURL, |
1088 | buffer: *mut c_void, |
1089 | buflen: size_t, |
1090 | n: *mut size_t, |
1091 | ) -> CURLcode; |
1092 | pub fn curl_easy_send( |
1093 | curl: *mut CURL, |
1094 | buffer: *const c_void, |
1095 | buflen: size_t, |
1096 | n: *mut size_t, |
1097 | ) -> CURLcode; |
1098 | |
1099 | #[cfg (feature = "upkeep_7_62_0" )] |
1100 | pub fn curl_easy_upkeep(curl: *mut CURL) -> CURLcode; |
1101 | |
1102 | pub fn curl_multi_init() -> *mut CURLM; |
1103 | pub fn curl_multi_add_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode; |
1104 | pub fn curl_multi_remove_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode; |
1105 | pub fn curl_multi_fdset( |
1106 | multi_handle: *mut CURLM, |
1107 | read_fd_set: *mut fd_set, |
1108 | write_fd_set: *mut fd_set, |
1109 | exc_fd_set: *mut fd_set, |
1110 | max_fd: *mut c_int, |
1111 | ) -> CURLMcode; |
1112 | pub fn curl_multi_wait( |
1113 | multi_handle: *mut CURLM, |
1114 | extra_fds: *mut curl_waitfd, |
1115 | extra_nfds: c_uint, |
1116 | timeout_ms: c_int, |
1117 | ret: *mut c_int, |
1118 | ) -> CURLMcode; |
1119 | |
1120 | #[cfg (feature = "poll_7_68_0" )] |
1121 | pub fn curl_multi_poll( |
1122 | multi_handle: *mut CURLM, |
1123 | extra_fds: *mut curl_waitfd, |
1124 | extra_nfds: c_uint, |
1125 | timeout_ms: c_int, |
1126 | ret: *mut c_int, |
1127 | ) -> CURLMcode; |
1128 | |
1129 | #[cfg (feature = "poll_7_68_0" )] |
1130 | pub fn curl_multi_wakeup(multi_handle: *mut CURLM) -> CURLMcode; |
1131 | |
1132 | pub fn curl_multi_perform(multi_handle: *mut CURLM, running_handles: *mut c_int) -> CURLMcode; |
1133 | pub fn curl_multi_cleanup(multi_handle: *mut CURLM) -> CURLMcode; |
1134 | pub fn curl_multi_info_read( |
1135 | multi_handle: *mut CURLM, |
1136 | msgs_in_queue: *mut c_int, |
1137 | ) -> *mut CURLMsg; |
1138 | pub fn curl_multi_strerror(code: CURLMcode) -> *const c_char; |
1139 | pub fn curl_multi_socket( |
1140 | multi_handle: *mut CURLM, |
1141 | s: curl_socket_t, |
1142 | running_handles: *mut c_int, |
1143 | ) -> CURLMcode; |
1144 | pub fn curl_multi_socket_action( |
1145 | multi_handle: *mut CURLM, |
1146 | s: curl_socket_t, |
1147 | ev_bitmask: c_int, |
1148 | running_handles: *mut c_int, |
1149 | ) -> CURLMcode; |
1150 | pub fn curl_multi_socket_all( |
1151 | multi_handle: *mut CURLM, |
1152 | running_handles: *mut c_int, |
1153 | ) -> CURLMcode; |
1154 | pub fn curl_multi_timeout(multi_handle: *mut CURLM, milliseconds: *mut c_long) -> CURLMcode; |
1155 | pub fn curl_multi_setopt(multi_handle: *mut CURLM, option: CURLMoption, ...) -> CURLMcode; |
1156 | pub fn curl_multi_assign( |
1157 | multi_handle: *mut CURLM, |
1158 | sockfd: curl_socket_t, |
1159 | sockp: *mut c_void, |
1160 | ) -> CURLMcode; |
1161 | } |
1162 | |
1163 | pub fn rust_crate_version() -> &'static str { |
1164 | env!("CARGO_PKG_VERSION" ) |
1165 | } |
1166 | |
1167 | #[doc (hidden)] |
1168 | pub fn vendored() -> bool { |
1169 | cfg!(libcurl_vendored) |
1170 | } |
1171 | |