# 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}
