| 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 | pub use windows_sys::Win32::Networking::WinSock::FD_SET as fd_set; | 
|---|
| 21 | #[ cfg(windows)] | 
|---|
| 22 | use windows_sys::Win32::Networking::WinSock::SOCKADDR; | 
|---|
| 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 | #[ deprecated= "has no effect"] | 
|---|
| 418 | pub const CURLOPT_WRITEINFO: CURLoption = 9999; | 
|---|
| 419 | pub const CURLOPT_VERBOSE: CURLoption = CURLOPTTYPE_LONG + 41; | 
|---|
| 420 | pub const CURLOPT_HEADER: CURLoption = CURLOPTTYPE_LONG + 42; | 
|---|
| 421 | pub const CURLOPT_NOPROGRESS: CURLoption = CURLOPTTYPE_LONG + 43; | 
|---|
| 422 | pub const CURLOPT_NOBODY: CURLoption = CURLOPTTYPE_LONG + 44; | 
|---|
| 423 | pub const CURLOPT_FAILONERROR: CURLoption = CURLOPTTYPE_LONG + 45; | 
|---|
| 424 | pub const CURLOPT_UPLOAD: CURLoption = CURLOPTTYPE_LONG + 46; | 
|---|
| 425 | pub const CURLOPT_POST: CURLoption = CURLOPTTYPE_LONG + 47; | 
|---|
| 426 | pub const CURLOPT_DIRLISTONLY: CURLoption = CURLOPTTYPE_LONG + 48; | 
|---|
| 427 | pub const CURLOPT_APPEND: CURLoption = CURLOPTTYPE_LONG + 50; | 
|---|
| 428 | pub const CURLOPT_NETRC: CURLoption = CURLOPTTYPE_LONG + 51; | 
|---|
| 429 | pub const CURLOPT_FOLLOWLOCATION: CURLoption = CURLOPTTYPE_LONG + 52; | 
|---|
| 430 | pub const CURLOPT_TRANSFERTEXT: CURLoption = CURLOPTTYPE_LONG + 53; | 
|---|
| 431 | pub const CURLOPT_PUT: CURLoption = CURLOPTTYPE_LONG + 54; | 
|---|
| 432 | pub const CURLOPT_PROGRESSFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 56; | 
|---|
| 433 | pub const CURLOPT_PROGRESSDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 57; | 
|---|
| 434 | pub const CURLOPT_AUTOREFERER: CURLoption = CURLOPTTYPE_LONG + 58; | 
|---|
| 435 | pub const CURLOPT_PROXYPORT: CURLoption = CURLOPTTYPE_LONG + 59; | 
|---|
| 436 | pub const CURLOPT_POSTFIELDSIZE: CURLoption = CURLOPTTYPE_LONG + 60; | 
|---|
| 437 | pub const CURLOPT_HTTPPROXYTUNNEL: CURLoption = CURLOPTTYPE_LONG + 61; | 
|---|
| 438 | pub const CURLOPT_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 62; | 
|---|
| 439 | pub const CURLOPT_KRBLEVEL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 63; | 
|---|
| 440 | pub const CURLOPT_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 64; | 
|---|
| 441 | pub const CURLOPT_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 65; | 
|---|
| 442 | pub const CURLOPT_MAXREDIRS: CURLoption = CURLOPTTYPE_LONG + 68; | 
|---|
| 443 | pub const CURLOPT_FILETIME: CURLoption = CURLOPTTYPE_LONG + 69; | 
|---|
| 444 | pub const CURLOPT_TELNETOPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 70; | 
|---|
| 445 | pub const CURLOPT_MAXCONNECTS: CURLoption = CURLOPTTYPE_LONG + 71; | 
|---|
| 446 | #[ deprecated= "has no effect"] | 
|---|
| 447 | pub const CURLOPT_CLOSEPOLICY: CURLoption = 9999; | 
|---|
| 448 | pub const CURLOPT_FRESH_CONNECT: CURLoption = CURLOPTTYPE_LONG + 74; | 
|---|
| 449 | pub const CURLOPT_FORBID_REUSE: CURLoption = CURLOPTTYPE_LONG + 75; | 
|---|
| 450 | pub const CURLOPT_RANDOM_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 76; | 
|---|
| 451 | pub const CURLOPT_EGDSOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 77; | 
|---|
| 452 | pub const CURLOPT_CONNECTTIMEOUT: CURLoption = CURLOPTTYPE_LONG + 78; | 
|---|
| 453 | pub const CURLOPT_HEADERFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 79; | 
|---|
| 454 | pub const CURLOPT_HTTPGET: CURLoption = CURLOPTTYPE_LONG + 80; | 
|---|
| 455 | pub const CURLOPT_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 81; | 
|---|
| 456 | pub const CURLOPT_COOKIEJAR: CURLoption = CURLOPTTYPE_OBJECTPOINT + 82; | 
|---|
| 457 | pub const CURLOPT_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 83; | 
|---|
| 458 | pub const CURLOPT_HTTP_VERSION: CURLoption = CURLOPTTYPE_LONG + 84; | 
|---|
| 459 | pub const CURLOPT_FTP_USE_EPSV: CURLoption = CURLOPTTYPE_LONG + 85; | 
|---|
| 460 | pub const CURLOPT_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 86; | 
|---|
| 461 | pub const CURLOPT_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 87; | 
|---|
| 462 | pub const CURLOPT_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 88; | 
|---|
| 463 | pub const CURLOPT_SSLENGINE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 89; | 
|---|
| 464 | pub const CURLOPT_SSLENGINE_DEFAULT: CURLoption = CURLOPTTYPE_LONG + 90; | 
|---|
| 465 | pub const CURLOPT_DNS_USE_GLOBAL_CACHE: CURLoption = CURLOPTTYPE_LONG + 91; | 
|---|
| 466 | pub const CURLOPT_DNS_CACHE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 92; | 
|---|
| 467 | pub const CURLOPT_PREQUOTE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 93; | 
|---|
| 468 | pub const CURLOPT_DEBUGFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 94; | 
|---|
| 469 | pub const CURLOPT_DEBUGDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 95; | 
|---|
| 470 | pub const CURLOPT_COOKIESESSION: CURLoption = CURLOPTTYPE_LONG + 96; | 
|---|
| 471 | pub const CURLOPT_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 97; | 
|---|
| 472 | pub const CURLOPT_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 98; | 
|---|
| 473 | pub const CURLOPT_NOSIGNAL: CURLoption = CURLOPTTYPE_LONG + 99; | 
|---|
| 474 | pub const CURLOPT_SHARE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 100; | 
|---|
| 475 | pub const CURLOPT_PROXYTYPE: CURLoption = CURLOPTTYPE_LONG + 101; | 
|---|
| 476 | pub const CURLOPT_ACCEPT_ENCODING: CURLoption = CURLOPTTYPE_OBJECTPOINT + 102; | 
|---|
| 477 | pub const CURLOPT_PRIVATE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 103; | 
|---|
| 478 | pub const CURLOPT_HTTP200ALIASES: CURLoption = CURLOPTTYPE_OBJECTPOINT + 104; | 
|---|
| 479 | pub const CURLOPT_UNRESTRICTED_AUTH: CURLoption = CURLOPTTYPE_LONG + 105; | 
|---|
| 480 | pub const CURLOPT_FTP_USE_EPRT: CURLoption = CURLOPTTYPE_LONG + 106; | 
|---|
| 481 | pub const CURLOPT_HTTPAUTH: CURLoption = CURLOPTTYPE_LONG + 107; | 
|---|
| 482 | pub const CURLOPT_SSL_CTX_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 108; | 
|---|
| 483 | pub const CURLOPT_SSL_CTX_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 109; | 
|---|
| 484 | pub const CURLOPT_FTP_CREATE_MISSING_DIRS: CURLoption = CURLOPTTYPE_LONG + 110; | 
|---|
| 485 | pub const CURLOPT_PROXYAUTH: CURLoption = CURLOPTTYPE_LONG + 111; | 
|---|
| 486 | pub const CURLOPT_FTP_RESPONSE_TIMEOUT: CURLoption = CURLOPTTYPE_LONG + 112; | 
|---|
| 487 | pub const CURLOPT_IPRESOLVE: CURLoption = CURLOPTTYPE_LONG + 113; | 
|---|
| 488 | pub const CURLOPT_MAXFILESIZE: CURLoption = CURLOPTTYPE_LONG + 114; | 
|---|
| 489 | pub const CURLOPT_INFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 115; | 
|---|
| 490 | pub const CURLOPT_RESUME_FROM_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 116; | 
|---|
| 491 | pub const CURLOPT_MAXFILESIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 117; | 
|---|
| 492 | pub const CURLOPT_NETRC_FILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 118; | 
|---|
| 493 | pub const CURLOPT_USE_SSL: CURLoption = CURLOPTTYPE_LONG + 119; | 
|---|
| 494 | pub const CURLOPT_POSTFIELDSIZE_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 120; | 
|---|
| 495 | pub const CURLOPT_TCP_NODELAY: CURLoption = CURLOPTTYPE_LONG + 121; | 
|---|
| 496 | pub const CURLOPT_FTPSSLAUTH: CURLoption = CURLOPTTYPE_LONG + 129; | 
|---|
| 497 | pub const CURLOPT_IOCTLFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 130; | 
|---|
| 498 | pub const CURLOPT_IOCTLDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 131; | 
|---|
| 499 | pub const CURLOPT_FTP_ACCOUNT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 134; | 
|---|
| 500 | pub const CURLOPT_COOKIELIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 135; | 
|---|
| 501 | pub const CURLOPT_IGNORE_CONTENT_LENGTH: CURLoption = CURLOPTTYPE_LONG + 136; | 
|---|
| 502 | pub const CURLOPT_FTP_SKIP_PASV_IP: CURLoption = CURLOPTTYPE_LONG + 137; | 
|---|
| 503 | pub const CURLOPT_FTP_FILEMETHOD: CURLoption = CURLOPTTYPE_LONG + 138; | 
|---|
| 504 | pub const CURLOPT_LOCALPORT: CURLoption = CURLOPTTYPE_LONG + 139; | 
|---|
| 505 | pub const CURLOPT_LOCALPORTRANGE: CURLoption = CURLOPTTYPE_LONG + 140; | 
|---|
| 506 | pub const CURLOPT_CONNECT_ONLY: CURLoption = CURLOPTTYPE_LONG + 141; | 
|---|
| 507 | pub const CURLOPT_CONV_FROM_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 142; | 
|---|
| 508 | pub const CURLOPT_CONV_TO_NETWORK_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 143; | 
|---|
| 509 | pub const CURLOPT_CONV_FROM_UTF8_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 144; | 
|---|
| 510 | pub const CURLOPT_MAX_SEND_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 145; | 
|---|
| 511 | pub const CURLOPT_MAX_RECV_SPEED_LARGE: CURLoption = CURLOPTTYPE_OFF_T + 146; | 
|---|
| 512 | pub const CURLOPT_FTP_ALTERNATIVE_TO_USER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 147; | 
|---|
| 513 | pub const CURLOPT_SOCKOPTFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 148; | 
|---|
| 514 | pub const CURLOPT_SOCKOPTDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 149; | 
|---|
| 515 | pub const CURLOPT_SSL_SESSIONID_CACHE: CURLoption = CURLOPTTYPE_LONG + 150; | 
|---|
| 516 | pub const CURLOPT_SSH_AUTH_TYPES: CURLoption = CURLOPTTYPE_LONG + 151; | 
|---|
| 517 | pub const CURLOPT_SSH_PUBLIC_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 152; | 
|---|
| 518 | pub const CURLOPT_SSH_PRIVATE_KEYFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 153; | 
|---|
| 519 | pub const CURLOPT_FTP_SSL_CCC: CURLoption = CURLOPTTYPE_LONG + 154; | 
|---|
| 520 | pub const CURLOPT_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 155; | 
|---|
| 521 | pub const CURLOPT_CONNECTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 156; | 
|---|
| 522 | pub const CURLOPT_HTTP_TRANSFER_DECODING: CURLoption = CURLOPTTYPE_LONG + 157; | 
|---|
| 523 | pub const CURLOPT_HTTP_CONTENT_DECODING: CURLoption = CURLOPTTYPE_LONG + 158; | 
|---|
| 524 | pub const CURLOPT_NEW_FILE_PERMS: CURLoption = CURLOPTTYPE_LONG + 159; | 
|---|
| 525 | pub const CURLOPT_NEW_DIRECTORY_PERMS: CURLoption = CURLOPTTYPE_LONG + 160; | 
|---|
| 526 | pub const CURLOPT_POSTREDIR: CURLoption = CURLOPTTYPE_LONG + 161; | 
|---|
| 527 | pub const CURLOPT_SSH_HOST_PUBLIC_KEY_MD5: CURLoption = CURLOPTTYPE_OBJECTPOINT + 162; | 
|---|
| 528 | pub const CURLOPT_OPENSOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 163; | 
|---|
| 529 | pub const CURLOPT_OPENSOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 164; | 
|---|
| 530 | pub const CURLOPT_COPYPOSTFIELDS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 165; | 
|---|
| 531 | pub const CURLOPT_PROXY_TRANSFER_MODE: CURLoption = CURLOPTTYPE_LONG + 166; | 
|---|
| 532 | pub const CURLOPT_SEEKFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 167; | 
|---|
| 533 | pub const CURLOPT_SEEKDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 168; | 
|---|
| 534 | pub const CURLOPT_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 169; | 
|---|
| 535 | pub const CURLOPT_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 170; | 
|---|
| 536 | pub const CURLOPT_ADDRESS_SCOPE: CURLoption = CURLOPTTYPE_LONG + 171; | 
|---|
| 537 | pub const CURLOPT_CERTINFO: CURLoption = CURLOPTTYPE_LONG + 172; | 
|---|
| 538 | pub const CURLOPT_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 173; | 
|---|
| 539 | pub const CURLOPT_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 174; | 
|---|
| 540 | pub const CURLOPT_PROXYUSERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 175; | 
|---|
| 541 | pub const CURLOPT_PROXYPASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 176; | 
|---|
| 542 | pub const CURLOPT_NOPROXY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 177; | 
|---|
| 543 | pub const CURLOPT_TFTP_BLKSIZE: CURLoption = CURLOPTTYPE_LONG + 178; | 
|---|
| 544 | pub const CURLOPT_SOCKS5_GSSAPI_SERVICE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 179; | 
|---|
| 545 | pub const CURLOPT_SOCKS5_GSSAPI_NEC: CURLoption = CURLOPTTYPE_LONG + 180; | 
|---|
| 546 | pub const CURLOPT_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 181; | 
|---|
| 547 | pub const CURLOPT_REDIR_PROTOCOLS: CURLoption = CURLOPTTYPE_LONG + 182; | 
|---|
| 548 | pub const CURLOPT_SSH_KNOWNHOSTS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 183; | 
|---|
| 549 | pub const CURLOPT_SSH_KEYFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 184; | 
|---|
| 550 | pub const CURLOPT_SSH_KEYDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 185; | 
|---|
| 551 | pub const CURLOPT_MAIL_FROM: CURLoption = CURLOPTTYPE_OBJECTPOINT + 186; | 
|---|
| 552 | pub const CURLOPT_MAIL_RCPT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 187; | 
|---|
| 553 | pub const CURLOPT_FTP_USE_PRET: CURLoption = CURLOPTTYPE_LONG + 188; | 
|---|
| 554 | pub const CURLOPT_RTSP_REQUEST: CURLoption = CURLOPTTYPE_LONG + 189; | 
|---|
| 555 | pub const CURLOPT_RTSP_SESSION_ID: CURLoption = CURLOPTTYPE_OBJECTPOINT + 190; | 
|---|
| 556 | pub const CURLOPT_RTSP_STREAM_URI: CURLoption = CURLOPTTYPE_OBJECTPOINT + 191; | 
|---|
| 557 | pub const CURLOPT_RTSP_TRANSPORT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 192; | 
|---|
| 558 | pub const CURLOPT_RTSP_CLIENT_CSEQ: CURLoption = CURLOPTTYPE_LONG + 193; | 
|---|
| 559 | pub const CURLOPT_RTSP_SERVER_CSEQ: CURLoption = CURLOPTTYPE_LONG + 194; | 
|---|
| 560 | pub const CURLOPT_INTERLEAVEDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 195; | 
|---|
| 561 | pub const CURLOPT_INTERLEAVEFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 196; | 
|---|
| 562 | pub const CURLOPT_WILDCARDMATCH: CURLoption = CURLOPTTYPE_LONG + 197; | 
|---|
| 563 | pub const CURLOPT_CHUNK_BGN_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 198; | 
|---|
| 564 | pub const CURLOPT_CHUNK_END_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 199; | 
|---|
| 565 | pub const CURLOPT_FNMATCH_FUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 200; | 
|---|
| 566 | pub const CURLOPT_CHUNK_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 201; | 
|---|
| 567 | pub const CURLOPT_FNMATCH_DATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 202; | 
|---|
| 568 | pub const CURLOPT_RESOLVE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 203; | 
|---|
| 569 | pub const CURLOPT_TLSAUTH_USERNAME: CURLoption = CURLOPTTYPE_OBJECTPOINT + 204; | 
|---|
| 570 | pub const CURLOPT_TLSAUTH_PASSWORD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 205; | 
|---|
| 571 | pub const CURLOPT_TLSAUTH_TYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 206; | 
|---|
| 572 | pub const CURLOPT_TRANSFER_ENCODING: CURLoption = CURLOPTTYPE_LONG + 207; | 
|---|
| 573 | pub const CURLOPT_CLOSESOCKETFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 208; | 
|---|
| 574 | pub const CURLOPT_CLOSESOCKETDATA: CURLoption = CURLOPTTYPE_OBJECTPOINT + 209; | 
|---|
| 575 | pub const CURLOPT_GSSAPI_DELEGATION: CURLoption = CURLOPTTYPE_LONG + 210; | 
|---|
| 576 | pub const CURLOPT_DNS_SERVERS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 211; | 
|---|
| 577 | // pub const CURLOPT_ACCEPTTIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 212; | 
|---|
| 578 | pub const CURLOPT_TCP_KEEPALIVE: CURLoption = CURLOPTTYPE_LONG + 213; | 
|---|
| 579 | pub const CURLOPT_TCP_KEEPIDLE: CURLoption = CURLOPTTYPE_LONG + 214; | 
|---|
| 580 | pub const CURLOPT_TCP_KEEPINTVL: CURLoption = CURLOPTTYPE_LONG + 215; | 
|---|
| 581 | pub const CURLOPT_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 216; | 
|---|
| 582 | // pub const CURLOPT_MAIL_AUTH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 217; | 
|---|
| 583 | // pub const CURLOPT_SASL_IR: CURLoption = CURLOPTTYPE_LONG + 218; | 
|---|
| 584 | // pub const CURLOPT_XFERINFOFUNCTION: CURLoption = CURLOPTTYPE_FUNCTIONPOINT + 219; | 
|---|
| 585 | // pub const CURLOPT_XOAUTH2_BEARER: CURLoption = CURLOPTTYPE_OBJECTPOINT + 220; | 
|---|
| 586 | // pub const CURLOPT_DNS_INTERFACE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 221; | 
|---|
| 587 | // pub const CURLOPT_DNS_LOCAL_IP4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 222; | 
|---|
| 588 | // pub const CURLOPT_DNS_LOCAL_IP6: CURLoption = CURLOPTTYPE_OBJECTPOINT + 223; | 
|---|
| 589 | // pub const CURLOPT_LOGIN_OPTIONS: CURLoption = CURLOPTTYPE_OBJECTPOINT + 224; | 
|---|
| 590 | pub const CURLOPT_EXPECT_100_TIMEOUT_MS: CURLoption = CURLOPTTYPE_LONG + 227; | 
|---|
| 591 | pub const CURLOPT_PINNEDPUBLICKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 230; | 
|---|
| 592 | pub const CURLOPT_UNIX_SOCKET_PATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 231; | 
|---|
| 593 | pub const CURLOPT_PATH_AS_IS: CURLoption = CURLOPTTYPE_LONG + 234; | 
|---|
| 594 | pub const CURLOPT_PIPEWAIT: CURLoption = CURLOPTTYPE_LONG + 237; | 
|---|
| 595 | pub const CURLOPT_CONNECT_TO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 243; | 
|---|
| 596 | pub const CURLOPT_PROXY_CAINFO: CURLoption = CURLOPTTYPE_OBJECTPOINT + 246; | 
|---|
| 597 | pub const CURLOPT_PROXY_CAPATH: CURLoption = CURLOPTTYPE_OBJECTPOINT + 247; | 
|---|
| 598 | pub const CURLOPT_PROXY_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 248; | 
|---|
| 599 | pub const CURLOPT_PROXY_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 249; | 
|---|
| 600 | pub const CURLOPT_PROXY_SSLVERSION: CURLoption = CURLOPTTYPE_VALUES + 250; | 
|---|
| 601 | pub const CURLOPT_PROXY_SSLCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 254; | 
|---|
| 602 | pub const CURLOPT_PROXY_SSLCERTTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 255; | 
|---|
| 603 | pub const CURLOPT_PROXY_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 256; | 
|---|
| 604 | pub const CURLOPT_PROXY_SSLKEYTYPE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 257; | 
|---|
| 605 | pub const CURLOPT_PROXY_KEYPASSWD: CURLoption = CURLOPTTYPE_OBJECTPOINT + 258; | 
|---|
| 606 | pub const CURLOPT_PROXY_SSL_CIPHER_LIST: CURLoption = CURLOPTTYPE_OBJECTPOINT + 259; | 
|---|
| 607 | pub const CURLOPT_PROXY_CRLFILE: CURLoption = CURLOPTTYPE_OBJECTPOINT + 260; | 
|---|
| 608 | pub const CURLOPT_PROXY_SSL_OPTIONS: CURLoption = CURLOPTTYPE_LONG + 261; | 
|---|
| 609 |  | 
|---|
| 610 | pub const CURLOPT_ABSTRACT_UNIX_SOCKET: CURLoption = CURLOPTTYPE_OBJECTPOINT + 264; | 
|---|
| 611 |  | 
|---|
| 612 | pub const CURLOPT_DOH_URL: CURLoption = CURLOPTTYPE_OBJECTPOINT + 279; | 
|---|
| 613 | pub const CURLOPT_UPLOAD_BUFFERSIZE: CURLoption = CURLOPTTYPE_LONG + 280; | 
|---|
| 614 |  | 
|---|
| 615 | pub const CURLOPT_HTTP09_ALLOWED: CURLoption = CURLOPTTYPE_LONG + 285; | 
|---|
| 616 |  | 
|---|
| 617 | pub const CURLOPT_MAXAGE_CONN: CURLoption = CURLOPTTYPE_LONG + 288; | 
|---|
| 618 |  | 
|---|
| 619 | pub const CURLOPT_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 291; | 
|---|
| 620 | pub const CURLOPT_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 292; | 
|---|
| 621 | pub const CURLOPT_PROXY_SSLCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 293; | 
|---|
| 622 | pub const CURLOPT_PROXY_SSLKEY_BLOB: CURLoption = CURLOPTTYPE_BLOB + 294; | 
|---|
| 623 | pub const CURLOPT_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 295; | 
|---|
| 624 |  | 
|---|
| 625 | pub const CURLOPT_PROXY_ISSUERCERT: CURLoption = CURLOPTTYPE_OBJECTPOINT + 296; | 
|---|
| 626 | pub const CURLOPT_PROXY_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 297; | 
|---|
| 627 |  | 
|---|
| 628 | pub const CURLOPT_AWS_SIGV4: CURLoption = CURLOPTTYPE_OBJECTPOINT + 305; | 
|---|
| 629 |  | 
|---|
| 630 | pub const CURLOPT_DOH_SSL_VERIFYPEER: CURLoption = CURLOPTTYPE_LONG + 306; | 
|---|
| 631 | pub const CURLOPT_DOH_SSL_VERIFYHOST: CURLoption = CURLOPTTYPE_LONG + 307; | 
|---|
| 632 | pub const CURLOPT_DOH_SSL_VERIFYSTATUS: CURLoption = CURLOPTTYPE_LONG + 308; | 
|---|
| 633 | pub const CURLOPT_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 309; | 
|---|
| 634 | pub const CURLOPT_PROXY_CAINFO_BLOB: CURLoption = CURLOPTTYPE_BLOB + 310; | 
|---|
| 635 |  | 
|---|
| 636 | pub const CURL_IPRESOLVE_WHATEVER: c_int = 0; | 
|---|
| 637 | pub const CURL_IPRESOLVE_V4: c_int = 1; | 
|---|
| 638 | pub const CURL_IPRESOLVE_V6: c_int = 2; | 
|---|
| 639 |  | 
|---|
| 640 | pub const CURLSSLOPT_ALLOW_BEAST: c_long = 1 << 0; | 
|---|
| 641 | pub const CURLSSLOPT_NO_REVOKE: c_long = 1 << 1; | 
|---|
| 642 | pub const CURLSSLOPT_NO_PARTIALCHAIN: c_long = 1 << 2; | 
|---|
| 643 | pub const CURLSSLOPT_REVOKE_BEST_EFFORT: c_long = 1 << 3; | 
|---|
| 644 | pub const CURLSSLOPT_NATIVE_CA: c_long = 1 << 4; | 
|---|
| 645 | pub const CURLSSLOPT_AUTO_CLIENT_CERT: c_long = 1 << 5; | 
|---|
| 646 |  | 
|---|
| 647 | /// These enums are for use with the CURLOPT_HTTP_VERSION option. | 
|---|
| 648 | /// | 
|---|
| 649 | /// Setting this means we don't care, and that we'd like the library to choose | 
|---|
| 650 | /// the best possible for us! | 
|---|
| 651 | pub const CURL_HTTP_VERSION_NONE: c_int = 0; | 
|---|
| 652 | /// Please use HTTP 1.0 in the request | 
|---|
| 653 | pub const CURL_HTTP_VERSION_1_0: c_int = 1; | 
|---|
| 654 | /// Please use HTTP 1.1 in the request | 
|---|
| 655 | pub const CURL_HTTP_VERSION_1_1: c_int = 2; | 
|---|
| 656 | /// Please use HTTP 2 in the request | 
|---|
| 657 | /// (Added in CURL 7.33.0) | 
|---|
| 658 | pub const CURL_HTTP_VERSION_2_0: c_int = 3; | 
|---|
| 659 | /// Use version 2 for HTTPS, version 1.1 for HTTP | 
|---|
| 660 | /// (Added in CURL 7.47.0) | 
|---|
| 661 | pub const CURL_HTTP_VERSION_2TLS: c_int = 4; | 
|---|
| 662 | /// Please use HTTP 2 without HTTP/1.1 Upgrade | 
|---|
| 663 | /// (Added in CURL 7.49.0) | 
|---|
| 664 | pub const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE: c_int = 5; | 
|---|
| 665 | /// Use HTTP/3, fallback to HTTP/2 or HTTP/1 if needed. | 
|---|
| 666 | /// (Added in CURL 7.66.0) | 
|---|
| 667 | pub const CURL_HTTP_VERSION_3: c_int = 30; | 
|---|
| 668 |  | 
|---|
| 669 | // Note that the type here is wrong, it's just intended to just be an enum. | 
|---|
| 670 | pub const CURL_SSLVERSION_DEFAULT: __enum_ty = 0; | 
|---|
| 671 | pub const CURL_SSLVERSION_TLSv1: __enum_ty = 1; | 
|---|
| 672 | pub const CURL_SSLVERSION_SSLv2: __enum_ty = 2; | 
|---|
| 673 | pub const CURL_SSLVERSION_SSLv3: __enum_ty = 3; | 
|---|
| 674 | pub const CURL_SSLVERSION_TLSv1_0: __enum_ty = 4; | 
|---|
| 675 | pub const CURL_SSLVERSION_TLSv1_1: __enum_ty = 5; | 
|---|
| 676 | pub const CURL_SSLVERSION_TLSv1_2: __enum_ty = 6; | 
|---|
| 677 | pub const CURL_SSLVERSION_TLSv1_3: __enum_ty = 7; | 
|---|
| 678 |  | 
|---|
| 679 | pub const CURLOPT_READDATA: CURLoption = CURLOPT_INFILE; | 
|---|
| 680 | pub const CURLOPT_WRITEDATA: CURLoption = CURLOPT_FILE; | 
|---|
| 681 | pub const CURLOPT_HEADERDATA: CURLoption = CURLOPT_WRITEHEADER; | 
|---|
| 682 |  | 
|---|
| 683 | pub type curl_TimeCond = __enum_ty; | 
|---|
| 684 | pub const CURL_TIMECOND_NONE: curl_TimeCond = 0; | 
|---|
| 685 | pub const CURL_TIMECOND_IFMODSINCE: curl_TimeCond = 1; | 
|---|
| 686 | pub const CURL_TIMECOND_IFUNMODSINCE: curl_TimeCond = 2; | 
|---|
| 687 | pub const CURL_TIMECOND_LASTMOD: curl_TimeCond = 3; | 
|---|
| 688 |  | 
|---|
| 689 | pub type CURLformoption = __enum_ty; | 
|---|
| 690 | pub const CURLFORM_NOTHING: CURLformoption = 0; | 
|---|
| 691 | pub const CURLFORM_COPYNAME: CURLformoption = 1; | 
|---|
| 692 | pub const CURLFORM_PTRNAME: CURLformoption = 2; | 
|---|
| 693 | pub const CURLFORM_NAMELENGTH: CURLformoption = 3; | 
|---|
| 694 | pub const CURLFORM_COPYCONTENTS: CURLformoption = 4; | 
|---|
| 695 | pub const CURLFORM_PTRCONTENTS: CURLformoption = 5; | 
|---|
| 696 | pub const CURLFORM_CONTENTSLENGTH: CURLformoption = 6; | 
|---|
| 697 | pub const CURLFORM_FILECONTENT: CURLformoption = 7; | 
|---|
| 698 | pub const CURLFORM_ARRAY: CURLformoption = 8; | 
|---|
| 699 | pub const CURLFORM_OBSOLETE: CURLformoption = 9; | 
|---|
| 700 | pub const CURLFORM_FILE: CURLformoption = 10; | 
|---|
| 701 | pub const CURLFORM_BUFFER: CURLformoption = 11; | 
|---|
| 702 | pub const CURLFORM_BUFFERPTR: CURLformoption = 12; | 
|---|
| 703 | pub const CURLFORM_BUFFERLENGTH: CURLformoption = 13; | 
|---|
| 704 | pub const CURLFORM_CONTENTTYPE: CURLformoption = 14; | 
|---|
| 705 | pub const CURLFORM_CONTENTHEADER: CURLformoption = 15; | 
|---|
| 706 | pub const CURLFORM_FILENAME: CURLformoption = 16; | 
|---|
| 707 | pub const CURLFORM_END: CURLformoption = 17; | 
|---|
| 708 | pub const CURLFORM_STREAM: CURLformoption = 19; | 
|---|
| 709 |  | 
|---|
| 710 | pub type CURLFORMcode = __enum_ty; | 
|---|
| 711 | pub const CURL_FORMADD_OK: CURLFORMcode = 0; | 
|---|
| 712 | pub const CURL_FORMADD_MEMORY: CURLFORMcode = 1; | 
|---|
| 713 | pub const CURL_FORMADD_OPTION_TWICE: CURLFORMcode = 2; | 
|---|
| 714 | pub const CURL_FORMADD_NULL: CURLFORMcode = 3; | 
|---|
| 715 | pub const CURL_FORMADD_UNKNOWN_OPTION: CURLFORMcode = 4; | 
|---|
| 716 | pub const CURL_FORMADD_INCOMPLETE: CURLFORMcode = 5; | 
|---|
| 717 | pub const CURL_FORMADD_ILLEGAL_ARRAY: CURLFORMcode = 6; | 
|---|
| 718 | pub const CURL_FORMADD_DISABLED: CURLFORMcode = 7; | 
|---|
| 719 |  | 
|---|
| 720 | pub const CURL_REDIR_POST_301: c_ulong = 1; | 
|---|
| 721 | pub const CURL_REDIR_POST_302: c_ulong = 2; | 
|---|
| 722 | pub const CURL_REDIR_POST_303: c_ulong = 4; | 
|---|
| 723 | pub const CURL_REDIR_POST_ALL: c_ulong = | 
|---|
| 724 | CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303; | 
|---|
| 725 |  | 
|---|
| 726 | #[ repr(C)] | 
|---|
| 727 | pub struct curl_forms { | 
|---|
| 728 | pub option: CURLformoption, | 
|---|
| 729 | pub value: *const c_char, | 
|---|
| 730 | } | 
|---|
| 731 |  | 
|---|
| 732 | pub type curl_formget_callback = extern "C"fn(*mut c_void, *const c_char, size_t) -> size_t; | 
|---|
| 733 |  | 
|---|
| 734 | #[ repr(C)] | 
|---|
| 735 | pub struct curl_slist { | 
|---|
| 736 | pub data: *mut c_char, | 
|---|
| 737 | pub next: *mut curl_slist, | 
|---|
| 738 | } | 
|---|
| 739 |  | 
|---|
| 740 | #[ repr(C)] | 
|---|
| 741 | pub struct curl_certinfo { | 
|---|
| 742 | pub num_of_certs: c_int, | 
|---|
| 743 | pub certinfo: *mut *mut curl_slist, | 
|---|
| 744 | } | 
|---|
| 745 |  | 
|---|
| 746 | // pub type curl_sslbackend = __enum_ty; | 
|---|
| 747 | // pub const CURLSSLBACKEND_NONE: curl_sslbackend = 0; | 
|---|
| 748 | // pub const CURLSSLBACKEND_OPENSSL: curl_sslbackend = 1; | 
|---|
| 749 | // pub const CURLSSLBACKEND_GNUTLS: curl_sslbackend = 2; | 
|---|
| 750 | // pub const CURLSSLBACKEND_NSS: curl_sslbackend = 3; | 
|---|
| 751 | // pub const CURLSSLBACKEND_QSOSSL: curl_sslbackend = 4; | 
|---|
| 752 | // pub const CURLSSLBACKEND_GSKIT: curl_sslbackend = 5; | 
|---|
| 753 | // pub const CURLSSLBACKEND_POLARSSL: curl_sslbackend = 6; | 
|---|
| 754 | // pub const CURLSSLBACKEND_CYASSL: curl_sslbackend = 7; | 
|---|
| 755 | // pub const CURLSSLBACKEND_SCHANNEL: curl_sslbackend = 8; | 
|---|
| 756 | // pub const CURLSSLBACKEND_DARWINSSL: curl_sslbackend = 9; | 
|---|
| 757 |  | 
|---|
| 758 | // #[repr(C)] | 
|---|
| 759 | // pub struct curl_tlssessioninfo { | 
|---|
| 760 | //     pub backend: curl_sslbackend, | 
|---|
| 761 | //     pub internals: *mut c_void, | 
|---|
| 762 | // } | 
|---|
| 763 |  | 
|---|
| 764 | pub const CURLINFO_STRING: CURLINFO = 0x100000; | 
|---|
| 765 | pub const CURLINFO_LONG: CURLINFO = 0x200000; | 
|---|
| 766 | pub const CURLINFO_DOUBLE: CURLINFO = 0x300000; | 
|---|
| 767 | pub const CURLINFO_SLIST: CURLINFO = 0x400000; | 
|---|
| 768 | pub const CURLINFO_MASK: CURLINFO = 0x0fffff; | 
|---|
| 769 | pub const CURLINFO_TYPEMASK: CURLINFO = 0xf00000; | 
|---|
| 770 |  | 
|---|
| 771 | pub const CURLINFO_EFFECTIVE_URL: CURLINFO = CURLINFO_STRING + 1; | 
|---|
| 772 | pub const CURLINFO_RESPONSE_CODE: CURLINFO = CURLINFO_LONG + 2; | 
|---|
| 773 | pub const CURLINFO_TOTAL_TIME: CURLINFO = CURLINFO_DOUBLE + 3; | 
|---|
| 774 | pub const CURLINFO_NAMELOOKUP_TIME: CURLINFO = CURLINFO_DOUBLE + 4; | 
|---|
| 775 | pub const CURLINFO_CONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 5; | 
|---|
| 776 | pub const CURLINFO_PRETRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 6; | 
|---|
| 777 | pub const CURLINFO_SIZE_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 7; | 
|---|
| 778 | pub const CURLINFO_SIZE_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 8; | 
|---|
| 779 | pub const CURLINFO_SPEED_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 9; | 
|---|
| 780 | pub const CURLINFO_SPEED_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 10; | 
|---|
| 781 | pub const CURLINFO_HEADER_SIZE: CURLINFO = CURLINFO_LONG + 11; | 
|---|
| 782 | pub const CURLINFO_REQUEST_SIZE: CURLINFO = CURLINFO_LONG + 12; | 
|---|
| 783 | pub const CURLINFO_SSL_VERIFYRESULT: CURLINFO = CURLINFO_LONG + 13; | 
|---|
| 784 | pub const CURLINFO_FILETIME: CURLINFO = CURLINFO_LONG + 14; | 
|---|
| 785 | pub const CURLINFO_CONTENT_LENGTH_DOWNLOAD: CURLINFO = CURLINFO_DOUBLE + 15; | 
|---|
| 786 | pub const CURLINFO_CONTENT_LENGTH_UPLOAD: CURLINFO = CURLINFO_DOUBLE + 16; | 
|---|
| 787 | pub const CURLINFO_STARTTRANSFER_TIME: CURLINFO = CURLINFO_DOUBLE + 17; | 
|---|
| 788 | pub const CURLINFO_CONTENT_TYPE: CURLINFO = CURLINFO_STRING + 18; | 
|---|
| 789 | pub const CURLINFO_REDIRECT_TIME: CURLINFO = CURLINFO_DOUBLE + 19; | 
|---|
| 790 | pub const CURLINFO_REDIRECT_COUNT: CURLINFO = CURLINFO_LONG + 20; | 
|---|
| 791 | pub const CURLINFO_PRIVATE: CURLINFO = CURLINFO_STRING + 21; | 
|---|
| 792 | pub const CURLINFO_HTTP_CONNECTCODE: CURLINFO = CURLINFO_LONG + 22; | 
|---|
| 793 | pub const CURLINFO_HTTPAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 23; | 
|---|
| 794 | pub const CURLINFO_PROXYAUTH_AVAIL: CURLINFO = CURLINFO_LONG + 24; | 
|---|
| 795 | pub const CURLINFO_OS_ERRNO: CURLINFO = CURLINFO_LONG + 25; | 
|---|
| 796 | pub const CURLINFO_NUM_CONNECTS: CURLINFO = CURLINFO_LONG + 26; | 
|---|
| 797 | pub const CURLINFO_SSL_ENGINES: CURLINFO = CURLINFO_SLIST + 27; | 
|---|
| 798 | pub const CURLINFO_COOKIELIST: CURLINFO = CURLINFO_SLIST + 28; | 
|---|
| 799 | pub const CURLINFO_LASTSOCKET: CURLINFO = CURLINFO_LONG + 29; | 
|---|
| 800 | pub const CURLINFO_FTP_ENTRY_PATH: CURLINFO = CURLINFO_STRING + 30; | 
|---|
| 801 | pub const CURLINFO_REDIRECT_URL: CURLINFO = CURLINFO_STRING + 31; | 
|---|
| 802 | pub const CURLINFO_PRIMARY_IP: CURLINFO = CURLINFO_STRING + 32; | 
|---|
| 803 | pub const CURLINFO_APPCONNECT_TIME: CURLINFO = CURLINFO_DOUBLE + 33; | 
|---|
| 804 | pub const CURLINFO_CERTINFO: CURLINFO = CURLINFO_SLIST + 34; | 
|---|
| 805 | pub const CURLINFO_CONDITION_UNMET: CURLINFO = CURLINFO_LONG + 35; | 
|---|
| 806 | pub const CURLINFO_RTSP_SESSION_ID: CURLINFO = CURLINFO_STRING + 36; | 
|---|
| 807 | pub const CURLINFO_RTSP_CLIENT_CSEQ: CURLINFO = CURLINFO_LONG + 37; | 
|---|
| 808 | pub const CURLINFO_RTSP_SERVER_CSEQ: CURLINFO = CURLINFO_LONG + 38; | 
|---|
| 809 | pub const CURLINFO_RTSP_CSEQ_RECV: CURLINFO = CURLINFO_LONG + 39; | 
|---|
| 810 | pub const CURLINFO_PRIMARY_PORT: CURLINFO = CURLINFO_LONG + 40; | 
|---|
| 811 | pub const CURLINFO_LOCAL_IP: CURLINFO = CURLINFO_STRING + 41; | 
|---|
| 812 | pub const CURLINFO_LOCAL_PORT: CURLINFO = CURLINFO_LONG + 42; | 
|---|
| 813 | // pub const CURLINFO_TLS_SESSION: CURLINFO = CURLINFO_SLIST + 43; | 
|---|
| 814 |  | 
|---|
| 815 | pub type curl_closepolicy = __enum_ty; | 
|---|
| 816 | pub const CURLCLOSEPOLICY_NONE: curl_closepolicy = 0; | 
|---|
| 817 | pub const CURLCLOSEPOLICY_OLDEST: curl_closepolicy = 1; | 
|---|
| 818 | pub const CURLCLOSEPOLICY_LEAST_RECENTLY_USED: curl_closepolicy = 2; | 
|---|
| 819 | pub const CURLCLOSEPOLICY_LEAST_TRAFFIC: curl_closepolicy = 3; | 
|---|
| 820 | pub const CURLCLOSEPOLICY_SLOWEST: curl_closepolicy = 4; | 
|---|
| 821 | pub const CURLCLOSEPOLICY_CALLBACK: curl_closepolicy = 5; | 
|---|
| 822 |  | 
|---|
| 823 | pub const CURL_GLOBAL_SSL: c_long = 1 << 0; | 
|---|
| 824 | pub const CURL_GLOBAL_WIN32: c_long = 1 << 1; | 
|---|
| 825 | pub const CURL_GLOBAL_ALL: c_long = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32; | 
|---|
| 826 | pub const CURL_GLOBAL_NOTHING: c_long = 0; | 
|---|
| 827 | pub const CURL_GLOBAL_DEFAULT: c_long = CURL_GLOBAL_ALL; | 
|---|
| 828 | // pub const CURL_GLOBAL_ACK_EINTR: c_long = 1 << 2; | 
|---|
| 829 |  | 
|---|
| 830 | pub type curl_lock_data = __enum_ty; | 
|---|
| 831 | pub const CURL_LOCK_DATA_NONE: curl_lock_data = 0; | 
|---|
| 832 | pub const CURL_LOCK_DATA_SHARE: curl_lock_data = 1; | 
|---|
| 833 | pub const CURL_LOCK_DATA_COOKIE: curl_lock_data = 2; | 
|---|
| 834 | pub const CURL_LOCK_DATA_DNS: curl_lock_data = 3; | 
|---|
| 835 | pub const CURL_LOCK_DATA_SSL_SESSION: curl_lock_data = 4; | 
|---|
| 836 | pub const CURL_LOCK_DATA_CONNECT: curl_lock_data = 5; | 
|---|
| 837 |  | 
|---|
| 838 | pub type curl_lock_access = __enum_ty; | 
|---|
| 839 | pub const CURL_LOCK_ACCESS_NONE: curl_lock_access = 0; | 
|---|
| 840 | pub const CURL_LOCK_ACCESS_SHARED: curl_lock_access = 1; | 
|---|
| 841 | pub const CURL_LOCK_ACCESS_SINGLE: curl_lock_access = 2; | 
|---|
| 842 |  | 
|---|
| 843 | pub type curl_lock_function = | 
|---|
| 844 | extern "C"fn(*mut CURL, curl_lock_data, curl_lock_access, *mut c_void); | 
|---|
| 845 | pub type curl_unlock_function = extern "C"fn(*mut CURL, curl_lock_data, *mut c_void); | 
|---|
| 846 |  | 
|---|
| 847 | pub enum CURLSH {} | 
|---|
| 848 |  | 
|---|
| 849 | pub type CURLSHcode = __enum_ty; | 
|---|
| 850 | pub const CURLSHE_OK: CURLSHcode = 0; | 
|---|
| 851 | pub const CURLSHE_BAD_OPTION: CURLSHcode = 1; | 
|---|
| 852 | pub const CURLSHE_IN_USE: CURLSHcode = 2; | 
|---|
| 853 | pub const CURLSHE_INVALID: CURLSHcode = 3; | 
|---|
| 854 | pub const CURLSHE_NOMEM: CURLSHcode = 4; | 
|---|
| 855 | // pub const CURLSHE_NOT_BUILT_IN: CURLSHcode = 5; | 
|---|
| 856 |  | 
|---|
| 857 | pub type CURLSHoption = __enum_ty; | 
|---|
| 858 | pub const CURLSHOPT_NONE: CURLSHoption = 0; | 
|---|
| 859 | pub const CURLSHOPT_SHARE: CURLSHoption = 1; | 
|---|
| 860 | pub const CURLSHOPT_UNSHARE: CURLSHoption = 2; | 
|---|
| 861 | pub const CURLSHOPT_LOCKFUNC: CURLSHoption = 3; | 
|---|
| 862 | pub const CURLSHOPT_UNLOCKFUNC: CURLSHoption = 4; | 
|---|
| 863 | pub const CURLSHOPT_USERDATA: CURLSHoption = 5; | 
|---|
| 864 |  | 
|---|
| 865 | pub const CURLVERSION_FIRST: CURLversion = 0; | 
|---|
| 866 | pub const CURLVERSION_SECOND: CURLversion = 1; | 
|---|
| 867 | pub const CURLVERSION_THIRD: CURLversion = 2; | 
|---|
| 868 | pub const CURLVERSION_FOURTH: CURLversion = 3; | 
|---|
| 869 | pub const CURLVERSION_FIFTH: CURLversion = 4; | 
|---|
| 870 | pub const CURLVERSION_SIXTH: CURLversion = 5; | 
|---|
| 871 | pub const CURLVERSION_SEVENTH: CURLversion = 6; | 
|---|
| 872 | pub const CURLVERSION_EIGHTH: CURLversion = 7; | 
|---|
| 873 | pub const CURLVERSION_NINTH: CURLversion = 8; | 
|---|
| 874 | pub const CURLVERSION_TENTH: CURLversion = 9; | 
|---|
| 875 | pub const CURLVERSION_ELEVENTH: CURLversion = 10; | 
|---|
| 876 | pub const CURLVERSION_TWELFTH: CURLversion = 11; | 
|---|
| 877 | pub const CURLVERSION_NOW: CURLversion = CURLVERSION_TWELFTH; | 
|---|
| 878 |  | 
|---|
| 879 | #[ repr(C)] | 
|---|
| 880 | pub struct curl_version_info_data { | 
|---|
| 881 | pub age: CURLversion, | 
|---|
| 882 | pub version: *const c_char, | 
|---|
| 883 | pub version_num: c_uint, | 
|---|
| 884 | pub host: *const c_char, | 
|---|
| 885 | pub features: c_int, | 
|---|
| 886 | pub ssl_version: *const c_char, | 
|---|
| 887 | pub ssl_version_num: c_long, | 
|---|
| 888 | pub libz_version: *const c_char, | 
|---|
| 889 | pub protocols: *const *const c_char, | 
|---|
| 890 | pub ares: *const c_char, | 
|---|
| 891 | pub ares_num: c_int, | 
|---|
| 892 | pub libidn: *const c_char, | 
|---|
| 893 | pub iconv_ver_num: c_int, | 
|---|
| 894 | pub libssh_version: *const c_char, | 
|---|
| 895 | pub brotli_ver_num: c_uint, | 
|---|
| 896 | pub brotli_version: *const c_char, | 
|---|
| 897 | pub nghttp2_ver_num: c_uint, | 
|---|
| 898 | pub nghttp2_version: *const c_char, | 
|---|
| 899 | pub quic_version: *const c_char, | 
|---|
| 900 | pub cainfo: *const c_char, | 
|---|
| 901 | pub capath: *const c_char, | 
|---|
| 902 | pub zstd_ver_num: c_uint, | 
|---|
| 903 | pub zstd_version: *const c_char, | 
|---|
| 904 | pub hyper_version: *const c_char, | 
|---|
| 905 | pub gsasl_version: *const c_char, | 
|---|
| 906 | pub feature_names: *const *const c_char, | 
|---|
| 907 | pub rtmp_version: *const c_char, | 
|---|
| 908 | } | 
|---|
| 909 |  | 
|---|
| 910 | pub const CURL_VERSION_IPV6: c_int = 1 << 0; | 
|---|
| 911 | pub const CURL_VERSION_KERBEROS4: c_int = 1 << 1; | 
|---|
| 912 | pub const CURL_VERSION_SSL: c_int = 1 << 2; | 
|---|
| 913 | pub const CURL_VERSION_LIBZ: c_int = 1 << 3; | 
|---|
| 914 | pub const CURL_VERSION_NTLM: c_int = 1 << 4; | 
|---|
| 915 | pub const CURL_VERSION_GSSNEGOTIATE: c_int = 1 << 5; | 
|---|
| 916 | pub const CURL_VERSION_DEBUG: c_int = 1 << 6; | 
|---|
| 917 | pub const CURL_VERSION_ASYNCHDNS: c_int = 1 << 7; | 
|---|
| 918 | pub const CURL_VERSION_SPNEGO: c_int = 1 << 8; | 
|---|
| 919 | pub const CURL_VERSION_LARGEFILE: c_int = 1 << 9; | 
|---|
| 920 | pub const CURL_VERSION_IDN: c_int = 1 << 10; | 
|---|
| 921 | pub const CURL_VERSION_SSPI: c_int = 1 << 11; | 
|---|
| 922 | pub const CURL_VERSION_CONV: c_int = 1 << 12; | 
|---|
| 923 | pub const CURL_VERSION_CURLDEBUG: c_int = 1 << 13; | 
|---|
| 924 | pub const CURL_VERSION_TLSAUTH_SRP: c_int = 1 << 14; | 
|---|
| 925 | pub const CURL_VERSION_NTLM_WB: c_int = 1 << 15; | 
|---|
| 926 | pub const CURL_VERSION_HTTP2: c_int = 1 << 16; | 
|---|
| 927 | pub const CURL_VERSION_UNIX_SOCKETS: c_int = 1 << 19; | 
|---|
| 928 | pub const CURL_VERSION_HTTPS_PROXY: c_int = 1 << 21; | 
|---|
| 929 | pub const CURL_VERSION_BROTLI: c_int = 1 << 23; | 
|---|
| 930 | pub const CURL_VERSION_ALTSVC: c_int = 1 << 24; | 
|---|
| 931 | pub const CURL_VERSION_HTTP3: c_int = 1 << 25; | 
|---|
| 932 | pub const CURL_VERSION_ZSTD: c_int = 1 << 26; | 
|---|
| 933 | pub const CURL_VERSION_UNICODE: c_int = 1 << 27; | 
|---|
| 934 | pub const CURL_VERSION_HSTS: c_int = 1 << 28; | 
|---|
| 935 | pub const CURL_VERSION_GSASL: c_int = 1 << 29; | 
|---|
| 936 |  | 
|---|
| 937 | pub const CURLPAUSE_RECV: c_int = 1 << 0; | 
|---|
| 938 | pub const CURLPAUSE_RECV_CONT: c_int = 0; | 
|---|
| 939 | pub const CURLPAUSE_SEND: c_int = 1 << 2; | 
|---|
| 940 | pub const CURLPAUSE_SEND_CONT: c_int = 0; | 
|---|
| 941 |  | 
|---|
| 942 | pub enum CURLM {} | 
|---|
| 943 |  | 
|---|
| 944 | pub type CURLMcode = c_int; | 
|---|
| 945 | pub const CURLM_CALL_MULTI_PERFORM: CURLMcode = -1; | 
|---|
| 946 | pub const CURLM_OK: CURLMcode = 0; | 
|---|
| 947 | pub const CURLM_BAD_HANDLE: CURLMcode = 1; | 
|---|
| 948 | pub const CURLM_BAD_EASY_HANDLE: CURLMcode = 2; | 
|---|
| 949 | pub const CURLM_OUT_OF_MEMORY: CURLMcode = 3; | 
|---|
| 950 | pub const CURLM_INTERNAL_ERROR: CURLMcode = 4; | 
|---|
| 951 | pub const CURLM_BAD_SOCKET: CURLMcode = 5; | 
|---|
| 952 | pub const CURLM_UNKNOWN_OPTION: CURLMcode = 6; | 
|---|
| 953 | // pub const CURLM_ADDED_ALREADY: CURLMcode = 7; | 
|---|
| 954 |  | 
|---|
| 955 | pub type CURLMSG = __enum_ty; | 
|---|
| 956 | pub const CURLMSG_NONE: CURLMSG = 0; | 
|---|
| 957 | pub const CURLMSG_DONE: CURLMSG = 1; | 
|---|
| 958 |  | 
|---|
| 959 | #[ repr(C)] | 
|---|
| 960 | pub struct CURLMsg { | 
|---|
| 961 | pub msg: CURLMSG, | 
|---|
| 962 | pub easy_handle: *mut CURL, | 
|---|
| 963 | pub data: *mut c_void, | 
|---|
| 964 | } | 
|---|
| 965 |  | 
|---|
| 966 | pub const CURL_WAIT_POLLIN: c_short = 0x1; | 
|---|
| 967 | pub const CURL_WAIT_POLLPRI: c_short = 0x2; | 
|---|
| 968 | pub const CURL_WAIT_POLLOUT: c_short = 0x4; | 
|---|
| 969 |  | 
|---|
| 970 | #[ repr(C)] | 
|---|
| 971 | pub struct curl_waitfd { | 
|---|
| 972 | pub fd: curl_socket_t, | 
|---|
| 973 | pub events: c_short, | 
|---|
| 974 | pub revents: c_short, | 
|---|
| 975 | } | 
|---|
| 976 |  | 
|---|
| 977 | pub const CURL_POLL_NONE: c_int = 0; | 
|---|
| 978 | pub const CURL_POLL_IN: c_int = 1; | 
|---|
| 979 | pub const CURL_POLL_OUT: c_int = 2; | 
|---|
| 980 | pub const CURL_POLL_INOUT: c_int = 3; | 
|---|
| 981 | pub const CURL_POLL_REMOVE: c_int = 4; | 
|---|
| 982 | pub const CURL_CSELECT_IN: c_int = 1; | 
|---|
| 983 | pub const CURL_CSELECT_OUT: c_int = 2; | 
|---|
| 984 | pub const CURL_CSELECT_ERR: c_int = 4; | 
|---|
| 985 | pub const CURL_SOCKET_TIMEOUT: curl_socket_t = CURL_SOCKET_BAD; | 
|---|
| 986 |  | 
|---|
| 987 | pub type curl_socket_callback = | 
|---|
| 988 | extern "C"fn(*mut CURL, curl_socket_t, c_int, *mut c_void, *mut c_void) -> c_int; | 
|---|
| 989 | pub type curl_multi_timer_callback = extern "C"fn(*mut CURLM, c_long, *mut c_void) -> c_int; | 
|---|
| 990 |  | 
|---|
| 991 | pub type CURLMoption = __enum_ty; | 
|---|
| 992 | pub const CURLMOPT_SOCKETFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 1; | 
|---|
| 993 | pub const CURLMOPT_SOCKETDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 2; | 
|---|
| 994 | pub const CURLMOPT_PIPELINING: CURLMoption = CURLOPTTYPE_LONG + 3; | 
|---|
| 995 | pub const CURLMOPT_TIMERFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 4; | 
|---|
| 996 | pub const CURLMOPT_TIMERDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 5; | 
|---|
| 997 | pub const CURLMOPT_MAXCONNECTS: CURLMoption = CURLOPTTYPE_LONG + 6; | 
|---|
| 998 | pub const CURLMOPT_MAX_HOST_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 7; | 
|---|
| 999 | pub const CURLMOPT_MAX_PIPELINE_LENGTH: CURLMoption = CURLOPTTYPE_LONG + 8; | 
|---|
| 1000 | pub const CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 9; | 
|---|
| 1001 | pub const CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE: CURLMoption = CURLOPTTYPE_OFF_T + 10; | 
|---|
| 1002 | pub const CURLMOPT_PIPELINING_SITE_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 11; | 
|---|
| 1003 | pub const CURLMOPT_PIPELINING_SERVER_BL: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 12; | 
|---|
| 1004 | pub const CURLMOPT_MAX_TOTAL_CONNECTIONS: CURLMoption = CURLOPTTYPE_LONG + 13; | 
|---|
| 1005 | pub const CURLMOPT_PUSHFUNCTION: CURLMoption = CURLOPTTYPE_FUNCTIONPOINT + 14; | 
|---|
| 1006 | pub const CURLMOPT_PUSHDATA: CURLMoption = CURLOPTTYPE_OBJECTPOINT + 15; | 
|---|
| 1007 | pub const CURLMOPT_MAX_CONCURRENT_STREAMS: CURLMoption = CURLOPTTYPE_LONG + 16; | 
|---|
| 1008 |  | 
|---|
| 1009 | // These enums are for use with the CURLMOPT_PIPELINING option. | 
|---|
| 1010 | pub const CURLPIPE_NOTHING: c_long = 0; | 
|---|
| 1011 | pub const CURLPIPE_HTTP1: c_long = 1; | 
|---|
| 1012 | pub const CURLPIPE_MULTIPLEX: c_long = 2; | 
|---|
| 1013 |  | 
|---|
| 1014 | pub const CURL_ERROR_SIZE: usize = 256; | 
|---|
| 1015 |  | 
|---|
| 1016 | pub type curl_opensocket_callback = | 
|---|
| 1017 | extern "C"fn(*mut c_void, curlsocktype, *mut curl_sockaddr) -> curl_socket_t; | 
|---|
| 1018 | pub type curlsocktype = __enum_ty; | 
|---|
| 1019 | pub const CURLSOCKTYPE_IPCXN: curlsocktype = 0; | 
|---|
| 1020 | pub const CURLSOCKTYPE_ACCEPT: curlsocktype = 1; | 
|---|
| 1021 | pub const CURLSOCKTYPE_LAST: curlsocktype = 2; | 
|---|
| 1022 |  | 
|---|
| 1023 | #[ repr(C)] | 
|---|
| 1024 | pub struct curl_sockaddr { | 
|---|
| 1025 | pub family: c_int, | 
|---|
| 1026 | pub socktype: c_int, | 
|---|
| 1027 | pub protocol: c_int, | 
|---|
| 1028 | pub addrlen: c_uint, | 
|---|
| 1029 | #[ cfg(unix)] | 
|---|
| 1030 | pub addr: libc::sockaddr, | 
|---|
| 1031 | #[ cfg(windows)] | 
|---|
| 1032 | pub addr: SOCKADDR, | 
|---|
| 1033 | } | 
|---|
| 1034 |  | 
|---|
| 1035 | unsafeextern "C"{ | 
|---|
| 1036 | pub unsafefn curl_formadd( | 
|---|
| 1037 | httppost: *mut *mut curl_httppost, | 
|---|
| 1038 | last_post: *mut *mut curl_httppost, | 
|---|
| 1039 | ... | 
|---|
| 1040 | ) -> CURLFORMcode; | 
|---|
| 1041 | pub unsafefn curl_formget( | 
|---|
| 1042 | form: *mut curl_httppost, | 
|---|
| 1043 | arg: *mut c_void, | 
|---|
| 1044 | append: curl_formget_callback, | 
|---|
| 1045 | ) -> c_int; | 
|---|
| 1046 | pub unsafefn curl_formfree(form: *mut curl_httppost); | 
|---|
| 1047 |  | 
|---|
| 1048 | pub unsafefn curl_version() -> *mut c_char; | 
|---|
| 1049 |  | 
|---|
| 1050 | pub unsafefn curl_easy_escape(handle: *mut CURL, string: *const c_char, length: c_int) | 
|---|
| 1051 | -> *mut c_char; | 
|---|
| 1052 | pub unsafefn curl_easy_unescape( | 
|---|
| 1053 | handle: *mut CURL, | 
|---|
| 1054 | string: *const c_char, | 
|---|
| 1055 | length: c_int, | 
|---|
| 1056 | outlength: *mut c_int, | 
|---|
| 1057 | ) -> *mut c_char; | 
|---|
| 1058 | pub unsafefn curl_free(p: *mut c_void); | 
|---|
| 1059 |  | 
|---|
| 1060 | pub unsafefn curl_global_init(flags: c_long) -> CURLcode; | 
|---|
| 1061 | pub unsafefn curl_global_init_mem( | 
|---|
| 1062 | flags: c_long, | 
|---|
| 1063 | m: curl_malloc_callback, | 
|---|
| 1064 | f: curl_free_callback, | 
|---|
| 1065 | r: curl_realloc_callback, | 
|---|
| 1066 | s: curl_strdup_callback, | 
|---|
| 1067 | c: curl_calloc_callback, | 
|---|
| 1068 | ) -> CURLcode; | 
|---|
| 1069 | pub unsafefn curl_global_cleanup(); | 
|---|
| 1070 |  | 
|---|
| 1071 | pub unsafefn curl_slist_append(list: *mut curl_slist, val: *const c_char) -> *mut curl_slist; | 
|---|
| 1072 | pub unsafefn curl_slist_free_all(list: *mut curl_slist); | 
|---|
| 1073 |  | 
|---|
| 1074 | pub unsafefn curl_getdate(p: *const c_char, _: *const time_t) -> time_t; | 
|---|
| 1075 |  | 
|---|
| 1076 | pub unsafefn curl_share_init() -> *mut CURLSH; | 
|---|
| 1077 | pub unsafefn curl_share_setopt(sh: *mut CURLSH, opt: CURLSHoption, ...) -> CURLSHcode; | 
|---|
| 1078 | pub unsafefn curl_share_cleanup(sh: *mut CURLSH) -> CURLSHcode; | 
|---|
| 1079 |  | 
|---|
| 1080 | pub unsafefn curl_version_info(t: CURLversion) -> *mut curl_version_info_data; | 
|---|
| 1081 |  | 
|---|
| 1082 | pub unsafefn curl_easy_strerror(code: CURLcode) -> *const c_char; | 
|---|
| 1083 | pub unsafefn curl_share_strerror(code: CURLSHcode) -> *const c_char; | 
|---|
| 1084 | pub unsafefn curl_easy_pause(handle: *mut CURL, bitmask: c_int) -> CURLcode; | 
|---|
| 1085 |  | 
|---|
| 1086 | pub unsafefn curl_easy_init() -> *mut CURL; | 
|---|
| 1087 | pub unsafefn curl_easy_setopt(curl: *mut CURL, option: CURLoption, ...) -> CURLcode; | 
|---|
| 1088 | pub unsafefn curl_easy_perform(curl: *mut CURL) -> CURLcode; | 
|---|
| 1089 | pub unsafefn curl_easy_cleanup(curl: *mut CURL); | 
|---|
| 1090 | pub unsafefn curl_easy_getinfo(curl: *mut CURL, info: CURLINFO, ...) -> CURLcode; | 
|---|
| 1091 | pub unsafefn curl_easy_duphandle(curl: *mut CURL) -> *mut CURL; | 
|---|
| 1092 | pub unsafefn curl_easy_reset(curl: *mut CURL); | 
|---|
| 1093 | pub unsafefn curl_easy_recv( | 
|---|
| 1094 | curl: *mut CURL, | 
|---|
| 1095 | buffer: *mut c_void, | 
|---|
| 1096 | buflen: size_t, | 
|---|
| 1097 | n: *mut size_t, | 
|---|
| 1098 | ) -> CURLcode; | 
|---|
| 1099 | pub unsafefn curl_easy_send( | 
|---|
| 1100 | curl: *mut CURL, | 
|---|
| 1101 | buffer: *const c_void, | 
|---|
| 1102 | buflen: size_t, | 
|---|
| 1103 | n: *mut size_t, | 
|---|
| 1104 | ) -> CURLcode; | 
|---|
| 1105 |  | 
|---|
| 1106 | #[ cfg(feature = "upkeep_7_62_0")] | 
|---|
| 1107 | pub fn curl_easy_upkeep(curl: *mut CURL) -> CURLcode; | 
|---|
| 1108 |  | 
|---|
| 1109 | pub unsafefn curl_multi_init() -> *mut CURLM; | 
|---|
| 1110 | pub unsafefn curl_multi_add_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode; | 
|---|
| 1111 | pub unsafefn curl_multi_remove_handle(multi_handle: *mut CURLM, curl_handle: *mut CURL) -> CURLMcode; | 
|---|
| 1112 | pub unsafefn curl_multi_fdset( | 
|---|
| 1113 | multi_handle: *mut CURLM, | 
|---|
| 1114 | read_fd_set: *mut fd_set, | 
|---|
| 1115 | write_fd_set: *mut fd_set, | 
|---|
| 1116 | exc_fd_set: *mut fd_set, | 
|---|
| 1117 | max_fd: *mut c_int, | 
|---|
| 1118 | ) -> CURLMcode; | 
|---|
| 1119 | pub unsafefn curl_multi_wait( | 
|---|
| 1120 | multi_handle: *mut CURLM, | 
|---|
| 1121 | extra_fds: *mut curl_waitfd, | 
|---|
| 1122 | extra_nfds: c_uint, | 
|---|
| 1123 | timeout_ms: c_int, | 
|---|
| 1124 | ret: *mut c_int, | 
|---|
| 1125 | ) -> CURLMcode; | 
|---|
| 1126 |  | 
|---|
| 1127 | #[ cfg(feature = "poll_7_68_0")] | 
|---|
| 1128 | pub fn curl_multi_poll( | 
|---|
| 1129 | multi_handle: *mut CURLM, | 
|---|
| 1130 | extra_fds: *mut curl_waitfd, | 
|---|
| 1131 | extra_nfds: c_uint, | 
|---|
| 1132 | timeout_ms: c_int, | 
|---|
| 1133 | ret: *mut c_int, | 
|---|
| 1134 | ) -> CURLMcode; | 
|---|
| 1135 |  | 
|---|
| 1136 | #[ cfg(feature = "poll_7_68_0")] | 
|---|
| 1137 | pub fn curl_multi_wakeup(multi_handle: *mut CURLM) -> CURLMcode; | 
|---|
| 1138 |  | 
|---|
| 1139 | pub unsafefn curl_multi_perform(multi_handle: *mut CURLM, running_handles: *mut c_int) -> CURLMcode; | 
|---|
| 1140 | pub unsafefn curl_multi_cleanup(multi_handle: *mut CURLM) -> CURLMcode; | 
|---|
| 1141 | pub unsafefn curl_multi_info_read( | 
|---|
| 1142 | multi_handle: *mut CURLM, | 
|---|
| 1143 | msgs_in_queue: *mut c_int, | 
|---|
| 1144 | ) -> *mut CURLMsg; | 
|---|
| 1145 | pub unsafefn curl_multi_strerror(code: CURLMcode) -> *const c_char; | 
|---|
| 1146 | pub unsafefn curl_multi_socket( | 
|---|
| 1147 | multi_handle: *mut CURLM, | 
|---|
| 1148 | s: curl_socket_t, | 
|---|
| 1149 | running_handles: *mut c_int, | 
|---|
| 1150 | ) -> CURLMcode; | 
|---|
| 1151 | pub unsafefn curl_multi_socket_action( | 
|---|
| 1152 | multi_handle: *mut CURLM, | 
|---|
| 1153 | s: curl_socket_t, | 
|---|
| 1154 | ev_bitmask: c_int, | 
|---|
| 1155 | running_handles: *mut c_int, | 
|---|
| 1156 | ) -> CURLMcode; | 
|---|
| 1157 | pub unsafefn curl_multi_socket_all( | 
|---|
| 1158 | multi_handle: *mut CURLM, | 
|---|
| 1159 | running_handles: *mut c_int, | 
|---|
| 1160 | ) -> CURLMcode; | 
|---|
| 1161 | pub unsafefn curl_multi_timeout(multi_handle: *mut CURLM, milliseconds: *mut c_long) -> CURLMcode; | 
|---|
| 1162 | pub unsafefn curl_multi_setopt(multi_handle: *mut CURLM, option: CURLMoption, ...) -> CURLMcode; | 
|---|
| 1163 | pub unsafefn curl_multi_assign( | 
|---|
| 1164 | multi_handle: *mut CURLM, | 
|---|
| 1165 | sockfd: curl_socket_t, | 
|---|
| 1166 | sockp: *mut c_void, | 
|---|
| 1167 | ) -> CURLMcode; | 
|---|
| 1168 | } | 
|---|
| 1169 |  | 
|---|
| 1170 | pub fn rust_crate_version() -> &'static str { | 
|---|
| 1171 | env!( "CARGO_PKG_VERSION") | 
|---|
| 1172 | } | 
|---|
| 1173 |  | 
|---|
| 1174 | #[ doc(hidden)] | 
|---|
| 1175 | pub fn vendored() -> bool { | 
|---|
| 1176 | cfg!(libcurl_vendored) | 
|---|
| 1177 | } | 
|---|
| 1178 |  | 
|---|