From 38dae7b3d5f63e2c5c1e4e5fa3403a4952200a02 Mon Sep 17 00:00:00 2001 From: Gnimuc Date: Tue, 18 May 2021 16:06:05 +0900 Subject: [PATCH 1/4] Upgrade the wrapper script and rework the pacakge for multi-platform support --- gen/Manifest.toml | 145 ++ gen/Project.toml | 9 + gen/generate.jl | 77 +- gen/generator.toml | 14 + lib/aarch64-apple-darwin20.jl | 2086 ++++++++++++++++++++++++++++ lib/aarch64-linux-gnu.jl | 2087 ++++++++++++++++++++++++++++ lib/aarch64-linux-musl.jl | 2081 ++++++++++++++++++++++++++++ lib/armv7l-linux-gnueabihf.jl | 2087 ++++++++++++++++++++++++++++ lib/armv7l-linux-musleabihf.jl | 2081 ++++++++++++++++++++++++++++ lib/i686-linux-gnu.jl | 2087 ++++++++++++++++++++++++++++ lib/i686-linux-musl.jl | 2081 ++++++++++++++++++++++++++++ lib/i686-w64-mingw32.jl | 2092 +++++++++++++++++++++++++++++ lib/powerpc64le-linux-gnu.jl | 2087 ++++++++++++++++++++++++++++ lib/x86_64-apple-darwin14.jl | 2086 ++++++++++++++++++++++++++++ lib/x86_64-linux-gnu.jl | 2087 ++++++++++++++++++++++++++++ lib/x86_64-linux-musl.jl | 2081 ++++++++++++++++++++++++++++ lib/x86_64-unknown-freebsd11.1.jl | 2090 ++++++++++++++++++++++++++++ lib/x86_64-w64-mingw32.jl | 2092 +++++++++++++++++++++++++++++ src/LibCURL.jl | 59 +- src/lC_common_h.jl | 1205 ----------------- src/lC_curl_h.jl | 255 ---- src/lC_defines_h.jl | 243 ---- src/lC_exports_h.jl | 1252 ----------------- 23 files changed, 29442 insertions(+), 3022 deletions(-) create mode 100644 gen/Manifest.toml create mode 100644 gen/Project.toml create mode 100644 gen/generator.toml create mode 100644 lib/aarch64-apple-darwin20.jl create mode 100644 lib/aarch64-linux-gnu.jl create mode 100644 lib/aarch64-linux-musl.jl create mode 100644 lib/armv7l-linux-gnueabihf.jl create mode 100644 lib/armv7l-linux-musleabihf.jl create mode 100644 lib/i686-linux-gnu.jl create mode 100644 lib/i686-linux-musl.jl create mode 100644 lib/i686-w64-mingw32.jl create mode 100644 lib/powerpc64le-linux-gnu.jl create mode 100644 lib/x86_64-apple-darwin14.jl create mode 100644 lib/x86_64-linux-gnu.jl create mode 100644 lib/x86_64-linux-musl.jl create mode 100644 lib/x86_64-unknown-freebsd11.1.jl create mode 100644 lib/x86_64-w64-mingw32.jl delete mode 100644 src/lC_common_h.jl delete mode 100644 src/lC_curl_h.jl delete mode 100644 src/lC_defines_h.jl delete mode 100644 src/lC_exports_h.jl diff --git a/gen/Manifest.toml b/gen/Manifest.toml new file mode 100644 index 0000000..8938585 --- /dev/null +++ b/gen/Manifest.toml @@ -0,0 +1,145 @@ +# This file is machine-generated - editing it directly is not advised + +[[ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" + +[[Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[CEnum]] +git-tree-sha1 = "215a9aa4a1f23fbd05b92769fdd62559488d70e9" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.4.1" + +[[Clang]] +deps = ["CEnum", "Clang_jll", "Downloads", "Pkg", "TOML"] +git-tree-sha1 = "93b424759f11b7dbd300eb424fa1bfe590e15cf6" +repo-rev = "master" +repo-url = "https://github.com/JuliaInterop/Clang.jl.git" +uuid = "40e3b903-d033-50b4-a0cc-940c62c95e31" +version = "0.14.0" + +[[Clang_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "libLLVM_jll"] +git-tree-sha1 = "a5923c06de3178dd755f4b9411ea8922a7ae6fb8" +uuid = "0ee61d77-7f21-5576-8119-9fcc46b10100" +version = "11.0.1+3" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[Downloads]] +deps = ["ArgTools", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.3.0" + +[[LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" + +[[LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" + +[[LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" + +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" + +[[MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" + +[[NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" + +[[Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[Preferences]] +deps = ["TOML"] +git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.2.2" + +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[Random]] +deps = ["Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" + +[[Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" + +[[UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" + +[[libLLVM_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" + +[[nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" + +[[p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/gen/Project.toml b/gen/Project.toml new file mode 100644 index 0000000..86f2b04 --- /dev/null +++ b/gen/Project.toml @@ -0,0 +1,9 @@ +[deps] +Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31" +LibCURL_jll = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +MozillaCACerts_jll = "14a3606d-f60d-562e-9121-12d972cd8159" + +[compat] +Clang = "0.14" +LibCURL_jll = "7.66" +MozillaCACerts_jll = ">= 2020" diff --git a/gen/generate.jl b/gen/generate.jl index 471b759..000316d 100644 --- a/gen/generate.jl +++ b/gen/generate.jl @@ -1,66 +1,35 @@ -using Clang.cindex -using Clang.wrap_c -using Printf +using Pkg +using Pkg.Artifacts +using Clang.Generators +using Clang.Generators.JLLEnvs +using LibCURL_jll -# Set these to correspond to your local filesystem's curl and clang include paths -const CURL_PATH = "/usr/local/opt/curl/include/curl" -const CLANG_INCLUDES = [ - "/usr/local/opt/llvm/include", -] +cd(@__DIR__) -const SRC_DIR = abspath(@__DIR__, "..", "src") +artifact_toml = joinpath(dirname(Pkg.pathof(LibCURL_jll)), "..", "StdlibArtifacts.toml") +artifact_dir = Pkg.Artifacts.ensure_artifact_installed("LibCURL", artifact_toml) -headers = map(x -> joinpath(CURL_PATH, x), ["curl.h", "easy.h", "multi.h"]) -context = wrap_c.init(; - headers = headers, - clang_args = String[], - common_file = joinpath(SRC_DIR, "lC_common_h.jl"), - clang_includes = CLANG_INCLUDES, - clang_diagnostics = true, - header_wrapped = (top_header, cursor_header) -> in(cursor_header, headers), - header_library = header -> "libcurl", - header_outputfile = header -> joinpath(SRC_DIR, "lC_") * replace(basename(header), "." => "_") * ".jl", -) -context.options.wrap_structs = true +include_dir = joinpath(artifact_dir, "include") |> normpath +curl_h = joinpath(include_dir, "curl", "curl.h") +@assert isfile(curl_h) -begin - context.headers = [joinpath(CURL_PATH, "curl.h")] - run(context) -end - -function write_constants(filename::AbstractString, startswith_identifier::AbstractString, exports_file) - open(filename, "r") do file - lines = split(read(file, String), "\n") +# mprintf_h = joinpath(include_dir, "curl", "mprintf.h") +# stdcheaders_h = joinpath(include_dir, "curl", "stdcheaders.h") - for line in lines - if startswith(line, startswith_identifier) - @printf exports_file "export %s\n" split(line, r" |\(")[2] - end - end - end -end +options = load_options(joinpath(@__DIR__, "generator.toml")) -# Generate export statements -open(joinpath(SRC_DIR, "lC_exports_h.jl"), "w+") do exports_file - println(exports_file, "# Generating exports") +for target in JLLEnvs.JLL_ENV_TRIPLES + @info "processing $target" - write_constants(joinpath(SRC_DIR, "lC_curl_h.jl"), "function", exports_file) - write_constants(joinpath(SRC_DIR, "lC_common_h.jl"), "const", exports_file) + options["general"]["output_file_path"] = joinpath(@__DIR__, "..", "lib", "$target.jl") - # Generate define constants - open(joinpath(SRC_DIR, "lC_defines_h.jl"), "w+") do defines_file - println(defines_file, "# Generating #define constants") + args = get_default_args(target) + push!(args, "-I$include_dir") - hashdefs = split(read(`gcc -E -dD -P $(joinpath(CURL_PATH, "curl.h"))`, String), "\n") + # header_files = detect_headers(include_dir, args) + header_files = [curl_h] - for line in hashdefs - m = match(r"^\s*#define\s+CURL(\w+)\s+(.+)", line) + ctx = create_context(header_files, args, options) - if m !== nothing - c2 = replace(m.captures[2], "(unsigned long)" => "") - @printf defines_file "const CURL%-30s = %s\n" m.captures[1] c2 - @printf exports_file "export CURL%s\n" m.captures[1] - end - end - end + build!(ctx) end diff --git a/gen/generator.toml b/gen/generator.toml new file mode 100644 index 0000000..7c7a0de --- /dev/null +++ b/gen/generator.toml @@ -0,0 +1,14 @@ +[general] +library_name = "libcurl" +use_julia_native_enum_type = true +use_deterministic_symbol = true +auto_mutability = true + +printer_blacklist = [ + "CURL_SUFFIX_CURL_OFF_T", + "CURL_SUFFIX_CURL_OFF_TU", + "CURL_ZERO_TERMINATED", +] + +[codegen.macro] +macro_mode = "basic" \ No newline at end of file diff --git a/lib/aarch64-apple-darwin20.jl b/lib/aarch64-apple-darwin20.jl new file mode 100644 index 0000000..e22905d --- /dev/null +++ b/lib/aarch64-apple-darwin20.jl @@ -0,0 +1,2086 @@ +const __darwin_socklen_t = UInt32 + +const __darwin_time_t = Clong + +const time_t = __darwin_time_t + +mutable struct fd_set + fds_bits::NTuple{32, Int32} + fd_set() = new() +end + +const sa_family_t = UInt8 + +const socklen_t = __darwin_socklen_t + +struct sockaddr + sa_len::UInt8 + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_40}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_18::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_19::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_20::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_21::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_39}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_39 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_39}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_39, f::Symbol) + r = Ref{__JL_Ctag_39}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_39}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_39}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_40 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_40() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_40}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_40, f::Symbol) + r = Ref{__JL_Ctag_40}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_40}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_40}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/aarch64-linux-gnu.jl b/lib/aarch64-linux-gnu.jl new file mode 100644 index 0000000..77ed3e0 --- /dev/null +++ b/lib/aarch64-linux-gnu.jl @@ -0,0 +1,2087 @@ +const __time_t = Clong + +const __socklen_t = Cuint + +const time_t = __time_t + +const __fd_mask = Clong + +mutable struct fd_set + __fds_bits::NTuple{16, __fd_mask} + fd_set() = new() +end + +const socklen_t = __socklen_t + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_55}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_33::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_34::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_35::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_36::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_54}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_54 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_54}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_54, f::Symbol) + r = Ref{__JL_Ctag_54}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_54}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_54}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_55 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_55() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_55}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_55, f::Symbol) + r = Ref{__JL_Ctag_55}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_55}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_55}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/aarch64-linux-musl.jl b/lib/aarch64-linux-musl.jl new file mode 100644 index 0000000..fe7f516 --- /dev/null +++ b/lib/aarch64-linux-musl.jl @@ -0,0 +1,2081 @@ +const time_t = Clong + +mutable struct fd_set + fds_bits::NTuple{16, Culong} + fd_set() = new() +end + +const socklen_t = Cuint + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_48}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_26::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_27::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_28::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_29::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_47}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_47 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_47}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_47, f::Symbol) + r = Ref{__JL_Ctag_47}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_47}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_47}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_48 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_48() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_48}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_48, f::Symbol) + r = Ref{__JL_Ctag_48}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_48}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_48}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/armv7l-linux-gnueabihf.jl b/lib/armv7l-linux-gnueabihf.jl new file mode 100644 index 0000000..f31368f --- /dev/null +++ b/lib/armv7l-linux-gnueabihf.jl @@ -0,0 +1,2087 @@ +const __time_t = Clong + +const __socklen_t = Cuint + +const time_t = __time_t + +const __fd_mask = Clong + +mutable struct fd_set + __fds_bits::NTuple{32, __fd_mask} + fd_set() = new() +end + +const socklen_t = __socklen_t + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clonglong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{72, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 4) + f === :time && return Ptr{time_t}(x + 8) + f === :perm && return Ptr{Cuint}(x + 12) + f === :uid && return Ptr{Cint}(x + 16) + f === :gid && return Ptr{Cint}(x + 20) + f === :size && return Ptr{curl_off_t}(x + 24) + f === :hardlinks && return Ptr{Clong}(x + 32) + f === :strings && return Ptr{__JL_Ctag_55}(x + 36) + f === :flags && return Ptr{Cuint}(x + 56) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 60) + f === :b_size && return Ptr{Csize_t}(x + 64) + f === :b_used && return Ptr{Csize_t}(x + 68) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_33::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_34::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_35::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_36::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{12, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 4) + f === :data && return Ptr{__JL_Ctag_54}(x + 8) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_54 + data::NTuple{4, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_54}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_54, f::Symbol) + r = Ref{__JL_Ctag_54}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_54}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_54}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_55 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_55() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_55}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 4) + f === :user && return Ptr{Ptr{Cchar}}(x + 8) + f === :group && return Ptr{Ptr{Cchar}}(x + 12) + f === :target && return Ptr{Ptr{Cchar}}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_55, f::Symbol) + r = Ref{__JL_Ctag_55}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_55}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_55}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clonglong + +const CURL_FORMAT_CURL_OFF_T = "lld" + +const CURL_FORMAT_CURL_OFF_TU = "llu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/armv7l-linux-musleabihf.jl b/lib/armv7l-linux-musleabihf.jl new file mode 100644 index 0000000..df70fbd --- /dev/null +++ b/lib/armv7l-linux-musleabihf.jl @@ -0,0 +1,2081 @@ +const time_t = Clong + +mutable struct fd_set + fds_bits::NTuple{32, Culong} + fd_set() = new() +end + +const socklen_t = Cuint + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clonglong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{72, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 4) + f === :time && return Ptr{time_t}(x + 8) + f === :perm && return Ptr{Cuint}(x + 12) + f === :uid && return Ptr{Cint}(x + 16) + f === :gid && return Ptr{Cint}(x + 20) + f === :size && return Ptr{curl_off_t}(x + 24) + f === :hardlinks && return Ptr{Clong}(x + 32) + f === :strings && return Ptr{__JL_Ctag_48}(x + 36) + f === :flags && return Ptr{Cuint}(x + 56) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 60) + f === :b_size && return Ptr{Csize_t}(x + 64) + f === :b_used && return Ptr{Csize_t}(x + 68) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_26::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_27::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_28::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_29::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{12, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 4) + f === :data && return Ptr{__JL_Ctag_47}(x + 8) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_47 + data::NTuple{4, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_47}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_47, f::Symbol) + r = Ref{__JL_Ctag_47}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_47}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_47}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_48 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_48() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_48}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 4) + f === :user && return Ptr{Ptr{Cchar}}(x + 8) + f === :group && return Ptr{Ptr{Cchar}}(x + 12) + f === :target && return Ptr{Ptr{Cchar}}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_48, f::Symbol) + r = Ref{__JL_Ctag_48}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_48}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_48}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clonglong + +const CURL_FORMAT_CURL_OFF_T = "lld" + +const CURL_FORMAT_CURL_OFF_TU = "llu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/i686-linux-gnu.jl b/lib/i686-linux-gnu.jl new file mode 100644 index 0000000..6096a15 --- /dev/null +++ b/lib/i686-linux-gnu.jl @@ -0,0 +1,2087 @@ +const __time_t = Clong + +const __socklen_t = Cuint + +const time_t = __time_t + +const __fd_mask = Clong + +mutable struct fd_set + __fds_bits::NTuple{32, __fd_mask} + fd_set() = new() +end + +const socklen_t = __socklen_t + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clonglong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{72, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 4) + f === :time && return Ptr{time_t}(x + 8) + f === :perm && return Ptr{Cuint}(x + 12) + f === :uid && return Ptr{Cint}(x + 16) + f === :gid && return Ptr{Cint}(x + 20) + f === :size && return Ptr{curl_off_t}(x + 24) + f === :hardlinks && return Ptr{Clong}(x + 32) + f === :strings && return Ptr{__JL_Ctag_56}(x + 36) + f === :flags && return Ptr{Cuint}(x + 56) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 60) + f === :b_size && return Ptr{Csize_t}(x + 64) + f === :b_used && return Ptr{Csize_t}(x + 68) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_34::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_35::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_36::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_37::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{12, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 4) + f === :data && return Ptr{__JL_Ctag_55}(x + 8) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_55 + data::NTuple{4, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_55}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_55, f::Symbol) + r = Ref{__JL_Ctag_55}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_55}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_55}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_56 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_56() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_56}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 4) + f === :user && return Ptr{Ptr{Cchar}}(x + 8) + f === :group && return Ptr{Ptr{Cchar}}(x + 12) + f === :target && return Ptr{Ptr{Cchar}}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_56, f::Symbol) + r = Ref{__JL_Ctag_56}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_56}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_56}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clonglong + +const CURL_FORMAT_CURL_OFF_T = "lld" + +const CURL_FORMAT_CURL_OFF_TU = "llu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/i686-linux-musl.jl b/lib/i686-linux-musl.jl new file mode 100644 index 0000000..df70fbd --- /dev/null +++ b/lib/i686-linux-musl.jl @@ -0,0 +1,2081 @@ +const time_t = Clong + +mutable struct fd_set + fds_bits::NTuple{32, Culong} + fd_set() = new() +end + +const socklen_t = Cuint + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clonglong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{72, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 4) + f === :time && return Ptr{time_t}(x + 8) + f === :perm && return Ptr{Cuint}(x + 12) + f === :uid && return Ptr{Cint}(x + 16) + f === :gid && return Ptr{Cint}(x + 20) + f === :size && return Ptr{curl_off_t}(x + 24) + f === :hardlinks && return Ptr{Clong}(x + 32) + f === :strings && return Ptr{__JL_Ctag_48}(x + 36) + f === :flags && return Ptr{Cuint}(x + 56) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 60) + f === :b_size && return Ptr{Csize_t}(x + 64) + f === :b_used && return Ptr{Csize_t}(x + 68) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_26::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_27::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_28::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_29::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{12, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 4) + f === :data && return Ptr{__JL_Ctag_47}(x + 8) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_47 + data::NTuple{4, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_47}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_47, f::Symbol) + r = Ref{__JL_Ctag_47}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_47}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_47}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_48 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_48() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_48}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 4) + f === :user && return Ptr{Ptr{Cchar}}(x + 8) + f === :group && return Ptr{Ptr{Cchar}}(x + 12) + f === :target && return Ptr{Ptr{Cchar}}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_48, f::Symbol) + r = Ref{__JL_Ctag_48}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_48}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_48}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clonglong + +const CURL_FORMAT_CURL_OFF_T = "lld" + +const CURL_FORMAT_CURL_OFF_TU = "llu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/i686-w64-mingw32.jl b/lib/i686-w64-mingw32.jl new file mode 100644 index 0000000..95e9652 --- /dev/null +++ b/lib/i686-w64-mingw32.jl @@ -0,0 +1,2092 @@ +const __time32_t = Clong + +const time_t = __time32_t + +const UINT_PTR = Cuint + +const u_short = Cushort + +const u_int = Cuint + +const SOCKET = UINT_PTR + +mutable struct fd_set + fd_count::u_int + fd_array::NTuple{64, SOCKET} + fd_set() = new() +end + +struct sockaddr + sa_family::u_short + sa_data::NTuple{14, Cchar} +end + +const socklen_t = Cint + +const curl_socklen_t = socklen_t + +const curl_off_t = Clonglong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = SOCKET + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{72, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 4) + f === :time && return Ptr{time_t}(x + 8) + f === :perm && return Ptr{Cuint}(x + 12) + f === :uid && return Ptr{Cint}(x + 16) + f === :gid && return Ptr{Cint}(x + 20) + f === :size && return Ptr{curl_off_t}(x + 24) + f === :hardlinks && return Ptr{Clong}(x + 32) + f === :strings && return Ptr{__JL_Ctag_145}(x + 36) + f === :flags && return Ptr{Cuint}(x + 56) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 60) + f === :b_size && return Ptr{Csize_t}(x + 64) + f === :b_used && return Ptr{Csize_t}(x + 68) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_123::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_124::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_125::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_126::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{12, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 4) + f === :data && return Ptr{__JL_Ctag_144}(x + 8) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_144 + data::NTuple{4, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_144}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_144, f::Symbol) + r = Ref{__JL_Ctag_144}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_144}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_144}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_145 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_145() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_145}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 4) + f === :user && return Ptr{Ptr{Cchar}}(x + 8) + f === :group && return Ptr{Ptr{Cchar}}(x + 12) + f === :target && return Ptr{Ptr{Cchar}}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_145, f::Symbol) + r = Ref{__JL_Ctag_145}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_145}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_145}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clonglong + +const CURL_FORMAT_CURL_OFF_T = "I64d" + +const CURL_FORMAT_CURL_OFF_TU = "I64u" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_EXTERN = __declspec(dllimport) + +const CURL_SOCKET_BAD = INVALID_SOCKET + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/powerpc64le-linux-gnu.jl b/lib/powerpc64le-linux-gnu.jl new file mode 100644 index 0000000..77ed3e0 --- /dev/null +++ b/lib/powerpc64le-linux-gnu.jl @@ -0,0 +1,2087 @@ +const __time_t = Clong + +const __socklen_t = Cuint + +const time_t = __time_t + +const __fd_mask = Clong + +mutable struct fd_set + __fds_bits::NTuple{16, __fd_mask} + fd_set() = new() +end + +const socklen_t = __socklen_t + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_55}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_33::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_34::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_35::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_36::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_54}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_54 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_54}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_54, f::Symbol) + r = Ref{__JL_Ctag_54}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_54}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_54}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_55 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_55() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_55}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_55, f::Symbol) + r = Ref{__JL_Ctag_55}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_55}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_55}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/x86_64-apple-darwin14.jl b/lib/x86_64-apple-darwin14.jl new file mode 100644 index 0000000..e22905d --- /dev/null +++ b/lib/x86_64-apple-darwin14.jl @@ -0,0 +1,2086 @@ +const __darwin_socklen_t = UInt32 + +const __darwin_time_t = Clong + +const time_t = __darwin_time_t + +mutable struct fd_set + fds_bits::NTuple{32, Int32} + fd_set() = new() +end + +const sa_family_t = UInt8 + +const socklen_t = __darwin_socklen_t + +struct sockaddr + sa_len::UInt8 + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_40}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_18::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_19::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_20::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_21::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_39}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_39 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_39}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_39, f::Symbol) + r = Ref{__JL_Ctag_39}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_39}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_39}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_40 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_40() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_40}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_40, f::Symbol) + r = Ref{__JL_Ctag_40}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_40}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_40}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/x86_64-linux-gnu.jl b/lib/x86_64-linux-gnu.jl new file mode 100644 index 0000000..321e1ea --- /dev/null +++ b/lib/x86_64-linux-gnu.jl @@ -0,0 +1,2087 @@ +const __time_t = Clong + +const __socklen_t = Cuint + +const time_t = __time_t + +const __fd_mask = Clong + +mutable struct fd_set + __fds_bits::NTuple{16, __fd_mask} + fd_set() = new() +end + +const socklen_t = __socklen_t + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_56}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_34::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_35::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_36::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_37::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_55}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_55 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_55}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_55, f::Symbol) + r = Ref{__JL_Ctag_55}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_55}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_55}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_56 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_56() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_56}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_56, f::Symbol) + r = Ref{__JL_Ctag_56}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_56}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_56}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/x86_64-linux-musl.jl b/lib/x86_64-linux-musl.jl new file mode 100644 index 0000000..fe7f516 --- /dev/null +++ b/lib/x86_64-linux-musl.jl @@ -0,0 +1,2081 @@ +const time_t = Clong + +mutable struct fd_set + fds_bits::NTuple{16, Culong} + fd_set() = new() +end + +const socklen_t = Cuint + +const sa_family_t = Cushort + +struct sockaddr + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_48}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_26::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_27::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_28::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_29::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_47}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_47 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_47}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_47, f::Symbol) + r = Ref{__JL_Ctag_47}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_47}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_47}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_48 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_48() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_48}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_48, f::Symbol) + r = Ref{__JL_Ctag_48}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_48}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_48}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/x86_64-unknown-freebsd11.1.jl b/lib/x86_64-unknown-freebsd11.1.jl new file mode 100644 index 0000000..efa6c36 --- /dev/null +++ b/lib/x86_64-unknown-freebsd11.1.jl @@ -0,0 +1,2090 @@ +const __time_t = Int64 + +const __sa_family_t = UInt8 + +const __socklen_t = UInt32 + +const time_t = __time_t + +const __fd_mask = Culong + +mutable struct fd_set + __fds_bits::NTuple{16, __fd_mask} + fd_set() = new() +end + +const sa_family_t = __sa_family_t + +const socklen_t = __socklen_t + +struct sockaddr + sa_len::Cuchar + sa_family::sa_family_t + sa_data::NTuple{14, Cchar} +end + +const curl_socklen_t = socklen_t + +const curl_off_t = Clong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = Cint + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_41}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_19::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_20::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_21::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_22::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_40}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_40 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_40}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_40, f::Symbol) + r = Ref{__JL_Ctag_40}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_40}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_40}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_41 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_41() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_41}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_41, f::Symbol) + r = Ref{__JL_Ctag_41}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_41}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_41}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clong + +const CURL_FORMAT_CURL_OFF_T = "ld" + +const CURL_FORMAT_CURL_OFF_TU = "lu" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_SOCKET_BAD = -1 + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/lib/x86_64-w64-mingw32.jl b/lib/x86_64-w64-mingw32.jl new file mode 100644 index 0000000..6da8c89 --- /dev/null +++ b/lib/x86_64-w64-mingw32.jl @@ -0,0 +1,2092 @@ +const __time64_t = Clonglong + +const time_t = __time64_t + +const UINT_PTR = Culonglong + +const u_short = Cushort + +const u_int = Cuint + +const SOCKET = UINT_PTR + +mutable struct fd_set + fd_count::u_int + fd_array::NTuple{64, SOCKET} + fd_set() = new() +end + +struct sockaddr + sa_family::u_short + sa_data::NTuple{14, Cchar} +end + +const socklen_t = Cint + +const curl_socklen_t = socklen_t + +const curl_off_t = Clonglong + +const CURL = Cvoid + +const CURLSH = Cvoid + +const curl_socket_t = SOCKET + +@enum curl_sslbackend::UInt32 begin + CURLSSLBACKEND_NONE = 0 + CURLSSLBACKEND_OPENSSL = 1 + CURLSSLBACKEND_GNUTLS = 2 + CURLSSLBACKEND_NSS = 3 + CURLSSLBACKEND_OBSOLETE4 = 4 + CURLSSLBACKEND_GSKIT = 5 + CURLSSLBACKEND_POLARSSL = 6 + CURLSSLBACKEND_WOLFSSL = 7 + CURLSSLBACKEND_SCHANNEL = 8 + CURLSSLBACKEND_SECURETRANSPORT = 9 + CURLSSLBACKEND_AXTLS = 10 + CURLSSLBACKEND_MBEDTLS = 11 + CURLSSLBACKEND_MESALINK = 12 + CURLSSLBACKEND_BEARSSL = 13 +end + +struct curl_httppost + next::Ptr{curl_httppost} + name::Ptr{Cchar} + namelength::Clong + contents::Ptr{Cchar} + contentslength::Clong + buffer::Ptr{Cchar} + bufferlength::Clong + contenttype::Ptr{Cchar} + # contentheader::Ptr{curl_slist} + contentheader::Ptr{Cvoid} + more::Ptr{curl_httppost} + flags::Clong + showfilename::Ptr{Cchar} + userp::Ptr{Cvoid} + contentlen::curl_off_t +end + +function Base.getproperty(x::curl_httppost, f::Symbol) + f === :contentheader && return Ptr{curl_slist}(getfield(x, f)) + return getfield(x, f) +end + +# typedef int ( * curl_progress_callback ) ( void * clientp , double dltotal , double dlnow , double ultotal , double ulnow ) +const curl_progress_callback = Ptr{Cvoid} + +# typedef int ( * curl_xferinfo_callback ) ( void * clientp , curl_off_t dltotal , curl_off_t dlnow , curl_off_t ultotal , curl_off_t ulnow ) +const curl_xferinfo_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_write_callback ) ( char * buffer , size_t size , size_t nitems , void * outstream ) +const curl_write_callback = Ptr{Cvoid} + +# typedef int ( * curl_resolver_start_callback ) ( void * resolver_state , void * reserved , void * userdata ) +const curl_resolver_start_callback = Ptr{Cvoid} + +@enum curlfiletype::UInt32 begin + CURLFILETYPE_FILE = 0 + CURLFILETYPE_DIRECTORY = 1 + CURLFILETYPE_SYMLINK = 2 + CURLFILETYPE_DEVICE_BLOCK = 3 + CURLFILETYPE_DEVICE_CHAR = 4 + CURLFILETYPE_NAMEDPIPE = 5 + CURLFILETYPE_SOCKET = 6 + CURLFILETYPE_DOOR = 7 + CURLFILETYPE_UNKNOWN = 8 +end + +struct curl_fileinfo + data::NTuple{128, UInt8} +end + +function Base.getproperty(x::Ptr{curl_fileinfo}, f::Symbol) + f === :filename && return Ptr{Ptr{Cchar}}(x + 0) + f === :filetype && return Ptr{curlfiletype}(x + 8) + f === :time && return Ptr{time_t}(x + 16) + f === :perm && return Ptr{Cuint}(x + 24) + f === :uid && return Ptr{Cint}(x + 28) + f === :gid && return Ptr{Cint}(x + 32) + f === :size && return Ptr{curl_off_t}(x + 40) + f === :hardlinks && return Ptr{Clong}(x + 48) + f === :strings && return Ptr{__JL_Ctag_146}(x + 56) + f === :flags && return Ptr{Cuint}(x + 96) + f === :b_data && return Ptr{Ptr{Cchar}}(x + 104) + f === :b_size && return Ptr{Csize_t}(x + 112) + f === :b_used && return Ptr{Csize_t}(x + 120) + return getfield(x, f) +end + +function Base.getproperty(x::curl_fileinfo, f::Symbol) + r = Ref{curl_fileinfo}(x) + ptr = Base.unsafe_convert(Ptr{curl_fileinfo}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{curl_fileinfo}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +# typedef long ( * curl_chunk_bgn_callback ) ( const void * transfer_info , void * ptr , int remains ) +const curl_chunk_bgn_callback = Ptr{Cvoid} + +# typedef long ( * curl_chunk_end_callback ) ( void * ptr ) +const curl_chunk_end_callback = Ptr{Cvoid} + +# typedef int ( * curl_fnmatch_callback ) ( void * ptr , const char * pattern , const char * string ) +const curl_fnmatch_callback = Ptr{Cvoid} + +# typedef int ( * curl_seek_callback ) ( void * instream , curl_off_t offset , int origin ) +const curl_seek_callback = Ptr{Cvoid} + +# typedef size_t ( * curl_read_callback ) ( char * buffer , size_t size , size_t nitems , void * instream ) +const curl_read_callback = Ptr{Cvoid} + +# typedef int ( * curl_trailer_callback ) ( struct curl_slist * * list , void * userdata ) +const curl_trailer_callback = Ptr{Cvoid} + +@enum curlsocktype::UInt32 begin + CURLSOCKTYPE_IPCXN = 0 + CURLSOCKTYPE_ACCEPT = 1 + CURLSOCKTYPE_LAST = 2 +end + +# typedef int ( * curl_sockopt_callback ) ( void * clientp , curl_socket_t curlfd , curlsocktype purpose ) +const curl_sockopt_callback = Ptr{Cvoid} + +mutable struct curl_sockaddr + family::Cint + socktype::Cint + protocol::Cint + addrlen::Cuint + addr::sockaddr + curl_sockaddr() = new() +end + +# typedef curl_socket_t ( * curl_opensocket_callback ) ( void * clientp , curlsocktype purpose , struct curl_sockaddr * address ) +const curl_opensocket_callback = Ptr{Cvoid} + +# typedef int ( * curl_closesocket_callback ) ( void * clientp , curl_socket_t item ) +const curl_closesocket_callback = Ptr{Cvoid} + +@enum curlioerr::UInt32 begin + CURLIOE_OK = 0 + CURLIOE_UNKNOWNCMD = 1 + CURLIOE_FAILRESTART = 2 + CURLIOE_LAST = 3 +end + +@enum curliocmd::UInt32 begin + CURLIOCMD_NOP = 0 + CURLIOCMD_RESTARTREAD = 1 + CURLIOCMD_LAST = 2 +end + +# typedef curlioerr ( * curl_ioctl_callback ) ( CURL * handle , int cmd , void * clientp ) +const curl_ioctl_callback = Ptr{Cvoid} + +# typedef void * ( * curl_malloc_callback ) ( size_t size ) +const curl_malloc_callback = Ptr{Cvoid} + +# typedef void ( * curl_free_callback ) ( void * ptr ) +const curl_free_callback = Ptr{Cvoid} + +# typedef void * ( * curl_realloc_callback ) ( void * ptr , size_t size ) +const curl_realloc_callback = Ptr{Cvoid} + +# typedef char * ( * curl_strdup_callback ) ( const char * str ) +const curl_strdup_callback = Ptr{Cvoid} + +# typedef void * ( * curl_calloc_callback ) ( size_t nmemb , size_t size ) +const curl_calloc_callback = Ptr{Cvoid} + +@enum curl_infotype::UInt32 begin + CURLINFO_TEXT = 0 + CURLINFO_HEADER_IN = 1 + CURLINFO_HEADER_OUT = 2 + CURLINFO_DATA_IN = 3 + CURLINFO_DATA_OUT = 4 + CURLINFO_SSL_DATA_IN = 5 + CURLINFO_SSL_DATA_OUT = 6 + CURLINFO_END = 7 +end + +# typedef int ( * curl_debug_callback ) ( CURL * handle , /* the handle/transfer this concerns */ curl_infotype type , /* what kind of data */ char * data , /* points to the data */ size_t size , /* size of the data pointed to */ void * userptr ) +const curl_debug_callback = Ptr{Cvoid} + +@enum CURLcode::UInt32 begin + CURLE_OK = 0 + CURLE_UNSUPPORTED_PROTOCOL = 1 + CURLE_FAILED_INIT = 2 + CURLE_URL_MALFORMAT = 3 + CURLE_NOT_BUILT_IN = 4 + CURLE_COULDNT_RESOLVE_PROXY = 5 + CURLE_COULDNT_RESOLVE_HOST = 6 + CURLE_COULDNT_CONNECT = 7 + CURLE_WEIRD_SERVER_REPLY = 8 + CURLE_REMOTE_ACCESS_DENIED = 9 + CURLE_FTP_ACCEPT_FAILED = 10 + CURLE_FTP_WEIRD_PASS_REPLY = 11 + CURLE_FTP_ACCEPT_TIMEOUT = 12 + CURLE_FTP_WEIRD_PASV_REPLY = 13 + CURLE_FTP_WEIRD_227_FORMAT = 14 + CURLE_FTP_CANT_GET_HOST = 15 + CURLE_HTTP2 = 16 + CURLE_FTP_COULDNT_SET_TYPE = 17 + CURLE_PARTIAL_FILE = 18 + CURLE_FTP_COULDNT_RETR_FILE = 19 + CURLE_OBSOLETE20 = 20 + CURLE_QUOTE_ERROR = 21 + CURLE_HTTP_RETURNED_ERROR = 22 + CURLE_WRITE_ERROR = 23 + CURLE_OBSOLETE24 = 24 + CURLE_UPLOAD_FAILED = 25 + CURLE_READ_ERROR = 26 + CURLE_OUT_OF_MEMORY = 27 + CURLE_OPERATION_TIMEDOUT = 28 + CURLE_OBSOLETE29 = 29 + CURLE_FTP_PORT_FAILED = 30 + CURLE_FTP_COULDNT_USE_REST = 31 + CURLE_OBSOLETE32 = 32 + CURLE_RANGE_ERROR = 33 + CURLE_HTTP_POST_ERROR = 34 + CURLE_SSL_CONNECT_ERROR = 35 + CURLE_BAD_DOWNLOAD_RESUME = 36 + CURLE_FILE_COULDNT_READ_FILE = 37 + CURLE_LDAP_CANNOT_BIND = 38 + CURLE_LDAP_SEARCH_FAILED = 39 + CURLE_OBSOLETE40 = 40 + CURLE_FUNCTION_NOT_FOUND = 41 + CURLE_ABORTED_BY_CALLBACK = 42 + CURLE_BAD_FUNCTION_ARGUMENT = 43 + CURLE_OBSOLETE44 = 44 + CURLE_INTERFACE_FAILED = 45 + CURLE_OBSOLETE46 = 46 + CURLE_TOO_MANY_REDIRECTS = 47 + CURLE_UNKNOWN_OPTION = 48 + CURLE_TELNET_OPTION_SYNTAX = 49 + CURLE_OBSOLETE50 = 50 + CURLE_OBSOLETE51 = 51 + CURLE_GOT_NOTHING = 52 + CURLE_SSL_ENGINE_NOTFOUND = 53 + CURLE_SSL_ENGINE_SETFAILED = 54 + CURLE_SEND_ERROR = 55 + CURLE_RECV_ERROR = 56 + CURLE_OBSOLETE57 = 57 + CURLE_SSL_CERTPROBLEM = 58 + CURLE_SSL_CIPHER = 59 + CURLE_PEER_FAILED_VERIFICATION = 60 + CURLE_BAD_CONTENT_ENCODING = 61 + CURLE_LDAP_INVALID_URL = 62 + CURLE_FILESIZE_EXCEEDED = 63 + CURLE_USE_SSL_FAILED = 64 + CURLE_SEND_FAIL_REWIND = 65 + CURLE_SSL_ENGINE_INITFAILED = 66 + CURLE_LOGIN_DENIED = 67 + CURLE_TFTP_NOTFOUND = 68 + CURLE_TFTP_PERM = 69 + CURLE_REMOTE_DISK_FULL = 70 + CURLE_TFTP_ILLEGAL = 71 + CURLE_TFTP_UNKNOWNID = 72 + CURLE_REMOTE_FILE_EXISTS = 73 + CURLE_TFTP_NOSUCHUSER = 74 + CURLE_CONV_FAILED = 75 + CURLE_CONV_REQD = 76 + CURLE_SSL_CACERT_BADFILE = 77 + CURLE_REMOTE_FILE_NOT_FOUND = 78 + CURLE_SSH = 79 + CURLE_SSL_SHUTDOWN_FAILED = 80 + CURLE_AGAIN = 81 + CURLE_SSL_CRL_BADFILE = 82 + CURLE_SSL_ISSUER_ERROR = 83 + CURLE_FTP_PRET_FAILED = 84 + CURLE_RTSP_CSEQ_ERROR = 85 + CURLE_RTSP_SESSION_ERROR = 86 + CURLE_FTP_BAD_FILE_LIST = 87 + CURLE_CHUNK_FAILED = 88 + CURLE_NO_CONNECTION_AVAILABLE = 89 + CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90 + CURLE_SSL_INVALIDCERTSTATUS = 91 + CURLE_HTTP2_STREAM = 92 + CURLE_RECURSIVE_API_CALL = 93 + CURLE_AUTH_ERROR = 94 + CURLE_HTTP3 = 95 + CURLE_QUIC_CONNECT_ERROR = 96 + CURLE_PROXY = 97 + CURL_LAST = 98 +end + +@enum CURLproxycode::UInt32 begin + CURLPX_OK = 0 + CURLPX_BAD_ADDRESS_TYPE = 1 + CURLPX_BAD_VERSION = 2 + CURLPX_CLOSED = 3 + CURLPX_GSSAPI = 4 + CURLPX_GSSAPI_PERMSG = 5 + CURLPX_GSSAPI_PROTECTION = 6 + CURLPX_IDENTD = 7 + CURLPX_IDENTD_DIFFER = 8 + CURLPX_LONG_HOSTNAME = 9 + CURLPX_LONG_PASSWD = 10 + CURLPX_LONG_USER = 11 + CURLPX_NO_AUTH = 12 + CURLPX_RECV_ADDRESS = 13 + CURLPX_RECV_AUTH = 14 + CURLPX_RECV_CONNECT = 15 + CURLPX_RECV_REQACK = 16 + CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED = 17 + CURLPX_REPLY_COMMAND_NOT_SUPPORTED = 18 + CURLPX_REPLY_CONNECTION_REFUSED = 19 + CURLPX_REPLY_GENERAL_SERVER_FAILURE = 20 + CURLPX_REPLY_HOST_UNREACHABLE = 21 + CURLPX_REPLY_NETWORK_UNREACHABLE = 22 + CURLPX_REPLY_NOT_ALLOWED = 23 + CURLPX_REPLY_TTL_EXPIRED = 24 + CURLPX_REPLY_UNASSIGNED = 25 + CURLPX_REQUEST_FAILED = 26 + CURLPX_RESOLVE_HOST = 27 + CURLPX_SEND_AUTH = 28 + CURLPX_SEND_CONNECT = 29 + CURLPX_SEND_REQUEST = 30 + CURLPX_UNKNOWN_FAIL = 31 + CURLPX_UNKNOWN_MODE = 32 + CURLPX_USER_REJECTED = 33 + CURLPX_LAST = 34 +end + +# typedef CURLcode ( * curl_conv_callback ) ( char * buffer , size_t length ) +const curl_conv_callback = Ptr{Cvoid} + +# typedef CURLcode ( * curl_ssl_ctx_callback ) ( CURL * curl , /* easy handle */ void * ssl_ctx , /* actually an OpenSSL +# or WolfSSL SSL_CTX, +# or an mbedTLS +# mbedtls_ssl_config */ void * userptr ) +const curl_ssl_ctx_callback = Ptr{Cvoid} + +@enum curl_proxytype::UInt32 begin + CURLPROXY_HTTP = 0 + CURLPROXY_HTTP_1_0 = 1 + CURLPROXY_HTTPS = 2 + CURLPROXY_SOCKS4 = 4 + CURLPROXY_SOCKS5 = 5 + CURLPROXY_SOCKS4A = 6 + CURLPROXY_SOCKS5_HOSTNAME = 7 +end + +@enum curl_khtype::UInt32 begin + CURLKHTYPE_UNKNOWN = 0 + CURLKHTYPE_RSA1 = 1 + CURLKHTYPE_RSA = 2 + CURLKHTYPE_DSS = 3 + CURLKHTYPE_ECDSA = 4 + CURLKHTYPE_ED25519 = 5 +end + +mutable struct curl_khkey + key::Ptr{Cchar} + len::Csize_t + keytype::curl_khtype + curl_khkey() = new() +end + +@enum curl_khstat::UInt32 begin + CURLKHSTAT_FINE_ADD_TO_FILE = 0 + CURLKHSTAT_FINE = 1 + CURLKHSTAT_REJECT = 2 + CURLKHSTAT_DEFER = 3 + CURLKHSTAT_FINE_REPLACE = 4 + CURLKHSTAT_LAST = 5 +end + +@enum curl_khmatch::UInt32 begin + CURLKHMATCH_OK = 0 + CURLKHMATCH_MISMATCH = 1 + CURLKHMATCH_MISSING = 2 + CURLKHMATCH_LAST = 3 +end + +# typedef int ( * curl_sshkeycallback ) ( CURL * easy , /* easy handle */ const struct curl_khkey * knownkey , /* known */ const struct curl_khkey * foundkey , /* found */ enum curl_khmatch , /* libcurl's view on the keys */ void * clientp ) +const curl_sshkeycallback = Ptr{Cvoid} + +@enum curl_usessl::UInt32 begin + CURLUSESSL_NONE = 0 + CURLUSESSL_TRY = 1 + CURLUSESSL_CONTROL = 2 + CURLUSESSL_ALL = 3 + CURLUSESSL_LAST = 4 +end + +@enum curl_ftpccc::UInt32 begin + CURLFTPSSL_CCC_NONE = 0 + CURLFTPSSL_CCC_PASSIVE = 1 + CURLFTPSSL_CCC_ACTIVE = 2 + CURLFTPSSL_CCC_LAST = 3 +end + +@enum curl_ftpauth::UInt32 begin + CURLFTPAUTH_DEFAULT = 0 + CURLFTPAUTH_SSL = 1 + CURLFTPAUTH_TLS = 2 + CURLFTPAUTH_LAST = 3 +end + +@enum curl_ftpcreatedir::UInt32 begin + CURLFTP_CREATE_DIR_NONE = 0 + CURLFTP_CREATE_DIR = 1 + CURLFTP_CREATE_DIR_RETRY = 2 + CURLFTP_CREATE_DIR_LAST = 3 +end + +@enum curl_ftpmethod::UInt32 begin + CURLFTPMETHOD_DEFAULT = 0 + CURLFTPMETHOD_MULTICWD = 1 + CURLFTPMETHOD_NOCWD = 2 + CURLFTPMETHOD_SINGLECWD = 3 + CURLFTPMETHOD_LAST = 4 +end + +@enum CURLoption::UInt32 begin + CURLOPT_WRITEDATA = 10001 + CURLOPT_URL = 10002 + CURLOPT_PORT = 3 + CURLOPT_PROXY = 10004 + CURLOPT_USERPWD = 10005 + CURLOPT_PROXYUSERPWD = 10006 + CURLOPT_RANGE = 10007 + CURLOPT_READDATA = 10009 + CURLOPT_ERRORBUFFER = 10010 + CURLOPT_WRITEFUNCTION = 20011 + CURLOPT_READFUNCTION = 20012 + CURLOPT_TIMEOUT = 13 + CURLOPT_INFILESIZE = 14 + CURLOPT_POSTFIELDS = 10015 + CURLOPT_REFERER = 10016 + CURLOPT_FTPPORT = 10017 + CURLOPT_USERAGENT = 10018 + CURLOPT_LOW_SPEED_LIMIT = 19 + CURLOPT_LOW_SPEED_TIME = 20 + CURLOPT_RESUME_FROM = 21 + CURLOPT_COOKIE = 10022 + CURLOPT_HTTPHEADER = 10023 + CURLOPT_HTTPPOST = 10024 + CURLOPT_SSLCERT = 10025 + CURLOPT_KEYPASSWD = 10026 + CURLOPT_CRLF = 27 + CURLOPT_QUOTE = 10028 + CURLOPT_HEADERDATA = 10029 + CURLOPT_COOKIEFILE = 10031 + CURLOPT_SSLVERSION = 32 + CURLOPT_TIMECONDITION = 33 + CURLOPT_TIMEVALUE = 34 + CURLOPT_CUSTOMREQUEST = 10036 + CURLOPT_STDERR = 10037 + CURLOPT_POSTQUOTE = 10039 + CURLOPT_OBSOLETE40 = 10040 + CURLOPT_VERBOSE = 41 + CURLOPT_HEADER = 42 + CURLOPT_NOPROGRESS = 43 + CURLOPT_NOBODY = 44 + CURLOPT_FAILONERROR = 45 + CURLOPT_UPLOAD = 46 + CURLOPT_POST = 47 + CURLOPT_DIRLISTONLY = 48 + CURLOPT_APPEND = 50 + CURLOPT_NETRC = 51 + CURLOPT_FOLLOWLOCATION = 52 + CURLOPT_TRANSFERTEXT = 53 + CURLOPT_PUT = 54 + CURLOPT_PROGRESSFUNCTION = 20056 + CURLOPT_XFERINFODATA = 10057 + CURLOPT_AUTOREFERER = 58 + CURLOPT_PROXYPORT = 59 + CURLOPT_POSTFIELDSIZE = 60 + CURLOPT_HTTPPROXYTUNNEL = 61 + CURLOPT_INTERFACE = 10062 + CURLOPT_KRBLEVEL = 10063 + CURLOPT_SSL_VERIFYPEER = 64 + CURLOPT_CAINFO = 10065 + CURLOPT_MAXREDIRS = 68 + CURLOPT_FILETIME = 69 + CURLOPT_TELNETOPTIONS = 10070 + CURLOPT_MAXCONNECTS = 71 + CURLOPT_OBSOLETE72 = 72 + CURLOPT_FRESH_CONNECT = 74 + CURLOPT_FORBID_REUSE = 75 + CURLOPT_RANDOM_FILE = 10076 + CURLOPT_EGDSOCKET = 10077 + CURLOPT_CONNECTTIMEOUT = 78 + CURLOPT_HEADERFUNCTION = 20079 + CURLOPT_HTTPGET = 80 + CURLOPT_SSL_VERIFYHOST = 81 + CURLOPT_COOKIEJAR = 10082 + CURLOPT_SSL_CIPHER_LIST = 10083 + CURLOPT_HTTP_VERSION = 84 + CURLOPT_FTP_USE_EPSV = 85 + CURLOPT_SSLCERTTYPE = 10086 + CURLOPT_SSLKEY = 10087 + CURLOPT_SSLKEYTYPE = 10088 + CURLOPT_SSLENGINE = 10089 + CURLOPT_SSLENGINE_DEFAULT = 90 + CURLOPT_DNS_USE_GLOBAL_CACHE = 91 + CURLOPT_DNS_CACHE_TIMEOUT = 92 + CURLOPT_PREQUOTE = 10093 + CURLOPT_DEBUGFUNCTION = 20094 + CURLOPT_DEBUGDATA = 10095 + CURLOPT_COOKIESESSION = 96 + CURLOPT_CAPATH = 10097 + CURLOPT_BUFFERSIZE = 98 + CURLOPT_NOSIGNAL = 99 + CURLOPT_SHARE = 10100 + CURLOPT_PROXYTYPE = 101 + CURLOPT_ACCEPT_ENCODING = 10102 + CURLOPT_PRIVATE = 10103 + CURLOPT_HTTP200ALIASES = 10104 + CURLOPT_UNRESTRICTED_AUTH = 105 + CURLOPT_FTP_USE_EPRT = 106 + CURLOPT_HTTPAUTH = 107 + CURLOPT_SSL_CTX_FUNCTION = 20108 + CURLOPT_SSL_CTX_DATA = 10109 + CURLOPT_FTP_CREATE_MISSING_DIRS = 110 + CURLOPT_PROXYAUTH = 111 + CURLOPT_FTP_RESPONSE_TIMEOUT = 112 + CURLOPT_IPRESOLVE = 113 + CURLOPT_MAXFILESIZE = 114 + CURLOPT_INFILESIZE_LARGE = 30115 + CURLOPT_RESUME_FROM_LARGE = 30116 + CURLOPT_MAXFILESIZE_LARGE = 30117 + CURLOPT_NETRC_FILE = 10118 + CURLOPT_USE_SSL = 119 + CURLOPT_POSTFIELDSIZE_LARGE = 30120 + CURLOPT_TCP_NODELAY = 121 + CURLOPT_FTPSSLAUTH = 129 + CURLOPT_IOCTLFUNCTION = 20130 + CURLOPT_IOCTLDATA = 10131 + CURLOPT_FTP_ACCOUNT = 10134 + CURLOPT_COOKIELIST = 10135 + CURLOPT_IGNORE_CONTENT_LENGTH = 136 + CURLOPT_FTP_SKIP_PASV_IP = 137 + CURLOPT_FTP_FILEMETHOD = 138 + CURLOPT_LOCALPORT = 139 + CURLOPT_LOCALPORTRANGE = 140 + CURLOPT_CONNECT_ONLY = 141 + CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142 + CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143 + CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144 + CURLOPT_MAX_SEND_SPEED_LARGE = 30145 + CURLOPT_MAX_RECV_SPEED_LARGE = 30146 + CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147 + CURLOPT_SOCKOPTFUNCTION = 20148 + CURLOPT_SOCKOPTDATA = 10149 + CURLOPT_SSL_SESSIONID_CACHE = 150 + CURLOPT_SSH_AUTH_TYPES = 151 + CURLOPT_SSH_PUBLIC_KEYFILE = 10152 + CURLOPT_SSH_PRIVATE_KEYFILE = 10153 + CURLOPT_FTP_SSL_CCC = 154 + CURLOPT_TIMEOUT_MS = 155 + CURLOPT_CONNECTTIMEOUT_MS = 156 + CURLOPT_HTTP_TRANSFER_DECODING = 157 + CURLOPT_HTTP_CONTENT_DECODING = 158 + CURLOPT_NEW_FILE_PERMS = 159 + CURLOPT_NEW_DIRECTORY_PERMS = 160 + CURLOPT_POSTREDIR = 161 + CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162 + CURLOPT_OPENSOCKETFUNCTION = 20163 + CURLOPT_OPENSOCKETDATA = 10164 + CURLOPT_COPYPOSTFIELDS = 10165 + CURLOPT_PROXY_TRANSFER_MODE = 166 + CURLOPT_SEEKFUNCTION = 20167 + CURLOPT_SEEKDATA = 10168 + CURLOPT_CRLFILE = 10169 + CURLOPT_ISSUERCERT = 10170 + CURLOPT_ADDRESS_SCOPE = 171 + CURLOPT_CERTINFO = 172 + CURLOPT_USERNAME = 10173 + CURLOPT_PASSWORD = 10174 + CURLOPT_PROXYUSERNAME = 10175 + CURLOPT_PROXYPASSWORD = 10176 + CURLOPT_NOPROXY = 10177 + CURLOPT_TFTP_BLKSIZE = 178 + CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179 + CURLOPT_SOCKS5_GSSAPI_NEC = 180 + CURLOPT_PROTOCOLS = 181 + CURLOPT_REDIR_PROTOCOLS = 182 + CURLOPT_SSH_KNOWNHOSTS = 10183 + CURLOPT_SSH_KEYFUNCTION = 20184 + CURLOPT_SSH_KEYDATA = 10185 + CURLOPT_MAIL_FROM = 10186 + CURLOPT_MAIL_RCPT = 10187 + CURLOPT_FTP_USE_PRET = 188 + CURLOPT_RTSP_REQUEST = 189 + CURLOPT_RTSP_SESSION_ID = 10190 + CURLOPT_RTSP_STREAM_URI = 10191 + CURLOPT_RTSP_TRANSPORT = 10192 + CURLOPT_RTSP_CLIENT_CSEQ = 193 + CURLOPT_RTSP_SERVER_CSEQ = 194 + CURLOPT_INTERLEAVEDATA = 10195 + CURLOPT_INTERLEAVEFUNCTION = 20196 + CURLOPT_WILDCARDMATCH = 197 + CURLOPT_CHUNK_BGN_FUNCTION = 20198 + CURLOPT_CHUNK_END_FUNCTION = 20199 + CURLOPT_FNMATCH_FUNCTION = 20200 + CURLOPT_CHUNK_DATA = 10201 + CURLOPT_FNMATCH_DATA = 10202 + CURLOPT_RESOLVE = 10203 + CURLOPT_TLSAUTH_USERNAME = 10204 + CURLOPT_TLSAUTH_PASSWORD = 10205 + CURLOPT_TLSAUTH_TYPE = 10206 + CURLOPT_TRANSFER_ENCODING = 207 + CURLOPT_CLOSESOCKETFUNCTION = 20208 + CURLOPT_CLOSESOCKETDATA = 10209 + CURLOPT_GSSAPI_DELEGATION = 210 + CURLOPT_DNS_SERVERS = 10211 + CURLOPT_ACCEPTTIMEOUT_MS = 212 + CURLOPT_TCP_KEEPALIVE = 213 + CURLOPT_TCP_KEEPIDLE = 214 + CURLOPT_TCP_KEEPINTVL = 215 + CURLOPT_SSL_OPTIONS = 216 + CURLOPT_MAIL_AUTH = 10217 + CURLOPT_SASL_IR = 218 + CURLOPT_XFERINFOFUNCTION = 20219 + CURLOPT_XOAUTH2_BEARER = 10220 + CURLOPT_DNS_INTERFACE = 10221 + CURLOPT_DNS_LOCAL_IP4 = 10222 + CURLOPT_DNS_LOCAL_IP6 = 10223 + CURLOPT_LOGIN_OPTIONS = 10224 + CURLOPT_SSL_ENABLE_NPN = 225 + CURLOPT_SSL_ENABLE_ALPN = 226 + CURLOPT_EXPECT_100_TIMEOUT_MS = 227 + CURLOPT_PROXYHEADER = 10228 + CURLOPT_HEADEROPT = 229 + CURLOPT_PINNEDPUBLICKEY = 10230 + CURLOPT_UNIX_SOCKET_PATH = 10231 + CURLOPT_SSL_VERIFYSTATUS = 232 + CURLOPT_SSL_FALSESTART = 233 + CURLOPT_PATH_AS_IS = 234 + CURLOPT_PROXY_SERVICE_NAME = 10235 + CURLOPT_SERVICE_NAME = 10236 + CURLOPT_PIPEWAIT = 237 + CURLOPT_DEFAULT_PROTOCOL = 10238 + CURLOPT_STREAM_WEIGHT = 239 + CURLOPT_STREAM_DEPENDS = 10240 + CURLOPT_STREAM_DEPENDS_E = 10241 + CURLOPT_TFTP_NO_OPTIONS = 242 + CURLOPT_CONNECT_TO = 10243 + CURLOPT_TCP_FASTOPEN = 244 + CURLOPT_KEEP_SENDING_ON_ERROR = 245 + CURLOPT_PROXY_CAINFO = 10246 + CURLOPT_PROXY_CAPATH = 10247 + CURLOPT_PROXY_SSL_VERIFYPEER = 248 + CURLOPT_PROXY_SSL_VERIFYHOST = 249 + CURLOPT_PROXY_SSLVERSION = 250 + CURLOPT_PROXY_TLSAUTH_USERNAME = 10251 + CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252 + CURLOPT_PROXY_TLSAUTH_TYPE = 10253 + CURLOPT_PROXY_SSLCERT = 10254 + CURLOPT_PROXY_SSLCERTTYPE = 10255 + CURLOPT_PROXY_SSLKEY = 10256 + CURLOPT_PROXY_SSLKEYTYPE = 10257 + CURLOPT_PROXY_KEYPASSWD = 10258 + CURLOPT_PROXY_SSL_CIPHER_LIST = 10259 + CURLOPT_PROXY_CRLFILE = 10260 + CURLOPT_PROXY_SSL_OPTIONS = 261 + CURLOPT_PRE_PROXY = 10262 + CURLOPT_PROXY_PINNEDPUBLICKEY = 10263 + CURLOPT_ABSTRACT_UNIX_SOCKET = 10264 + CURLOPT_SUPPRESS_CONNECT_HEADERS = 265 + CURLOPT_REQUEST_TARGET = 10266 + CURLOPT_SOCKS5_AUTH = 267 + CURLOPT_SSH_COMPRESSION = 268 + CURLOPT_MIMEPOST = 10269 + CURLOPT_TIMEVALUE_LARGE = 30270 + CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271 + CURLOPT_RESOLVER_START_FUNCTION = 20272 + CURLOPT_RESOLVER_START_DATA = 10273 + CURLOPT_HAPROXYPROTOCOL = 274 + CURLOPT_DNS_SHUFFLE_ADDRESSES = 275 + CURLOPT_TLS13_CIPHERS = 10276 + CURLOPT_PROXY_TLS13_CIPHERS = 10277 + CURLOPT_DISALLOW_USERNAME_IN_URL = 278 + CURLOPT_DOH_URL = 10279 + CURLOPT_UPLOAD_BUFFERSIZE = 280 + CURLOPT_UPKEEP_INTERVAL_MS = 281 + CURLOPT_CURLU = 10282 + CURLOPT_TRAILERFUNCTION = 20283 + CURLOPT_TRAILERDATA = 10284 + CURLOPT_HTTP09_ALLOWED = 285 + CURLOPT_ALTSVC_CTRL = 286 + CURLOPT_ALTSVC = 10287 + CURLOPT_MAXAGE_CONN = 288 + CURLOPT_SASL_AUTHZID = 10289 + CURLOPT_MAIL_RCPT_ALLLOWFAILS = 290 + CURLOPT_SSLCERT_BLOB = 40291 + CURLOPT_SSLKEY_BLOB = 40292 + CURLOPT_PROXY_SSLCERT_BLOB = 40293 + CURLOPT_PROXY_SSLKEY_BLOB = 40294 + CURLOPT_ISSUERCERT_BLOB = 40295 + CURLOPT_PROXY_ISSUERCERT = 10296 + CURLOPT_PROXY_ISSUERCERT_BLOB = 40297 + CURLOPT_SSL_EC_CURVES = 10298 + CURLOPT_LASTENTRY = 10299 +end + +@enum __JL_Ctag_124::UInt32 begin + CURL_HTTP_VERSION_NONE = 0 + CURL_HTTP_VERSION_1_0 = 1 + CURL_HTTP_VERSION_1_1 = 2 + CURL_HTTP_VERSION_2_0 = 3 + CURL_HTTP_VERSION_2TLS = 4 + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5 + CURL_HTTP_VERSION_3 = 30 + CURL_HTTP_VERSION_LAST = 31 +end + +@enum __JL_Ctag_125::UInt32 begin + CURL_RTSPREQ_NONE = 0 + CURL_RTSPREQ_OPTIONS = 1 + CURL_RTSPREQ_DESCRIBE = 2 + CURL_RTSPREQ_ANNOUNCE = 3 + CURL_RTSPREQ_SETUP = 4 + CURL_RTSPREQ_PLAY = 5 + CURL_RTSPREQ_PAUSE = 6 + CURL_RTSPREQ_TEARDOWN = 7 + CURL_RTSPREQ_GET_PARAMETER = 8 + CURL_RTSPREQ_SET_PARAMETER = 9 + CURL_RTSPREQ_RECORD = 10 + CURL_RTSPREQ_RECEIVE = 11 + CURL_RTSPREQ_LAST = 12 +end + +@enum CURL_NETRC_OPTION::UInt32 begin + CURL_NETRC_IGNORED = 0 + CURL_NETRC_OPTIONAL = 1 + CURL_NETRC_REQUIRED = 2 + CURL_NETRC_LAST = 3 +end + +@enum __JL_Ctag_126::UInt32 begin + CURL_SSLVERSION_DEFAULT = 0 + CURL_SSLVERSION_TLSv1 = 1 + CURL_SSLVERSION_SSLv2 = 2 + CURL_SSLVERSION_SSLv3 = 3 + CURL_SSLVERSION_TLSv1_0 = 4 + CURL_SSLVERSION_TLSv1_1 = 5 + CURL_SSLVERSION_TLSv1_2 = 6 + CURL_SSLVERSION_TLSv1_3 = 7 + CURL_SSLVERSION_LAST = 8 +end + +@enum __JL_Ctag_127::UInt32 begin + CURL_SSLVERSION_MAX_NONE = 0 + CURL_SSLVERSION_MAX_DEFAULT = 65536 + CURL_SSLVERSION_MAX_TLSv1_0 = 262144 + CURL_SSLVERSION_MAX_TLSv1_1 = 327680 + CURL_SSLVERSION_MAX_TLSv1_2 = 393216 + CURL_SSLVERSION_MAX_TLSv1_3 = 458752 + CURL_SSLVERSION_MAX_LAST = 524288 +end + +@enum CURL_TLSAUTH::UInt32 begin + CURL_TLSAUTH_NONE = 0 + CURL_TLSAUTH_SRP = 1 + CURL_TLSAUTH_LAST = 2 +end + +@enum curl_TimeCond::UInt32 begin + CURL_TIMECOND_NONE = 0 + CURL_TIMECOND_IFMODSINCE = 1 + CURL_TIMECOND_IFUNMODSINCE = 2 + CURL_TIMECOND_LASTMOD = 3 + CURL_TIMECOND_LAST = 4 +end + +function curl_strequal(s1, s2) + ccall((:curl_strequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}), s1, s2) +end + +function curl_strnequal(s1, s2, n) + ccall((:curl_strnequal, libcurl), Cint, (Ptr{Cchar}, Ptr{Cchar}, Csize_t), s1, s2, n) +end + +mutable struct curl_mime end + +mutable struct curl_mimepart end + +function curl_mime_init(easy) + ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) +end + +function curl_mime_free(mime) + ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) +end + +function curl_mime_addpart(mime) + ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) +end + +function curl_mime_name(part, name) + ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, name) +end + +function curl_mime_filename(part, filename) + ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_type(part, mimetype) + ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, mimetype) +end + +function curl_mime_encoder(part, encoding) + ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, encoding) +end + +function curl_mime_data(part, data, datasize) + ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}, Csize_t), part, data, datasize) +end + +function curl_mime_filedata(part, filename) + ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cchar}), part, filename) +end + +function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) + ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) +end + +function curl_mime_subparts(part, subparts) + ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) +end + +struct curl_slist + data::Ptr{Cchar} + next::Ptr{curl_slist} +end + +function curl_mime_headers(part, headers, take_ownership) + ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_slist}, Cint), part, headers, take_ownership) +end + +@enum CURLformoption::UInt32 begin + CURLFORM_NOTHING = 0 + CURLFORM_COPYNAME = 1 + CURLFORM_PTRNAME = 2 + CURLFORM_NAMELENGTH = 3 + CURLFORM_COPYCONTENTS = 4 + CURLFORM_PTRCONTENTS = 5 + CURLFORM_CONTENTSLENGTH = 6 + CURLFORM_FILECONTENT = 7 + CURLFORM_ARRAY = 8 + CURLFORM_OBSOLETE = 9 + CURLFORM_FILE = 10 + CURLFORM_BUFFER = 11 + CURLFORM_BUFFERPTR = 12 + CURLFORM_BUFFERLENGTH = 13 + CURLFORM_CONTENTTYPE = 14 + CURLFORM_CONTENTHEADER = 15 + CURLFORM_FILENAME = 16 + CURLFORM_END = 17 + CURLFORM_OBSOLETE2 = 18 + CURLFORM_STREAM = 19 + CURLFORM_CONTENTLEN = 20 + CURLFORM_LASTENTRY = 21 +end + +mutable struct curl_forms + option::CURLformoption + value::Ptr{Cchar} + curl_forms() = new() +end + +@enum CURLFORMcode::UInt32 begin + CURL_FORMADD_OK = 0 + CURL_FORMADD_MEMORY = 1 + CURL_FORMADD_OPTION_TWICE = 2 + CURL_FORMADD_NULL = 3 + CURL_FORMADD_UNKNOWN_OPTION = 4 + CURL_FORMADD_INCOMPLETE = 5 + CURL_FORMADD_ILLEGAL_ARRAY = 6 + CURL_FORMADD_DISABLED = 7 + CURL_FORMADD_LAST = 8 +end + +# typedef size_t ( * curl_formget_callback ) ( void * arg , const char * buf , size_t len ) +const curl_formget_callback = Ptr{Cvoid} + +function curl_formget(form, arg, append) + ccall((:curl_formget, libcurl), Cint, (Ptr{curl_httppost}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) +end + +function curl_formfree(form) + ccall((:curl_formfree, libcurl), Cvoid, (Ptr{curl_httppost},), form) +end + +function curl_getenv(variable) + ccall((:curl_getenv, libcurl), Ptr{Cchar}, (Ptr{Cchar},), variable) +end + +function curl_version() + ccall((:curl_version, libcurl), Ptr{Cchar}, ()) +end + +function curl_easy_escape(handle, string, length) + ccall((:curl_easy_escape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint), handle, string, length) +end + +function curl_escape(string, length) + ccall((:curl_escape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_easy_unescape(handle, string, length, outlength) + ccall((:curl_easy_unescape, libcurl), Ptr{Cchar}, (Ptr{CURL}, Ptr{Cchar}, Cint, Ptr{Cint}), handle, string, length, outlength) +end + +function curl_unescape(string, length) + ccall((:curl_unescape, libcurl), Ptr{Cchar}, (Ptr{Cchar}, Cint), string, length) +end + +function curl_free(p) + ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) +end + +function curl_global_init(flags) + ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) +end + +function curl_global_init_mem(flags, m, f, r, s, c) + ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) +end + +function curl_global_cleanup() + ccall((:curl_global_cleanup, libcurl), Cvoid, ()) +end + +mutable struct curl_ssl_backend + id::curl_sslbackend + name::Ptr{Cchar} + curl_ssl_backend() = new() +end + +@enum CURLsslset::UInt32 begin + CURLSSLSET_OK = 0 + CURLSSLSET_UNKNOWN_BACKEND = 1 + CURLSSLSET_TOO_LATE = 2 + CURLSSLSET_NO_BACKENDS = 3 +end + +function curl_global_sslset(id, name, avail) + ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{Cchar}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) +end + +function curl_slist_append(arg1, arg2) + ccall((:curl_slist_append, libcurl), Ptr{curl_slist}, (Ptr{curl_slist}, Ptr{Cchar}), arg1, arg2) +end + +function curl_slist_free_all(arg1) + ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{curl_slist},), arg1) +end + +function curl_getdate(p, unused) + ccall((:curl_getdate, libcurl), time_t, (Ptr{Cchar}, Ptr{time_t}), p, unused) +end + +mutable struct curl_certinfo + num_of_certs::Cint + certinfo::Ptr{Ptr{curl_slist}} + curl_certinfo() = new() +end + +mutable struct curl_tlssessioninfo + backend::curl_sslbackend + internals::Ptr{Cvoid} + curl_tlssessioninfo() = new() +end + +@enum CURLINFO::UInt32 begin + CURLINFO_NONE = 0 + CURLINFO_EFFECTIVE_URL = 1048577 + CURLINFO_RESPONSE_CODE = 2097154 + CURLINFO_TOTAL_TIME = 3145731 + CURLINFO_NAMELOOKUP_TIME = 3145732 + CURLINFO_CONNECT_TIME = 3145733 + CURLINFO_PRETRANSFER_TIME = 3145734 + CURLINFO_SIZE_UPLOAD = 3145735 + CURLINFO_SIZE_UPLOAD_T = 6291463 + CURLINFO_SIZE_DOWNLOAD = 3145736 + CURLINFO_SIZE_DOWNLOAD_T = 6291464 + CURLINFO_SPEED_DOWNLOAD = 3145737 + CURLINFO_SPEED_DOWNLOAD_T = 6291465 + CURLINFO_SPEED_UPLOAD = 3145738 + CURLINFO_SPEED_UPLOAD_T = 6291466 + CURLINFO_HEADER_SIZE = 2097163 + CURLINFO_REQUEST_SIZE = 2097164 + CURLINFO_SSL_VERIFYRESULT = 2097165 + CURLINFO_FILETIME = 2097166 + CURLINFO_FILETIME_T = 6291470 + CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743 + CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471 + CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744 + CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472 + CURLINFO_STARTTRANSFER_TIME = 3145745 + CURLINFO_CONTENT_TYPE = 1048594 + CURLINFO_REDIRECT_TIME = 3145747 + CURLINFO_REDIRECT_COUNT = 2097172 + CURLINFO_PRIVATE = 1048597 + CURLINFO_HTTP_CONNECTCODE = 2097174 + CURLINFO_HTTPAUTH_AVAIL = 2097175 + CURLINFO_PROXYAUTH_AVAIL = 2097176 + CURLINFO_OS_ERRNO = 2097177 + CURLINFO_NUM_CONNECTS = 2097178 + CURLINFO_SSL_ENGINES = 4194331 + CURLINFO_COOKIELIST = 4194332 + CURLINFO_LASTSOCKET = 2097181 + CURLINFO_FTP_ENTRY_PATH = 1048606 + CURLINFO_REDIRECT_URL = 1048607 + CURLINFO_PRIMARY_IP = 1048608 + CURLINFO_APPCONNECT_TIME = 3145761 + CURLINFO_CERTINFO = 4194338 + CURLINFO_CONDITION_UNMET = 2097187 + CURLINFO_RTSP_SESSION_ID = 1048612 + CURLINFO_RTSP_CLIENT_CSEQ = 2097189 + CURLINFO_RTSP_SERVER_CSEQ = 2097190 + CURLINFO_RTSP_CSEQ_RECV = 2097191 + CURLINFO_PRIMARY_PORT = 2097192 + CURLINFO_LOCAL_IP = 1048617 + CURLINFO_LOCAL_PORT = 2097194 + CURLINFO_TLS_SESSION = 4194347 + CURLINFO_ACTIVESOCKET = 5242924 + CURLINFO_TLS_SSL_PTR = 4194349 + CURLINFO_HTTP_VERSION = 2097198 + CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199 + CURLINFO_PROTOCOL = 2097200 + CURLINFO_SCHEME = 1048625 + CURLINFO_TOTAL_TIME_T = 6291506 + CURLINFO_NAMELOOKUP_TIME_T = 6291507 + CURLINFO_CONNECT_TIME_T = 6291508 + CURLINFO_PRETRANSFER_TIME_T = 6291509 + CURLINFO_STARTTRANSFER_TIME_T = 6291510 + CURLINFO_REDIRECT_TIME_T = 6291511 + CURLINFO_APPCONNECT_TIME_T = 6291512 + CURLINFO_RETRY_AFTER = 6291513 + CURLINFO_EFFECTIVE_METHOD = 1048634 + CURLINFO_PROXY_ERROR = 2097211 + CURLINFO_LASTONE = 59 +end + +@enum curl_closepolicy::UInt32 begin + CURLCLOSEPOLICY_NONE = 0 + CURLCLOSEPOLICY_OLDEST = 1 + CURLCLOSEPOLICY_LEAST_RECENTLY_USED = 2 + CURLCLOSEPOLICY_LEAST_TRAFFIC = 3 + CURLCLOSEPOLICY_SLOWEST = 4 + CURLCLOSEPOLICY_CALLBACK = 5 + CURLCLOSEPOLICY_LAST = 6 +end + +@enum curl_lock_data::UInt32 begin + CURL_LOCK_DATA_NONE = 0 + CURL_LOCK_DATA_SHARE = 1 + CURL_LOCK_DATA_COOKIE = 2 + CURL_LOCK_DATA_DNS = 3 + CURL_LOCK_DATA_SSL_SESSION = 4 + CURL_LOCK_DATA_CONNECT = 5 + CURL_LOCK_DATA_PSL = 6 + CURL_LOCK_DATA_LAST = 7 +end + +@enum curl_lock_access::UInt32 begin + CURL_LOCK_ACCESS_NONE = 0 + CURL_LOCK_ACCESS_SHARED = 1 + CURL_LOCK_ACCESS_SINGLE = 2 + CURL_LOCK_ACCESS_LAST = 3 +end + +# typedef void ( * curl_lock_function ) ( CURL * handle , curl_lock_data data , curl_lock_access locktype , void * userptr ) +const curl_lock_function = Ptr{Cvoid} + +# typedef void ( * curl_unlock_function ) ( CURL * handle , curl_lock_data data , void * userptr ) +const curl_unlock_function = Ptr{Cvoid} + +@enum CURLSHcode::UInt32 begin + CURLSHE_OK = 0 + CURLSHE_BAD_OPTION = 1 + CURLSHE_IN_USE = 2 + CURLSHE_INVALID = 3 + CURLSHE_NOMEM = 4 + CURLSHE_NOT_BUILT_IN = 5 + CURLSHE_LAST = 6 +end + +@enum CURLSHoption::UInt32 begin + CURLSHOPT_NONE = 0 + CURLSHOPT_SHARE = 1 + CURLSHOPT_UNSHARE = 2 + CURLSHOPT_LOCKFUNC = 3 + CURLSHOPT_UNLOCKFUNC = 4 + CURLSHOPT_USERDATA = 5 + CURLSHOPT_LAST = 6 +end + +function curl_share_init() + ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) +end + +function curl_share_cleanup(arg1) + ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) +end + +@enum CURLversion::UInt32 begin + CURLVERSION_FIRST = 0 + CURLVERSION_SECOND = 1 + CURLVERSION_THIRD = 2 + CURLVERSION_FOURTH = 3 + CURLVERSION_FIFTH = 4 + CURLVERSION_SIXTH = 5 + CURLVERSION_SEVENTH = 6 + CURLVERSION_EIGHTH = 7 + CURLVERSION_LAST = 8 +end + +mutable struct curl_version_info_data + age::CURLversion + version::Ptr{Cchar} + version_num::Cuint + host::Ptr{Cchar} + features::Cint + ssl_version::Ptr{Cchar} + ssl_version_num::Clong + libz_version::Ptr{Cchar} + protocols::Ptr{Ptr{Cchar}} + ares::Ptr{Cchar} + ares_num::Cint + libidn::Ptr{Cchar} + iconv_ver_num::Cint + libssh_version::Ptr{Cchar} + brotli_ver_num::Cuint + brotli_version::Ptr{Cchar} + nghttp2_ver_num::Cuint + nghttp2_version::Ptr{Cchar} + quic_version::Ptr{Cchar} + cainfo::Ptr{Cchar} + capath::Ptr{Cchar} + zstd_ver_num::Cuint + zstd_version::Ptr{Cchar} + curl_version_info_data() = new() +end + +function curl_version_info(arg1) + ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) +end + +function curl_easy_strerror(arg1) + ccall((:curl_easy_strerror, libcurl), Ptr{Cchar}, (CURLcode,), arg1) +end + +function curl_share_strerror(arg1) + ccall((:curl_share_strerror, libcurl), Ptr{Cchar}, (CURLSHcode,), arg1) +end + +function curl_easy_pause(handle, bitmask) + ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) +end + +mutable struct curl_blob + data::Ptr{Cvoid} + len::Csize_t + flags::Cuint + curl_blob() = new() +end + +function curl_easy_init() + ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) +end + +function curl_easy_perform(curl) + ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +function curl_easy_cleanup(curl) + ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_duphandle(curl) + ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) +end + +function curl_easy_reset(curl) + ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) +end + +function curl_easy_recv(curl, buffer, buflen, n) + ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_send(curl, buffer, buflen, n) + ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) +end + +function curl_easy_upkeep(curl) + ccall((:curl_easy_upkeep, libcurl), CURLcode, (Ptr{CURL},), curl) +end + +const CURLM = Cvoid + +@enum CURLMcode::Int32 begin + CURLM_CALL_MULTI_PERFORM = -1 + CURLM_OK = 0 + CURLM_BAD_HANDLE = 1 + CURLM_BAD_EASY_HANDLE = 2 + CURLM_OUT_OF_MEMORY = 3 + CURLM_INTERNAL_ERROR = 4 + CURLM_BAD_SOCKET = 5 + CURLM_UNKNOWN_OPTION = 6 + CURLM_ADDED_ALREADY = 7 + CURLM_RECURSIVE_API_CALL = 8 + CURLM_WAKEUP_FAILURE = 9 + CURLM_BAD_FUNCTION_ARGUMENT = 10 + CURLM_LAST = 11 +end + +@enum CURLMSG::UInt32 begin + CURLMSG_NONE = 0 + CURLMSG_DONE = 1 + CURLMSG_LAST = 2 +end + +struct CURLMsg + data::NTuple{24, UInt8} +end + +function Base.getproperty(x::Ptr{CURLMsg}, f::Symbol) + f === :msg && return Ptr{CURLMSG}(x + 0) + f === :easy_handle && return Ptr{Ptr{CURL}}(x + 8) + f === :data && return Ptr{__JL_Ctag_145}(x + 16) + return getfield(x, f) +end + +function Base.getproperty(x::CURLMsg, f::Symbol) + r = Ref{CURLMsg}(x) + ptr = Base.unsafe_convert(Ptr{CURLMsg}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{CURLMsg}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct curl_waitfd + fd::curl_socket_t + events::Cshort + revents::Cshort + curl_waitfd() = new() +end + +function curl_multi_init() + ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) +end + +function curl_multi_add_handle(multi_handle, curl_handle) + ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_remove_handle(multi_handle, curl_handle) + ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) +end + +function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) + ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) +end + +function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) + ccall((:curl_multi_poll, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{curl_waitfd}, Cuint, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) +end + +function curl_multi_wakeup(multi_handle) + ccall((:curl_multi_wakeup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_perform(multi_handle, running_handles) + ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_cleanup(multi_handle) + ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) +end + +function curl_multi_info_read(multi_handle, msgs_in_queue) + ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) +end + +function curl_multi_strerror(arg1) + ccall((:curl_multi_strerror, libcurl), Ptr{Cchar}, (CURLMcode,), arg1) +end + +# typedef int ( * curl_socket_callback ) ( CURL * easy , /* easy handle */ curl_socket_t s , /* socket */ int what , /* see above */ void * userp , /* private callback +# pointer */ void * socketp ) +const curl_socket_callback = Ptr{Cvoid} + +# typedef int ( * curl_multi_timer_callback ) ( CURLM * multi , /* multi handle */ long timeout_ms , /* see above */ void * userp ) +const curl_multi_timer_callback = Ptr{Cvoid} + +function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) + ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) +end + +function curl_multi_socket_all(multi_handle, running_handles) + ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) +end + +function curl_multi_timeout(multi_handle, milliseconds) + ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) +end + +@enum CURLMoption::UInt32 begin + CURLMOPT_SOCKETFUNCTION = 20001 + CURLMOPT_SOCKETDATA = 10002 + CURLMOPT_PIPELINING = 3 + CURLMOPT_TIMERFUNCTION = 20004 + CURLMOPT_TIMERDATA = 10005 + CURLMOPT_MAXCONNECTS = 6 + CURLMOPT_MAX_HOST_CONNECTIONS = 7 + CURLMOPT_MAX_PIPELINE_LENGTH = 8 + CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009 + CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010 + CURLMOPT_PIPELINING_SITE_BL = 10011 + CURLMOPT_PIPELINING_SERVER_BL = 10012 + CURLMOPT_MAX_TOTAL_CONNECTIONS = 13 + CURLMOPT_PUSHFUNCTION = 20014 + CURLMOPT_PUSHDATA = 10015 + CURLMOPT_MAX_CONCURRENT_STREAMS = 16 + CURLMOPT_LASTENTRY = 17 +end + +function curl_multi_assign(multi_handle, sockfd, sockp) + ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) +end + +mutable struct curl_pushheaders end + +function curl_pushheader_bynum(h, num) + ccall((:curl_pushheader_bynum, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Csize_t), h, num) +end + +function curl_pushheader_byname(h, name) + ccall((:curl_pushheader_byname, libcurl), Ptr{Cchar}, (Ptr{curl_pushheaders}, Ptr{Cchar}), h, name) +end + +# typedef int ( * curl_push_callback ) ( CURL * parent , CURL * easy , size_t num_headers , struct curl_pushheaders * headers , void * userp ) +const curl_push_callback = Ptr{Cvoid} + +@enum CURLUcode::UInt32 begin + CURLUE_OK = 0 + CURLUE_BAD_HANDLE = 1 + CURLUE_BAD_PARTPOINTER = 2 + CURLUE_MALFORMED_INPUT = 3 + CURLUE_BAD_PORT_NUMBER = 4 + CURLUE_UNSUPPORTED_SCHEME = 5 + CURLUE_URLDECODE = 6 + CURLUE_OUT_OF_MEMORY = 7 + CURLUE_USER_NOT_ALLOWED = 8 + CURLUE_UNKNOWN_PART = 9 + CURLUE_NO_SCHEME = 10 + CURLUE_NO_USER = 11 + CURLUE_NO_PASSWORD = 12 + CURLUE_NO_OPTIONS = 13 + CURLUE_NO_HOST = 14 + CURLUE_NO_PORT = 15 + CURLUE_NO_QUERY = 16 + CURLUE_NO_FRAGMENT = 17 +end + +@enum CURLUPart::UInt32 begin + CURLUPART_URL = 0 + CURLUPART_SCHEME = 1 + CURLUPART_USER = 2 + CURLUPART_PASSWORD = 3 + CURLUPART_OPTIONS = 4 + CURLUPART_HOST = 5 + CURLUPART_PORT = 6 + CURLUPART_PATH = 7 + CURLUPART_QUERY = 8 + CURLUPART_FRAGMENT = 9 + CURLUPART_ZONEID = 10 +end + +mutable struct Curl_URL end + +const CURLU = Curl_URL + +function curl_url() + ccall((:curl_url, libcurl), Ptr{CURLU}, ()) +end + +function curl_url_cleanup(handle) + ccall((:curl_url_cleanup, libcurl), Cvoid, (Ptr{CURLU},), handle) +end + +function curl_url_dup(in) + ccall((:curl_url_dup, libcurl), Ptr{CURLU}, (Ptr{CURLU},), in) +end + +function curl_url_get(handle, what, part, flags) + ccall((:curl_url_get, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Ptr{Cchar}}, Cuint), handle, what, part, flags) +end + +function curl_url_set(handle, what, part, flags) + ccall((:curl_url_set, libcurl), CURLUcode, (Ptr{CURLU}, CURLUPart, Ptr{Cchar}, Cuint), handle, what, part, flags) +end + +@enum curl_easytype::UInt32 begin + CURLOT_LONG = 0 + CURLOT_VALUES = 1 + CURLOT_OFF_T = 2 + CURLOT_OBJECT = 3 + CURLOT_STRING = 4 + CURLOT_SLIST = 5 + CURLOT_CBPTR = 6 + CURLOT_BLOB = 7 + CURLOT_FUNCTION = 8 +end + +mutable struct curl_easyoption + name::Ptr{Cchar} + id::CURLoption + type::curl_easytype + flags::Cuint + curl_easyoption() = new() +end + +function curl_easy_option_by_name(name) + ccall((:curl_easy_option_by_name, libcurl), Ptr{curl_easyoption}, (Ptr{Cchar},), name) +end + +function curl_easy_option_by_id(id) + ccall((:curl_easy_option_by_id, libcurl), Ptr{curl_easyoption}, (CURLoption,), id) +end + +function curl_easy_option_next(prev) + ccall((:curl_easy_option_next, libcurl), Ptr{curl_easyoption}, (Ptr{curl_easyoption},), prev) +end + +struct __JL_Ctag_145 + data::NTuple{8, UInt8} +end + +function Base.getproperty(x::Ptr{__JL_Ctag_145}, f::Symbol) + f === :whatever && return Ptr{Ptr{Cvoid}}(x + 0) + f === :result && return Ptr{CURLcode}(x + 0) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_145, f::Symbol) + r = Ref{__JL_Ctag_145}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_145}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_145}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +mutable struct __JL_Ctag_146 + time::Ptr{Cchar} + perm::Ptr{Cchar} + user::Ptr{Cchar} + group::Ptr{Cchar} + target::Ptr{Cchar} + __JL_Ctag_146() = new() +end + +function Base.getproperty(x::Ptr{__JL_Ctag_146}, f::Symbol) + f === :time && return Ptr{Ptr{Cchar}}(x + 0) + f === :perm && return Ptr{Ptr{Cchar}}(x + 8) + f === :user && return Ptr{Ptr{Cchar}}(x + 16) + f === :group && return Ptr{Ptr{Cchar}}(x + 24) + f === :target && return Ptr{Ptr{Cchar}}(x + 32) + return getfield(x, f) +end + +function Base.getproperty(x::__JL_Ctag_146, f::Symbol) + r = Ref{__JL_Ctag_146}(x) + ptr = Base.unsafe_convert(Ptr{__JL_Ctag_146}, r) + fptr = getproperty(ptr, f) + GC.@preserve r unsafe_load(fptr) +end + +function Base.setproperty!(x::Ptr{__JL_Ctag_146}, f::Symbol, v) + unsafe_store!(getproperty(x, f), v) +end + +const LIBCURL_COPYRIGHT = "1996 - 2020 Daniel Stenberg, ." + +const LIBCURL_VERSION = "7.73.0" + +const LIBCURL_VERSION_MAJOR = 7 + +const LIBCURL_VERSION_MINOR = 73 + +const LIBCURL_VERSION_PATCH = 0 + +const LIBCURL_VERSION_NUM = 0x00074900 + +const LIBCURL_TIMESTAMP = "2020-10-14" + +const CURL_TYPEOF_CURL_OFF_T = Clonglong + +const CURL_FORMAT_CURL_OFF_T = "I64d" + +const CURL_FORMAT_CURL_OFF_TU = "I64u" + +const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t + +const CURL_EXTERN = __declspec(dllimport) + +const CURL_SOCKET_BAD = INVALID_SOCKET + +const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL + +const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL + +const CURLSSLBACKEND_DARWINSSL = CURLSSLBACKEND_SECURETRANSPORT + +const CURL_HTTPPOST_FILENAME = 1 << 0 + +const CURL_HTTPPOST_READFILE = 1 << 1 + +const CURL_HTTPPOST_PTRNAME = 1 << 2 + +const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 + +const CURL_HTTPPOST_BUFFER = 1 << 4 + +const CURL_HTTPPOST_PTRBUFFER = 1 << 5 + +const CURL_HTTPPOST_CALLBACK = 1 << 6 + +const CURL_HTTPPOST_LARGE = 1 << 7 + +const CURL_PROGRESSFUNC_CONTINUE = 0x10000001 + +const CURL_MAX_READ_SIZE = 524288 + +const CURL_MAX_WRITE_SIZE = 16384 + +const CURL_MAX_HTTP_HEADER = 100 * 1024 + +const CURL_WRITEFUNC_PAUSE = 0x10000001 + +const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 + +const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 + +const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 + +const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 + +const CURLFINFOFLAG_KNOWN_UID = 1 << 4 + +const CURLFINFOFLAG_KNOWN_GID = 1 << 5 + +const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 + +const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 + +const CURL_CHUNK_BGN_FUNC_OK = 0 + +const CURL_CHUNK_BGN_FUNC_FAIL = 1 + +const CURL_CHUNK_BGN_FUNC_SKIP = 2 + +const CURL_CHUNK_END_FUNC_OK = 0 + +const CURL_CHUNK_END_FUNC_FAIL = 1 + +const CURL_FNMATCHFUNC_MATCH = 0 + +const CURL_FNMATCHFUNC_NOMATCH = 1 + +const CURL_FNMATCHFUNC_FAIL = 2 + +const CURL_SEEKFUNC_OK = 0 + +const CURL_SEEKFUNC_FAIL = 1 + +const CURL_SEEKFUNC_CANTSEEK = 2 + +const CURL_READFUNC_ABORT = 0x10000000 + +const CURL_READFUNC_PAUSE = 0x10000001 + +const CURL_TRAILERFUNC_OK = 0 + +const CURL_TRAILERFUNC_ABORT = 1 + +const CURL_SOCKOPT_OK = 0 + +const CURL_SOCKOPT_ERROR = 1 + +const CURL_SOCKOPT_ALREADY_CONNECTED = 2 + +const CURLE_OBSOLETE16 = CURLE_HTTP2 + +const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED + +const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT + +const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING + +const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY + +const CURLE_SSL_CACERT = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION + +const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION + +const CURLE_OBSOLETE = CURLE_OBSOLETE50 + +const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 + +const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 + +const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 + +const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 + +const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 + +const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 + +const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 + +const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 + +const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 + +const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 + +const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 + +const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN + +const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED + +const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE + +const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR + +const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL + +const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS + +const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR + +const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED + +const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT + +const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR + +const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED + +const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED + +const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE + +const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME + +const CURLE_ALREADY_COMPLETE = 99999 + +const CURLOPT_FILE = CURLOPT_WRITEDATA + +const CURLOPT_INFILE = CURLOPT_READDATA + +const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA + +const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 + +const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 + +const CURLAUTH_NONE = Culong(0) + +const CURLAUTH_BASIC = Culong(1) << 0 + +const CURLAUTH_DIGEST = Culong(1) << 1 + +const CURLAUTH_NEGOTIATE = Culong(1) << 2 + +const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE + +const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE + +const CURLAUTH_NTLM = Culong(1) << 3 + +const CURLAUTH_DIGEST_IE = Culong(1) << 4 + +const CURLAUTH_NTLM_WB = Culong(1) << 5 + +const CURLAUTH_BEARER = Culong(1) << 6 + +const CURLAUTH_ONLY = Culong(1) << 31 + +const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE + +const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE) + +const CURLSSH_AUTH_ANY = ~0 + +const CURLSSH_AUTH_NONE = 0 + +const CURLSSH_AUTH_PUBLICKEY = 1 << 0 + +const CURLSSH_AUTH_PASSWORD = 1 << 1 + +const CURLSSH_AUTH_HOST = 1 << 2 + +const CURLSSH_AUTH_KEYBOARD = 1 << 3 + +const CURLSSH_AUTH_AGENT = 1 << 4 + +const CURLSSH_AUTH_GSSAPI = 1 << 5 + +const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY + +const CURLGSSAPI_DELEGATION_NONE = 0 + +const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 + +const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 + +const CURL_ERROR_SIZE = 256 + +const CURLSSLOPT_ALLOW_BEAST = 1 << 0 + +const CURLSSLOPT_NO_REVOKE = 1 << 1 + +const CURLSSLOPT_NO_PARTIALCHAIN = 1 << 2 + +const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3 + +const CURLSSLOPT_NATIVE_CA = 1 << 4 + +const CURL_HET_DEFAULT = Clong(200) + +const CURL_UPKEEP_INTERVAL_DEFAULT = Clong(60000) + +const CURLFTPSSL_NONE = CURLUSESSL_NONE + +const CURLFTPSSL_TRY = CURLUSESSL_TRY + +const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL + +const CURLFTPSSL_ALL = CURLUSESSL_ALL + +const CURLFTPSSL_LAST = CURLUSESSL_LAST + +const curl_ftpssl = curl_usessl + +const CURLHEADER_UNIFIED = 0 + +const CURLHEADER_SEPARATE = 1 << 0 + +const CURLALTSVC_IMMEDIATELY = 1 << 0 + +const CURLALTSVC_READONLYFILE = 1 << 2 + +const CURLALTSVC_H1 = 1 << 3 + +const CURLALTSVC_H2 = 1 << 4 + +const CURLALTSVC_H3 = 1 << 5 + +const CURLPROTO_HTTP = 1 << 0 + +const CURLPROTO_HTTPS = 1 << 1 + +const CURLPROTO_FTP = 1 << 2 + +const CURLPROTO_FTPS = 1 << 3 + +const CURLPROTO_SCP = 1 << 4 + +const CURLPROTO_SFTP = 1 << 5 + +const CURLPROTO_TELNET = 1 << 6 + +const CURLPROTO_LDAP = 1 << 7 + +const CURLPROTO_LDAPS = 1 << 8 + +const CURLPROTO_DICT = 1 << 9 + +const CURLPROTO_FILE = 1 << 10 + +const CURLPROTO_TFTP = 1 << 11 + +const CURLPROTO_IMAP = 1 << 12 + +const CURLPROTO_IMAPS = 1 << 13 + +const CURLPROTO_POP3 = 1 << 14 + +const CURLPROTO_POP3S = 1 << 15 + +const CURLPROTO_SMTP = 1 << 16 + +const CURLPROTO_SMTPS = 1 << 17 + +const CURLPROTO_RTSP = 1 << 18 + +const CURLPROTO_RTMP = 1 << 19 + +const CURLPROTO_RTMPT = 1 << 20 + +const CURLPROTO_RTMPE = 1 << 21 + +const CURLPROTO_RTMPTE = 1 << 22 + +const CURLPROTO_RTMPS = 1 << 23 + +const CURLPROTO_RTMPTS = 1 << 24 + +const CURLPROTO_GOPHER = 1 << 25 + +const CURLPROTO_SMB = 1 << 26 + +const CURLPROTO_SMBS = 1 << 27 + +const CURLPROTO_MQTT = 1 << 28 + +const CURLPROTO_ALL = ~0 + +const CURLOPTTYPE_LONG = 0 + +const CURLOPTTYPE_OBJECTPOINT = 10000 + +const CURLOPTTYPE_FUNCTIONPOINT = 20000 + +const CURLOPTTYPE_OFF_T = 30000 + +const CURLOPTTYPE_BLOB = 40000 + +const CURLOPTTYPE_STRINGPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_SLISTPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_CBPOINT = CURLOPTTYPE_OBJECTPOINT + +const CURLOPTTYPE_VALUES = CURLOPTTYPE_LONG + +const CURLOPT_PROGRESSDATA = CURLOPT_XFERINFODATA + +const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT + +const CURLOPT_POST301 = CURLOPT_POSTREDIR + +const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_FTPAPPEND = CURLOPT_APPEND + +const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY + +const CURLOPT_FTP_SSL = CURLOPT_USE_SSL + +const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD + +const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL + +const CURL_IPRESOLVE_WHATEVER = 0 + +const CURL_IPRESOLVE_V4 = 1 + +const CURL_IPRESOLVE_V6 = 2 + +const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER + +const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 + +const CURL_REDIR_GET_ALL = 0 + +const CURL_REDIR_POST_301 = 1 + +const CURL_REDIR_POST_302 = 2 + +const CURL_REDIR_POST_303 = 4 + +const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 + +const CURLINFO_STRING = 0x00100000 + +const CURLINFO_LONG = 0x00200000 + +const CURLINFO_DOUBLE = 0x00300000 + +const CURLINFO_SLIST = 0x00400000 + +const CURLINFO_PTR = 0x00400000 + +const CURLINFO_SOCKET = 0x00500000 + +const CURLINFO_OFF_T = 0x00600000 + +const CURLINFO_MASK = 0x000fffff + +const CURLINFO_TYPEMASK = 0x00f00000 + +const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE + +const CURL_GLOBAL_SSL = 1 << 0 + +const CURL_GLOBAL_WIN32 = 1 << 1 + +const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 + +const CURL_GLOBAL_NOTHING = 0 + +const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL + +const CURL_GLOBAL_ACK_EINTR = 1 << 2 + +const CURLVERSION_NOW = CURLVERSION_EIGHTH + +const CURL_VERSION_IPV6 = 1 << 0 + +const CURL_VERSION_KERBEROS4 = 1 << 1 + +const CURL_VERSION_SSL = 1 << 2 + +const CURL_VERSION_LIBZ = 1 << 3 + +const CURL_VERSION_NTLM = 1 << 4 + +const CURL_VERSION_GSSNEGOTIATE = 1 << 5 + +const CURL_VERSION_DEBUG = 1 << 6 + +const CURL_VERSION_ASYNCHDNS = 1 << 7 + +const CURL_VERSION_SPNEGO = 1 << 8 + +const CURL_VERSION_LARGEFILE = 1 << 9 + +const CURL_VERSION_IDN = 1 << 10 + +const CURL_VERSION_SSPI = 1 << 11 + +const CURL_VERSION_CONV = 1 << 12 + +const CURL_VERSION_CURLDEBUG = 1 << 13 + +const CURL_VERSION_TLSAUTH_SRP = 1 << 14 + +const CURL_VERSION_NTLM_WB = 1 << 15 + +const CURL_VERSION_HTTP2 = 1 << 16 + +const CURL_VERSION_GSSAPI = 1 << 17 + +const CURL_VERSION_KERBEROS5 = 1 << 18 + +const CURL_VERSION_UNIX_SOCKETS = 1 << 19 + +const CURL_VERSION_PSL = 1 << 20 + +const CURL_VERSION_HTTPS_PROXY = 1 << 21 + +const CURL_VERSION_MULTI_SSL = 1 << 22 + +const CURL_VERSION_BROTLI = 1 << 23 + +const CURL_VERSION_ALTSVC = 1 << 24 + +const CURL_VERSION_HTTP3 = 1 << 25 + +const CURL_VERSION_ZSTD = 1 << 26 + +const CURL_VERSION_UNICODE = 1 << 27 + +const CURLPAUSE_RECV = 1 << 0 + +const CURLPAUSE_RECV_CONT = 0 + +const CURLPAUSE_SEND = 1 << 2 + +const CURLPAUSE_SEND_CONT = 0 + +const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND + +const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT + +const CURL_BLOB_COPY = 1 + +const CURL_BLOB_NOCOPY = 0 + +const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM + +const CURLPIPE_NOTHING = Clong(0) + +const CURLPIPE_HTTP1 = Clong(1) + +const CURLPIPE_MULTIPLEX = Clong(2) + +const CURL_WAIT_POLLIN = 0x0001 + +const CURL_WAIT_POLLPRI = 0x0002 + +const CURL_WAIT_POLLOUT = 0x0004 + +const CURL_POLL_NONE = 0 + +const CURL_POLL_IN = 1 + +const CURL_POLL_OUT = 2 + +const CURL_POLL_INOUT = 3 + +const CURL_POLL_REMOVE = 4 + +const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD + +const CURL_CSELECT_IN = 0x01 + +const CURL_CSELECT_OUT = 0x02 + +const CURL_CSELECT_ERR = 0x04 + +const CURL_PUSH_OK = 0 + +const CURL_PUSH_DENY = 1 + +const CURL_PUSH_ERROROUT = 2 + +const CURLU_DEFAULT_PORT = 1 << 0 + +const CURLU_NO_DEFAULT_PORT = 1 << 1 + +const CURLU_DEFAULT_SCHEME = 1 << 2 + +const CURLU_NON_SUPPORT_SCHEME = 1 << 3 + +const CURLU_PATH_AS_IS = 1 << 4 + +const CURLU_DISALLOW_USER = 1 << 5 + +const CURLU_URLDECODE = 1 << 6 + +const CURLU_URLENCODE = 1 << 7 + +const CURLU_APPENDQUERY = 1 << 8 + +const CURLU_GUESS_SCHEME = 1 << 9 + +const CURLU_NO_AUTHORITY = 1 << 10 + +const CURLOT_FLAG_ALIAS = 1 << 0 + diff --git a/src/LibCURL.jl b/src/LibCURL.jl index f259a5b..3c1f9d4 100644 --- a/src/LibCURL.jl +++ b/src/LibCURL.jl @@ -1,15 +1,8 @@ - module LibCURL using LibCURL_jll using MozillaCACerts_jll -const time_t = Int -const size_t = Csize_t -const curl_off_t = Int64 -const fd_set = Union{} -const socklen_t = Int32 - cacert = "" export Mime_ext @@ -21,27 +14,67 @@ function __init__() global cacert = MozillaCACerts_jll.cacert end -include("lC_exports_h.jl") -include("lC_common_h.jl") -include("lC_curl_h.jl") +const IS_LIBC_MUSL = occursin("musl", Base.BUILD_TRIPLET) + +if Sys.isapple() && Sys.ARCH === :aarch64 + include("../lib/aarch64-apple-darwin20.jl") +elseif Sys.islinux() && Sys.ARCH === :aarch64 && !IS_LIBC_MUSL + include("../lib/aarch64-linux-gnu.jl") +elseif Sys.islinux() && Sys.ARCH === :aarch64 && IS_LIBC_MUSL + include("../lib/aarch64-linux-musl.jl") +elseif Sys.islinux() && startswith(string(Sys.ARCH), "arm") && !IS_LIBC_MUSL + include("../lib/armv7l-linux-gnueabihf.jl") +elseif Sys.islinux() && startswith(string(Sys.ARCH), "arm") && IS_LIBC_MUSL + include("../lib/armv7l-linux-musleabihf.jl") +elseif Sys.islinux() && Sys.ARCH === :i686 && !IS_LIBC_MUSL + include("../lib/i686-linux-gnu.jl") +elseif Sys.islinux() && Sys.ARCH === :i686 && IS_LIBC_MUSL + include("../lib/i686-linux-musl.jl") +elseif Sys.iswindows() && Sys.ARCH === :i686 + include("../lib/i686-w64-mingw32.jl") +elseif Sys.islinux() && Sys.ARCH === :powerpc64le + include("../lib/powerpc64le-linux-gnu.jl") +elseif Sys.isapple() && Sys.ARCH === :x86_64 + include("../lib/x86_64-apple-darwin14.jl") +elseif Sys.islinux() && Sys.ARCH === :x86_64 && !IS_LIBC_MUSL + include("../lib/x86_64-linux-gnu.jl") +elseif Sys.islinux() && Sys.ARCH === :x86_64 && IS_LIBC_MUSL + include("../lib/x86_64-linux-musl.jl") +elseif Sys.isbsd() && !Sys.isapple() + include("../lib/x86_64-unknown-freebsd11.1.jl") +elseif Sys.iswindows() && Sys.ARCH === :x86_64 + include("../lib/x86_64-w64-mingw32.jl") +else + error("Unknown platform: $(Base.BUILD_TRIPLET)") +end -# curl_easy_getinfo, curl_easy_setopt, and curl_multi_setopt are vararg C functions +# curl_share_setopt, curl_easy_getinfo, curl_easy_setopt, and curl_multi_setopt are vararg C functions +curl_share_setopt(handle, opt, param) = ccall((:curl_share_setopt, libcurl), CURLSHcode, (Ptr{CURLSH}, CURLSHoption, Any...), handle, opt, param) curl_easy_setopt(handle, opt, ptrval::Array{T}) where T = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{T}...), handle, opt, ptrval) curl_easy_setopt(handle, opt, ptrval::Integer) = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Clong...), handle, opt, ptrval) curl_easy_setopt(handle, opt, ptrval::Ptr{T}) where {T} = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{T}...), handle, opt, ptrval) curl_easy_setopt(handle, opt, ptrval::AbstractString) = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{UInt8}...), handle, opt, ptrval) +curl_easy_setopt(handle, opt, param) = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Any...), handle, opt, param) curl_multi_setopt(handle, opt, ptrval::Array{T}) where T = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Ptr{T}...), handle, opt, ptrval) curl_multi_setopt(handle, opt, ptrval::Integer) = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Clong...), handle, opt, ptrval) curl_multi_setopt(handle, opt, ptrval::Ptr{T}) where {T} = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Ptr{T}...), handle, opt, ptrval) curl_multi_setopt(handle, opt, ptrval::AbstractString) = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Ptr{UInt8}...), handle, opt, ptrval) +curl_multi_setopt(multi_handle, opt, param) = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Any...), multi_handle, opt, param) curl_easy_getinfo(handle, opt, ptrval::Array{T}) where T = ccall((:curl_easy_getinfo, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{T}...), handle, opt, ptrval) curl_easy_getinfo(handle, opt, ptrval::AbstractString) = ccall((:curl_easy_getinfo, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{UInt8}...), handle, opt, ptrval) - -include("lC_defines_h.jl") +curl_easy_getinfo(handle, info, arg) = ccall((:curl_easy_getinfo, libcurl), CURLcode, (Ptr{CURL}, CURLINFO, Any...), handle, info, arg) include("Mime_ext.jl") +# exports +const PREFIXES = ["curl_", "CURLOPT_", "CURLFORM_", "CURLE_", "CURLINFO_", "CURLSSH_", "CURLAUTH_", "CURLM", "CURL"] +for name in names(@__MODULE__; all=true), prefix in PREFIXES + if startswith(string(name), prefix) + @eval export $name + end end + +end # module diff --git a/src/lC_common_h.jl b/src/lC_common_h.jl deleted file mode 100644 index 6a8c0cb..0000000 --- a/src/lC_common_h.jl +++ /dev/null @@ -1,1205 +0,0 @@ -# Automatically generated using Clang.jl wrap_c, version 0.0.0 - -const CURL = Cvoid -const CURLSH = Cvoid - -const curl_socket_t = Cint -const CURL_SOCKET_BAD = -1 - -# begin enum curl_sslbackend -const curl_sslbackend = UInt32 -const CURLSSLBACKEND_NONE = (UInt32)(0) -const CURLSSLBACKEND_OPENSSL = (UInt32)(1) -const CURLSSLBACKEND_GNUTLS = (UInt32)(2) -const CURLSSLBACKEND_NSS = (UInt32)(3) -const CURLSSLBACKEND_OBSOLETE4 = (UInt32)(4) -const CURLSSLBACKEND_GSKIT = (UInt32)(5) -const CURLSSLBACKEND_POLARSSL = (UInt32)(6) -const CURLSSLBACKEND_WOLFSSL = (UInt32)(7) -const CURLSSLBACKEND_SCHANNEL = (UInt32)(8) -const CURLSSLBACKEND_DARWINSSL = (UInt32)(9) -const CURLSSLBACKEND_AXTLS = (UInt32)(10) -const CURLSSLBACKEND_MBEDTLS = (UInt32)(11) -# end enum curl_sslbackend - -const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL -const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL -const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL - -mutable struct curl_httppost - next::Ptr{Cvoid} - name::Ptr{UInt8} - namelength::Clong - contents::Ptr{UInt8} - contentslength::Clong - buffer::Ptr{UInt8} - bufferlength::Clong - contenttype::Ptr{UInt8} - contentheader::Ptr{Cvoid} - more::Ptr{Cvoid} - flags::Clong - showfilename::Ptr{UInt8} - userp::Ptr{Cvoid} - contentlen::curl_off_t -end - -const CURL_HTTPPOST_FILENAME = 1 << 0 -const CURL_HTTPPOST_READFILE = 1 << 1 -const CURL_HTTPPOST_PTRNAME = 1 << 2 -const CURL_HTTPPOST_PTRCONTENTS = 1 << 3 -const CURL_HTTPPOST_BUFFER = 1 << 4 -const CURL_HTTPPOST_PTRBUFFER = 1 << 5 -const CURL_HTTPPOST_CALLBACK = 1 << 6 -const CURL_HTTPPOST_LARGE = 1 << 7 - -const curl_progress_callback = Ptr{Cvoid} -const curl_xferinfo_callback = Ptr{Cvoid} - -const CURL_MAX_READ_SIZE = 524288 -const CURL_MAX_WRITE_SIZE = 16384 -const CURL_MAX_HTTP_HEADER = 100 * 1024 -const CURL_WRITEFUNC_PAUSE = 0x10000001 - -const curl_write_callback = Ptr{Cvoid} -const curl_resolver_start_callback = Ptr{Cvoid} - -const CURLFINFOFLAG_KNOWN_FILENAME = 1 << 0 -const CURLFINFOFLAG_KNOWN_FILETYPE = 1 << 1 -const CURLFINFOFLAG_KNOWN_TIME = 1 << 2 -const CURLFINFOFLAG_KNOWN_PERM = 1 << 3 -const CURLFINFOFLAG_KNOWN_UID = 1 << 4 -const CURLFINFOFLAG_KNOWN_GID = 1 << 5 -const CURLFINFOFLAG_KNOWN_SIZE = 1 << 6 -const CURLFINFOFLAG_KNOWN_HLINKCOUNT = 1 << 7 -const CURL_CHUNK_BGN_FUNC_OK = 0 -const CURL_CHUNK_BGN_FUNC_FAIL = 1 -const CURL_CHUNK_BGN_FUNC_SKIP = 2 -const CURL_CHUNK_END_FUNC_OK = 0 -const CURL_CHUNK_END_FUNC_FAIL = 1 -const CURL_FNMATCHFUNC_MATCH = 0 -const CURL_FNMATCHFUNC_NOMATCH = 1 -const CURL_FNMATCHFUNC_FAIL = 2 -const CURL_SEEKFUNC_OK = 0 -const CURL_SEEKFUNC_FAIL = 1 -const CURL_SEEKFUNC_CANTSEEK = 2 -const CURL_READFUNC_ABORT = 0x10000000 -const CURL_READFUNC_PAUSE = 0x10000001 -const CURL_SOCKOPT_OK = 0 -const CURL_SOCKOPT_ERROR = 1 -const CURL_SOCKOPT_ALREADY_CONNECTED = 2 - -# begin enum curlfiletype -const curlfiletype = UInt32 -const CURLFILETYPE_FILE = (UInt32)(0) -const CURLFILETYPE_DIRECTORY = (UInt32)(1) -const CURLFILETYPE_SYMLINK = (UInt32)(2) -const CURLFILETYPE_DEVICE_BLOCK = (UInt32)(3) -const CURLFILETYPE_DEVICE_CHAR = (UInt32)(4) -const CURLFILETYPE_NAMEDPIPE = (UInt32)(5) -const CURLFILETYPE_SOCKET = (UInt32)(6) -const CURLFILETYPE_DOOR = (UInt32)(7) -const CURLFILETYPE_UNKNOWN = (UInt32)(8) -# end enum curlfiletype - -mutable struct curl_fileinfo - filename::Ptr{UInt8} - filetype::curlfiletype - time::time_t - perm::UInt32 - uid::Cint - gid::Cint - size::curl_off_t - hardlinks::Clong - strings::Cvoid - flags::UInt32 - b_data::Ptr{UInt8} - b_size::Csize_t - b_used::Csize_t -end - -const curl_chunk_bgn_callback = Ptr{Cvoid} -const curl_chunk_end_callback = Ptr{Cvoid} -const curl_fnmatch_callback = Ptr{Cvoid} -const curl_seek_callback = Ptr{Cvoid} -const curl_read_callback = Ptr{Cvoid} - -# begin enum curlsocktype -const curlsocktype = UInt32 -const CURLSOCKTYPE_IPCXN = (UInt32)(0) -const CURLSOCKTYPE_ACCEPT = (UInt32)(1) -const CURLSOCKTYPE_LAST = (UInt32)(2) -# end enum curlsocktype - -const curl_sockopt_callback = Ptr{Cvoid} - -mutable struct curl_sockaddr - family::Cint - socktype::Cint - protocol::Cint - addrlen::UInt32 - addr::Cvoid -end - -const curl_opensocket_callback = Ptr{Cvoid} -const curl_closesocket_callback = Ptr{Cvoid} - -# begin enum curlioerr -const curlioerr = UInt32 -const CURLIOE_OK = (UInt32)(0) -const CURLIOE_UNKNOWNCMD = (UInt32)(1) -const CURLIOE_FAILRESTART = (UInt32)(2) -const CURLIOE_LAST = (UInt32)(3) -# end enum curlioerr - -# begin enum curliocmd -const curliocmd = UInt32 -const CURLIOCMD_NOP = (UInt32)(0) -const CURLIOCMD_RESTARTREAD = (UInt32)(1) -const CURLIOCMD_LAST = (UInt32)(2) -# end enum curliocmd - -const curl_ioctl_callback = Ptr{Cvoid} -const curl_malloc_callback = Ptr{Cvoid} -const curl_free_callback = Ptr{Cvoid} -const curl_realloc_callback = Ptr{Cvoid} -const curl_strdup_callback = Ptr{Cvoid} -const curl_calloc_callback = Ptr{Cvoid} - -# begin enum curl_infotype -const curl_infotype = UInt32 -const CURLINFO_TEXT = (UInt32)(0) -const CURLINFO_HEADER_IN = (UInt32)(1) -const CURLINFO_HEADER_OUT = (UInt32)(2) -const CURLINFO_DATA_IN = (UInt32)(3) -const CURLINFO_DATA_OUT = (UInt32)(4) -const CURLINFO_SSL_DATA_IN = (UInt32)(5) -const CURLINFO_SSL_DATA_OUT = (UInt32)(6) -const CURLINFO_END = (UInt32)(7) -# end enum curl_infotype - -const curl_debug_callback = Ptr{Cvoid} - -# begin enum CURLcode -const CURLcode = UInt32 -const CURLE_OK = (UInt32)(0) -const CURLE_UNSUPPORTED_PROTOCOL = (UInt32)(1) -const CURLE_FAILED_INIT = (UInt32)(2) -const CURLE_URL_MALFORMAT = (UInt32)(3) -const CURLE_NOT_BUILT_IN = (UInt32)(4) -const CURLE_COULDNT_RESOLVE_PROXY = (UInt32)(5) -const CURLE_COULDNT_RESOLVE_HOST = (UInt32)(6) -const CURLE_COULDNT_CONNECT = (UInt32)(7) -const CURLE_WEIRD_SERVER_REPLY = (UInt32)(8) -const CURLE_REMOTE_ACCESS_DENIED = (UInt32)(9) -const CURLE_FTP_ACCEPT_FAILED = (UInt32)(10) -const CURLE_FTP_WEIRD_PASS_REPLY = (UInt32)(11) -const CURLE_FTP_ACCEPT_TIMEOUT = (UInt32)(12) -const CURLE_FTP_WEIRD_PASV_REPLY = (UInt32)(13) -const CURLE_FTP_WEIRD_227_FORMAT = (UInt32)(14) -const CURLE_FTP_CANT_GET_HOST = (UInt32)(15) -const CURLE_HTTP2 = (UInt32)(16) -const CURLE_FTP_COULDNT_SET_TYPE = (UInt32)(17) -const CURLE_PARTIAL_FILE = (UInt32)(18) -const CURLE_FTP_COULDNT_RETR_FILE = (UInt32)(19) -const CURLE_OBSOLETE20 = (UInt32)(20) -const CURLE_QUOTE_ERROR = (UInt32)(21) -const CURLE_HTTP_RETURNED_ERROR = (UInt32)(22) -const CURLE_WRITE_ERROR = (UInt32)(23) -const CURLE_OBSOLETE24 = (UInt32)(24) -const CURLE_UPLOAD_FAILED = (UInt32)(25) -const CURLE_READ_ERROR = (UInt32)(26) -const CURLE_OUT_OF_MEMORY = (UInt32)(27) -const CURLE_OPERATION_TIMEDOUT = (UInt32)(28) -const CURLE_OBSOLETE29 = (UInt32)(29) -const CURLE_FTP_PORT_FAILED = (UInt32)(30) -const CURLE_FTP_COULDNT_USE_REST = (UInt32)(31) -const CURLE_OBSOLETE32 = (UInt32)(32) -const CURLE_RANGE_ERROR = (UInt32)(33) -const CURLE_HTTP_POST_ERROR = (UInt32)(34) -const CURLE_SSL_CONNECT_ERROR = (UInt32)(35) -const CURLE_BAD_DOWNLOAD_RESUME = (UInt32)(36) -const CURLE_FILE_COULDNT_READ_FILE = (UInt32)(37) -const CURLE_LDAP_CANNOT_BIND = (UInt32)(38) -const CURLE_LDAP_SEARCH_FAILED = (UInt32)(39) -const CURLE_OBSOLETE40 = (UInt32)(40) -const CURLE_FUNCTION_NOT_FOUND = (UInt32)(41) -const CURLE_ABORTED_BY_CALLBACK = (UInt32)(42) -const CURLE_BAD_FUNCTION_ARGUMENT = (UInt32)(43) -const CURLE_OBSOLETE44 = (UInt32)(44) -const CURLE_INTERFACE_FAILED = (UInt32)(45) -const CURLE_OBSOLETE46 = (UInt32)(46) -const CURLE_TOO_MANY_REDIRECTS = (UInt32)(47) -const CURLE_UNKNOWN_OPTION = (UInt32)(48) -const CURLE_TELNET_OPTION_SYNTAX = (UInt32)(49) -const CURLE_OBSOLETE50 = (UInt32)(50) -const CURLE_PEER_FAILED_VERIFICATION = (UInt32)(51) -const CURLE_GOT_NOTHING = (UInt32)(52) -const CURLE_SSL_ENGINE_NOTFOUND = (UInt32)(53) -const CURLE_SSL_ENGINE_SETFAILED = (UInt32)(54) -const CURLE_SEND_ERROR = (UInt32)(55) -const CURLE_RECV_ERROR = (UInt32)(56) -const CURLE_OBSOLETE57 = (UInt32)(57) -const CURLE_SSL_CERTPROBLEM = (UInt32)(58) -const CURLE_SSL_CIPHER = (UInt32)(59) -const CURLE_SSL_CACERT = (UInt32)(60) -const CURLE_BAD_CONTENT_ENCODING = (UInt32)(61) -const CURLE_LDAP_INVALID_URL = (UInt32)(62) -const CURLE_FILESIZE_EXCEEDED = (UInt32)(63) -const CURLE_USE_SSL_FAILED = (UInt32)(64) -const CURLE_SEND_FAIL_REWIND = (UInt32)(65) -const CURLE_SSL_ENGINE_INITFAILED = (UInt32)(66) -const CURLE_LOGIN_DENIED = (UInt32)(67) -const CURLE_TFTP_NOTFOUND = (UInt32)(68) -const CURLE_TFTP_PERM = (UInt32)(69) -const CURLE_REMOTE_DISK_FULL = (UInt32)(70) -const CURLE_TFTP_ILLEGAL = (UInt32)(71) -const CURLE_TFTP_UNKNOWNID = (UInt32)(72) -const CURLE_REMOTE_FILE_EXISTS = (UInt32)(73) -const CURLE_TFTP_NOSUCHUSER = (UInt32)(74) -const CURLE_CONV_FAILED = (UInt32)(75) -const CURLE_CONV_REQD = (UInt32)(76) -const CURLE_SSL_CACERT_BADFILE = (UInt32)(77) -const CURLE_REMOTE_FILE_NOT_FOUND = (UInt32)(78) -const CURLE_SSH = (UInt32)(79) -const CURLE_SSL_SHUTDOWN_FAILED = (UInt32)(80) -const CURLE_AGAIN = (UInt32)(81) -const CURLE_SSL_CRL_BADFILE = (UInt32)(82) -const CURLE_SSL_ISSUER_ERROR = (UInt32)(83) -const CURLE_FTP_PRET_FAILED = (UInt32)(84) -const CURLE_RTSP_CSEQ_ERROR = (UInt32)(85) -const CURLE_RTSP_SESSION_ERROR = (UInt32)(86) -const CURLE_FTP_BAD_FILE_LIST = (UInt32)(87) -const CURLE_CHUNK_FAILED = (UInt32)(88) -const CURLE_NO_CONNECTION_AVAILABLE = (UInt32)(89) -const CURLE_SSL_PINNEDPUBKEYNOTMATCH = (UInt32)(90) -const CURLE_SSL_INVALIDCERTSTATUS = (UInt32)(91) -const CURLE_HTTP2_STREAM = (UInt32)(92) -const CURLE_RECURSIVE_API_CALL = (UInt32)(93) -const CURL_LAST = (UInt32)(94) -# end enum CURLcode - -const curl_conv_callback = Ptr{Cvoid} -const curl_ssl_ctx_callback = Ptr{Cvoid} - -# begin enum curl_proxytype -const curl_proxytype = UInt32 -const CURLPROXY_HTTP = (UInt32)(0) -const CURLPROXY_HTTP_1_0 = (UInt32)(1) -const CURLPROXY_HTTPS = (UInt32)(2) -const CURLPROXY_SOCKS4 = (UInt32)(4) -const CURLPROXY_SOCKS5 = (UInt32)(5) -const CURLPROXY_SOCKS4A = (UInt32)(6) -const CURLPROXY_SOCKS5_HOSTNAME = (UInt32)(7) -# end enum curl_proxytype - -const CURLSSH_AUTH_ANY = ~0 -const CURLSSH_AUTH_NONE = 0 -const CURLSSH_AUTH_PUBLICKEY = 1 << 0 -const CURLSSH_AUTH_PASSWORD = 1 << 1 -const CURLSSH_AUTH_HOST = 1 << 2 -const CURLSSH_AUTH_KEYBOARD = 1 << 3 -const CURLSSH_AUTH_AGENT = 1 << 4 -const CURLSSH_AUTH_GSSAPI = 1 << 5 -const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY -const CURLGSSAPI_DELEGATION_NONE = 0 -const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1 << 0 -const CURLGSSAPI_DELEGATION_FLAG = 1 << 1 -const CURL_ERROR_SIZE = 256 - -# begin enum curl_khtype -const curl_khtype = UInt32 -const CURLKHTYPE_UNKNOWN = (UInt32)(0) -const CURLKHTYPE_RSA1 = (UInt32)(1) -const CURLKHTYPE_RSA = (UInt32)(2) -const CURLKHTYPE_DSS = (UInt32)(3) -const CURLKHTYPE_ECDSA = (UInt32)(4) -const CURLKHTYPE_ED25519 = (UInt32)(5) -# end enum curl_khtype - -mutable struct curl_khkey - key::Ptr{UInt8} - len::Csize_t - keytype::Cvoid -end - -# begin enum curl_khstat -const curl_khstat = UInt32 -const CURLKHSTAT_FINE_ADD_TO_FILE = (UInt32)(0) -const CURLKHSTAT_FINE = (UInt32)(1) -const CURLKHSTAT_REJECT = (UInt32)(2) -const CURLKHSTAT_DEFER = (UInt32)(3) -const CURLKHSTAT_LAST = (UInt32)(4) -# end enum curl_khstat - -# begin enum curl_khmatch -const curl_khmatch = UInt32 -const CURLKHMATCH_OK = (UInt32)(0) -const CURLKHMATCH_MISMATCH = (UInt32)(1) -const CURLKHMATCH_MISSING = (UInt32)(2) -const CURLKHMATCH_LAST = (UInt32)(3) -# end enum curl_khmatch - -const curl_sshkeycallback = Ptr{Cvoid} - -# begin enum curl_usessl -const curl_usessl = UInt32 -const CURLUSESSL_NONE = (UInt32)(0) -const CURLUSESSL_TRY = (UInt32)(1) -const CURLUSESSL_CONTROL = (UInt32)(2) -const CURLUSESSL_ALL = (UInt32)(3) -const CURLUSESSL_LAST = (UInt32)(4) -# end enum curl_usessl - -const CURLSSLOPT_ALLOW_BEAST = 1 << 0 -const CURLSSLOPT_NO_REVOKE = 1 << 1 -const CURL_HET_DEFAULT = Clong(200) - -const curl_ftpssl = curl_usessl -const CURLFTPSSL_NONE = CURLUSESSL_NONE -const CURLFTPSSL_TRY = CURLUSESSL_TRY -const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL -const CURLFTPSSL_ALL = CURLUSESSL_ALL -const CURLFTPSSL_LAST = CURLUSESSL_LAST - -# begin enum curl_ftpccc -const curl_ftpccc = UInt32 -const CURLFTPSSL_CCC_NONE = (UInt32)(0) -const CURLFTPSSL_CCC_PASSIVE = (UInt32)(1) -const CURLFTPSSL_CCC_ACTIVE = (UInt32)(2) -const CURLFTPSSL_CCC_LAST = (UInt32)(3) -# end enum curl_ftpccc - -# begin enum curl_ftpauth -const curl_ftpauth = UInt32 -const CURLFTPAUTH_DEFAULT = (UInt32)(0) -const CURLFTPAUTH_SSL = (UInt32)(1) -const CURLFTPAUTH_TLS = (UInt32)(2) -const CURLFTPAUTH_LAST = (UInt32)(3) -# end enum curl_ftpauth - -# begin enum curl_ftpcreatedir -const curl_ftpcreatedir = UInt32 -const CURLFTP_CREATE_DIR_NONE = (UInt32)(0) -const CURLFTP_CREATE_DIR = (UInt32)(1) -const CURLFTP_CREATE_DIR_RETRY = (UInt32)(2) -const CURLFTP_CREATE_DIR_LAST = (UInt32)(3) -# end enum curl_ftpcreatedir - -# begin enum curl_ftpmethod -const curl_ftpmethod = UInt32 -const CURLFTPMETHOD_DEFAULT = (UInt32)(0) -const CURLFTPMETHOD_MULTICWD = (UInt32)(1) -const CURLFTPMETHOD_NOCWD = (UInt32)(2) -const CURLFTPMETHOD_SINGLECWD = (UInt32)(3) -const CURLFTPMETHOD_LAST = (UInt32)(4) -# end enum curl_ftpmethod - -const CURLHEADER_UNIFIED = 0 -const CURLHEADER_SEPARATE = 1 << 0 -const CURLPROTO_HTTP = 1 << 0 -const CURLPROTO_HTTPS = 1 << 1 -const CURLPROTO_FTP = 1 << 2 -const CURLPROTO_FTPS = 1 << 3 -const CURLPROTO_SCP = 1 << 4 -const CURLPROTO_SFTP = 1 << 5 -const CURLPROTO_TELNET = 1 << 6 -const CURLPROTO_LDAP = 1 << 7 -const CURLPROTO_LDAPS = 1 << 8 -const CURLPROTO_DICT = 1 << 9 -const CURLPROTO_FILE = 1 << 10 -const CURLPROTO_TFTP = 1 << 11 -const CURLPROTO_IMAP = 1 << 12 -const CURLPROTO_IMAPS = 1 << 13 -const CURLPROTO_POP3 = 1 << 14 -const CURLPROTO_POP3S = 1 << 15 -const CURLPROTO_SMTP = 1 << 16 -const CURLPROTO_SMTPS = 1 << 17 -const CURLPROTO_RTSP = 1 << 18 -const CURLPROTO_RTMP = 1 << 19 -const CURLPROTO_RTMPT = 1 << 20 -const CURLPROTO_RTMPE = 1 << 21 -const CURLPROTO_RTMPTE = 1 << 22 -const CURLPROTO_RTMPS = 1 << 23 -const CURLPROTO_RTMPTS = 1 << 24 -const CURLPROTO_GOPHER = 1 << 25 -const CURLPROTO_SMB = 1 << 26 -const CURLPROTO_SMBS = 1 << 27 -const CURLPROTO_ALL = ~0 -const CURLOPTTYPE_LONG = 0 -const CURLOPTTYPE_OBJECTPOINT = 10000 -const CURLOPTTYPE_STRINGPOINT = 10000 -const CURLOPTTYPE_FUNCTIONPOINT = 20000 -const CURLOPTTYPE_OFF_T = 30000 - -# begin enum CURLoption -const CURLoption = UInt32 -const CURLOPT_WRITEDATA = (UInt32)(10001) -const CURLOPT_URL = (UInt32)(10002) -const CURLOPT_PORT = (UInt32)(3) -const CURLOPT_PROXY = (UInt32)(10004) -const CURLOPT_USERPWD = (UInt32)(10005) -const CURLOPT_PROXYUSERPWD = (UInt32)(10006) -const CURLOPT_RANGE = (UInt32)(10007) -const CURLOPT_READDATA = (UInt32)(10009) -const CURLOPT_ERRORBUFFER = (UInt32)(10010) -const CURLOPT_WRITEFUNCTION = (UInt32)(20011) -const CURLOPT_READFUNCTION = (UInt32)(20012) -const CURLOPT_TIMEOUT = (UInt32)(13) -const CURLOPT_INFILESIZE = (UInt32)(14) -const CURLOPT_POSTFIELDS = (UInt32)(10015) -const CURLOPT_REFERER = (UInt32)(10016) -const CURLOPT_FTPPORT = (UInt32)(10017) -const CURLOPT_USERAGENT = (UInt32)(10018) -const CURLOPT_LOW_SPEED_LIMIT = (UInt32)(19) -const CURLOPT_LOW_SPEED_TIME = (UInt32)(20) -const CURLOPT_RESUME_FROM = (UInt32)(21) -const CURLOPT_COOKIE = (UInt32)(10022) -const CURLOPT_HTTPHEADER = (UInt32)(10023) -const CURLOPT_HTTPPOST = (UInt32)(10024) -const CURLOPT_SSLCERT = (UInt32)(10025) -const CURLOPT_KEYPASSWD = (UInt32)(10026) -const CURLOPT_CRLF = (UInt32)(27) -const CURLOPT_QUOTE = (UInt32)(10028) -const CURLOPT_HEADERDATA = (UInt32)(10029) -const CURLOPT_COOKIEFILE = (UInt32)(10031) -const CURLOPT_SSLVERSION = (UInt32)(32) -const CURLOPT_TIMECONDITION = (UInt32)(33) -const CURLOPT_TIMEVALUE = (UInt32)(34) -const CURLOPT_CUSTOMREQUEST = (UInt32)(10036) -const CURLOPT_STDERR = (UInt32)(10037) -const CURLOPT_POSTQUOTE = (UInt32)(10039) -const CURLOPT_OBSOLETE40 = (UInt32)(10040) -const CURLOPT_VERBOSE = (UInt32)(41) -const CURLOPT_HEADER = (UInt32)(42) -const CURLOPT_NOPROGRESS = (UInt32)(43) -const CURLOPT_NOBODY = (UInt32)(44) -const CURLOPT_FAILONERROR = (UInt32)(45) -const CURLOPT_UPLOAD = (UInt32)(46) -const CURLOPT_POST = (UInt32)(47) -const CURLOPT_DIRLISTONLY = (UInt32)(48) -const CURLOPT_APPEND = (UInt32)(50) -const CURLOPT_NETRC = (UInt32)(51) -const CURLOPT_FOLLOWLOCATION = (UInt32)(52) -const CURLOPT_TRANSFERTEXT = (UInt32)(53) -const CURLOPT_PUT = (UInt32)(54) -const CURLOPT_PROGRESSFUNCTION = (UInt32)(20056) -const CURLOPT_PROGRESSDATA = (UInt32)(10057) -const CURLOPT_AUTOREFERER = (UInt32)(58) -const CURLOPT_PROXYPORT = (UInt32)(59) -const CURLOPT_POSTFIELDSIZE = (UInt32)(60) -const CURLOPT_HTTPPROXYTUNNEL = (UInt32)(61) -const CURLOPT_INTERFACE = (UInt32)(10062) -const CURLOPT_KRBLEVEL = (UInt32)(10063) -const CURLOPT_SSL_VERIFYPEER = (UInt32)(64) -const CURLOPT_CAINFO = (UInt32)(10065) -const CURLOPT_MAXREDIRS = (UInt32)(68) -const CURLOPT_FILETIME = (UInt32)(69) -const CURLOPT_TELNETOPTIONS = (UInt32)(10070) -const CURLOPT_MAXCONNECTS = (UInt32)(71) -const CURLOPT_OBSOLETE72 = (UInt32)(72) -const CURLOPT_FRESH_CONNECT = (UInt32)(74) -const CURLOPT_FORBID_REUSE = (UInt32)(75) -const CURLOPT_RANDOM_FILE = (UInt32)(10076) -const CURLOPT_EGDSOCKET = (UInt32)(10077) -const CURLOPT_CONNECTTIMEOUT = (UInt32)(78) -const CURLOPT_HEADERFUNCTION = (UInt32)(20079) -const CURLOPT_HTTPGET = (UInt32)(80) -const CURLOPT_SSL_VERIFYHOST = (UInt32)(81) -const CURLOPT_COOKIEJAR = (UInt32)(10082) -const CURLOPT_SSL_CIPHER_LIST = (UInt32)(10083) -const CURLOPT_HTTP_VERSION = (UInt32)(84) -const CURLOPT_FTP_USE_EPSV = (UInt32)(85) -const CURLOPT_SSLCERTTYPE = (UInt32)(10086) -const CURLOPT_SSLKEY = (UInt32)(10087) -const CURLOPT_SSLKEYTYPE = (UInt32)(10088) -const CURLOPT_SSLENGINE = (UInt32)(10089) -const CURLOPT_SSLENGINE_DEFAULT = (UInt32)(90) -const CURLOPT_DNS_USE_GLOBAL_CACHE = (UInt32)(91) -const CURLOPT_DNS_CACHE_TIMEOUT = (UInt32)(92) -const CURLOPT_PREQUOTE = (UInt32)(10093) -const CURLOPT_DEBUGFUNCTION = (UInt32)(20094) -const CURLOPT_DEBUGDATA = (UInt32)(10095) -const CURLOPT_COOKIESESSION = (UInt32)(96) -const CURLOPT_CAPATH = (UInt32)(10097) -const CURLOPT_BUFFERSIZE = (UInt32)(98) -const CURLOPT_NOSIGNAL = (UInt32)(99) -const CURLOPT_SHARE = (UInt32)(10100) -const CURLOPT_PROXYTYPE = (UInt32)(101) -const CURLOPT_ACCEPT_ENCODING = (UInt32)(10102) -const CURLOPT_PRIVATE = (UInt32)(10103) -const CURLOPT_HTTP200ALIASES = (UInt32)(10104) -const CURLOPT_UNRESTRICTED_AUTH = (UInt32)(105) -const CURLOPT_FTP_USE_EPRT = (UInt32)(106) -const CURLOPT_HTTPAUTH = (UInt32)(107) -const CURLOPT_SSL_CTX_FUNCTION = (UInt32)(20108) -const CURLOPT_SSL_CTX_DATA = (UInt32)(10109) -const CURLOPT_FTP_CREATE_MISSING_DIRS = (UInt32)(110) -const CURLOPT_PROXYAUTH = (UInt32)(111) -const CURLOPT_FTP_RESPONSE_TIMEOUT = (UInt32)(112) -const CURLOPT_IPRESOLVE = (UInt32)(113) -const CURLOPT_MAXFILESIZE = (UInt32)(114) -const CURLOPT_INFILESIZE_LARGE = (UInt32)(30115) -const CURLOPT_RESUME_FROM_LARGE = (UInt32)(30116) -const CURLOPT_MAXFILESIZE_LARGE = (UInt32)(30117) -const CURLOPT_NETRC_FILE = (UInt32)(10118) -const CURLOPT_USE_SSL = (UInt32)(119) -const CURLOPT_POSTFIELDSIZE_LARGE = (UInt32)(30120) -const CURLOPT_TCP_NODELAY = (UInt32)(121) -const CURLOPT_FTPSSLAUTH = (UInt32)(129) -const CURLOPT_IOCTLFUNCTION = (UInt32)(20130) -const CURLOPT_IOCTLDATA = (UInt32)(10131) -const CURLOPT_FTP_ACCOUNT = (UInt32)(10134) -const CURLOPT_COOKIELIST = (UInt32)(10135) -const CURLOPT_IGNORE_CONTENT_LENGTH = (UInt32)(136) -const CURLOPT_FTP_SKIP_PASV_IP = (UInt32)(137) -const CURLOPT_FTP_FILEMETHOD = (UInt32)(138) -const CURLOPT_LOCALPORT = (UInt32)(139) -const CURLOPT_LOCALPORTRANGE = (UInt32)(140) -const CURLOPT_CONNECT_ONLY = (UInt32)(141) -const CURLOPT_CONV_FROM_NETWORK_FUNCTION = (UInt32)(20142) -const CURLOPT_CONV_TO_NETWORK_FUNCTION = (UInt32)(20143) -const CURLOPT_CONV_FROM_UTF8_FUNCTION = (UInt32)(20144) -const CURLOPT_MAX_SEND_SPEED_LARGE = (UInt32)(30145) -const CURLOPT_MAX_RECV_SPEED_LARGE = (UInt32)(30146) -const CURLOPT_FTP_ALTERNATIVE_TO_USER = (UInt32)(10147) -const CURLOPT_SOCKOPTFUNCTION = (UInt32)(20148) -const CURLOPT_SOCKOPTDATA = (UInt32)(10149) -const CURLOPT_SSL_SESSIONID_CACHE = (UInt32)(150) -const CURLOPT_SSH_AUTH_TYPES = (UInt32)(151) -const CURLOPT_SSH_PUBLIC_KEYFILE = (UInt32)(10152) -const CURLOPT_SSH_PRIVATE_KEYFILE = (UInt32)(10153) -const CURLOPT_FTP_SSL_CCC = (UInt32)(154) -const CURLOPT_TIMEOUT_MS = (UInt32)(155) -const CURLOPT_CONNECTTIMEOUT_MS = (UInt32)(156) -const CURLOPT_HTTP_TRANSFER_DECODING = (UInt32)(157) -const CURLOPT_HTTP_CONTENT_DECODING = (UInt32)(158) -const CURLOPT_NEW_FILE_PERMS = (UInt32)(159) -const CURLOPT_NEW_DIRECTORY_PERMS = (UInt32)(160) -const CURLOPT_POSTREDIR = (UInt32)(161) -const CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = (UInt32)(10162) -const CURLOPT_OPENSOCKETFUNCTION = (UInt32)(20163) -const CURLOPT_OPENSOCKETDATA = (UInt32)(10164) -const CURLOPT_COPYPOSTFIELDS = (UInt32)(10165) -const CURLOPT_PROXY_TRANSFER_MODE = (UInt32)(166) -const CURLOPT_SEEKFUNCTION = (UInt32)(20167) -const CURLOPT_SEEKDATA = (UInt32)(10168) -const CURLOPT_CRLFILE = (UInt32)(10169) -const CURLOPT_ISSUERCERT = (UInt32)(10170) -const CURLOPT_ADDRESS_SCOPE = (UInt32)(171) -const CURLOPT_CERTINFO = (UInt32)(172) -const CURLOPT_USERNAME = (UInt32)(10173) -const CURLOPT_PASSWORD = (UInt32)(10174) -const CURLOPT_PROXYUSERNAME = (UInt32)(10175) -const CURLOPT_PROXYPASSWORD = (UInt32)(10176) -const CURLOPT_NOPROXY = (UInt32)(10177) -const CURLOPT_TFTP_BLKSIZE = (UInt32)(178) -const CURLOPT_SOCKS5_GSSAPI_SERVICE = (UInt32)(10179) -const CURLOPT_SOCKS5_GSSAPI_NEC = (UInt32)(180) -const CURLOPT_PROTOCOLS = (UInt32)(181) -const CURLOPT_REDIR_PROTOCOLS = (UInt32)(182) -const CURLOPT_SSH_KNOWNHOSTS = (UInt32)(10183) -const CURLOPT_SSH_KEYFUNCTION = (UInt32)(20184) -const CURLOPT_SSH_KEYDATA = (UInt32)(10185) -const CURLOPT_MAIL_FROM = (UInt32)(10186) -const CURLOPT_MAIL_RCPT = (UInt32)(10187) -const CURLOPT_FTP_USE_PRET = (UInt32)(188) -const CURLOPT_RTSP_REQUEST = (UInt32)(189) -const CURLOPT_RTSP_SESSION_ID = (UInt32)(10190) -const CURLOPT_RTSP_STREAM_URI = (UInt32)(10191) -const CURLOPT_RTSP_TRANSPORT = (UInt32)(10192) -const CURLOPT_RTSP_CLIENT_CSEQ = (UInt32)(193) -const CURLOPT_RTSP_SERVER_CSEQ = (UInt32)(194) -const CURLOPT_INTERLEAVEDATA = (UInt32)(10195) -const CURLOPT_INTERLEAVEFUNCTION = (UInt32)(20196) -const CURLOPT_WILDCARDMATCH = (UInt32)(197) -const CURLOPT_CHUNK_BGN_FUNCTION = (UInt32)(20198) -const CURLOPT_CHUNK_END_FUNCTION = (UInt32)(20199) -const CURLOPT_FNMATCH_FUNCTION = (UInt32)(20200) -const CURLOPT_CHUNK_DATA = (UInt32)(10201) -const CURLOPT_FNMATCH_DATA = (UInt32)(10202) -const CURLOPT_RESOLVE = (UInt32)(10203) -const CURLOPT_TLSAUTH_USERNAME = (UInt32)(10204) -const CURLOPT_TLSAUTH_PASSWORD = (UInt32)(10205) -const CURLOPT_TLSAUTH_TYPE = (UInt32)(10206) -const CURLOPT_TRANSFER_ENCODING = (UInt32)(207) -const CURLOPT_CLOSESOCKETFUNCTION = (UInt32)(20208) -const CURLOPT_CLOSESOCKETDATA = (UInt32)(10209) -const CURLOPT_GSSAPI_DELEGATION = (UInt32)(210) -const CURLOPT_DNS_SERVERS = (UInt32)(10211) -const CURLOPT_ACCEPTTIMEOUT_MS = (UInt32)(212) -const CURLOPT_TCP_KEEPALIVE = (UInt32)(213) -const CURLOPT_TCP_KEEPIDLE = (UInt32)(214) -const CURLOPT_TCP_KEEPINTVL = (UInt32)(215) -const CURLOPT_SSL_OPTIONS = (UInt32)(216) -const CURLOPT_MAIL_AUTH = (UInt32)(10217) -const CURLOPT_SASL_IR = (UInt32)(218) -const CURLOPT_XFERINFOFUNCTION = (UInt32)(20219) -const CURLOPT_XOAUTH2_BEARER = (UInt32)(10220) -const CURLOPT_DNS_INTERFACE = (UInt32)(10221) -const CURLOPT_DNS_LOCAL_IP4 = (UInt32)(10222) -const CURLOPT_DNS_LOCAL_IP6 = (UInt32)(10223) -const CURLOPT_LOGIN_OPTIONS = (UInt32)(10224) -const CURLOPT_SSL_ENABLE_NPN = (UInt32)(225) -const CURLOPT_SSL_ENABLE_ALPN = (UInt32)(226) -const CURLOPT_EXPECT_100_TIMEOUT_MS = (UInt32)(227) -const CURLOPT_PROXYHEADER = (UInt32)(10228) -const CURLOPT_HEADEROPT = (UInt32)(229) -const CURLOPT_PINNEDPUBLICKEY = (UInt32)(10230) -const CURLOPT_UNIX_SOCKET_PATH = (UInt32)(10231) -const CURLOPT_SSL_VERIFYSTATUS = (UInt32)(232) -const CURLOPT_SSL_FALSESTART = (UInt32)(233) -const CURLOPT_PATH_AS_IS = (UInt32)(234) -const CURLOPT_PROXY_SERVICE_NAME = (UInt32)(10235) -const CURLOPT_SERVICE_NAME = (UInt32)(10236) -const CURLOPT_PIPEWAIT = (UInt32)(237) -const CURLOPT_DEFAULT_PROTOCOL = (UInt32)(10238) -const CURLOPT_STREAM_WEIGHT = (UInt32)(239) -const CURLOPT_STREAM_DEPENDS = (UInt32)(10240) -const CURLOPT_STREAM_DEPENDS_E = (UInt32)(10241) -const CURLOPT_TFTP_NO_OPTIONS = (UInt32)(242) -const CURLOPT_CONNECT_TO = (UInt32)(10243) -const CURLOPT_TCP_FASTOPEN = (UInt32)(244) -const CURLOPT_KEEP_SENDING_ON_ERROR = (UInt32)(245) -const CURLOPT_PROXY_CAINFO = (UInt32)(10246) -const CURLOPT_PROXY_CAPATH = (UInt32)(10247) -const CURLOPT_PROXY_SSL_VERIFYPEER = (UInt32)(248) -const CURLOPT_PROXY_SSL_VERIFYHOST = (UInt32)(249) -const CURLOPT_PROXY_SSLVERSION = (UInt32)(250) -const CURLOPT_PROXY_TLSAUTH_USERNAME = (UInt32)(10251) -const CURLOPT_PROXY_TLSAUTH_PASSWORD = (UInt32)(10252) -const CURLOPT_PROXY_TLSAUTH_TYPE = (UInt32)(10253) -const CURLOPT_PROXY_SSLCERT = (UInt32)(10254) -const CURLOPT_PROXY_SSLCERTTYPE = (UInt32)(10255) -const CURLOPT_PROXY_SSLKEY = (UInt32)(10256) -const CURLOPT_PROXY_SSLKEYTYPE = (UInt32)(10257) -const CURLOPT_PROXY_KEYPASSWD = (UInt32)(10258) -const CURLOPT_PROXY_SSL_CIPHER_LIST = (UInt32)(10259) -const CURLOPT_PROXY_CRLFILE = (UInt32)(10260) -const CURLOPT_PROXY_SSL_OPTIONS = (UInt32)(261) -const CURLOPT_PRE_PROXY = (UInt32)(10262) -const CURLOPT_PROXY_PINNEDPUBLICKEY = (UInt32)(10263) -const CURLOPT_ABSTRACT_UNIX_SOCKET = (UInt32)(10264) -const CURLOPT_SUPPRESS_CONNECT_HEADERS = (UInt32)(265) -const CURLOPT_REQUEST_TARGET = (UInt32)(10266) -const CURLOPT_SOCKS5_AUTH = (UInt32)(267) -const CURLOPT_SSH_COMPRESSION = (UInt32)(268) -const CURLOPT_MIMEPOST = (UInt32)(10269) -const CURLOPT_TIMEVALUE_LARGE = (UInt32)(30270) -const CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = (UInt32)(271) -const CURLOPT_RESOLVER_START_FUNCTION = (UInt32)(20272) -const CURLOPT_RESOLVER_START_DATA = (UInt32)(10273) -const CURLOPT_HAPROXYPROTOCOL = (UInt32)(274) -const CURLOPT_DNS_SHUFFLE_ADDRESSES = (UInt32)(275) -const CURLOPT_TLS13_CIPHERS = (UInt32)(10276) -const CURLOPT_PROXY_TLS13_CIPHERS = (UInt32)(10277) -const CURLOPT_DISALLOW_USERNAME_IN_URL = (UInt32)(278) -const CURLOPT_MAXAGE_CONN = UInt32(288) -const CURLOPT_LASTENTRY = (UInt32)(10299) -# end enum CURLoption - -const CURLOPT_XFERINFODATA = CURLOPT_PROGRESSDATA -const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT -const CURLOPT_POST301 = CURLOPT_POSTREDIR -const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD -const CURLOPT_FTPAPPEND = CURLOPT_APPEND -const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY -const CURLOPT_FTP_SSL = CURLOPT_USE_SSL -const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD -const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL -const CURL_IPRESOLVE_WHATEVER = 0 -const CURL_IPRESOLVE_V4 = 1 -const CURL_IPRESOLVE_V6 = 2 -const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER - -# begin enum ANONYMOUS -const CURL_HTTP_VERSION_NONE = (UInt32)(0) -const CURL_HTTP_VERSION_1_0 = (UInt32)(1) -const CURL_HTTP_VERSION_1_1 = (UInt32)(2) -const CURL_HTTP_VERSION_2_0 = (UInt32)(3) -const CURL_HTTP_VERSION_2TLS = (UInt32)(4) -const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = (UInt32)(5) -const CURL_HTTP_VERSION_LAST = (UInt32)(6) -# end enum ANONYMOUS - -const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 - -# begin enum ANONYMOUS -const CURL_RTSPREQ_NONE = (UInt32)(0) -const CURL_RTSPREQ_OPTIONS = (UInt32)(1) -const CURL_RTSPREQ_DESCRIBE = (UInt32)(2) -const CURL_RTSPREQ_ANNOUNCE = (UInt32)(3) -const CURL_RTSPREQ_SETUP = (UInt32)(4) -const CURL_RTSPREQ_PLAY = (UInt32)(5) -const CURL_RTSPREQ_PAUSE = (UInt32)(6) -const CURL_RTSPREQ_TEARDOWN = (UInt32)(7) -const CURL_RTSPREQ_GET_PARAMETER = (UInt32)(8) -const CURL_RTSPREQ_SET_PARAMETER = (UInt32)(9) -const CURL_RTSPREQ_RECORD = (UInt32)(10) -const CURL_RTSPREQ_RECEIVE = (UInt32)(11) -const CURL_RTSPREQ_LAST = (UInt32)(12) -# end enum ANONYMOUS - -# begin enum CURL_NETRC_OPTION -const CURL_NETRC_OPTION = UInt32 -const CURL_NETRC_IGNORED = (UInt32)(0) -const CURL_NETRC_OPTIONAL = (UInt32)(1) -const CURL_NETRC_REQUIRED = (UInt32)(2) -const CURL_NETRC_LAST = (UInt32)(3) -# end enum CURL_NETRC_OPTION - -# begin enum ANONYMOUS -const CURL_SSLVERSION_DEFAULT = (UInt32)(0) -const CURL_SSLVERSION_TLSv1 = (UInt32)(1) -const CURL_SSLVERSION_SSLv2 = (UInt32)(2) -const CURL_SSLVERSION_SSLv3 = (UInt32)(3) -const CURL_SSLVERSION_TLSv1_0 = (UInt32)(4) -const CURL_SSLVERSION_TLSv1_1 = (UInt32)(5) -const CURL_SSLVERSION_TLSv1_2 = (UInt32)(6) -const CURL_SSLVERSION_TLSv1_3 = (UInt32)(7) -const CURL_SSLVERSION_LAST = (UInt32)(8) -# end enum ANONYMOUS - -# begin enum ANONYMOUS -const CURL_SSLVERSION_MAX_NONE = (UInt32)(0) -const CURL_SSLVERSION_MAX_DEFAULT = (UInt32)(65536) -const CURL_SSLVERSION_MAX_TLSv1_0 = (UInt32)(262144) -const CURL_SSLVERSION_MAX_TLSv1_1 = (UInt32)(327680) -const CURL_SSLVERSION_MAX_TLSv1_2 = (UInt32)(393216) -const CURL_SSLVERSION_MAX_TLSv1_3 = (UInt32)(458752) -const CURL_SSLVERSION_MAX_LAST = (UInt32)(524288) -# end enum ANONYMOUS - -# begin enum CURL_TLSAUTH -const CURL_TLSAUTH = UInt32 -const CURL_TLSAUTH_NONE = (UInt32)(0) -const CURL_TLSAUTH_SRP = (UInt32)(1) -const CURL_TLSAUTH_LAST = (UInt32)(2) -# end enum CURL_TLSAUTH - -const CURL_REDIR_GET_ALL = 0 -const CURL_REDIR_POST_301 = 1 -const CURL_REDIR_POST_302 = 2 -const CURL_REDIR_POST_303 = 4 -const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301 | CURL_REDIR_POST_302) | CURL_REDIR_POST_303 - -# begin enum curl_TimeCond -const curl_TimeCond = UInt32 -const CURL_TIMECOND_NONE = (UInt32)(0) -const CURL_TIMECOND_IFMODSINCE = (UInt32)(1) -const CURL_TIMECOND_IFUNMODSINCE = (UInt32)(2) -const CURL_TIMECOND_LASTMOD = (UInt32)(3) -const CURL_TIMECOND_LAST = (UInt32)(4) -# end enum curl_TimeCond - -struct curl_mime_s end - -const curl_mime = Cvoid - -struct curl_mimepart_s end - -const curl_mimepart = Cvoid - -# begin enum CURLformoption -const CURLformoption = UInt32 -const CURLFORM_NOTHING = (UInt32)(0) -const CURLFORM_COPYNAME = (UInt32)(1) -const CURLFORM_PTRNAME = (UInt32)(2) -const CURLFORM_NAMELENGTH = (UInt32)(3) -const CURLFORM_COPYCONTENTS = (UInt32)(4) -const CURLFORM_PTRCONTENTS = (UInt32)(5) -const CURLFORM_CONTENTSLENGTH = (UInt32)(6) -const CURLFORM_FILECONTENT = (UInt32)(7) -const CURLFORM_ARRAY = (UInt32)(8) -const CURLFORM_OBSOLETE = (UInt32)(9) -const CURLFORM_FILE = (UInt32)(10) -const CURLFORM_BUFFER = (UInt32)(11) -const CURLFORM_BUFFERPTR = (UInt32)(12) -const CURLFORM_BUFFERLENGTH = (UInt32)(13) -const CURLFORM_CONTENTTYPE = (UInt32)(14) -const CURLFORM_CONTENTHEADER = (UInt32)(15) -const CURLFORM_FILENAME = (UInt32)(16) -const CURLFORM_END = (UInt32)(17) -const CURLFORM_OBSOLETE2 = (UInt32)(18) -const CURLFORM_STREAM = (UInt32)(19) -const CURLFORM_CONTENTLEN = (UInt32)(20) -const CURLFORM_LASTENTRY = (UInt32)(21) -# end enum CURLformoption - -mutable struct curl_forms - option::CURLformoption - value::Ptr{UInt8} -end - -# begin enum CURLFORMcode -const CURLFORMcode = UInt32 -const CURL_FORMADD_OK = (UInt32)(0) -const CURL_FORMADD_MEMORY = (UInt32)(1) -const CURL_FORMADD_OPTION_TWICE = (UInt32)(2) -const CURL_FORMADD_NULL = (UInt32)(3) -const CURL_FORMADD_UNKNOWN_OPTION = (UInt32)(4) -const CURL_FORMADD_INCOMPLETE = (UInt32)(5) -const CURL_FORMADD_ILLEGAL_ARRAY = (UInt32)(6) -const CURL_FORMADD_DISABLED = (UInt32)(7) -const CURL_FORMADD_LAST = (UInt32)(8) -# end enum CURLFORMcode - -const curl_formget_callback = Ptr{Cvoid} - -mutable struct curl_slist - data::Ptr{UInt8} - next::Ptr{Cvoid} -end - -const curl_ssl_backend = Cvoid - -# begin enum CURLsslset -const CURLsslset = UInt32 -const CURLSSLSET_OK = (UInt32)(0) -const CURLSSLSET_UNKNOWN_BACKEND = (UInt32)(1) -const CURLSSLSET_TOO_LATE = (UInt32)(2) -const CURLSSLSET_NO_BACKENDS = (UInt32)(3) -# end enum CURLsslset - -mutable struct curl_certinfo - num_of_certs::Cint - certinfo::Ptr{Ptr{Cvoid}} -end - -mutable struct curl_tlssessioninfo - backend::curl_sslbackend - internals::Ptr{Cvoid} -end - -const CURLINFO_STRING = 0x00100000 -const CURLINFO_LONG = 0x00200000 -const CURLINFO_DOUBLE = 0x00300000 -const CURLINFO_SLIST = 0x00400000 -const CURLINFO_PTR = 0x00400000 -const CURLINFO_SOCKET = 0x00500000 -const CURLINFO_OFF_T = 0x00600000 -const CURLINFO_MASK = 0x000fffff -const CURLINFO_TYPEMASK = 0x00f00000 - -# begin enum CURLINFO -const CURLINFO = UInt32 -const CURLINFO_NONE = (UInt32)(0) -const CURLINFO_EFFECTIVE_URL = (UInt32)(1048577) -const CURLINFO_RESPONSE_CODE = (UInt32)(2097154) -const CURLINFO_TOTAL_TIME = (UInt32)(3145731) -const CURLINFO_NAMELOOKUP_TIME = (UInt32)(3145732) -const CURLINFO_CONNECT_TIME = (UInt32)(3145733) -const CURLINFO_PRETRANSFER_TIME = (UInt32)(3145734) -const CURLINFO_SIZE_UPLOAD = (UInt32)(3145735) -const CURLINFO_SIZE_UPLOAD_T = (UInt32)(6291463) -const CURLINFO_SIZE_DOWNLOAD = (UInt32)(3145736) -const CURLINFO_SIZE_DOWNLOAD_T = (UInt32)(6291464) -const CURLINFO_SPEED_DOWNLOAD = (UInt32)(3145737) -const CURLINFO_SPEED_DOWNLOAD_T = (UInt32)(6291465) -const CURLINFO_SPEED_UPLOAD = (UInt32)(3145738) -const CURLINFO_SPEED_UPLOAD_T = (UInt32)(6291466) -const CURLINFO_HEADER_SIZE = (UInt32)(2097163) -const CURLINFO_REQUEST_SIZE = (UInt32)(2097164) -const CURLINFO_SSL_VERIFYRESULT = (UInt32)(2097165) -const CURLINFO_FILETIME = (UInt32)(2097166) -const CURLINFO_FILETIME_T = (UInt32)(6291470) -const CURLINFO_CONTENT_LENGTH_DOWNLOAD = (UInt32)(3145743) -const CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = (UInt32)(6291471) -const CURLINFO_CONTENT_LENGTH_UPLOAD = (UInt32)(3145744) -const CURLINFO_CONTENT_LENGTH_UPLOAD_T = (UInt32)(6291472) -const CURLINFO_STARTTRANSFER_TIME = (UInt32)(3145745) -const CURLINFO_CONTENT_TYPE = (UInt32)(1048594) -const CURLINFO_REDIRECT_TIME = (UInt32)(3145747) -const CURLINFO_REDIRECT_COUNT = (UInt32)(2097172) -const CURLINFO_PRIVATE = (UInt32)(1048597) -const CURLINFO_HTTP_CONNECTCODE = (UInt32)(2097174) -const CURLINFO_HTTPAUTH_AVAIL = (UInt32)(2097175) -const CURLINFO_PROXYAUTH_AVAIL = (UInt32)(2097176) -const CURLINFO_OS_ERRNO = (UInt32)(2097177) -const CURLINFO_NUM_CONNECTS = (UInt32)(2097178) -const CURLINFO_SSL_ENGINES = (UInt32)(4194331) -const CURLINFO_COOKIELIST = (UInt32)(4194332) -const CURLINFO_LASTSOCKET = (UInt32)(2097181) -const CURLINFO_FTP_ENTRY_PATH = (UInt32)(1048606) -const CURLINFO_REDIRECT_URL = (UInt32)(1048607) -const CURLINFO_PRIMARY_IP = (UInt32)(1048608) -const CURLINFO_APPCONNECT_TIME = (UInt32)(3145761) -const CURLINFO_CERTINFO = (UInt32)(4194338) -const CURLINFO_CONDITION_UNMET = (UInt32)(2097187) -const CURLINFO_RTSP_SESSION_ID = (UInt32)(1048612) -const CURLINFO_RTSP_CLIENT_CSEQ = (UInt32)(2097189) -const CURLINFO_RTSP_SERVER_CSEQ = (UInt32)(2097190) -const CURLINFO_RTSP_CSEQ_RECV = (UInt32)(2097191) -const CURLINFO_PRIMARY_PORT = (UInt32)(2097192) -const CURLINFO_LOCAL_IP = (UInt32)(1048617) -const CURLINFO_LOCAL_PORT = (UInt32)(2097194) -const CURLINFO_TLS_SESSION = (UInt32)(4194347) -const CURLINFO_ACTIVESOCKET = (UInt32)(5242924) -const CURLINFO_TLS_SSL_PTR = (UInt32)(4194349) -const CURLINFO_HTTP_VERSION = (UInt32)(2097198) -const CURLINFO_PROXY_SSL_VERIFYRESULT = (UInt32)(2097199) -const CURLINFO_PROTOCOL = (UInt32)(2097200) -const CURLINFO_SCHEME = (UInt32)(1048625) -const CURLINFO_TOTAL_TIME_T = (UInt32)(6291506) -const CURLINFO_NAMELOOKUP_TIME_T = (UInt32)(6291507) -const CURLINFO_CONNECT_TIME_T = (UInt32)(6291508) -const CURLINFO_PRETRANSFER_TIME_T = (UInt32)(6291509) -const CURLINFO_STARTTRANSFER_TIME_T = (UInt32)(6291510) -const CURLINFO_REDIRECT_TIME_T = (UInt32)(6291511) -const CURLINFO_APPCONNECT_TIME_T = (UInt32)(6291512) -const CURLINFO_LASTONE = (UInt32)(56) -# end enum CURLINFO - -const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE - -# begin enum curl_closepolicy -const curl_closepolicy = UInt32 -const CURLCLOSEPOLICY_NONE = (UInt32)(0) -const CURLCLOSEPOLICY_OLDEST = (UInt32)(1) -const CURLCLOSEPOLICY_LEAST_RECENTLY_USED = (UInt32)(2) -const CURLCLOSEPOLICY_LEAST_TRAFFIC = (UInt32)(3) -const CURLCLOSEPOLICY_SLOWEST = (UInt32)(4) -const CURLCLOSEPOLICY_CALLBACK = (UInt32)(5) -const CURLCLOSEPOLICY_LAST = (UInt32)(6) -# end enum curl_closepolicy - -const CURL_GLOBAL_SSL = 1 << 0 -const CURL_GLOBAL_WIN32 = 1 << 1 -const CURL_GLOBAL_ALL = CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32 -const CURL_GLOBAL_NOTHING = 0 -const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL -const CURL_GLOBAL_ACK_EINTR = 1 << 2 - -# begin enum curl_lock_data -const curl_lock_data = UInt32 -const CURL_LOCK_DATA_NONE = (UInt32)(0) -const CURL_LOCK_DATA_SHARE = (UInt32)(1) -const CURL_LOCK_DATA_COOKIE = (UInt32)(2) -const CURL_LOCK_DATA_DNS = (UInt32)(3) -const CURL_LOCK_DATA_SSL_SESSION = (UInt32)(4) -const CURL_LOCK_DATA_CONNECT = (UInt32)(5) -const CURL_LOCK_DATA_PSL = (UInt32)(6) -const CURL_LOCK_DATA_LAST = (UInt32)(7) -# end enum curl_lock_data - -# begin enum curl_lock_access -const curl_lock_access = UInt32 -const CURL_LOCK_ACCESS_NONE = (UInt32)(0) -const CURL_LOCK_ACCESS_SHARED = (UInt32)(1) -const CURL_LOCK_ACCESS_SINGLE = (UInt32)(2) -const CURL_LOCK_ACCESS_LAST = (UInt32)(3) -# end enum curl_lock_access - -const curl_lock_function = Ptr{Cvoid} -const curl_unlock_function = Ptr{Cvoid} - -# begin enum CURLSHcode -const CURLSHcode = UInt32 -const CURLSHE_OK = (UInt32)(0) -const CURLSHE_BAD_OPTION = (UInt32)(1) -const CURLSHE_IN_USE = (UInt32)(2) -const CURLSHE_INVALID = (UInt32)(3) -const CURLSHE_NOMEM = (UInt32)(4) -const CURLSHE_NOT_BUILT_IN = (UInt32)(5) -const CURLSHE_LAST = (UInt32)(6) -# end enum CURLSHcode - -# begin enum CURLSHoption -const CURLSHoption = UInt32 -const CURLSHOPT_NONE = (UInt32)(0) -const CURLSHOPT_SHARE = (UInt32)(1) -const CURLSHOPT_UNSHARE = (UInt32)(2) -const CURLSHOPT_LOCKFUNC = (UInt32)(3) -const CURLSHOPT_UNLOCKFUNC = (UInt32)(4) -const CURLSHOPT_USERDATA = (UInt32)(5) -const CURLSHOPT_LAST = (UInt32)(6) -# end enum CURLSHoption - -# begin enum CURLversion -const CURLversion = UInt32 -const CURLVERSION_FIRST = (UInt32)(0) -const CURLVERSION_SECOND = (UInt32)(1) -const CURLVERSION_THIRD = (UInt32)(2) -const CURLVERSION_FOURTH = (UInt32)(3) -const CURLVERSION_FIFTH = (UInt32)(4) -const CURLVERSION_LAST = (UInt32)(5) -# end enum CURLversion - -const CURLVERSION_NOW = CURLVERSION_FIFTH - -mutable struct curl_version_info_data - age::CURLversion - version::Ptr{UInt8} - version_num::UInt32 - host::Ptr{UInt8} - features::Int32 - ssl_version::Ptr{UInt8} - ssl_version_num::Int32 - libz_version::Ptr{UInt8} - protocols::Ptr{Ptr{UInt8}} - ares::Ptr{UInt8} - ares_num::Int32 - libidn::Ptr{UInt8} - iconv_ver_num::Int32 - libssh_version::Ptr{UInt8} - brotli_ver_num::UInt32 - brotli_version::Ptr{UInt8} -end - -const CURL_VERSION_IPV6 = 1 << 0 -const CURL_VERSION_KERBEROS4 = 1 << 1 -const CURL_VERSION_SSL = 1 << 2 -const CURL_VERSION_LIBZ = 1 << 3 -const CURL_VERSION_NTLM = 1 << 4 -const CURL_VERSION_GSSNEGOTIATE = 1 << 5 -const CURL_VERSION_DEBUG = 1 << 6 -const CURL_VERSION_ASYNCHDNS = 1 << 7 -const CURL_VERSION_SPNEGO = 1 << 8 -const CURL_VERSION_LARGEFILE = 1 << 9 -const CURL_VERSION_IDN = 1 << 10 -const CURL_VERSION_SSPI = 1 << 11 -const CURL_VERSION_CONV = 1 << 12 -const CURL_VERSION_CURLDEBUG = 1 << 13 -const CURL_VERSION_TLSAUTH_SRP = 1 << 14 -const CURL_VERSION_NTLM_WB = 1 << 15 -const CURL_VERSION_HTTP2 = 1 << 16 -const CURL_VERSION_GSSAPI = 1 << 17 -const CURL_VERSION_KERBEROS5 = 1 << 18 -const CURL_VERSION_UNIX_SOCKETS = 1 << 19 -const CURL_VERSION_PSL = 1 << 20 -const CURL_VERSION_HTTPS_PROXY = 1 << 21 -const CURL_VERSION_MULTI_SSL = 1 << 22 -const CURL_VERSION_BROTLI = 1 << 23 -const CURLPAUSE_RECV = 1 << 0 -const CURLPAUSE_RECV_CONT = 0 -const CURLPAUSE_SEND = 1 << 2 -const CURLPAUSE_SEND_CONT = 0 -const CURLPAUSE_ALL = CURLPAUSE_RECV | CURLPAUSE_SEND -const CURLPAUSE_CONT = CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT - -const CURLE_OBSOLETE16 = CURLE_HTTP2 -const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED -const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT - -const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING -const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY -const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION -const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION -const CURLE_OBSOLETE = CURLE_OBSOLETE50 -const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 -const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 -const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 -const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 -const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 -const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 -const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 -const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 -const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 -const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 -const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 -const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN -const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED -const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE -const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR -const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL -const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS -const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR -const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED -const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT -const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR -const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED -const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED -const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE -const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME -const CURLE_ALREADY_COMPLETE = 99999 -const CURLOPT_FILE = CURLOPT_WRITEDATA -const CURLOPT_INFILE = CURLOPT_READDATA -const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA -const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 -const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 - -# multi.h - -const CURLM = Cvoid - -# begin enum CURLMcode -const CURLMcode = Cint -const CURLM_CALL_MULTI_PERFORM = (Int32)(-1) -const CURLM_OK = (Int32)(0) -const CURLM_BAD_HANDLE = (Int32)(1) -const CURLM_BAD_EASY_HANDLE = (Int32)(2) -const CURLM_OUT_OF_MEMORY = (Int32)(3) -const CURLM_INTERNAL_ERROR = (Int32)(4) -const CURLM_BAD_SOCKET = (Int32)(5) -const CURLM_UNKNOWN_OPTION = (Int32)(6) -const CURLM_ADDED_ALREADY = (Int32)(7) -const CURLM_RECURSIVE_API_CALL = (Int32)(8) -const CURLM_LAST = (Int32)(9) -# end enum CURLMcode - -const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM -const CURLPIPE_NOTHING = Clong(0) -const CURLPIPE_HTTP1 = Clong(1) -const CURLPIPE_MULTIPLEX = Clong(2) - -# begin enum CURLMSG -const CURLMSG = UInt32 -const CURLMSG_NONE = (UInt32)(0) -const CURLMSG_DONE = (UInt32)(1) -const CURLMSG_LAST = (UInt32)(2) -# end enum CURLMSG - -mutable struct CURLMsg - msg::CURLMSG - easy_handle::Ptr{CURL} - data::Cvoid -end - -const CURL_WAIT_POLLIN = 0x0001 -const CURL_WAIT_POLLPRI = 0x0002 -const CURL_WAIT_POLLOUT = 0x0004 - -mutable struct curl_waitfd - fd::curl_socket_t - events::Int16 - revents::Int16 -end - -const CURL_POLL_NONE = 0 -const CURL_POLL_IN = 1 -const CURL_POLL_OUT = 2 -const CURL_POLL_INOUT = 3 -const CURL_POLL_REMOVE = 4 -const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD -const CURL_CSELECT_IN = 0x01 -const CURL_CSELECT_OUT = 0x02 -const CURL_CSELECT_ERR = 0x04 - -const curl_socket_callback = Ptr{Cvoid} -const curl_multi_timer_callback = Ptr{Cvoid} - -# begin enum CURLMoption -const CURLMoption = UInt32 -const CURLMOPT_SOCKETFUNCTION = (UInt32)(20001) -const CURLMOPT_SOCKETDATA = (UInt32)(10002) -const CURLMOPT_PIPELINING = (UInt32)(3) -const CURLMOPT_TIMERFUNCTION = (UInt32)(20004) -const CURLMOPT_TIMERDATA = (UInt32)(10005) -const CURLMOPT_MAXCONNECTS = (UInt32)(6) -const CURLMOPT_MAX_HOST_CONNECTIONS = (UInt32)(7) -const CURLMOPT_MAX_PIPELINE_LENGTH = (UInt32)(8) -const CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = (UInt32)(30009) -const CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = (UInt32)(30010) -const CURLMOPT_PIPELINING_SITE_BL = (UInt32)(10011) -const CURLMOPT_PIPELINING_SERVER_BL = (UInt32)(10012) -const CURLMOPT_MAX_TOTAL_CONNECTIONS = (UInt32)(13) -const CURLMOPT_PUSHFUNCTION = (UInt32)(20014) -const CURLMOPT_PUSHDATA = (UInt32)(10015) -const CURLMOPT_LASTENTRY = (UInt32)(10016) -# end enum CURLMoption - -const CURL_PUSH_OK = 0 -const CURL_PUSH_DENY = 1 - -struct curl_pushheaders end - -const curl_push_callback = Ptr{Cvoid} diff --git a/src/lC_curl_h.jl b/src/lC_curl_h.jl deleted file mode 100644 index 9a988da..0000000 --- a/src/lC_curl_h.jl +++ /dev/null @@ -1,255 +0,0 @@ -# Julia wrapper for header: /usr/local/opt/curl/include/curl/curl.h -# Automatically generated using Clang.jl wrap_c, version 0.0.0 - - -function curl_strequal(s1, s2) - ccall((:curl_strequal, libcurl), Cint, (Ptr{UInt8}, Ptr{UInt8}), s1, s2) -end - -function curl_strnequal(s1, s2, n) - ccall((:curl_strnequal, libcurl), Cint, (Ptr{UInt8}, Ptr{UInt8}, Csize_t), s1, s2, n) -end - -function curl_mime_init(easy) - ccall((:curl_mime_init, libcurl), Ptr{curl_mime}, (Ptr{CURL},), easy) -end - -function curl_mime_free(mime) - ccall((:curl_mime_free, libcurl), Cvoid, (Ptr{curl_mime},), mime) -end - -function curl_mime_addpart(mime) - ccall((:curl_mime_addpart, libcurl), Ptr{curl_mimepart}, (Ptr{curl_mime},), mime) -end - -function curl_mime_name(part, name) - ccall((:curl_mime_name, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{UInt8}), part, name) -end - -function curl_mime_filename(part, filename) - ccall((:curl_mime_filename, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{UInt8}), part, filename) -end - -function curl_mime_type(part, mimetype) - ccall((:curl_mime_type, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{UInt8}), part, mimetype) -end - -function curl_mime_encoder(part, encoding) - ccall((:curl_mime_encoder, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{UInt8}), part, encoding) -end - -function curl_mime_data(part, data, datasize) - ccall((:curl_mime_data, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{UInt8}, Csize_t), part, data, datasize) -end - -function curl_mime_filedata(part, filename) - ccall((:curl_mime_filedata, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{UInt8}), part, filename) -end - -function curl_mime_data_cb(part, datasize, readfunc, seekfunc, freefunc, arg) - ccall((:curl_mime_data_cb, libcurl), CURLcode, (Ptr{curl_mimepart}, curl_off_t, curl_read_callback, curl_seek_callback, curl_free_callback, Ptr{Cvoid}), part, datasize, readfunc, seekfunc, freefunc, arg) -end - -function curl_mime_subparts(part, subparts) - ccall((:curl_mime_subparts, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{curl_mime}), part, subparts) -end - -function curl_mime_headers(part, headers, take_ownership) - ccall((:curl_mime_headers, libcurl), CURLcode, (Ptr{curl_mimepart}, Ptr{Cvoid}, Cint), part, headers, take_ownership) -end - -function curl_formget(form, arg, append) - ccall((:curl_formget, libcurl), Cint, (Ptr{Cvoid}, Ptr{Cvoid}, curl_formget_callback), form, arg, append) -end - -function curl_formfree(form) - ccall((:curl_formfree, libcurl), Cvoid, (Ptr{Cvoid},), form) -end - -function curl_getenv(variable) - ccall((:curl_getenv, libcurl), Ptr{UInt8}, (Ptr{UInt8},), variable) -end - -function curl_version() - ccall((:curl_version, libcurl), Ptr{UInt8}, ()) -end - -function curl_easy_escape(handle, string, length) - ccall((:curl_easy_escape, libcurl), Ptr{UInt8}, (Ptr{CURL}, Ptr{UInt8}, Cint), handle, string, length) -end - -function curl_escape(string, length) - ccall((:curl_escape, libcurl), Ptr{UInt8}, (Ptr{UInt8}, Cint), string, length) -end - -function curl_easy_unescape(handle, string, length, outlength) - ccall((:curl_easy_unescape, libcurl), Ptr{UInt8}, (Ptr{CURL}, Ptr{UInt8}, Cint, Ptr{Cint}), handle, string, length, outlength) -end - -function curl_unescape(string, length) - ccall((:curl_unescape, libcurl), Ptr{UInt8}, (Ptr{UInt8}, Cint), string, length) -end - -function curl_free(p) - ccall((:curl_free, libcurl), Cvoid, (Ptr{Cvoid},), p) -end - -function curl_global_init(flags) - ccall((:curl_global_init, libcurl), CURLcode, (Clong,), flags) -end - -function curl_global_init_mem(flags, m, f, r, s, c) - ccall((:curl_global_init_mem, libcurl), CURLcode, (Clong, curl_malloc_callback, curl_free_callback, curl_realloc_callback, curl_strdup_callback, curl_calloc_callback), flags, m, f, r, s, c) -end - -function curl_global_cleanup() - ccall((:curl_global_cleanup, libcurl), Cvoid, ()) -end - -function curl_global_sslset(id, name, avail) - ccall((:curl_global_sslset, libcurl), CURLsslset, (curl_sslbackend, Ptr{UInt8}, Ptr{Ptr{Ptr{curl_ssl_backend}}}), id, name, avail) -end - -function curl_slist_append(arg1, arg2) - ccall((:curl_slist_append, libcurl), Ptr{Cvoid}, (Ptr{Cvoid}, Ptr{UInt8}), arg1, arg2) -end - -function curl_slist_free_all(arg1) - ccall((:curl_slist_free_all, libcurl), Cvoid, (Ptr{Cvoid},), arg1) -end - -function curl_getdate(p, unused) - ccall((:curl_getdate, libcurl), time_t, (Ptr{UInt8}, Ptr{time_t}), p, unused) -end - -function curl_share_init() - ccall((:curl_share_init, libcurl), Ptr{CURLSH}, ()) -end - -function curl_share_setopt(handle, opt, param) - ccall((:curl_share_setopt, libcurl), CURLSHcode, (Ptr{CURLSH}, CURLSHoption, Any...), handle, opt, param) -end - -function curl_share_cleanup(arg1) - ccall((:curl_share_cleanup, libcurl), CURLSHcode, (Ptr{CURLSH},), arg1) -end - -function curl_version_info(arg1) - ccall((:curl_version_info, libcurl), Ptr{curl_version_info_data}, (CURLversion,), arg1) -end - -function curl_easy_strerror(arg1) - ccall((:curl_easy_strerror, libcurl), Ptr{UInt8}, (CURLcode,), arg1) -end - -function curl_share_strerror(arg1) - ccall((:curl_share_strerror, libcurl), Ptr{UInt8}, (CURLSHcode,), arg1) -end - -function curl_easy_pause(handle, bitmask) - ccall((:curl_easy_pause, libcurl), CURLcode, (Ptr{CURL}, Cint), handle, bitmask) -end - -function curl_easy_init() - ccall((:curl_easy_init, libcurl), Ptr{CURL}, ()) -end - -function curl_easy_setopt(handle, opt, param) - ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Any...), handle, opt, param) -end - -function curl_easy_perform(curl) - ccall((:curl_easy_perform, libcurl), CURLcode, (Ptr{CURL},), curl) -end - -function curl_easy_cleanup(curl) - ccall((:curl_easy_cleanup, libcurl), Cvoid, (Ptr{CURL},), curl) -end - -function curl_easy_getinfo(handle, info, arg) - ccall((:curl_easy_getinfo, libcurl), CURLcode, (Ptr{CURL}, CURLINFO, Any...), handle, info, arg) -end - -function curl_easy_duphandle(curl) - ccall((:curl_easy_duphandle, libcurl), Ptr{CURL}, (Ptr{CURL},), curl) -end - -function curl_easy_reset(curl) - ccall((:curl_easy_reset, libcurl), Cvoid, (Ptr{CURL},), curl) -end - -function curl_easy_recv(curl, buffer, buflen, n) - ccall((:curl_easy_recv, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) -end - -function curl_easy_send(curl, buffer, buflen, n) - ccall((:curl_easy_send, libcurl), CURLcode, (Ptr{CURL}, Ptr{Cvoid}, Csize_t, Ptr{Csize_t}), curl, buffer, buflen, n) -end - -function curl_multi_init() - ccall((:curl_multi_init, libcurl), Ptr{CURLM}, ()) -end - -function curl_multi_add_handle(multi_handle, curl_handle) - ccall((:curl_multi_add_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) -end - -function curl_multi_remove_handle(multi_handle, curl_handle) - ccall((:curl_multi_remove_handle, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{CURL}), multi_handle, curl_handle) -end - -function curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) - ccall((:curl_multi_fdset, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{fd_set}, Ptr{fd_set}, Ptr{fd_set}, Ptr{Cint}), multi_handle, read_fd_set, write_fd_set, exc_fd_set, max_fd) -end - -function curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms, ret) - ccall((:curl_multi_wait, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cvoid}, UInt32, Cint, Ptr{Cint}), multi_handle, extra_fds, extra_nfds, timeout_ms, ret) -end - -function curl_multi_perform(multi_handle, running_handles) - ccall((:curl_multi_perform, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) -end - -function curl_multi_cleanup(multi_handle) - ccall((:curl_multi_cleanup, libcurl), CURLMcode, (Ptr{CURLM},), multi_handle) -end - -function curl_multi_info_read(multi_handle, msgs_in_queue) - ccall((:curl_multi_info_read, libcurl), Ptr{CURLMsg}, (Ptr{CURLM}, Ptr{Cint}), multi_handle, msgs_in_queue) -end - -function curl_multi_strerror(arg1) - ccall((:curl_multi_strerror, libcurl), Ptr{UInt8}, (CURLMcode,), arg1) -end - -function curl_multi_socket(multi_handle, s, running_handles) - ccall((:curl_multi_socket, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cint}), multi_handle, s, running_handles) -end - -function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles) - ccall((:curl_multi_socket_action, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles) -end - -function curl_multi_socket_all(multi_handle, running_handles) - ccall((:curl_multi_socket_all, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Cint}), multi_handle, running_handles) -end - -function curl_multi_timeout(multi_handle, milliseconds) - ccall((:curl_multi_timeout, libcurl), CURLMcode, (Ptr{CURLM}, Ptr{Clong}), multi_handle, milliseconds) -end - -function curl_multi_setopt(multi_handle, opt, param) - ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Any...), multi_handle, opt, param) -end - -function curl_multi_assign(multi_handle, sockfd, sockp) - ccall((:curl_multi_assign, libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp) -end - -function curl_pushheader_bynum(h, num) - ccall((:curl_pushheader_bynum, libcurl), Ptr{UInt8}, (Ptr{Cvoid}, Csize_t), h, num) -end - -function curl_pushheader_byname(h, name) - ccall((:curl_pushheader_byname, libcurl), Ptr{UInt8}, (Ptr{Cvoid}, Ptr{UInt8}), h, name) -end diff --git a/src/lC_defines_h.jl b/src/lC_defines_h.jl deleted file mode 100644 index 81dfee0..0000000 --- a/src/lC_defines_h.jl +++ /dev/null @@ -1,243 +0,0 @@ -# Generating #define constants -const CURL_TYPEOF_CURL_OFF_T = Clong -const CURL_FORMAT_CURL_OFF_T = "ld" -const CURL_FORMAT_CURL_OFF_TU = "lu" -const CURL_SUFFIX_CURL_OFF_T = Clong -const CURL_SUFFIX_CURL_OFF_TU = Culong -const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t -const CURL_PULL_SYS_TYPES_H = 1 -const CURL_PULL_SYS_SOCKET_H = 1 -const CURL_SOCKET_BAD = -1 -const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL -const CURLSSLBACKEND_BORINGSSL = CURLSSLBACKEND_OPENSSL -const CURLSSLBACKEND_CYASSL = CURLSSLBACKEND_WOLFSSL -const CURL_HTTPPOST_FILENAME = (1<<0) -const CURL_HTTPPOST_READFILE = (1<<1) -const CURL_HTTPPOST_PTRNAME = (1<<2) -const CURL_HTTPPOST_PTRCONTENTS = (1<<3) -const CURL_HTTPPOST_BUFFER = (1<<4) -const CURL_HTTPPOST_PTRBUFFER = (1<<5) -const CURL_HTTPPOST_CALLBACK = (1<<6) -const CURL_HTTPPOST_LARGE = (1<<7) -const CURL_MAX_READ_SIZE = 524288 -const CURL_MAX_WRITE_SIZE = 16384 -const CURL_MAX_HTTP_HEADER = (100*1024) -const CURL_WRITEFUNC_PAUSE = 0x10000001 -const CURLFINFOFLAG_KNOWN_FILENAME = (1<<0) -const CURLFINFOFLAG_KNOWN_FILETYPE = (1<<1) -const CURLFINFOFLAG_KNOWN_TIME = (1<<2) -const CURLFINFOFLAG_KNOWN_PERM = (1<<3) -const CURLFINFOFLAG_KNOWN_UID = (1<<4) -const CURLFINFOFLAG_KNOWN_GID = (1<<5) -const CURLFINFOFLAG_KNOWN_SIZE = (1<<6) -const CURLFINFOFLAG_KNOWN_HLINKCOUNT = (1<<7) -const CURL_CHUNK_BGN_FUNC_OK = 0 -const CURL_CHUNK_BGN_FUNC_FAIL = 1 -const CURL_CHUNK_BGN_FUNC_SKIP = 2 -const CURL_CHUNK_END_FUNC_OK = 0 -const CURL_CHUNK_END_FUNC_FAIL = 1 -const CURL_FNMATCHFUNC_MATCH = 0 -const CURL_FNMATCHFUNC_NOMATCH = 1 -const CURL_FNMATCHFUNC_FAIL = 2 -const CURL_SEEKFUNC_OK = 0 -const CURL_SEEKFUNC_FAIL = 1 -const CURL_SEEKFUNC_CANTSEEK = 2 -const CURL_READFUNC_ABORT = 0x10000000 -const CURL_READFUNC_PAUSE = 0x10000001 -const CURL_SOCKOPT_OK = 0 -const CURL_SOCKOPT_ERROR = 1 -const CURL_SOCKOPT_ALREADY_CONNECTED = 2 -const CURLE_OBSOLETE16 = CURLE_HTTP2 -const CURLE_OBSOLETE10 = CURLE_FTP_ACCEPT_FAILED -const CURLE_OBSOLETE12 = CURLE_FTP_ACCEPT_TIMEOUT -const CURLOPT_ENCODING = CURLOPT_ACCEPT_ENCODING -const CURLE_FTP_WEIRD_SERVER_REPLY = CURLE_WEIRD_SERVER_REPLY -const CURLE_UNKNOWN_TELNET_OPTION = CURLE_UNKNOWN_OPTION -const CURLE_SSL_PEER_CERTIFICATE = CURLE_PEER_FAILED_VERIFICATION -const CURLE_OBSOLETE = CURLE_OBSOLETE50 -const CURLE_BAD_PASSWORD_ENTERED = CURLE_OBSOLETE46 -const CURLE_BAD_CALLING_ORDER = CURLE_OBSOLETE44 -const CURLE_FTP_USER_PASSWORD_INCORRECT = CURLE_OBSOLETE10 -const CURLE_FTP_CANT_RECONNECT = CURLE_OBSOLETE16 -const CURLE_FTP_COULDNT_GET_SIZE = CURLE_OBSOLETE32 -const CURLE_FTP_COULDNT_SET_ASCII = CURLE_OBSOLETE29 -const CURLE_FTP_WEIRD_USER_REPLY = CURLE_OBSOLETE12 -const CURLE_FTP_WRITE_ERROR = CURLE_OBSOLETE20 -const CURLE_LIBRARY_NOT_FOUND = CURLE_OBSOLETE40 -const CURLE_MALFORMAT_USER = CURLE_OBSOLETE24 -const CURLE_SHARE_IN_USE = CURLE_OBSOLETE57 -const CURLE_URL_MALFORMAT_USER = CURLE_NOT_BUILT_IN -const CURLE_FTP_ACCESS_DENIED = CURLE_REMOTE_ACCESS_DENIED -const CURLE_FTP_COULDNT_SET_BINARY = CURLE_FTP_COULDNT_SET_TYPE -const CURLE_FTP_QUOTE_ERROR = CURLE_QUOTE_ERROR -const CURLE_TFTP_DISKFULL = CURLE_REMOTE_DISK_FULL -const CURLE_TFTP_EXISTS = CURLE_REMOTE_FILE_EXISTS -const CURLE_HTTP_RANGE_ERROR = CURLE_RANGE_ERROR -const CURLE_FTP_SSL_FAILED = CURLE_USE_SSL_FAILED -const CURLE_OPERATION_TIMEOUTED = CURLE_OPERATION_TIMEDOUT -const CURLE_HTTP_NOT_FOUND = CURLE_HTTP_RETURNED_ERROR -const CURLE_HTTP_PORT_FAILED = CURLE_INTERFACE_FAILED -const CURLE_FTP_COULDNT_STOR_FILE = CURLE_UPLOAD_FAILED -const CURLE_FTP_PARTIAL_FILE = CURLE_PARTIAL_FILE -const CURLE_FTP_BAD_DOWNLOAD_RESUME = CURLE_BAD_DOWNLOAD_RESUME -const CURLE_ALREADY_COMPLETE = 99999 -const CURLOPT_FILE = CURLOPT_WRITEDATA -const CURLOPT_INFILE = CURLOPT_READDATA -const CURLOPT_WRITEHEADER = CURLOPT_HEADERDATA -const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40 -const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72 -const CURLAUTH_NONE = (0) -const CURLAUTH_BASIC = ((1)<<0) -const CURLAUTH_DIGEST = ((1)<<1) -const CURLAUTH_NEGOTIATE = ((1)<<2) -const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE -const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE -const CURLAUTH_NTLM = ((1)<<3) -const CURLAUTH_DIGEST_IE = ((1)<<4) -const CURLAUTH_NTLM_WB = ((1)<<5) -const CURLAUTH_BEARER = ((1)<<6) -const CURLAUTH_ONLY = ((1)<<31) -const CURLAUTH_ANY = (~CURLAUTH_DIGEST_IE) -const CURLAUTH_ANYSAFE = (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) -const CURLSSH_AUTH_ANY = ~0 -const CURLSSH_AUTH_NONE = 0 -const CURLSSH_AUTH_PUBLICKEY = (1<<0) -const CURLSSH_AUTH_PASSWORD = (1<<1) -const CURLSSH_AUTH_HOST = (1<<2) -const CURLSSH_AUTH_KEYBOARD = (1<<3) -const CURLSSH_AUTH_AGENT = (1<<4) -const CURLSSH_AUTH_GSSAPI = (1<<5) -const CURLSSH_AUTH_DEFAULT = CURLSSH_AUTH_ANY -const CURLGSSAPI_DELEGATION_NONE = 0 -const CURLGSSAPI_DELEGATION_POLICY_FLAG = (1<<0) -const CURLGSSAPI_DELEGATION_FLAG = (1<<1) -const CURL_ERROR_SIZE = 256 -const CURLSSLOPT_ALLOW_BEAST = (1<<0) -const CURLSSLOPT_NO_REVOKE = (1<<1) -const CURL_HET_DEFAULT = Clong(200) -const CURLFTPSSL_NONE = CURLUSESSL_NONE -const CURLFTPSSL_TRY = CURLUSESSL_TRY -const CURLFTPSSL_CONTROL = CURLUSESSL_CONTROL -const CURLFTPSSL_ALL = CURLUSESSL_ALL -const CURLFTPSSL_LAST = CURLUSESSL_LAST -const CURLHEADER_UNIFIED = 0 -const CURLHEADER_SEPARATE = (1<<0) -const CURLPROTO_HTTP = (1<<0) -const CURLPROTO_HTTPS = (1<<1) -const CURLPROTO_FTP = (1<<2) -const CURLPROTO_FTPS = (1<<3) -const CURLPROTO_SCP = (1<<4) -const CURLPROTO_SFTP = (1<<5) -const CURLPROTO_TELNET = (1<<6) -const CURLPROTO_LDAP = (1<<7) -const CURLPROTO_LDAPS = (1<<8) -const CURLPROTO_DICT = (1<<9) -const CURLPROTO_FILE = (1<<10) -const CURLPROTO_TFTP = (1<<11) -const CURLPROTO_IMAP = (1<<12) -const CURLPROTO_IMAPS = (1<<13) -const CURLPROTO_POP3 = (1<<14) -const CURLPROTO_POP3S = (1<<15) -const CURLPROTO_SMTP = (1<<16) -const CURLPROTO_SMTPS = (1<<17) -const CURLPROTO_RTSP = (1<<18) -const CURLPROTO_RTMP = (1<<19) -const CURLPROTO_RTMPT = (1<<20) -const CURLPROTO_RTMPE = (1<<21) -const CURLPROTO_RTMPTE = (1<<22) -const CURLPROTO_RTMPS = (1<<23) -const CURLPROTO_RTMPTS = (1<<24) -const CURLPROTO_GOPHER = (1<<25) -const CURLPROTO_SMB = (1<<26) -const CURLPROTO_SMBS = (1<<27) -const CURLPROTO_ALL = (~0) -const CURLOPTTYPE_LONG = 0 -const CURLOPTTYPE_OBJECTPOINT = 10000 -const CURLOPTTYPE_STRINGPOINT = 10000 -const CURLOPTTYPE_FUNCTIONPOINT = 20000 -const CURLOPTTYPE_OFF_T = 30000 -const CURLOPT_XFERINFODATA = CURLOPT_PROGRESSDATA -const CURLOPT_SERVER_RESPONSE_TIMEOUT = CURLOPT_FTP_RESPONSE_TIMEOUT -const CURLOPT_POST301 = CURLOPT_POSTREDIR -const CURLOPT_SSLKEYPASSWD = CURLOPT_KEYPASSWD -const CURLOPT_FTPAPPEND = CURLOPT_APPEND -const CURLOPT_FTPLISTONLY = CURLOPT_DIRLISTONLY -const CURLOPT_FTP_SSL = CURLOPT_USE_SSL -const CURLOPT_SSLCERTPASSWD = CURLOPT_KEYPASSWD -const CURLOPT_KRB4LEVEL = CURLOPT_KRBLEVEL -const CURL_IPRESOLVE_WHATEVER = 0 -const CURL_IPRESOLVE_V4 = 1 -const CURL_IPRESOLVE_V6 = 2 -const CURLOPT_RTSPHEADER = CURLOPT_HTTPHEADER -const CURL_HTTP_VERSION_2 = CURL_HTTP_VERSION_2_0 -const CURL_REDIR_GET_ALL = 0 -const CURL_REDIR_POST_301 = 1 -const CURL_REDIR_POST_302 = 2 -const CURL_REDIR_POST_303 = 4 -const CURL_REDIR_POST_ALL = (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) -const CURL_ZERO_TERMINATED = reinterpret(Csize_t, -1) -const CURLINFO_STRING = 0x100000 -const CURLINFO_LONG = 0x200000 -const CURLINFO_DOUBLE = 0x300000 -const CURLINFO_SLIST = 0x400000 -const CURLINFO_PTR = 0x400000 -const CURLINFO_SOCKET = 0x500000 -const CURLINFO_OFF_T = 0x600000 -const CURLINFO_MASK = 0x0fffff -const CURLINFO_TYPEMASK = 0xf00000 -const CURLINFO_HTTP_CODE = CURLINFO_RESPONSE_CODE -const CURL_GLOBAL_SSL = (1<<0) -const CURL_GLOBAL_WIN32 = (1<<1) -const CURL_GLOBAL_ALL = (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) -const CURL_GLOBAL_NOTHING = 0 -const CURL_GLOBAL_DEFAULT = CURL_GLOBAL_ALL -const CURL_GLOBAL_ACK_EINTR = (1<<2) -const CURLVERSION_NOW = CURLVERSION_FIFTH -const CURL_VERSION_IPV6 = (1<<0) -const CURL_VERSION_KERBEROS4 = (1<<1) -const CURL_VERSION_SSL = (1<<2) -const CURL_VERSION_LIBZ = (1<<3) -const CURL_VERSION_NTLM = (1<<4) -const CURL_VERSION_GSSNEGOTIATE = (1<<5) -const CURL_VERSION_DEBUG = (1<<6) -const CURL_VERSION_ASYNCHDNS = (1<<7) -const CURL_VERSION_SPNEGO = (1<<8) -const CURL_VERSION_LARGEFILE = (1<<9) -const CURL_VERSION_IDN = (1<<10) -const CURL_VERSION_SSPI = (1<<11) -const CURL_VERSION_CONV = (1<<12) -const CURL_VERSION_CURLDEBUG = (1<<13) -const CURL_VERSION_TLSAUTH_SRP = (1<<14) -const CURL_VERSION_NTLM_WB = (1<<15) -const CURL_VERSION_HTTP2 = (1<<16) -const CURL_VERSION_GSSAPI = (1<<17) -const CURL_VERSION_KERBEROS5 = (1<<18) -const CURL_VERSION_UNIX_SOCKETS = (1<<19) -const CURL_VERSION_PSL = (1<<20) -const CURL_VERSION_HTTPS_PROXY = (1<<21) -const CURL_VERSION_MULTI_SSL = (1<<22) -const CURL_VERSION_BROTLI = (1<<23) -const CURLPAUSE_RECV = (1<<0) -const CURLPAUSE_RECV_CONT = (0) -const CURLPAUSE_SEND = (1<<2) -const CURLPAUSE_SEND_CONT = (0) -const CURLPAUSE_ALL = (CURLPAUSE_RECV|CURLPAUSE_SEND) -const CURLPAUSE_CONT = (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) -const CURLM_CALL_MULTI_SOCKET = CURLM_CALL_MULTI_PERFORM -const CURLPIPE_NOTHING = Clong(0) -const CURLPIPE_HTTP1 = Clong(1) -const CURLPIPE_MULTIPLEX = Clong(2) -const CURL_WAIT_POLLIN = 0x0001 -const CURL_WAIT_POLLPRI = 0x0002 -const CURL_WAIT_POLLOUT = 0x0004 -const CURL_POLL_NONE = 0 -const CURL_POLL_IN = 1 -const CURL_POLL_OUT = 2 -const CURL_POLL_INOUT = 3 -const CURL_POLL_REMOVE = 4 -const CURL_SOCKET_TIMEOUT = CURL_SOCKET_BAD -const CURL_CSELECT_IN = 0x01 -const CURL_CSELECT_OUT = 0x02 -const CURL_CSELECT_ERR = 0x04 -const CURL_PUSH_OK = 0 -const CURL_PUSH_DENY = 1 diff --git a/src/lC_exports_h.jl b/src/lC_exports_h.jl deleted file mode 100644 index 7511574..0000000 --- a/src/lC_exports_h.jl +++ /dev/null @@ -1,1252 +0,0 @@ -# Generating exports -export curl_strequal -export curl_strnequal -export curl_mime_init -export curl_mime_free -export curl_mime_addpart -export curl_mime_name -export curl_mime_filename -export curl_mime_type -export curl_mime_encoder -export curl_mime_data -export curl_mime_filedata -export curl_mime_data_cb -export curl_mime_subparts -export curl_mime_headers -export curl_formget -export curl_formfree -export curl_getenv -export curl_version -export curl_easy_escape -export curl_escape -export curl_easy_unescape -export curl_unescape -export curl_free -export curl_global_init -export curl_global_init_mem -export curl_global_cleanup -export curl_global_sslset -export curl_slist_append -export curl_slist_free_all -export curl_getdate -export curl_share_init -export curl_share_setopt -export curl_share_cleanup -export curl_version_info -export curl_easy_strerror -export curl_share_strerror -export curl_easy_pause -export curl_easy_init -export curl_easy_setopt -export curl_easy_perform -export curl_easy_cleanup -export curl_easy_getinfo -export curl_easy_duphandle -export curl_easy_reset -export curl_easy_recv -export curl_easy_send -export curl_multi_init -export curl_multi_add_handle -export curl_multi_remove_handle -export curl_multi_fdset -export curl_multi_wait -export curl_multi_perform -export curl_multi_cleanup -export curl_multi_info_read -export curl_multi_strerror -export curl_multi_socket -export curl_multi_socket_action -export curl_multi_socket_all -export curl_multi_timeout -export curl_multi_setopt -export curl_multi_assign -export curl_pushheader_bynum -export curl_pushheader_byname -export CURL -export CURLSH -export curl_socket_t -export CURL_SOCKET_BAD -export curl_sslbackend -export CURLSSLBACKEND_NONE -export CURLSSLBACKEND_OPENSSL -export CURLSSLBACKEND_GNUTLS -export CURLSSLBACKEND_NSS -export CURLSSLBACKEND_OBSOLETE4 -export CURLSSLBACKEND_GSKIT -export CURLSSLBACKEND_POLARSSL -export CURLSSLBACKEND_WOLFSSL -export CURLSSLBACKEND_SCHANNEL -export CURLSSLBACKEND_DARWINSSL -export CURLSSLBACKEND_AXTLS -export CURLSSLBACKEND_MBEDTLS -export CURLSSLBACKEND_LIBRESSL -export CURLSSLBACKEND_BORINGSSL -export CURLSSLBACKEND_CYASSL -export CURL_HTTPPOST_FILENAME -export CURL_HTTPPOST_READFILE -export CURL_HTTPPOST_PTRNAME -export CURL_HTTPPOST_PTRCONTENTS -export CURL_HTTPPOST_BUFFER -export CURL_HTTPPOST_PTRBUFFER -export CURL_HTTPPOST_CALLBACK -export CURL_HTTPPOST_LARGE -export curl_progress_callback -export curl_xferinfo_callback -export CURL_MAX_READ_SIZE -export CURL_MAX_WRITE_SIZE -export CURL_MAX_HTTP_HEADER -export CURL_WRITEFUNC_PAUSE -export curl_write_callback -export curl_resolver_start_callback -export CURLFINFOFLAG_KNOWN_FILENAME -export CURLFINFOFLAG_KNOWN_FILETYPE -export CURLFINFOFLAG_KNOWN_TIME -export CURLFINFOFLAG_KNOWN_PERM -export CURLFINFOFLAG_KNOWN_UID -export CURLFINFOFLAG_KNOWN_GID -export CURLFINFOFLAG_KNOWN_SIZE -export CURLFINFOFLAG_KNOWN_HLINKCOUNT -export CURL_CHUNK_BGN_FUNC_OK -export CURL_CHUNK_BGN_FUNC_FAIL -export CURL_CHUNK_BGN_FUNC_SKIP -export CURL_CHUNK_END_FUNC_OK -export CURL_CHUNK_END_FUNC_FAIL -export CURL_FNMATCHFUNC_MATCH -export CURL_FNMATCHFUNC_NOMATCH -export CURL_FNMATCHFUNC_FAIL -export CURL_SEEKFUNC_OK -export CURL_SEEKFUNC_FAIL -export CURL_SEEKFUNC_CANTSEEK -export CURL_READFUNC_ABORT -export CURL_READFUNC_PAUSE -export CURL_SOCKOPT_OK -export CURL_SOCKOPT_ERROR -export CURL_SOCKOPT_ALREADY_CONNECTED -export curlfiletype -export CURLFILETYPE_FILE -export CURLFILETYPE_DIRECTORY -export CURLFILETYPE_SYMLINK -export CURLFILETYPE_DEVICE_BLOCK -export CURLFILETYPE_DEVICE_CHAR -export CURLFILETYPE_NAMEDPIPE -export CURLFILETYPE_SOCKET -export CURLFILETYPE_DOOR -export CURLFILETYPE_UNKNOWN -export curl_chunk_bgn_callback -export curl_chunk_end_callback -export curl_fnmatch_callback -export curl_seek_callback -export curl_read_callback -export curlsocktype -export CURLSOCKTYPE_IPCXN -export CURLSOCKTYPE_ACCEPT -export CURLSOCKTYPE_LAST -export curl_sockopt_callback -export curl_opensocket_callback -export curl_closesocket_callback -export curlioerr -export CURLIOE_OK -export CURLIOE_UNKNOWNCMD -export CURLIOE_FAILRESTART -export CURLIOE_LAST -export curliocmd -export CURLIOCMD_NOP -export CURLIOCMD_RESTARTREAD -export CURLIOCMD_LAST -export curl_ioctl_callback -export curl_malloc_callback -export curl_free_callback -export curl_realloc_callback -export curl_strdup_callback -export curl_calloc_callback -export curl_infotype -export CURLINFO_TEXT -export CURLINFO_HEADER_IN -export CURLINFO_HEADER_OUT -export CURLINFO_DATA_IN -export CURLINFO_DATA_OUT -export CURLINFO_SSL_DATA_IN -export CURLINFO_SSL_DATA_OUT -export CURLINFO_END -export curl_debug_callback -export CURLcode -export CURLE_OK -export CURLE_UNSUPPORTED_PROTOCOL -export CURLE_FAILED_INIT -export CURLE_URL_MALFORMAT -export CURLE_NOT_BUILT_IN -export CURLE_COULDNT_RESOLVE_PROXY -export CURLE_COULDNT_RESOLVE_HOST -export CURLE_COULDNT_CONNECT -export CURLE_WEIRD_SERVER_REPLY -export CURLE_REMOTE_ACCESS_DENIED -export CURLE_FTP_ACCEPT_FAILED -export CURLE_FTP_WEIRD_PASS_REPLY -export CURLE_FTP_ACCEPT_TIMEOUT -export CURLE_FTP_WEIRD_PASV_REPLY -export CURLE_FTP_WEIRD_227_FORMAT -export CURLE_FTP_CANT_GET_HOST -export CURLE_HTTP2 -export CURLE_FTP_COULDNT_SET_TYPE -export CURLE_PARTIAL_FILE -export CURLE_FTP_COULDNT_RETR_FILE -export CURLE_OBSOLETE20 -export CURLE_QUOTE_ERROR -export CURLE_HTTP_RETURNED_ERROR -export CURLE_WRITE_ERROR -export CURLE_OBSOLETE24 -export CURLE_UPLOAD_FAILED -export CURLE_READ_ERROR -export CURLE_OUT_OF_MEMORY -export CURLE_OPERATION_TIMEDOUT -export CURLE_OBSOLETE29 -export CURLE_FTP_PORT_FAILED -export CURLE_FTP_COULDNT_USE_REST -export CURLE_OBSOLETE32 -export CURLE_RANGE_ERROR -export CURLE_HTTP_POST_ERROR -export CURLE_SSL_CONNECT_ERROR -export CURLE_BAD_DOWNLOAD_RESUME -export CURLE_FILE_COULDNT_READ_FILE -export CURLE_LDAP_CANNOT_BIND -export CURLE_LDAP_SEARCH_FAILED -export CURLE_OBSOLETE40 -export CURLE_FUNCTION_NOT_FOUND -export CURLE_ABORTED_BY_CALLBACK -export CURLE_BAD_FUNCTION_ARGUMENT -export CURLE_OBSOLETE44 -export CURLE_INTERFACE_FAILED -export CURLE_OBSOLETE46 -export CURLE_TOO_MANY_REDIRECTS -export CURLE_UNKNOWN_OPTION -export CURLE_TELNET_OPTION_SYNTAX -export CURLE_OBSOLETE50 -export CURLE_PEER_FAILED_VERIFICATION -export CURLE_GOT_NOTHING -export CURLE_SSL_ENGINE_NOTFOUND -export CURLE_SSL_ENGINE_SETFAILED -export CURLE_SEND_ERROR -export CURLE_RECV_ERROR -export CURLE_OBSOLETE57 -export CURLE_SSL_CERTPROBLEM -export CURLE_SSL_CIPHER -export CURLE_SSL_CACERT -export CURLE_BAD_CONTENT_ENCODING -export CURLE_LDAP_INVALID_URL -export CURLE_FILESIZE_EXCEEDED -export CURLE_USE_SSL_FAILED -export CURLE_SEND_FAIL_REWIND -export CURLE_SSL_ENGINE_INITFAILED -export CURLE_LOGIN_DENIED -export CURLE_TFTP_NOTFOUND -export CURLE_TFTP_PERM -export CURLE_REMOTE_DISK_FULL -export CURLE_TFTP_ILLEGAL -export CURLE_TFTP_UNKNOWNID -export CURLE_REMOTE_FILE_EXISTS -export CURLE_TFTP_NOSUCHUSER -export CURLE_CONV_FAILED -export CURLE_CONV_REQD -export CURLE_SSL_CACERT_BADFILE -export CURLE_REMOTE_FILE_NOT_FOUND -export CURLE_SSH -export CURLE_SSL_SHUTDOWN_FAILED -export CURLE_AGAIN -export CURLE_SSL_CRL_BADFILE -export CURLE_SSL_ISSUER_ERROR -export CURLE_FTP_PRET_FAILED -export CURLE_RTSP_CSEQ_ERROR -export CURLE_RTSP_SESSION_ERROR -export CURLE_FTP_BAD_FILE_LIST -export CURLE_CHUNK_FAILED -export CURLE_NO_CONNECTION_AVAILABLE -export CURLE_SSL_PINNEDPUBKEYNOTMATCH -export CURLE_SSL_INVALIDCERTSTATUS -export CURLE_HTTP2_STREAM -export CURLE_RECURSIVE_API_CALL -export CURL_LAST -export curl_conv_callback -export curl_ssl_ctx_callback -export curl_proxytype -export CURLPROXY_HTTP -export CURLPROXY_HTTP_1_0 -export CURLPROXY_HTTPS -export CURLPROXY_SOCKS4 -export CURLPROXY_SOCKS5 -export CURLPROXY_SOCKS4A -export CURLPROXY_SOCKS5_HOSTNAME -export CURLSSH_AUTH_ANY -export CURLSSH_AUTH_NONE -export CURLSSH_AUTH_PUBLICKEY -export CURLSSH_AUTH_PASSWORD -export CURLSSH_AUTH_HOST -export CURLSSH_AUTH_KEYBOARD -export CURLSSH_AUTH_AGENT -export CURLSSH_AUTH_GSSAPI -export CURLSSH_AUTH_DEFAULT -export CURLGSSAPI_DELEGATION_NONE -export CURLGSSAPI_DELEGATION_POLICY_FLAG -export CURLGSSAPI_DELEGATION_FLAG -export CURL_ERROR_SIZE -export curl_khtype -export CURLKHTYPE_UNKNOWN -export CURLKHTYPE_RSA1 -export CURLKHTYPE_RSA -export CURLKHTYPE_DSS -export CURLKHTYPE_ECDSA -export CURLKHTYPE_ED25519 -export curl_khstat -export CURLKHSTAT_FINE_ADD_TO_FILE -export CURLKHSTAT_FINE -export CURLKHSTAT_REJECT -export CURLKHSTAT_DEFER -export CURLKHSTAT_LAST -export curl_khmatch -export CURLKHMATCH_OK -export CURLKHMATCH_MISMATCH -export CURLKHMATCH_MISSING -export CURLKHMATCH_LAST -export curl_sshkeycallback -export curl_usessl -export CURLUSESSL_NONE -export CURLUSESSL_TRY -export CURLUSESSL_CONTROL -export CURLUSESSL_ALL -export CURLUSESSL_LAST -export CURLSSLOPT_ALLOW_BEAST -export CURLSSLOPT_NO_REVOKE -export CURL_HET_DEFAULT -export curl_ftpssl -export CURLFTPSSL_NONE -export CURLFTPSSL_TRY -export CURLFTPSSL_CONTROL -export CURLFTPSSL_ALL -export CURLFTPSSL_LAST -export curl_ftpccc -export CURLFTPSSL_CCC_NONE -export CURLFTPSSL_CCC_PASSIVE -export CURLFTPSSL_CCC_ACTIVE -export CURLFTPSSL_CCC_LAST -export curl_ftpauth -export CURLFTPAUTH_DEFAULT -export CURLFTPAUTH_SSL -export CURLFTPAUTH_TLS -export CURLFTPAUTH_LAST -export curl_ftpcreatedir -export CURLFTP_CREATE_DIR_NONE -export CURLFTP_CREATE_DIR -export CURLFTP_CREATE_DIR_RETRY -export CURLFTP_CREATE_DIR_LAST -export curl_ftpmethod -export CURLFTPMETHOD_DEFAULT -export CURLFTPMETHOD_MULTICWD -export CURLFTPMETHOD_NOCWD -export CURLFTPMETHOD_SINGLECWD -export CURLFTPMETHOD_LAST -export CURLHEADER_UNIFIED -export CURLHEADER_SEPARATE -export CURLPROTO_HTTP -export CURLPROTO_HTTPS -export CURLPROTO_FTP -export CURLPROTO_FTPS -export CURLPROTO_SCP -export CURLPROTO_SFTP -export CURLPROTO_TELNET -export CURLPROTO_LDAP -export CURLPROTO_LDAPS -export CURLPROTO_DICT -export CURLPROTO_FILE -export CURLPROTO_TFTP -export CURLPROTO_IMAP -export CURLPROTO_IMAPS -export CURLPROTO_POP3 -export CURLPROTO_POP3S -export CURLPROTO_SMTP -export CURLPROTO_SMTPS -export CURLPROTO_RTSP -export CURLPROTO_RTMP -export CURLPROTO_RTMPT -export CURLPROTO_RTMPE -export CURLPROTO_RTMPTE -export CURLPROTO_RTMPS -export CURLPROTO_RTMPTS -export CURLPROTO_GOPHER -export CURLPROTO_SMB -export CURLPROTO_SMBS -export CURLPROTO_ALL -export CURLOPTTYPE_LONG -export CURLOPTTYPE_OBJECTPOINT -export CURLOPTTYPE_STRINGPOINT -export CURLOPTTYPE_FUNCTIONPOINT -export CURLOPTTYPE_OFF_T -export CURLoption -export CURLOPT_WRITEDATA -export CURLOPT_URL -export CURLOPT_PORT -export CURLOPT_PROXY -export CURLOPT_USERPWD -export CURLOPT_PROXYUSERPWD -export CURLOPT_RANGE -export CURLOPT_READDATA -export CURLOPT_ERRORBUFFER -export CURLOPT_WRITEFUNCTION -export CURLOPT_READFUNCTION -export CURLOPT_TIMEOUT -export CURLOPT_INFILESIZE -export CURLOPT_POSTFIELDS -export CURLOPT_REFERER -export CURLOPT_FTPPORT -export CURLOPT_USERAGENT -export CURLOPT_LOW_SPEED_LIMIT -export CURLOPT_LOW_SPEED_TIME -export CURLOPT_RESUME_FROM -export CURLOPT_COOKIE -export CURLOPT_HTTPHEADER -export CURLOPT_HTTPPOST -export CURLOPT_SSLCERT -export CURLOPT_KEYPASSWD -export CURLOPT_CRLF -export CURLOPT_QUOTE -export CURLOPT_HEADERDATA -export CURLOPT_COOKIEFILE -export CURLOPT_SSLVERSION -export CURLOPT_TIMECONDITION -export CURLOPT_TIMEVALUE -export CURLOPT_CUSTOMREQUEST -export CURLOPT_STDERR -export CURLOPT_POSTQUOTE -export CURLOPT_OBSOLETE40 -export CURLOPT_VERBOSE -export CURLOPT_HEADER -export CURLOPT_NOPROGRESS -export CURLOPT_NOBODY -export CURLOPT_FAILONERROR -export CURLOPT_UPLOAD -export CURLOPT_POST -export CURLOPT_DIRLISTONLY -export CURLOPT_APPEND -export CURLOPT_NETRC -export CURLOPT_FOLLOWLOCATION -export CURLOPT_TRANSFERTEXT -export CURLOPT_PUT -export CURLOPT_PROGRESSFUNCTION -export CURLOPT_PROGRESSDATA -export CURLOPT_AUTOREFERER -export CURLOPT_PROXYPORT -export CURLOPT_POSTFIELDSIZE -export CURLOPT_HTTPPROXYTUNNEL -export CURLOPT_INTERFACE -export CURLOPT_KRBLEVEL -export CURLOPT_SSL_VERIFYPEER -export CURLOPT_CAINFO -export CURLOPT_MAXREDIRS -export CURLOPT_FILETIME -export CURLOPT_TELNETOPTIONS -export CURLOPT_MAXCONNECTS -export CURLOPT_OBSOLETE72 -export CURLOPT_FRESH_CONNECT -export CURLOPT_FORBID_REUSE -export CURLOPT_RANDOM_FILE -export CURLOPT_EGDSOCKET -export CURLOPT_CONNECTTIMEOUT -export CURLOPT_HEADERFUNCTION -export CURLOPT_HTTPGET -export CURLOPT_SSL_VERIFYHOST -export CURLOPT_COOKIEJAR -export CURLOPT_SSL_CIPHER_LIST -export CURLOPT_HTTP_VERSION -export CURLOPT_FTP_USE_EPSV -export CURLOPT_SSLCERTTYPE -export CURLOPT_SSLKEY -export CURLOPT_SSLKEYTYPE -export CURLOPT_SSLENGINE -export CURLOPT_SSLENGINE_DEFAULT -export CURLOPT_DNS_USE_GLOBAL_CACHE -export CURLOPT_DNS_CACHE_TIMEOUT -export CURLOPT_PREQUOTE -export CURLOPT_DEBUGFUNCTION -export CURLOPT_DEBUGDATA -export CURLOPT_COOKIESESSION -export CURLOPT_CAPATH -export CURLOPT_BUFFERSIZE -export CURLOPT_NOSIGNAL -export CURLOPT_SHARE -export CURLOPT_PROXYTYPE -export CURLOPT_ACCEPT_ENCODING -export CURLOPT_PRIVATE -export CURLOPT_HTTP200ALIASES -export CURLOPT_UNRESTRICTED_AUTH -export CURLOPT_FTP_USE_EPRT -export CURLOPT_HTTPAUTH -export CURLOPT_SSL_CTX_FUNCTION -export CURLOPT_SSL_CTX_DATA -export CURLOPT_FTP_CREATE_MISSING_DIRS -export CURLOPT_PROXYAUTH -export CURLOPT_FTP_RESPONSE_TIMEOUT -export CURLOPT_IPRESOLVE -export CURLOPT_MAXFILESIZE -export CURLOPT_INFILESIZE_LARGE -export CURLOPT_RESUME_FROM_LARGE -export CURLOPT_MAXFILESIZE_LARGE -export CURLOPT_NETRC_FILE -export CURLOPT_USE_SSL -export CURLOPT_POSTFIELDSIZE_LARGE -export CURLOPT_TCP_NODELAY -export CURLOPT_FTPSSLAUTH -export CURLOPT_IOCTLFUNCTION -export CURLOPT_IOCTLDATA -export CURLOPT_FTP_ACCOUNT -export CURLOPT_COOKIELIST -export CURLOPT_IGNORE_CONTENT_LENGTH -export CURLOPT_FTP_SKIP_PASV_IP -export CURLOPT_FTP_FILEMETHOD -export CURLOPT_LOCALPORT -export CURLOPT_LOCALPORTRANGE -export CURLOPT_CONNECT_ONLY -export CURLOPT_CONV_FROM_NETWORK_FUNCTION -export CURLOPT_CONV_TO_NETWORK_FUNCTION -export CURLOPT_CONV_FROM_UTF8_FUNCTION -export CURLOPT_MAX_SEND_SPEED_LARGE -export CURLOPT_MAX_RECV_SPEED_LARGE -export CURLOPT_FTP_ALTERNATIVE_TO_USER -export CURLOPT_SOCKOPTFUNCTION -export CURLOPT_SOCKOPTDATA -export CURLOPT_SSL_SESSIONID_CACHE -export CURLOPT_SSH_AUTH_TYPES -export CURLOPT_SSH_PUBLIC_KEYFILE -export CURLOPT_SSH_PRIVATE_KEYFILE -export CURLOPT_FTP_SSL_CCC -export CURLOPT_TIMEOUT_MS -export CURLOPT_CONNECTTIMEOUT_MS -export CURLOPT_HTTP_TRANSFER_DECODING -export CURLOPT_HTTP_CONTENT_DECODING -export CURLOPT_NEW_FILE_PERMS -export CURLOPT_NEW_DIRECTORY_PERMS -export CURLOPT_POSTREDIR -export CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 -export CURLOPT_OPENSOCKETFUNCTION -export CURLOPT_OPENSOCKETDATA -export CURLOPT_COPYPOSTFIELDS -export CURLOPT_PROXY_TRANSFER_MODE -export CURLOPT_SEEKFUNCTION -export CURLOPT_SEEKDATA -export CURLOPT_CRLFILE -export CURLOPT_ISSUERCERT -export CURLOPT_ADDRESS_SCOPE -export CURLOPT_CERTINFO -export CURLOPT_USERNAME -export CURLOPT_PASSWORD -export CURLOPT_PROXYUSERNAME -export CURLOPT_PROXYPASSWORD -export CURLOPT_NOPROXY -export CURLOPT_TFTP_BLKSIZE -export CURLOPT_SOCKS5_GSSAPI_SERVICE -export CURLOPT_SOCKS5_GSSAPI_NEC -export CURLOPT_PROTOCOLS -export CURLOPT_REDIR_PROTOCOLS -export CURLOPT_SSH_KNOWNHOSTS -export CURLOPT_SSH_KEYFUNCTION -export CURLOPT_SSH_KEYDATA -export CURLOPT_MAIL_FROM -export CURLOPT_MAIL_RCPT -export CURLOPT_FTP_USE_PRET -export CURLOPT_RTSP_REQUEST -export CURLOPT_RTSP_SESSION_ID -export CURLOPT_RTSP_STREAM_URI -export CURLOPT_RTSP_TRANSPORT -export CURLOPT_RTSP_CLIENT_CSEQ -export CURLOPT_RTSP_SERVER_CSEQ -export CURLOPT_INTERLEAVEDATA -export CURLOPT_INTERLEAVEFUNCTION -export CURLOPT_WILDCARDMATCH -export CURLOPT_CHUNK_BGN_FUNCTION -export CURLOPT_CHUNK_END_FUNCTION -export CURLOPT_FNMATCH_FUNCTION -export CURLOPT_CHUNK_DATA -export CURLOPT_FNMATCH_DATA -export CURLOPT_RESOLVE -export CURLOPT_TLSAUTH_USERNAME -export CURLOPT_TLSAUTH_PASSWORD -export CURLOPT_TLSAUTH_TYPE -export CURLOPT_TRANSFER_ENCODING -export CURLOPT_CLOSESOCKETFUNCTION -export CURLOPT_CLOSESOCKETDATA -export CURLOPT_GSSAPI_DELEGATION -export CURLOPT_DNS_SERVERS -export CURLOPT_ACCEPTTIMEOUT_MS -export CURLOPT_TCP_KEEPALIVE -export CURLOPT_TCP_KEEPIDLE -export CURLOPT_TCP_KEEPINTVL -export CURLOPT_SSL_OPTIONS -export CURLOPT_MAIL_AUTH -export CURLOPT_SASL_IR -export CURLOPT_XFERINFOFUNCTION -export CURLOPT_XOAUTH2_BEARER -export CURLOPT_DNS_INTERFACE -export CURLOPT_DNS_LOCAL_IP4 -export CURLOPT_DNS_LOCAL_IP6 -export CURLOPT_LOGIN_OPTIONS -export CURLOPT_SSL_ENABLE_NPN -export CURLOPT_SSL_ENABLE_ALPN -export CURLOPT_EXPECT_100_TIMEOUT_MS -export CURLOPT_PROXYHEADER -export CURLOPT_HEADEROPT -export CURLOPT_PINNEDPUBLICKEY -export CURLOPT_UNIX_SOCKET_PATH -export CURLOPT_SSL_VERIFYSTATUS -export CURLOPT_SSL_FALSESTART -export CURLOPT_PATH_AS_IS -export CURLOPT_PROXY_SERVICE_NAME -export CURLOPT_SERVICE_NAME -export CURLOPT_PIPEWAIT -export CURLOPT_DEFAULT_PROTOCOL -export CURLOPT_STREAM_WEIGHT -export CURLOPT_STREAM_DEPENDS -export CURLOPT_STREAM_DEPENDS_E -export CURLOPT_TFTP_NO_OPTIONS -export CURLOPT_CONNECT_TO -export CURLOPT_TCP_FASTOPEN -export CURLOPT_KEEP_SENDING_ON_ERROR -export CURLOPT_PROXY_CAINFO -export CURLOPT_PROXY_CAPATH -export CURLOPT_PROXY_SSL_VERIFYPEER -export CURLOPT_PROXY_SSL_VERIFYHOST -export CURLOPT_PROXY_SSLVERSION -export CURLOPT_PROXY_TLSAUTH_USERNAME -export CURLOPT_PROXY_TLSAUTH_PASSWORD -export CURLOPT_PROXY_TLSAUTH_TYPE -export CURLOPT_PROXY_SSLCERT -export CURLOPT_PROXY_SSLCERTTYPE -export CURLOPT_PROXY_SSLKEY -export CURLOPT_PROXY_SSLKEYTYPE -export CURLOPT_PROXY_KEYPASSWD -export CURLOPT_PROXY_SSL_CIPHER_LIST -export CURLOPT_PROXY_CRLFILE -export CURLOPT_PROXY_SSL_OPTIONS -export CURLOPT_PRE_PROXY -export CURLOPT_PROXY_PINNEDPUBLICKEY -export CURLOPT_ABSTRACT_UNIX_SOCKET -export CURLOPT_SUPPRESS_CONNECT_HEADERS -export CURLOPT_REQUEST_TARGET -export CURLOPT_SOCKS5_AUTH -export CURLOPT_SSH_COMPRESSION -export CURLOPT_MIMEPOST -export CURLOPT_TIMEVALUE_LARGE -export CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS -export CURLOPT_RESOLVER_START_FUNCTION -export CURLOPT_RESOLVER_START_DATA -export CURLOPT_HAPROXYPROTOCOL -export CURLOPT_DNS_SHUFFLE_ADDRESSES -export CURLOPT_TLS13_CIPHERS -export CURLOPT_PROXY_TLS13_CIPHERS -export CURLOPT_DISALLOW_USERNAME_IN_URL -export CURLOPT_LASTENTRY -export CURLOPT_XFERINFODATA -export CURLOPT_SERVER_RESPONSE_TIMEOUT -export CURLOPT_POST301 -export CURLOPT_SSLKEYPASSWD -export CURLOPT_FTPAPPEND -export CURLOPT_FTPLISTONLY -export CURLOPT_FTP_SSL -export CURLOPT_SSLCERTPASSWD -export CURLOPT_KRB4LEVEL -export CURL_IPRESOLVE_WHATEVER -export CURL_IPRESOLVE_V4 -export CURL_IPRESOLVE_V6 -export CURLOPT_RTSPHEADER -export CURL_HTTP_VERSION_NONE -export CURL_HTTP_VERSION_1_0 -export CURL_HTTP_VERSION_1_1 -export CURL_HTTP_VERSION_2_0 -export CURL_HTTP_VERSION_2TLS -export CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE -export CURL_HTTP_VERSION_LAST -export CURL_HTTP_VERSION_2 -export CURL_RTSPREQ_NONE -export CURL_RTSPREQ_OPTIONS -export CURL_RTSPREQ_DESCRIBE -export CURL_RTSPREQ_ANNOUNCE -export CURL_RTSPREQ_SETUP -export CURL_RTSPREQ_PLAY -export CURL_RTSPREQ_PAUSE -export CURL_RTSPREQ_TEARDOWN -export CURL_RTSPREQ_GET_PARAMETER -export CURL_RTSPREQ_SET_PARAMETER -export CURL_RTSPREQ_RECORD -export CURL_RTSPREQ_RECEIVE -export CURL_RTSPREQ_LAST -export CURL_NETRC_OPTION -export CURL_NETRC_IGNORED -export CURL_NETRC_OPTIONAL -export CURL_NETRC_REQUIRED -export CURL_NETRC_LAST -export CURL_SSLVERSION_DEFAULT -export CURL_SSLVERSION_TLSv1 -export CURL_SSLVERSION_SSLv2 -export CURL_SSLVERSION_SSLv3 -export CURL_SSLVERSION_TLSv1_0 -export CURL_SSLVERSION_TLSv1_1 -export CURL_SSLVERSION_TLSv1_2 -export CURL_SSLVERSION_TLSv1_3 -export CURL_SSLVERSION_LAST -export CURL_SSLVERSION_MAX_NONE -export CURL_SSLVERSION_MAX_DEFAULT -export CURL_SSLVERSION_MAX_TLSv1_0 -export CURL_SSLVERSION_MAX_TLSv1_1 -export CURL_SSLVERSION_MAX_TLSv1_2 -export CURL_SSLVERSION_MAX_TLSv1_3 -export CURL_SSLVERSION_MAX_LAST -export CURL_TLSAUTH -export CURL_TLSAUTH_NONE -export CURL_TLSAUTH_SRP -export CURL_TLSAUTH_LAST -export CURL_REDIR_GET_ALL -export CURL_REDIR_POST_301 -export CURL_REDIR_POST_302 -export CURL_REDIR_POST_303 -export CURL_REDIR_POST_ALL -export curl_TimeCond -export CURL_TIMECOND_NONE -export CURL_TIMECOND_IFMODSINCE -export CURL_TIMECOND_IFUNMODSINCE -export CURL_TIMECOND_LASTMOD -export CURL_TIMECOND_LAST -export curl_mime -export curl_mimepart -export CURLformoption -export CURLFORM_NOTHING -export CURLFORM_COPYNAME -export CURLFORM_PTRNAME -export CURLFORM_NAMELENGTH -export CURLFORM_COPYCONTENTS -export CURLFORM_PTRCONTENTS -export CURLFORM_CONTENTSLENGTH -export CURLFORM_FILECONTENT -export CURLFORM_ARRAY -export CURLFORM_OBSOLETE -export CURLFORM_FILE -export CURLFORM_BUFFER -export CURLFORM_BUFFERPTR -export CURLFORM_BUFFERLENGTH -export CURLFORM_CONTENTTYPE -export CURLFORM_CONTENTHEADER -export CURLFORM_FILENAME -export CURLFORM_END -export CURLFORM_OBSOLETE2 -export CURLFORM_STREAM -export CURLFORM_CONTENTLEN -export CURLFORM_LASTENTRY -export CURLFORMcode -export CURL_FORMADD_OK -export CURL_FORMADD_MEMORY -export CURL_FORMADD_OPTION_TWICE -export CURL_FORMADD_NULL -export CURL_FORMADD_UNKNOWN_OPTION -export CURL_FORMADD_INCOMPLETE -export CURL_FORMADD_ILLEGAL_ARRAY -export CURL_FORMADD_DISABLED -export CURL_FORMADD_LAST -export curl_formget_callback -export curl_ssl_backend -export CURLsslset -export CURLSSLSET_OK -export CURLSSLSET_UNKNOWN_BACKEND -export CURLSSLSET_TOO_LATE -export CURLSSLSET_NO_BACKENDS -export CURLINFO_STRING -export CURLINFO_LONG -export CURLINFO_DOUBLE -export CURLINFO_SLIST -export CURLINFO_PTR -export CURLINFO_SOCKET -export CURLINFO_OFF_T -export CURLINFO_MASK -export CURLINFO_TYPEMASK -export CURLINFO -export CURLINFO_NONE -export CURLINFO_EFFECTIVE_URL -export CURLINFO_RESPONSE_CODE -export CURLINFO_TOTAL_TIME -export CURLINFO_NAMELOOKUP_TIME -export CURLINFO_CONNECT_TIME -export CURLINFO_PRETRANSFER_TIME -export CURLINFO_SIZE_UPLOAD -export CURLINFO_SIZE_UPLOAD_T -export CURLINFO_SIZE_DOWNLOAD -export CURLINFO_SIZE_DOWNLOAD_T -export CURLINFO_SPEED_DOWNLOAD -export CURLINFO_SPEED_DOWNLOAD_T -export CURLINFO_SPEED_UPLOAD -export CURLINFO_SPEED_UPLOAD_T -export CURLINFO_HEADER_SIZE -export CURLINFO_REQUEST_SIZE -export CURLINFO_SSL_VERIFYRESULT -export CURLINFO_FILETIME -export CURLINFO_FILETIME_T -export CURLINFO_CONTENT_LENGTH_DOWNLOAD -export CURLINFO_CONTENT_LENGTH_DOWNLOAD_T -export CURLINFO_CONTENT_LENGTH_UPLOAD -export CURLINFO_CONTENT_LENGTH_UPLOAD_T -export CURLINFO_STARTTRANSFER_TIME -export CURLINFO_CONTENT_TYPE -export CURLINFO_REDIRECT_TIME -export CURLINFO_REDIRECT_COUNT -export CURLINFO_PRIVATE -export CURLINFO_HTTP_CONNECTCODE -export CURLINFO_HTTPAUTH_AVAIL -export CURLINFO_PROXYAUTH_AVAIL -export CURLINFO_OS_ERRNO -export CURLINFO_NUM_CONNECTS -export CURLINFO_SSL_ENGINES -export CURLINFO_COOKIELIST -export CURLINFO_LASTSOCKET -export CURLINFO_FTP_ENTRY_PATH -export CURLINFO_REDIRECT_URL -export CURLINFO_PRIMARY_IP -export CURLINFO_APPCONNECT_TIME -export CURLINFO_CERTINFO -export CURLINFO_CONDITION_UNMET -export CURLINFO_RTSP_SESSION_ID -export CURLINFO_RTSP_CLIENT_CSEQ -export CURLINFO_RTSP_SERVER_CSEQ -export CURLINFO_RTSP_CSEQ_RECV -export CURLINFO_PRIMARY_PORT -export CURLINFO_LOCAL_IP -export CURLINFO_LOCAL_PORT -export CURLINFO_TLS_SESSION -export CURLINFO_ACTIVESOCKET -export CURLINFO_TLS_SSL_PTR -export CURLINFO_HTTP_VERSION -export CURLINFO_PROXY_SSL_VERIFYRESULT -export CURLINFO_PROTOCOL -export CURLINFO_SCHEME -export CURLINFO_TOTAL_TIME_T -export CURLINFO_NAMELOOKUP_TIME_T -export CURLINFO_CONNECT_TIME_T -export CURLINFO_PRETRANSFER_TIME_T -export CURLINFO_STARTTRANSFER_TIME_T -export CURLINFO_REDIRECT_TIME_T -export CURLINFO_APPCONNECT_TIME_T -export CURLINFO_LASTONE -export CURLINFO_HTTP_CODE -export curl_closepolicy -export CURLCLOSEPOLICY_NONE -export CURLCLOSEPOLICY_OLDEST -export CURLCLOSEPOLICY_LEAST_RECENTLY_USED -export CURLCLOSEPOLICY_LEAST_TRAFFIC -export CURLCLOSEPOLICY_SLOWEST -export CURLCLOSEPOLICY_CALLBACK -export CURLCLOSEPOLICY_LAST -export CURL_GLOBAL_SSL -export CURL_GLOBAL_WIN32 -export CURL_GLOBAL_ALL -export CURL_GLOBAL_NOTHING -export CURL_GLOBAL_DEFAULT -export CURL_GLOBAL_ACK_EINTR -export curl_lock_data -export CURL_LOCK_DATA_NONE -export CURL_LOCK_DATA_SHARE -export CURL_LOCK_DATA_COOKIE -export CURL_LOCK_DATA_DNS -export CURL_LOCK_DATA_SSL_SESSION -export CURL_LOCK_DATA_CONNECT -export CURL_LOCK_DATA_PSL -export CURL_LOCK_DATA_LAST -export curl_lock_access -export CURL_LOCK_ACCESS_NONE -export CURL_LOCK_ACCESS_SHARED -export CURL_LOCK_ACCESS_SINGLE -export CURL_LOCK_ACCESS_LAST -export curl_lock_function -export curl_unlock_function -export CURLSHcode -export CURLSHE_OK -export CURLSHE_BAD_OPTION -export CURLSHE_IN_USE -export CURLSHE_INVALID -export CURLSHE_NOMEM -export CURLSHE_NOT_BUILT_IN -export CURLSHE_LAST -export CURLSHoption -export CURLSHOPT_NONE -export CURLSHOPT_SHARE -export CURLSHOPT_UNSHARE -export CURLSHOPT_LOCKFUNC -export CURLSHOPT_UNLOCKFUNC -export CURLSHOPT_USERDATA -export CURLSHOPT_LAST -export CURLversion -export CURLVERSION_FIRST -export CURLVERSION_SECOND -export CURLVERSION_THIRD -export CURLVERSION_FOURTH -export CURLVERSION_FIFTH -export CURLVERSION_LAST -export CURLVERSION_NOW -export CURL_VERSION_IPV6 -export CURL_VERSION_KERBEROS4 -export CURL_VERSION_SSL -export CURL_VERSION_LIBZ -export CURL_VERSION_NTLM -export CURL_VERSION_GSSNEGOTIATE -export CURL_VERSION_DEBUG -export CURL_VERSION_ASYNCHDNS -export CURL_VERSION_SPNEGO -export CURL_VERSION_LARGEFILE -export CURL_VERSION_IDN -export CURL_VERSION_SSPI -export CURL_VERSION_CONV -export CURL_VERSION_CURLDEBUG -export CURL_VERSION_TLSAUTH_SRP -export CURL_VERSION_NTLM_WB -export CURL_VERSION_HTTP2 -export CURL_VERSION_GSSAPI -export CURL_VERSION_KERBEROS5 -export CURL_VERSION_UNIX_SOCKETS -export CURL_VERSION_PSL -export CURL_VERSION_HTTPS_PROXY -export CURL_VERSION_MULTI_SSL -export CURL_VERSION_BROTLI -export CURLPAUSE_RECV -export CURLPAUSE_RECV_CONT -export CURLPAUSE_SEND -export CURLPAUSE_SEND_CONT -export CURLPAUSE_ALL -export CURLPAUSE_CONT -export CURLE_OBSOLETE16 -export CURLE_OBSOLETE10 -export CURLE_OBSOLETE12 -export CURLOPT_ENCODING -export CURLE_FTP_WEIRD_SERVER_REPLY -export CURLE_UNKNOWN_TELNET_OPTION -export CURLE_SSL_PEER_CERTIFICATE -export CURLE_OBSOLETE -export CURLE_BAD_PASSWORD_ENTERED -export CURLE_BAD_CALLING_ORDER -export CURLE_FTP_USER_PASSWORD_INCORRECT -export CURLE_FTP_CANT_RECONNECT -export CURLE_FTP_COULDNT_GET_SIZE -export CURLE_FTP_COULDNT_SET_ASCII -export CURLE_FTP_WEIRD_USER_REPLY -export CURLE_FTP_WRITE_ERROR -export CURLE_LIBRARY_NOT_FOUND -export CURLE_MALFORMAT_USER -export CURLE_SHARE_IN_USE -export CURLE_URL_MALFORMAT_USER -export CURLE_FTP_ACCESS_DENIED -export CURLE_FTP_COULDNT_SET_BINARY -export CURLE_FTP_QUOTE_ERROR -export CURLE_TFTP_DISKFULL -export CURLE_TFTP_EXISTS -export CURLE_HTTP_RANGE_ERROR -export CURLE_FTP_SSL_FAILED -export CURLE_OPERATION_TIMEOUTED -export CURLE_HTTP_NOT_FOUND -export CURLE_HTTP_PORT_FAILED -export CURLE_FTP_COULDNT_STOR_FILE -export CURLE_FTP_PARTIAL_FILE -export CURLE_FTP_BAD_DOWNLOAD_RESUME -export CURLE_ALREADY_COMPLETE -export CURLOPT_FILE -export CURLOPT_INFILE -export CURLOPT_WRITEHEADER -export CURLOPT_WRITEINFO -export CURLOPT_CLOSEPOLICY -export CURLM -export CURLMcode -export CURLM_CALL_MULTI_PERFORM -export CURLM_OK -export CURLM_BAD_HANDLE -export CURLM_BAD_EASY_HANDLE -export CURLM_OUT_OF_MEMORY -export CURLM_INTERNAL_ERROR -export CURLM_BAD_SOCKET -export CURLM_UNKNOWN_OPTION -export CURLM_ADDED_ALREADY -export CURLM_RECURSIVE_API_CALL -export CURLM_LAST -export CURLM_CALL_MULTI_SOCKET -export CURLPIPE_NOTHING -export CURLPIPE_HTTP1 -export CURLPIPE_MULTIPLEX -export CURLMSG -export CURLMSG_NONE -export CURLMSG_DONE -export CURLMSG_LAST -export CURL_WAIT_POLLIN -export CURL_WAIT_POLLPRI -export CURL_WAIT_POLLOUT -export CURL_POLL_NONE -export CURL_POLL_IN -export CURL_POLL_OUT -export CURL_POLL_INOUT -export CURL_POLL_REMOVE -export CURL_SOCKET_TIMEOUT -export CURL_CSELECT_IN -export CURL_CSELECT_OUT -export CURL_CSELECT_ERR -export curl_socket_callback -export curl_multi_timer_callback -export CURLMoption -export CURLMOPT_SOCKETFUNCTION -export CURLMOPT_SOCKETDATA -export CURLMOPT_PIPELINING -export CURLMOPT_TIMERFUNCTION -export CURLMOPT_TIMERDATA -export CURLMOPT_MAXCONNECTS -export CURLMOPT_MAX_HOST_CONNECTIONS -export CURLMOPT_MAX_PIPELINE_LENGTH -export CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE -export CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE -export CURLMOPT_PIPELINING_SITE_BL -export CURLMOPT_PIPELINING_SERVER_BL -export CURLMOPT_MAX_TOTAL_CONNECTIONS -export CURLMOPT_PUSHFUNCTION -export CURLMOPT_PUSHDATA -export CURLMOPT_LASTENTRY -export CURL_PUSH_OK -export CURL_PUSH_DENY -export curl_push_callback -export CURL_TYPEOF_CURL_OFF_T -export CURL_FORMAT_CURL_OFF_T -export CURL_FORMAT_CURL_OFF_TU -export CURL_SUFFIX_CURL_OFF_T -export CURL_SUFFIX_CURL_OFF_TU -export CURL_TYPEOF_CURL_SOCKLEN_T -export CURL_PULL_SYS_TYPES_H -export CURL_PULL_SYS_SOCKET_H -export CURL_SOCKET_BAD -export CURLSSLBACKEND_LIBRESSL -export CURLSSLBACKEND_BORINGSSL -export CURLSSLBACKEND_CYASSL -export CURL_HTTPPOST_FILENAME -export CURL_HTTPPOST_READFILE -export CURL_HTTPPOST_PTRNAME -export CURL_HTTPPOST_PTRCONTENTS -export CURL_HTTPPOST_BUFFER -export CURL_HTTPPOST_PTRBUFFER -export CURL_HTTPPOST_CALLBACK -export CURL_HTTPPOST_LARGE -export CURL_MAX_READ_SIZE -export CURL_MAX_WRITE_SIZE -export CURL_MAX_HTTP_HEADER -export CURL_WRITEFUNC_PAUSE -export CURLFINFOFLAG_KNOWN_FILENAME -export CURLFINFOFLAG_KNOWN_FILETYPE -export CURLFINFOFLAG_KNOWN_TIME -export CURLFINFOFLAG_KNOWN_PERM -export CURLFINFOFLAG_KNOWN_UID -export CURLFINFOFLAG_KNOWN_GID -export CURLFINFOFLAG_KNOWN_SIZE -export CURLFINFOFLAG_KNOWN_HLINKCOUNT -export CURL_CHUNK_BGN_FUNC_OK -export CURL_CHUNK_BGN_FUNC_FAIL -export CURL_CHUNK_BGN_FUNC_SKIP -export CURL_CHUNK_END_FUNC_OK -export CURL_CHUNK_END_FUNC_FAIL -export CURL_FNMATCHFUNC_MATCH -export CURL_FNMATCHFUNC_NOMATCH -export CURL_FNMATCHFUNC_FAIL -export CURL_SEEKFUNC_OK -export CURL_SEEKFUNC_FAIL -export CURL_SEEKFUNC_CANTSEEK -export CURL_READFUNC_ABORT -export CURL_READFUNC_PAUSE -export CURL_SOCKOPT_OK -export CURL_SOCKOPT_ERROR -export CURL_SOCKOPT_ALREADY_CONNECTED -export CURLE_OBSOLETE16 -export CURLE_OBSOLETE10 -export CURLE_OBSOLETE12 -export CURLOPT_ENCODING -export CURLE_FTP_WEIRD_SERVER_REPLY -export CURLE_UNKNOWN_TELNET_OPTION -export CURLE_SSL_PEER_CERTIFICATE -export CURLE_OBSOLETE -export CURLE_BAD_PASSWORD_ENTERED -export CURLE_BAD_CALLING_ORDER -export CURLE_FTP_USER_PASSWORD_INCORRECT -export CURLE_FTP_CANT_RECONNECT -export CURLE_FTP_COULDNT_GET_SIZE -export CURLE_FTP_COULDNT_SET_ASCII -export CURLE_FTP_WEIRD_USER_REPLY -export CURLE_FTP_WRITE_ERROR -export CURLE_LIBRARY_NOT_FOUND -export CURLE_MALFORMAT_USER -export CURLE_SHARE_IN_USE -export CURLE_URL_MALFORMAT_USER -export CURLE_FTP_ACCESS_DENIED -export CURLE_FTP_COULDNT_SET_BINARY -export CURLE_FTP_QUOTE_ERROR -export CURLE_TFTP_DISKFULL -export CURLE_TFTP_EXISTS -export CURLE_HTTP_RANGE_ERROR -export CURLE_FTP_SSL_FAILED -export CURLE_OPERATION_TIMEOUTED -export CURLE_HTTP_NOT_FOUND -export CURLE_HTTP_PORT_FAILED -export CURLE_FTP_COULDNT_STOR_FILE -export CURLE_FTP_PARTIAL_FILE -export CURLE_FTP_BAD_DOWNLOAD_RESUME -export CURLE_ALREADY_COMPLETE -export CURLOPT_FILE -export CURLOPT_INFILE -export CURLOPT_WRITEHEADER -export CURLOPT_WRITEINFO -export CURLOPT_CLOSEPOLICY -export CURLAUTH_NONE -export CURLAUTH_BASIC -export CURLAUTH_DIGEST -export CURLAUTH_NEGOTIATE -export CURLAUTH_GSSNEGOTIATE -export CURLAUTH_GSSAPI -export CURLAUTH_NTLM -export CURLAUTH_DIGEST_IE -export CURLAUTH_NTLM_WB -export CURLAUTH_BEARER -export CURLAUTH_ONLY -export CURLAUTH_ANY -export CURLAUTH_ANYSAFE -export CURLSSH_AUTH_ANY -export CURLSSH_AUTH_NONE -export CURLSSH_AUTH_PUBLICKEY -export CURLSSH_AUTH_PASSWORD -export CURLSSH_AUTH_HOST -export CURLSSH_AUTH_KEYBOARD -export CURLSSH_AUTH_AGENT -export CURLSSH_AUTH_GSSAPI -export CURLSSH_AUTH_DEFAULT -export CURLGSSAPI_DELEGATION_NONE -export CURLGSSAPI_DELEGATION_POLICY_FLAG -export CURLGSSAPI_DELEGATION_FLAG -export CURL_ERROR_SIZE -export CURLSSLOPT_ALLOW_BEAST -export CURLSSLOPT_NO_REVOKE -export CURL_HET_DEFAULT -export CURLFTPSSL_NONE -export CURLFTPSSL_TRY -export CURLFTPSSL_CONTROL -export CURLFTPSSL_ALL -export CURLFTPSSL_LAST -export CURLHEADER_UNIFIED -export CURLHEADER_SEPARATE -export CURLPROTO_HTTP -export CURLPROTO_HTTPS -export CURLPROTO_FTP -export CURLPROTO_FTPS -export CURLPROTO_SCP -export CURLPROTO_SFTP -export CURLPROTO_TELNET -export CURLPROTO_LDAP -export CURLPROTO_LDAPS -export CURLPROTO_DICT -export CURLPROTO_FILE -export CURLPROTO_TFTP -export CURLPROTO_IMAP -export CURLPROTO_IMAPS -export CURLPROTO_POP3 -export CURLPROTO_POP3S -export CURLPROTO_SMTP -export CURLPROTO_SMTPS -export CURLPROTO_RTSP -export CURLPROTO_RTMP -export CURLPROTO_RTMPT -export CURLPROTO_RTMPE -export CURLPROTO_RTMPTE -export CURLPROTO_RTMPS -export CURLPROTO_RTMPTS -export CURLPROTO_GOPHER -export CURLPROTO_SMB -export CURLPROTO_SMBS -export CURLPROTO_ALL -export CURLOPTTYPE_LONG -export CURLOPTTYPE_OBJECTPOINT -export CURLOPTTYPE_STRINGPOINT -export CURLOPTTYPE_FUNCTIONPOINT -export CURLOPTTYPE_OFF_T -export CURLOPT_XFERINFODATA -export CURLOPT_SERVER_RESPONSE_TIMEOUT -export CURLOPT_POST301 -export CURLOPT_SSLKEYPASSWD -export CURLOPT_FTPAPPEND -export CURLOPT_FTPLISTONLY -export CURLOPT_FTP_SSL -export CURLOPT_SSLCERTPASSWD -export CURLOPT_KRB4LEVEL -export CURL_IPRESOLVE_WHATEVER -export CURL_IPRESOLVE_V4 -export CURL_IPRESOLVE_V6 -export CURLOPT_RTSPHEADER -export CURL_HTTP_VERSION_2 -export CURL_REDIR_GET_ALL -export CURL_REDIR_POST_301 -export CURL_REDIR_POST_302 -export CURL_REDIR_POST_303 -export CURL_REDIR_POST_ALL -export CURL_ZERO_TERMINATED -export CURLINFO_STRING -export CURLINFO_LONG -export CURLINFO_DOUBLE -export CURLINFO_SLIST -export CURLINFO_PTR -export CURLINFO_SOCKET -export CURLINFO_OFF_T -export CURLINFO_MASK -export CURLINFO_TYPEMASK -export CURLINFO_HTTP_CODE -export CURL_GLOBAL_SSL -export CURL_GLOBAL_WIN32 -export CURL_GLOBAL_ALL -export CURL_GLOBAL_NOTHING -export CURL_GLOBAL_DEFAULT -export CURL_GLOBAL_ACK_EINTR -export CURLVERSION_NOW -export CURL_VERSION_IPV6 -export CURL_VERSION_KERBEROS4 -export CURL_VERSION_SSL -export CURL_VERSION_LIBZ -export CURL_VERSION_NTLM -export CURL_VERSION_GSSNEGOTIATE -export CURL_VERSION_DEBUG -export CURL_VERSION_ASYNCHDNS -export CURL_VERSION_SPNEGO -export CURL_VERSION_LARGEFILE -export CURL_VERSION_IDN -export CURL_VERSION_SSPI -export CURL_VERSION_CONV -export CURL_VERSION_CURLDEBUG -export CURL_VERSION_TLSAUTH_SRP -export CURL_VERSION_NTLM_WB -export CURL_VERSION_HTTP2 -export CURL_VERSION_GSSAPI -export CURL_VERSION_KERBEROS5 -export CURL_VERSION_UNIX_SOCKETS -export CURL_VERSION_PSL -export CURL_VERSION_HTTPS_PROXY -export CURL_VERSION_MULTI_SSL -export CURL_VERSION_BROTLI -export CURLPAUSE_RECV -export CURLPAUSE_RECV_CONT -export CURLPAUSE_SEND -export CURLPAUSE_SEND_CONT -export CURLPAUSE_ALL -export CURLPAUSE_CONT -export CURLM_CALL_MULTI_SOCKET -export CURLPIPE_NOTHING -export CURLPIPE_HTTP1 -export CURLPIPE_MULTIPLEX -export CURL_WAIT_POLLIN -export CURL_WAIT_POLLPRI -export CURL_WAIT_POLLOUT -export CURL_POLL_NONE -export CURL_POLL_IN -export CURL_POLL_OUT -export CURL_POLL_INOUT -export CURL_POLL_REMOVE -export CURL_SOCKET_TIMEOUT -export CURL_CSELECT_IN -export CURL_CSELECT_OUT -export CURL_CSELECT_ERR -export CURL_PUSH_OK -export CURL_PUSH_DENY -export CURLOPT_MAXAGE_CONN From 229da57b2bf49ee8c8cf8debd046527e6f8fed9b Mon Sep 17 00:00:00 2001 From: Gnimuc Date: Tue, 18 May 2021 16:08:43 +0900 Subject: [PATCH 2/4] Fix CI scripts and test UUID --- .ci/change-uuid.jl | 5 +++++ .github/workflows/ci.yml | 7 +++---- test/libcurl_uuid.jl | 10 ++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .ci/change-uuid.jl create mode 100644 test/libcurl_uuid.jl diff --git a/.ci/change-uuid.jl b/.ci/change-uuid.jl new file mode 100644 index 0000000..45f529f --- /dev/null +++ b/.ci/change-uuid.jl @@ -0,0 +1,5 @@ +using UUIDs + +project_filename = joinpath(dirname(@__DIR__), "Project.toml") + +write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"$(uuid4())\"\n")) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 884d354..ec875e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,11 +43,10 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- + - run: julia --color=yes test/libcurl_uuid.jl + - run: julia --color=yes .ci/change-uuid.jl - uses: julia-actions/julia-buildpkg@v1 - - name: Run tests - run: | - julia --project --color=yes -e 'using UUIDs; write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"$(uuid4())\"\n"));' - julia --project --color=yes --check-bounds=yes -e 'import Pkg; Pkg.build(); Pkg.test(; coverage=true)' + - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: diff --git a/test/libcurl_uuid.jl b/test/libcurl_uuid.jl new file mode 100644 index 0000000..e364c9d --- /dev/null +++ b/test/libcurl_uuid.jl @@ -0,0 +1,10 @@ +using Pkg +using Test + +@testset "LibCURL UUID" begin + project_filename = joinpath(dirname(@__DIR__), "Project.toml") + project = Pkg.TOML.parsefile(project_filename) + uuid = project["uuid"] + correct_uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" + @test uuid == correct_uuid +end From 6593c9bb90465616cddfecf67bd313d2c6c4edfb Mon Sep 17 00:00:00 2001 From: Yupei Qi Date: Tue, 18 May 2021 16:21:29 +0900 Subject: [PATCH 3/4] `Pkg.pathof`=>`pathof` Co-authored-by: Kristoffer Carlsson --- gen/generate.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/generate.jl b/gen/generate.jl index 000316d..10d6b0f 100644 --- a/gen/generate.jl +++ b/gen/generate.jl @@ -6,7 +6,7 @@ using LibCURL_jll cd(@__DIR__) -artifact_toml = joinpath(dirname(Pkg.pathof(LibCURL_jll)), "..", "StdlibArtifacts.toml") +artifact_toml = joinpath(dirname(pathof(LibCURL_jll)), "..", "StdlibArtifacts.toml") artifact_dir = Pkg.Artifacts.ensure_artifact_installed("LibCURL", artifact_toml) include_dir = joinpath(artifact_dir, "include") |> normpath From 77a71382698e7811d9241dcd426075870ff11373 Mon Sep 17 00:00:00 2001 From: Gnimuc Date: Wed, 19 May 2021 13:40:46 +0900 Subject: [PATCH 4/4] `Base.BUILD_TRIPLET` -> `Sys.MACHINE` --- src/LibCURL.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LibCURL.jl b/src/LibCURL.jl index 3c1f9d4..c63f2ea 100644 --- a/src/LibCURL.jl +++ b/src/LibCURL.jl @@ -14,7 +14,7 @@ function __init__() global cacert = MozillaCACerts_jll.cacert end -const IS_LIBC_MUSL = occursin("musl", Base.BUILD_TRIPLET) +const IS_LIBC_MUSL = occursin("musl", Sys.MACHINE) if Sys.isapple() && Sys.ARCH === :aarch64 include("../lib/aarch64-apple-darwin20.jl") @@ -45,7 +45,7 @@ elseif Sys.isbsd() && !Sys.isapple() elseif Sys.iswindows() && Sys.ARCH === :x86_64 include("../lib/x86_64-w64-mingw32.jl") else - error("Unknown platform: $(Base.BUILD_TRIPLET)") + error("Unknown platform: $(Sys.MACHINE)") end # curl_share_setopt, curl_easy_getinfo, curl_easy_setopt, and curl_multi_setopt are vararg C functions