--------------------------------------------------------------------
-- |
-- Module    : Network.Curl.Opts
-- Copyright : (c) Galois Inc 2007-2009
-- License   : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@galois.com>
-- Stability : provisional
-- Portability: portable
--
-- This module contains the various options that specify what happens
-- when we use @perform@ on a @Curl@ handle.
--------------------------------------------------------------------
module Network.Curl.Opts where

import Network.Curl.Types
import Network.Curl.Post
import Data.List

import Foreign.Ptr
import Foreign.C.Types
import Data.Bits

data CurlOption
 = CurlFileObj (Ptr ())  -- ^ external pointer to pass to as 'WriteFunction's last argument.
 | CurlURL  URLString    -- ^ the URL to use for next request; can be the full URL or just the authority\/hostname.
 | CurlPort  Long        -- ^ what port to use.
 | CurlProxy String      -- ^ name of proxy
 | CurlUserPwd String    -- ^ the "user:pass" string to use
 | CurlProxyUserPwd String -- ^ same thing, but for the proxy.
 | CurlRange String      -- ^ byte range to fetch
 | CurlInFile FilePath   -- ^ external pointer to pass to as 'WriteFunction's last argument.
 | CurlErrorBuffer (Ptr CChar) -- ^ buffer for curl to deposit error messages (must at least CURL_ERROR_SIZE bytes long). Uses standard error if not specified.
 | CurlWriteFunction WriteFunction -- ^ callback to handle incoming data.
 | CurlReadFunction  ReadFunction  -- ^ callback for supplying outgoing\/uploaded data.
 | CurlTimeout Long{-secs-}        -- ^ number of seconds before timing out curl operation\/request.
 | CurlInFileSize Long{-bytes-}    -- ^ expected size of uploaded data.
 | CurlPostFields [String]         -- ^ (Multipart) POST data.
 | CurlReferer String              -- ^ Set the Referer: header to the given string.
 | CurlFtpPort String              -- ^ The string to feed to the FTP PORT command.
 | CurlUserAgent String            -- ^ Set the User-Agent: header to the given string.
 | CurlLowSpeed  Long              -- ^ If the bytes per sec drops below the given value, the operation is aborted.
 | CurlLowSpeedTime Long           -- ^ Upper bound for request to complete.
 | CurlResumeFrom Long             -- ^ Byte offset at which the transfer (HTTP or FTP) should start from.
 | CurlCookie String               -- ^ Set the Cookie: header to the given cookie (name=value pairs, semicolon-separated) string.
 | CurlHttpHeaders [String]        -- ^ Embellish the outgoing request with the given list of (formatted) header values.
 | CurlHttpPost  [HttpPost]        -- ^ (Multipart) POST data.
 | CurlSSLCert FilePath            -- ^ file holding your private SSL certificates (default format is PEM).
 | CurlSSLPassword String          -- ^ password to the above file.
 | CurlSSLKeyPassword String       -- ^ an alias for the previous.
 | CurlCRLF Bool                   -- ^ If true, convert Unix newlines into CRLFs when transferring.
 | CurlQuote [String]              -- ^ Sequence of FTP commands to execute prior to the main request.
 | CurlWriteHeader (Ptr ())        -- ^ State \/ pointer argument to pass to WriteFunction callback.
 | CurlCookieFile FilePath         -- ^ Path to file holding initial cookie data; also enables cookie handling.
 | CurlSSLVersion Long             -- ^ What protocol to attempt using (0:default;1:TLS;2:SSLv2;3:SSLv3)
 | CurlTimeCondition TimeCond      -- ^ How to interpret a conditional time value.
 | CurlTimeValue Long              -- ^ Number of secs since Jan 1, 1970. Interpretation is determined by CurlTimeCondition.
 | CurlCustomRequest String        -- ^ String holding alternative request command (WebDAV anyone?)
 {- | CurlStderr String {- XXX: should be FILE* ? -}               -- ^ File object to use for outputting debug info to. -}
 | CurlPostQuote [String]          -- ^ List of commands to issue to FTP server after the main request.
 | CurlWriteInfo String            -- ^ Not sure what this one does; something about passing it to the output function.
 | CurlVerbose Bool                -- ^ Control verbosity
 | CurlHeader Bool                 -- ^ Display outgoing and incoming headers 
 | CurlNoProgress Bool             -- ^ Control progress meter
 | CurlNoBody Bool                 -- ^ Use HEAD instead of GET
 | CurlFailOnError Bool            -- ^ If status response is >= 300, return an error (and no other output).
 | CurlUpload Bool                 -- ^ Control the main dataflow, i.e., True to perform uploads.
 | CurlPost Bool                   -- ^ Issue a POST request.
 | CurlFtpListOnly Bool            -- ^ Switch NLST for FTP directory listings
 | CurlFtpAppend Bool              -- ^ Control if FTP uploads append rather than overwrite files 
 | CurlUseNetRc NetRcOption        -- ^ control how or if a user's.netrc will be consulted for user:password
 | CurlFollowLocation Bool         -- ^ Handle auto-redirects by chasing down Location: values in responses.
 | CurlTransferTextASCII Bool      -- ^ Turn on ASCII transfers for FTP transfers; default is binary (i.e. off).
 | CurlPut Bool                    -- ^ Use PUT to upload data.
 | CurlProgressFunction ProgressFunction  -- ^ callback for showing progress
 | CurlProgressData (Ptr ())       -- ^ state argumentto pass to progress callback.
 | CurlAutoReferer Bool            -- ^ Control if the Referer: field is set upon following Location: redirects
 | CurlProxyPort Long              -- ^ (Numeric) proxy port to use.
 | CurlPostFieldSize Long          -- ^ Size of the POSTed data.
 | CurlHttpProxyTunnel Bool        -- ^ tunnel all HTTP operations through the proxy.
 | CurlInterface String            -- ^ Interface name of outgoing network interface ( network interface, IP address, host name.)
 | CurlKrb4Level String            -- ^ Kerberos security level ("clear", "safe", "confidential", "private" are good values, seemingly.)
 | CurlSSLVerifyPeer Bool          -- ^ Enable the authentication of peer certificate. Default is True.
 | CurlCAInfo FilePath             -- ^ If verifying peer's certificate, use certificates in this file to do so.
 | CurlMaxRedirs Long              -- ^ Maximum number of Location: redirects to chase down before giving up.
 | CurlFiletime Bool               -- ^ Try to determine the modification date of remote document; can be queried for.
 | CurlTelnetOptions [String]      -- ^ List of commands to use for initial telnet negotiations.
 | CurlMaxConnects Long            -- ^ Maximum number of cached active connections.
 | CurlClosePolicy Long            -- ^ No effect (obsolete.)
 | CurlFreshConnect Bool           -- ^ Force the opening up a new connection rather than try to reuse active connections. Default is not to.
 | CurlForbidReuse Bool            -- ^ Do not reuse the connection of next transfer when done.
 | CurlRandomFile FilePath         -- ^ Path to file used to seed (Open)SSL PRNG.
 | CurlEgdSocket FilePath          -- ^ Path to domain socket of EG Daemon.
 | CurlConnectTimeout Long         -- ^ max number of seconds to wait for the initial connection to happen.
 | CurlHeaderFunction WriteFunction -- ^ callback used to handle _incoming_ header data.
 | CurlHttpGet Bool                -- ^ Revert to a GET for the next request.
 | CurlSSLVerifyHost Long          -- ^ Perform Common name checking in peer certificate (1=> existence;2=> matches hostname.)
 | CurlCookieJar FilePath          -- ^ Path to file where additional cookie information will be stored.
 | CurlSSLCipherList String        -- ^ Colon-separated string list of cipher preferences to use for upcoming connection (e.g., "3DES:+RSA")
 | CurlHttpVersion HttpVersion     -- ^ What HTTP version to use, should you want to drop back for some reason.
 | CurlFtpUseEPSV Bool             -- ^ Attempt the use of EPSV before PASV for passive FTP downloads.
 | CurlSSLCertType String          -- ^ The format of your certificates ("PEM", "DER")
 | CurlSSLKey FilePath             -- ^ Filename of private key.
 | CurlSSLKeyType String           -- ^ Format of private key; use "ENG" to load from a crypto engine.
 | CurlSSLEngine String            -- ^ Name of crypto engine to use.
 | CurlSSLEngineDefault            -- ^ Make crypto engine the default for crypto operations.
 | CurlDNSUseGlobalCache Bool      -- ^ Have library uses its MT-unfriendly DNS global cache.
 | CurlDNSCacheTimeout Long        -- ^ Number of seconds to cache results of DNS lookups in memory.
 | CurlPreQuote [String]           -- ^ FTP commands to issue after connection and transfer mode has been set.
 | CurlDebugFunction DebugFunction -- ^ callback to catch and report transfer operations.
 | CurlDebugData (Ptr ())          -- ^ state argument to pass to debug callback.
 | CurlCookieSession Bool          -- ^ Signal the start of a cookie session, ignoring previous session cookies.
 | CurlCAPath FilePath             -- ^ Directory holding CA certificates; used when verifying peer certificate.
 | CurlBufferSize Long             -- ^ Turn (down, presumably) the buffers the received data is chunked up into (and reported to the WriteFunction.) A hint, library is free to ignore.
 | CurlNoSignal Bool               -- ^ Turn off use of signals internally.
 | CurlShare (Ptr ())              -- ^ Share handles are used for sharing data among concurrent Curl objects.
 | CurlProxyType Long              -- ^ What type of proxy to use.
 | CurlEncoding String             -- ^ What to report in the Accept-Encoding: header
 | CurlPrivate (Ptr ())            -- ^ Data associated with a Curl handle.
 | CurlHttp200Aliases String       -- ^ Alternatives to standard 200 OK response strings; whatever it takes, I suppose.
 | CurlUnrestrictedAuth Bool       -- ^ Pass on user:pass when following redirects.
 | CurlFtppUseEPRT Bool            -- ^ For active FTP downloads, try using EPRT command over LPRT.
 | CurlHttpAuth [HttpAuth]         -- ^ State your authentication preferences.
 | CurlSSLCtxFunction SSLCtxtFunction -- ^ callback to handle setting up SSL connections; have the power to abort them.
 | CurlSSLCtxData (Ptr ())         -- ^ state argument to pass into the above callback.
 | CurlFtpCreateMissingDirs Bool   -- ^ Have remote directories be created if not already there
 | CurlProxyAuth [HttpAuth]        -- ^ What preferred authentication schemes to use wrt. proxy.
 | CurlFtpResponseTimeout Long     -- ^ max number of seconds to wait for remote server to ACK commands.
 | CurlIPResolve Long              -- ^ Whether to resolve wrt IPv4 or IPv6.
 | CurlMaxFileSize Long            -- ^ Limit the number of bytes you're willing to download.
 | CurlInFileSizeLarge LLong       -- ^ Wider alternative of option giving upper bound of uploaded content (-1 => unknown.)
 | CurlResumeFromLarge LLong       -- ^ Wider alternative for specifying initial transfer offset.
 | CurlMaxFileSizeLarge LLong      -- ^ Wider alternative for specifying max download size.
 | CurlNetrcFile FilePath          -- ^ Path to user\'s .netrc
 | CurlFtpSSL Long                 -- ^ Try enabling the use of SSL for FTP control connections and\/or transfers.
 | CurlPostFieldSizeLarge LLong    -- ^ Size of data to POST; if unspecified (or -1), curl uses strlen().
 | CurlTCPNoDelay Bool             -- ^ Turn on or off the TCP\/IP NODELAY option.
 | CurlFtpSSLAuth Long             -- ^ Twiddle if TLS or SSL is used.
 | CurlIOCTLFunction (Ptr ())      -- ^ somewhat obscure callback for handling read stream resets.
 | CurlIOCTLData (Ptr ())          -- ^ state argument to the above.
 | CurlFtpAccount String           -- ^ The string to use when server asks for account info.
 | CurlCookieList String           -- ^ Cookie string to pass cookie engine; "ALL" scrubs all cookie info; "SESS" scrubs session ones.
 | CurlIgnoreContentLength Bool    -- ^ If Content-Length: values are troublesome (wrong, perhaps?), use this option to ignore using them as guidance.
 | CurlFtpSkipPASVIP Bool          -- ^ Ignore IP address in 227 responses.
 | CurlFtpFileMethod Long          -- ^ How to navigate to a file on the remote server (single, multiple CWDs).
 | CurlLocalPort Port              -- ^ What local port to use for established connection.
 | CurlLocalPortRange Port         -- ^ Number of attempts at finding local ports (using LocalPort as initial base.)
 | CurlConnectOnly Bool            -- ^ If enabled, perform all steps up until actual transfer.
     -- next three for completeness.
 | CurlConvFromNetworkFunction (Ptr ()) -- ^ callback for doing character translations from network format.
 | CurlConvToNetworkFunction (Ptr ())   -- ^ callback for doing character translations to network format.
 | CurlConvFromUtf8Function (Ptr ())    -- ^ callback for translating UTF8 into host encoding.
 | CurlMaxSendSpeedLarge LLong          -- ^ Specifies throttle value for outgoing data.
 | CurlMaxRecvSpeedLarge LLong          -- ^ Specifies throttle for incoming data.
 | CurlFtpAlternativeToUser String      -- ^ Alternative (to user:pass) for FTP authentication; weird.
 | CurlSockOptFunction (Ptr ())         -- ^ callback that's injected between socket creation and connection.
 | CurlSockOptData (Ptr ())             -- ^ state argument to the above.
 | CurlSSLSessionIdCache Bool           -- ^ Enable the SSL session id cache; default is on, so use this to disable.
 | CurlSSHAuthTypes [SSHAuthType]       -- ^ SSH authentication methods to use.
 | CurlSSHPublicKeyFile FilePath        -- ^ Path to file holding user's SSH public key.
 | CurlSSHPrivateKeyFile FilePath       -- ^ Path to file holding user's SSH private key.
 | CurlFtpSSLCCC Bool                   -- ^ Send CCC command after FTP connection has been authenticated.
 | CurlTimeoutMS Long                   -- ^ Max number of milliseconds that a transfer may take.
 | CurlConnectTimeoutMS Long            -- ^ Max number of milliseconds that a connection attempt may take to complete.
 | CurlHttpTransferDecoding Bool        -- ^ Disable transfer decoding; if disabled, curl will turn off chunking.
 | CurlHttpContentDecoding  Bool        -- ^ Disable content decoding, getting the raw bits.
   -- sync'ed wrt 7.19.2
 | CurlNewFilePerms Long
 | CurlNewDirectoryPerms Long
 | CurlPostRedirect Bool
   -- no support for open socket callbacks/function overrides.
 | CurlSSHHostPublicKeyMD5 String
 | CurlCopyPostFields Bool
 | CurlProxyTransferMode Long
   -- no support for seeking in the input stream.
 | CurlCRLFile       FilePath
 | CurlIssuerCert    FilePath
 | CurlAddressScope  Long
 | CurlCertInfo      Long
 | CurlUserName      String
 | CurlUserPassword  String
 | CurlProxyUser     String
 | CurlProxyPassword String
  

instance Show CurlOption where
  show :: CurlOption -> String
show CurlOption
x = CurlOption -> String
showCurlOption CurlOption
x

data HttpVersion
 = HttpVersionNone
 | HttpVersion10
 | HttpVersion11
   deriving ( Int -> HttpVersion
HttpVersion -> Int
HttpVersion -> [HttpVersion]
HttpVersion -> HttpVersion
HttpVersion -> HttpVersion -> [HttpVersion]
HttpVersion -> HttpVersion -> HttpVersion -> [HttpVersion]
(HttpVersion -> HttpVersion)
-> (HttpVersion -> HttpVersion)
-> (Int -> HttpVersion)
-> (HttpVersion -> Int)
-> (HttpVersion -> [HttpVersion])
-> (HttpVersion -> HttpVersion -> [HttpVersion])
-> (HttpVersion -> HttpVersion -> [HttpVersion])
-> (HttpVersion -> HttpVersion -> HttpVersion -> [HttpVersion])
-> Enum HttpVersion
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: HttpVersion -> HttpVersion -> HttpVersion -> [HttpVersion]
$cenumFromThenTo :: HttpVersion -> HttpVersion -> HttpVersion -> [HttpVersion]
enumFromTo :: HttpVersion -> HttpVersion -> [HttpVersion]
$cenumFromTo :: HttpVersion -> HttpVersion -> [HttpVersion]
enumFromThen :: HttpVersion -> HttpVersion -> [HttpVersion]
$cenumFromThen :: HttpVersion -> HttpVersion -> [HttpVersion]
enumFrom :: HttpVersion -> [HttpVersion]
$cenumFrom :: HttpVersion -> [HttpVersion]
fromEnum :: HttpVersion -> Int
$cfromEnum :: HttpVersion -> Int
toEnum :: Int -> HttpVersion
$ctoEnum :: Int -> HttpVersion
pred :: HttpVersion -> HttpVersion
$cpred :: HttpVersion -> HttpVersion
succ :: HttpVersion -> HttpVersion
$csucc :: HttpVersion -> HttpVersion
Enum,Int -> HttpVersion -> ShowS
[HttpVersion] -> ShowS
HttpVersion -> String
(Int -> HttpVersion -> ShowS)
-> (HttpVersion -> String)
-> ([HttpVersion] -> ShowS)
-> Show HttpVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HttpVersion] -> ShowS
$cshowList :: [HttpVersion] -> ShowS
show :: HttpVersion -> String
$cshow :: HttpVersion -> String
showsPrec :: Int -> HttpVersion -> ShowS
$cshowsPrec :: Int -> HttpVersion -> ShowS
Show )

data TimeCond
 = TimeCondNone
 | TimeCondIfModSince
 | TimeCondIfUnmodSince
 | TimeCondLastMode
   deriving ( Int -> TimeCond
TimeCond -> Int
TimeCond -> [TimeCond]
TimeCond -> TimeCond
TimeCond -> TimeCond -> [TimeCond]
TimeCond -> TimeCond -> TimeCond -> [TimeCond]
(TimeCond -> TimeCond)
-> (TimeCond -> TimeCond)
-> (Int -> TimeCond)
-> (TimeCond -> Int)
-> (TimeCond -> [TimeCond])
-> (TimeCond -> TimeCond -> [TimeCond])
-> (TimeCond -> TimeCond -> [TimeCond])
-> (TimeCond -> TimeCond -> TimeCond -> [TimeCond])
-> Enum TimeCond
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: TimeCond -> TimeCond -> TimeCond -> [TimeCond]
$cenumFromThenTo :: TimeCond -> TimeCond -> TimeCond -> [TimeCond]
enumFromTo :: TimeCond -> TimeCond -> [TimeCond]
$cenumFromTo :: TimeCond -> TimeCond -> [TimeCond]
enumFromThen :: TimeCond -> TimeCond -> [TimeCond]
$cenumFromThen :: TimeCond -> TimeCond -> [TimeCond]
enumFrom :: TimeCond -> [TimeCond]
$cenumFrom :: TimeCond -> [TimeCond]
fromEnum :: TimeCond -> Int
$cfromEnum :: TimeCond -> Int
toEnum :: Int -> TimeCond
$ctoEnum :: Int -> TimeCond
pred :: TimeCond -> TimeCond
$cpred :: TimeCond -> TimeCond
succ :: TimeCond -> TimeCond
$csucc :: TimeCond -> TimeCond
Enum, Int -> TimeCond -> ShowS
[TimeCond] -> ShowS
TimeCond -> String
(Int -> TimeCond -> ShowS)
-> (TimeCond -> String) -> ([TimeCond] -> ShowS) -> Show TimeCond
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimeCond] -> ShowS
$cshowList :: [TimeCond] -> ShowS
show :: TimeCond -> String
$cshow :: TimeCond -> String
showsPrec :: Int -> TimeCond -> ShowS
$cshowsPrec :: Int -> TimeCond -> ShowS
Show )
 
data NetRcOption
 = NetRcIgnored
 | NetRcOptional
 | NetRcRequired
   deriving ( Int -> NetRcOption
NetRcOption -> Int
NetRcOption -> [NetRcOption]
NetRcOption -> NetRcOption
NetRcOption -> NetRcOption -> [NetRcOption]
NetRcOption -> NetRcOption -> NetRcOption -> [NetRcOption]
(NetRcOption -> NetRcOption)
-> (NetRcOption -> NetRcOption)
-> (Int -> NetRcOption)
-> (NetRcOption -> Int)
-> (NetRcOption -> [NetRcOption])
-> (NetRcOption -> NetRcOption -> [NetRcOption])
-> (NetRcOption -> NetRcOption -> [NetRcOption])
-> (NetRcOption -> NetRcOption -> NetRcOption -> [NetRcOption])
-> Enum NetRcOption
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: NetRcOption -> NetRcOption -> NetRcOption -> [NetRcOption]
$cenumFromThenTo :: NetRcOption -> NetRcOption -> NetRcOption -> [NetRcOption]
enumFromTo :: NetRcOption -> NetRcOption -> [NetRcOption]
$cenumFromTo :: NetRcOption -> NetRcOption -> [NetRcOption]
enumFromThen :: NetRcOption -> NetRcOption -> [NetRcOption]
$cenumFromThen :: NetRcOption -> NetRcOption -> [NetRcOption]
enumFrom :: NetRcOption -> [NetRcOption]
$cenumFrom :: NetRcOption -> [NetRcOption]
fromEnum :: NetRcOption -> Int
$cfromEnum :: NetRcOption -> Int
toEnum :: Int -> NetRcOption
$ctoEnum :: Int -> NetRcOption
pred :: NetRcOption -> NetRcOption
$cpred :: NetRcOption -> NetRcOption
succ :: NetRcOption -> NetRcOption
$csucc :: NetRcOption -> NetRcOption
Enum, Int -> NetRcOption -> ShowS
[NetRcOption] -> ShowS
NetRcOption -> String
(Int -> NetRcOption -> ShowS)
-> (NetRcOption -> String)
-> ([NetRcOption] -> ShowS)
-> Show NetRcOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetRcOption] -> ShowS
$cshowList :: [NetRcOption] -> ShowS
show :: NetRcOption -> String
$cshow :: NetRcOption -> String
showsPrec :: Int -> NetRcOption -> ShowS
$cshowsPrec :: Int -> NetRcOption -> ShowS
Show )

data HttpAuth
 = HttpAuthNone
 | HttpAuthBasic
 | HttpAuthDigest
 | HttpAuthGSSNegotiate
 | HttpAuthNTLM
 | HttpAuthAny
 | HttpAuthAnySafe
   deriving ( Int -> HttpAuth
HttpAuth -> Int
HttpAuth -> [HttpAuth]
HttpAuth -> HttpAuth
HttpAuth -> HttpAuth -> [HttpAuth]
HttpAuth -> HttpAuth -> HttpAuth -> [HttpAuth]
(HttpAuth -> HttpAuth)
-> (HttpAuth -> HttpAuth)
-> (Int -> HttpAuth)
-> (HttpAuth -> Int)
-> (HttpAuth -> [HttpAuth])
-> (HttpAuth -> HttpAuth -> [HttpAuth])
-> (HttpAuth -> HttpAuth -> [HttpAuth])
-> (HttpAuth -> HttpAuth -> HttpAuth -> [HttpAuth])
-> Enum HttpAuth
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: HttpAuth -> HttpAuth -> HttpAuth -> [HttpAuth]
$cenumFromThenTo :: HttpAuth -> HttpAuth -> HttpAuth -> [HttpAuth]
enumFromTo :: HttpAuth -> HttpAuth -> [HttpAuth]
$cenumFromTo :: HttpAuth -> HttpAuth -> [HttpAuth]
enumFromThen :: HttpAuth -> HttpAuth -> [HttpAuth]
$cenumFromThen :: HttpAuth -> HttpAuth -> [HttpAuth]
enumFrom :: HttpAuth -> [HttpAuth]
$cenumFrom :: HttpAuth -> [HttpAuth]
fromEnum :: HttpAuth -> Int
$cfromEnum :: HttpAuth -> Int
toEnum :: Int -> HttpAuth
$ctoEnum :: Int -> HttpAuth
pred :: HttpAuth -> HttpAuth
$cpred :: HttpAuth -> HttpAuth
succ :: HttpAuth -> HttpAuth
$csucc :: HttpAuth -> HttpAuth
Enum, Int -> HttpAuth -> ShowS
[HttpAuth] -> ShowS
HttpAuth -> String
(Int -> HttpAuth -> ShowS)
-> (HttpAuth -> String) -> ([HttpAuth] -> ShowS) -> Show HttpAuth
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HttpAuth] -> ShowS
$cshowList :: [HttpAuth] -> ShowS
show :: HttpAuth -> String
$cshow :: HttpAuth -> String
showsPrec :: Int -> HttpAuth -> ShowS
$cshowsPrec :: Int -> HttpAuth -> ShowS
Show )

toHttpAuthMask :: [HttpAuth] -> Long
toHttpAuthMask :: [HttpAuth] -> Long
toHttpAuthMask [] = Long
0
toHttpAuthMask (HttpAuth
x:[HttpAuth]
xs) = 
  let vs :: Long
vs = [HttpAuth] -> Long
toHttpAuthMask [HttpAuth]
xs in
  case HttpAuth
x of 
    HttpAuth
HttpAuthNone  -> Long
vs
    HttpAuth
HttpAuthBasic -> Long
0x1 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    HttpAuth
HttpAuthDigest -> Long
0x2 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    HttpAuth
HttpAuthGSSNegotiate -> Long
0x4 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    HttpAuth
HttpAuthNTLM -> Long
0x8 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    HttpAuth
HttpAuthAny -> (Long -> Long
forall a. Bits a => a -> a
complement Long
0) Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    HttpAuth
HttpAuthAnySafe -> (Long -> Long
forall a. Bits a => a -> a
complement Long
1) Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs


data SSHAuthType
 = SSHAuthAny
 | SSHAuthNone
 | SSHAuthPublickey
 | SSHAuthPassword
 | SSHAuthHost
 | SSHAuthKeyboard
   deriving ( Int -> SSHAuthType -> ShowS
[SSHAuthType] -> ShowS
SSHAuthType -> String
(Int -> SSHAuthType -> ShowS)
-> (SSHAuthType -> String)
-> ([SSHAuthType] -> ShowS)
-> Show SSHAuthType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SSHAuthType] -> ShowS
$cshowList :: [SSHAuthType] -> ShowS
show :: SSHAuthType -> String
$cshow :: SSHAuthType -> String
showsPrec :: Int -> SSHAuthType -> ShowS
$cshowsPrec :: Int -> SSHAuthType -> ShowS
Show )


toSSHAuthMask :: [SSHAuthType] -> Long
toSSHAuthMask :: [SSHAuthType] -> Long
toSSHAuthMask [] = Long
0
toSSHAuthMask (SSHAuthType
x:[SSHAuthType]
xs) = 
  let vs :: Long
vs = [SSHAuthType] -> Long
toSSHAuthMask [SSHAuthType]
xs in 
  case SSHAuthType
x of
    SSHAuthType
SSHAuthAny -> (Long -> Long
forall a. Bits a => a -> a
complement Long
0) Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    SSHAuthType
SSHAuthNone -> Long
vs
    SSHAuthType
SSHAuthPublickey -> Long
1 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    SSHAuthType
SSHAuthPassword -> Long
2 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    SSHAuthType
SSHAuthHost -> Long
4 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs
    SSHAuthType
SSHAuthKeyboard -> Long
8 Long -> Long -> Long
forall a. Bits a => a -> a -> a
.|. Long
vs


type WriteFunction
  = Ptr CChar  --  pointer to external buffer holding data
 -> CInt       --  width (in bytes) of each item
 -> CInt       --  number of items
 -> Ptr ()     --  state argument (file pointer etc.)
 -> IO CInt    --  number of bytes written.

type ReadFunction
  = Ptr CChar  --  pointer to external buffer to fill in.
 -> CInt       --  width (in bytes) of each item
 -> CInt       --  number of items
 -> Ptr ()     --  state argument (file pointer etc.)
 -> IO (Maybe CInt) --  how many bytes was copied into buffer; Nothing => abort.
 
type ReadFunctionPrim
  = Ptr CChar
 -> CInt
 -> CInt
 -> Ptr ()
 -> IO CInt
 

type ProgressFunction
  = Ptr ()  --  state argument
 -> Double  --  expected download totals
 -> Double  --  download totals so far
 -> Double  --  expected upload totals
 -> Double  --  upload totals so far
 -> IO CInt --  not sure; 0 is a good one.

type DebugFunction
  = Curl       --  connection handle
 -> DebugInfo  --  type of call
 -> Ptr CChar  --  data buffer
 -> CInt       --  length of buffer
 -> Ptr ()     --  state argument
 -> IO ()      --  always 0

data DebugInfo
 = InfoText
 | InfoHeaderIn
 | InfoHeaderOut
 | InfoDataIn
 | InfoDataOut
 | InfoSslDataIn
 | InfoSslDataOut
   deriving ( DebugInfo -> DebugInfo -> Bool
(DebugInfo -> DebugInfo -> Bool)
-> (DebugInfo -> DebugInfo -> Bool) -> Eq DebugInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DebugInfo -> DebugInfo -> Bool
$c/= :: DebugInfo -> DebugInfo -> Bool
== :: DebugInfo -> DebugInfo -> Bool
$c== :: DebugInfo -> DebugInfo -> Bool
Eq, Int -> DebugInfo
DebugInfo -> Int
DebugInfo -> [DebugInfo]
DebugInfo -> DebugInfo
DebugInfo -> DebugInfo -> [DebugInfo]
DebugInfo -> DebugInfo -> DebugInfo -> [DebugInfo]
(DebugInfo -> DebugInfo)
-> (DebugInfo -> DebugInfo)
-> (Int -> DebugInfo)
-> (DebugInfo -> Int)
-> (DebugInfo -> [DebugInfo])
-> (DebugInfo -> DebugInfo -> [DebugInfo])
-> (DebugInfo -> DebugInfo -> [DebugInfo])
-> (DebugInfo -> DebugInfo -> DebugInfo -> [DebugInfo])
-> Enum DebugInfo
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: DebugInfo -> DebugInfo -> DebugInfo -> [DebugInfo]
$cenumFromThenTo :: DebugInfo -> DebugInfo -> DebugInfo -> [DebugInfo]
enumFromTo :: DebugInfo -> DebugInfo -> [DebugInfo]
$cenumFromTo :: DebugInfo -> DebugInfo -> [DebugInfo]
enumFromThen :: DebugInfo -> DebugInfo -> [DebugInfo]
$cenumFromThen :: DebugInfo -> DebugInfo -> [DebugInfo]
enumFrom :: DebugInfo -> [DebugInfo]
$cenumFrom :: DebugInfo -> [DebugInfo]
fromEnum :: DebugInfo -> Int
$cfromEnum :: DebugInfo -> Int
toEnum :: Int -> DebugInfo
$ctoEnum :: Int -> DebugInfo
pred :: DebugInfo -> DebugInfo
$cpred :: DebugInfo -> DebugInfo
succ :: DebugInfo -> DebugInfo
$csucc :: DebugInfo -> DebugInfo
Enum )

type DebugFunctionPrim
  = CurlH      --  connection handle
 -> CInt       --  type of call
 -> Ptr CChar  --  data buffer
 -> CInt       --  length of buffer
 -> Ptr ()     --  state argument
 -> IO CInt    --  always 0



type SSLCtxtFunction
  = CurlH   --  connection handle
 -> Ptr ()  --  the SSL_CTX handle
 -> Ptr ()  --  state argument
 -> IO CInt

curl_readfunc_abort :: CInt
curl_readfunc_abort :: CInt
curl_readfunc_abort = CInt
0x10000000

baseLong :: Int
baseLong :: Int
baseLong = Int
0

baseObject :: Int
baseObject :: Int
baseObject = Int
10000

baseFunction :: Int
baseFunction :: Int
baseFunction = Int
20000

baseOffT :: Int
baseOffT :: Int
baseOffT = Int
30000

unmarshallOption :: Unmarshaller a -> CurlOption -> IO a
unmarshallOption :: Unmarshaller a -> CurlOption -> IO a
unmarshallOption Unmarshaller a
um CurlOption
c =
 let 
  l :: Int -> Int
l   = (Int
baseLongInt -> Int -> Int
forall a. Num a => a -> a -> a
+)
  o :: Int -> Int
o   = (Int
baseObjectInt -> Int -> Int
forall a. Num a => a -> a -> a
+)
  f :: Int -> Int
f   = (Int
baseFunctionInt -> Int -> Int
forall a. Num a => a -> a -> a
+)
  off :: Int -> Int
off = (Int
baseOffTInt -> Int -> Int
forall a. Num a => a -> a -> a
+)
 in
 case CurlOption
c of
  CurlFileObj Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
1) Ptr ()
x
  CurlURL String
x   -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
2) String
x
  CurlPort Long
x  -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long   Unmarshaller a
um (Int -> Int
l Int
3) Long
x
  CurlProxy String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
4) String
x
  CurlUserPwd String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
5) String
x
  CurlProxyUserPwd String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
6) String
x
  CurlRange String
x   -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
7) String
x
  CurlInFile String
x  -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
9) String
x
  CurlErrorBuffer Ptr CChar
x   -> Unmarshaller a -> Int -> Ptr CChar -> IO a
forall a. Unmarshaller a -> Int -> Ptr CChar -> IO a
u_cptr Unmarshaller a
um (Int -> Int
o Int
10) Ptr CChar
x
  CurlWriteFunction WriteFunction
x -> Unmarshaller a -> Int -> WriteFunction -> IO a
forall a. Unmarshaller a -> Int -> WriteFunction -> IO a
u_writeFun Unmarshaller a
um (Int -> Int
f Int
11) WriteFunction
x
  CurlReadFunction ReadFunction
x  -> Unmarshaller a -> Int -> ReadFunction -> IO a
forall a. Unmarshaller a -> Int -> ReadFunction -> IO a
u_readFun  Unmarshaller a
um (Int -> Int
f Int
12) ReadFunction
x
  CurlTimeout Long
x ->  Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
13) Long
x
  CurlInFileSize Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
14) Long
x
  CurlPostFields [String]
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
15) ([String] -> String
forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concat ([String] -> String) -> [String] -> String
forall a b. (a -> b) -> a -> b
$ String -> [String] -> [String]
forall a. a -> [a] -> [a]
intersperse String
"&" [String]
x)
  CurlReferer String
x ->  Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
16) String
x
  CurlFtpPort String
x ->  Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
17) String
x
  CurlUserAgent String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
18) String
x
  CurlLowSpeed Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
19) Long
x
  CurlLowSpeedTime Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
20) Long
x
  CurlResumeFrom Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
21) Long
x
  CurlCookie String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
22) String
x
  CurlHttpHeaders [String]
x -> Unmarshaller a -> Int -> [String] -> IO a
forall a. Unmarshaller a -> Int -> [String] -> IO a
u_strings Unmarshaller a
um (Int -> Int
o Int
23) [String]
x
  CurlHttpPost [HttpPost]
x -> Unmarshaller a -> Int -> [HttpPost] -> IO a
forall a. Unmarshaller a -> Int -> [HttpPost] -> IO a
u_posts Unmarshaller a
um (Int -> Int
o Int
24) [HttpPost]
x
  CurlSSLCert String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
25) String
x
  CurlSSLPassword String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
26) String
x
  CurlSSLKeyPassword String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
26) String
x -- yes, duplicate.
  CurlCRLF Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
27) Bool
x
  CurlQuote [String]
x -> Unmarshaller a -> Int -> [String] -> IO a
forall a. Unmarshaller a -> Int -> [String] -> IO a
u_strings Unmarshaller a
um (Int -> Int
o Int
28) [String]
x
  CurlWriteHeader Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
29) Ptr ()
x
  CurlCookieFile String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
31) String
x
  CurlSSLVersion Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
32) Long
x
  CurlTimeCondition TimeCond
x -> Unmarshaller a -> Int -> TimeCond -> IO a
forall b a. Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um (Int -> Int
l Int
33) TimeCond
x
  CurlTimeValue Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
34) Long
x
  CurlCustomRequest String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
36) String
x
  -- CurlStderr x -> u_string um (o 37) x
  CurlPostQuote [String]
x -> Unmarshaller a -> Int -> [String] -> IO a
forall a. Unmarshaller a -> Int -> [String] -> IO a
u_strings Unmarshaller a
um (Int -> Int
o Int
39) [String]
x
  CurlWriteInfo String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
40) String
x
  CurlVerbose Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
41) Bool
x
  CurlHeader Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
42) Bool
x
  CurlNoProgress Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
43) Bool
x
  CurlNoBody Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
44) Bool
x
  CurlFailOnError Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
45) Bool
x
  CurlUpload Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
46) Bool
x
  CurlPost Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
47) Bool
x
  CurlFtpListOnly Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
48) Bool
x
  CurlFtpAppend Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
50) Bool
x
  CurlUseNetRc NetRcOption
x -> Unmarshaller a -> Int -> NetRcOption -> IO a
forall b a. Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um (Int -> Int
l Int
51) NetRcOption
x
  CurlFollowLocation Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
52) Bool
x
  CurlTransferTextASCII Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
53) Bool
x
  CurlPut Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
54) Bool
x
  CurlProgressFunction ProgressFunction
x -> Unmarshaller a -> Int -> ProgressFunction -> IO a
forall a. Unmarshaller a -> Int -> ProgressFunction -> IO a
u_progressFun Unmarshaller a
um (Int -> Int
f Int
56) ProgressFunction
x
  CurlProgressData Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
57) Ptr ()
x
  CurlAutoReferer Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
58) Bool
x
  CurlProxyPort Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
59) Long
x
  CurlPostFieldSize Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
60) Long
x
  CurlHttpProxyTunnel Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
61) Bool
x
  CurlInterface String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
62) String
x
  CurlKrb4Level String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
63) String
x
  CurlSSLVerifyPeer Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
64) Bool
x
  CurlCAInfo String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
65) String
x
  CurlMaxRedirs Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
68) Long
x
  CurlFiletime Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
69) Bool
x
  CurlTelnetOptions [String]
x -> Unmarshaller a -> Int -> [String] -> IO a
forall a. Unmarshaller a -> Int -> [String] -> IO a
u_strings Unmarshaller a
um (Int -> Int
o Int
70) [String]
x
  CurlMaxConnects Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
71) Long
x
  CurlClosePolicy Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
72) Long
x
  CurlFreshConnect Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
74) Bool
x
  CurlForbidReuse Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
75) Bool
x
  CurlRandomFile String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
76) String
x
  CurlEgdSocket String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
77) String
x
  CurlConnectTimeout Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
78) Long
x
  CurlHeaderFunction WriteFunction
x -> Unmarshaller a -> Int -> WriteFunction -> IO a
forall a. Unmarshaller a -> Int -> WriteFunction -> IO a
u_writeFun Unmarshaller a
um (Int -> Int
f Int
79) WriteFunction
x
  CurlHttpGet Bool
x        -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
80) Bool
x
  CurlSSLVerifyHost Long
x  -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
81) Long
x
  CurlCookieJar String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
82) String
x
  CurlSSLCipherList String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
83) String
x -- a string (or a l-list of them)?
  CurlHttpVersion HttpVersion
x -> Unmarshaller a -> Int -> HttpVersion -> IO a
forall b a. Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um (Int -> Int
l Int
84) HttpVersion
x
  CurlFtpUseEPSV Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
85) Bool
x
  CurlSSLCertType String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
86) String
x
  CurlSSLKey String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
87) String
x
  CurlSSLKeyType String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
88) String
x
  CurlSSLEngine String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
89) String
x
  CurlOption
CurlSSLEngineDefault -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
90) Bool
True
  CurlDNSUseGlobalCache Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
91) Bool
x
  CurlDNSCacheTimeout Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
92) Long
x
  CurlPreQuote [String]
x -> Unmarshaller a -> Int -> [String] -> IO a
forall a. Unmarshaller a -> Int -> [String] -> IO a
u_strings Unmarshaller a
um (Int -> Int
o Int
93) [String]
x
  CurlDebugFunction DebugFunction
x -> Unmarshaller a -> Int -> DebugFunction -> IO a
forall a. Unmarshaller a -> Int -> DebugFunction -> IO a
u_debugFun Unmarshaller a
um (Int -> Int
f Int
94) DebugFunction
x
  CurlDebugData Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
95) Ptr ()
x
  CurlCookieSession Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
96) Bool
x
  CurlCAPath String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
97) String
x
  CurlBufferSize Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
98) Long
x
  CurlNoSignal Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
99) Bool
x
  CurlShare Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
100) Ptr ()
x
  CurlProxyType Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall b a. Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um (Int -> Int
l Int
101) Long
x
  CurlEncoding String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
102) String
x
  CurlPrivate Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
103) Ptr ()
x
  CurlHttp200Aliases String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
104) String
x -- correct?
  CurlUnrestrictedAuth Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
105) Bool
x
  CurlFtppUseEPRT Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
106) Bool
x
  CurlHttpAuth [HttpAuth]
xs -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
107) ([HttpAuth] -> Long
toHttpAuthMask [HttpAuth]
xs)
  CurlSSLCtxFunction SSLCtxtFunction
x -> Unmarshaller a -> Int -> SSLCtxtFunction -> IO a
forall a. Unmarshaller a -> Int -> SSLCtxtFunction -> IO a
u_sslctxt Unmarshaller a
um (Int -> Int
f Int
108) SSLCtxtFunction
x
  CurlSSLCtxData Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
109) Ptr ()
x
  CurlFtpCreateMissingDirs Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
110) Bool
x
  CurlProxyAuth [HttpAuth]
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
111) ([HttpAuth] -> Long
toHttpAuthMask [HttpAuth]
x)
  CurlFtpResponseTimeout Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
112) Long
x
  CurlIPResolve Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
113) Long
x
  CurlMaxFileSize Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
114) Long
x
  CurlInFileSizeLarge LLong
x -> Unmarshaller a -> Int -> LLong -> IO a
forall a. Unmarshaller a -> Int -> LLong -> IO a
u_llong Unmarshaller a
um (Int -> Int
off Int
115) LLong
x
  CurlResumeFromLarge LLong
x -> Unmarshaller a -> Int -> LLong -> IO a
forall a. Unmarshaller a -> Int -> LLong -> IO a
u_llong Unmarshaller a
um (Int -> Int
off Int
116) LLong
x
  CurlMaxFileSizeLarge LLong
x -> Unmarshaller a -> Int -> LLong -> IO a
forall a. Unmarshaller a -> Int -> LLong -> IO a
u_llong Unmarshaller a
um (Int -> Int
off Int
117) LLong
x
  CurlNetrcFile String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
118) String
x
  CurlFtpSSL Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall b a. Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um (Int -> Int
l Int
119) Long
x
  CurlPostFieldSizeLarge LLong
x -> Unmarshaller a -> Int -> LLong -> IO a
forall a. Unmarshaller a -> Int -> LLong -> IO a
u_llong Unmarshaller a
um (Int -> Int
off Int
120) LLong
x
  CurlTCPNoDelay Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
121) Bool
x
  CurlFtpSSLAuth Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall b a. Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um (Int -> Int
l Int
129) Long
x
  CurlIOCTLFunction Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ioctl_fun Unmarshaller a
um (Int -> Int
f Int
130) Ptr ()
x
  CurlIOCTLData Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
131) Ptr ()
x
  CurlFtpAccount String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
134) String
x
  CurlCookieList String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
135) String
x
  CurlIgnoreContentLength Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
136) Bool
x
  CurlFtpSkipPASVIP Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
137) Bool
x
  CurlFtpFileMethod Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall b a. Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um (Int -> Int
l Int
138) Long
x
  CurlLocalPort Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
139) Long
x
  CurlLocalPortRange Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
140) Long
x
  CurlConnectOnly Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
141) Bool
x
  CurlConvFromNetworkFunction Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_convFromNetwork Unmarshaller a
um (Int -> Int
f Int
142) Ptr ()
x
  CurlConvToNetworkFunction Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_convToNetwork Unmarshaller a
um (Int -> Int
f Int
143) Ptr ()
x
  CurlConvFromUtf8Function Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_convFromUtf8 Unmarshaller a
um (Int -> Int
f Int
144) Ptr ()
x
  CurlMaxSendSpeedLarge LLong
x -> Unmarshaller a -> Int -> LLong -> IO a
forall a. Unmarshaller a -> Int -> LLong -> IO a
u_llong Unmarshaller a
um (Int -> Int
off Int
145) LLong
x
  CurlMaxRecvSpeedLarge LLong
x -> Unmarshaller a -> Int -> LLong -> IO a
forall a. Unmarshaller a -> Int -> LLong -> IO a
u_llong Unmarshaller a
um (Int -> Int
off Int
146) LLong
x
  CurlFtpAlternativeToUser String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
147) String
x
  CurlSockOptFunction Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_sockoptFun Unmarshaller a
um (Int -> Int
f Int
148) Ptr ()
x
  CurlSockOptData Ptr ()
x -> Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um (Int -> Int
o Int
149) Ptr ()
x
  CurlSSLSessionIdCache Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
150) Bool
x
  CurlSSHAuthTypes [SSHAuthType]
xs -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
151) ([SSHAuthType] -> Long
toSSHAuthMask [SSHAuthType]
xs)
  CurlSSHPublicKeyFile String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
152) String
x
  CurlSSHPrivateKeyFile String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
o Int
153) String
x
  CurlFtpSSLCCC Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
154) Bool
x
  CurlTimeoutMS Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
155) Long
x
  CurlConnectTimeoutMS Long
x -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
156) Long
x
  CurlHttpTransferDecoding Bool
x -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
157) Bool
x
  CurlHttpContentDecoding Bool
x ->  Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
158) Bool
x
  CurlNewFilePerms Long
x        -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
159) Long
x
  CurlNewDirectoryPerms Long
x   -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
160) Long
x
  CurlPostRedirect Bool
x        -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
161) Bool
x
  CurlSSHHostPublicKeyMD5 String
x -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
l Int
162) String
x
  CurlCopyPostFields Bool
x      -> Unmarshaller a -> Int -> Bool -> IO a
forall a. Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um (Int -> Int
l Int
165) Bool
x
  CurlProxyTransferMode Long
x   -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um (Int -> Int
l Int
166) Long
x
  CurlCRLFile String
x             -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
l Int
169) String
x
  CurlIssuerCert String
x          -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
l Int
170) String
x
  CurlAddressScope Long
x        -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um   (Int -> Int
l Int
171) Long
x
  CurlCertInfo Long
x            -> Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um   (Int -> Int
l Int
172) Long
x
  CurlUserName String
x            -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
l Int
173) String
x
  CurlUserPassword String
x        -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
l Int
174) String
x
  CurlProxyUser String
x           -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
l Int
175) String
x
  CurlProxyPassword String
x       -> Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string Unmarshaller a
um (Int -> Int
l Int
176) String
x

data Unmarshaller a
 = Unmarshaller
     { Unmarshaller a -> Int -> Long -> IO a
u_long    :: Int -> Long     -> IO a
     , Unmarshaller a -> Int -> LLong -> IO a
u_llong   :: Int -> LLong    -> IO a
     , Unmarshaller a -> Int -> String -> IO a
u_string  :: Int -> String   -> IO a
     , Unmarshaller a -> Int -> [String] -> IO a
u_strings :: Int -> [String] -> IO a
     , Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr     :: Int -> Ptr ()   -> IO a
     , Unmarshaller a -> Int -> WriteFunction -> IO a
u_writeFun :: Int -> WriteFunction -> IO a
     , Unmarshaller a -> Int -> ReadFunction -> IO a
u_readFun :: Int -> ReadFunction -> IO a
     , Unmarshaller a -> Int -> ProgressFunction -> IO a
u_progressFun :: Int -> ProgressFunction -> IO a
     , Unmarshaller a -> Int -> DebugFunction -> IO a
u_debugFun :: Int -> DebugFunction -> IO a
     , Unmarshaller a -> Int -> [HttpPost] -> IO a
u_posts    :: Int -> [HttpPost] -> IO a
     , Unmarshaller a -> Int -> SSLCtxtFunction -> IO a
u_sslctxt  :: Int -> SSLCtxtFunction -> IO a
     , Unmarshaller a -> Int -> Ptr () -> IO a
u_ioctl_fun :: Int -> Ptr () -> IO a
     , Unmarshaller a -> Int -> Ptr () -> IO a
u_convFromNetwork :: Int -> Ptr () -> IO a
     , Unmarshaller a -> Int -> Ptr () -> IO a
u_convToNetwork :: Int -> Ptr () -> IO a
     , Unmarshaller a -> Int -> Ptr () -> IO a
u_convFromUtf8 :: Int -> Ptr () -> IO a
     , Unmarshaller a -> Int -> Ptr () -> IO a
u_sockoptFun  :: Int -> Ptr () -> IO a
     }

verboseUnmarshaller :: Unmarshaller a -> Unmarshaller a
verboseUnmarshaller :: Unmarshaller a -> Unmarshaller a
verboseUnmarshaller Unmarshaller a
u =
  let two :: String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
m Unmarshaller a -> t -> t -> IO b
f t
x t
y = String -> IO ()
putStrLn String
m IO () -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Unmarshaller a -> t -> t -> IO b
f Unmarshaller a
u t
x t
y 
      twoS :: String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
m Unmarshaller a -> t -> t -> IO b
f t
x t
y = String -> IO ()
putStrLn (String
m String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
": " String -> ShowS
forall a. [a] -> [a] -> [a]
++ (t, t) -> String
forall a. Show a => a -> String
show (t
x,t
y)) IO () -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Unmarshaller a -> t -> t -> IO b
f Unmarshaller a
u t
x t
y 
  in Unmarshaller a
u 
    { u_long :: Int -> Long -> IO a
u_long        = String
-> (Unmarshaller a -> Int -> Long -> IO a) -> Int -> Long -> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_long" Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long
    , u_llong :: Int -> LLong -> IO a
u_llong       = String
-> (Unmarshaller a -> Int -> LLong -> IO a) -> Int -> LLong -> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_llong" Unmarshaller a -> Int -> LLong -> IO a
forall a. Unmarshaller a -> Int -> LLong -> IO a
u_llong
    , u_string :: Int -> String -> IO a
u_string      = String
-> (Unmarshaller a -> Int -> String -> IO a)
-> Int
-> String
-> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_string" Unmarshaller a -> Int -> String -> IO a
forall a. Unmarshaller a -> Int -> String -> IO a
u_string 
    , u_strings :: Int -> [String] -> IO a
u_strings     = String
-> (Unmarshaller a -> Int -> [String] -> IO a)
-> Int
-> [String]
-> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_strings" Unmarshaller a -> Int -> [String] -> IO a
forall a. Unmarshaller a -> Int -> [String] -> IO a
u_strings
    , u_ptr :: Int -> Ptr () -> IO a
u_ptr         = String
-> (Unmarshaller a -> Int -> Ptr () -> IO a)
-> Int
-> Ptr ()
-> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_ptr" Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr
    , u_writeFun :: Int -> WriteFunction -> IO a
u_writeFun    = String
-> (Unmarshaller a -> Int -> WriteFunction -> IO a)
-> Int
-> WriteFunction
-> IO a
forall t t b.
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
"u_writeFun" Unmarshaller a -> Int -> WriteFunction -> IO a
forall a. Unmarshaller a -> Int -> WriteFunction -> IO a
u_writeFun
    , u_readFun :: Int -> ReadFunction -> IO a
u_readFun     = String
-> (Unmarshaller a -> Int -> ReadFunction -> IO a)
-> Int
-> ReadFunction
-> IO a
forall t t b.
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
"u_readFun" Unmarshaller a -> Int -> ReadFunction -> IO a
forall a. Unmarshaller a -> Int -> ReadFunction -> IO a
u_readFun
    , u_progressFun :: Int -> ProgressFunction -> IO a
u_progressFun = String
-> (Unmarshaller a -> Int -> ProgressFunction -> IO a)
-> Int
-> ProgressFunction
-> IO a
forall t t b.
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
"u_progressFun" Unmarshaller a -> Int -> ProgressFunction -> IO a
forall a. Unmarshaller a -> Int -> ProgressFunction -> IO a
u_progressFun
    , u_debugFun :: Int -> DebugFunction -> IO a
u_debugFun    = String
-> (Unmarshaller a -> Int -> DebugFunction -> IO a)
-> Int
-> DebugFunction
-> IO a
forall t t b.
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
"u_debugFun" Unmarshaller a -> Int -> DebugFunction -> IO a
forall a. Unmarshaller a -> Int -> DebugFunction -> IO a
u_debugFun
    , u_posts :: Int -> [HttpPost] -> IO a
u_posts       = String
-> (Unmarshaller a -> Int -> [HttpPost] -> IO a)
-> Int
-> [HttpPost]
-> IO a
forall t t b.
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
"u_posts" Unmarshaller a -> Int -> [HttpPost] -> IO a
forall a. Unmarshaller a -> Int -> [HttpPost] -> IO a
u_posts
    , u_sslctxt :: Int -> SSLCtxtFunction -> IO a
u_sslctxt     = String
-> (Unmarshaller a -> Int -> SSLCtxtFunction -> IO a)
-> Int
-> SSLCtxtFunction
-> IO a
forall t t b.
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
"u_sslctxt" Unmarshaller a -> Int -> SSLCtxtFunction -> IO a
forall a. Unmarshaller a -> Int -> SSLCtxtFunction -> IO a
u_sslctxt
    , u_ioctl_fun :: Int -> Ptr () -> IO a
u_ioctl_fun        = String
-> (Unmarshaller a -> Int -> Ptr () -> IO a)
-> Int
-> Ptr ()
-> IO a
forall t t b.
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
two String
"u_ioctl_fun" Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ioctl_fun
    , u_convFromNetwork :: Int -> Ptr () -> IO a
u_convFromNetwork  = String
-> (Unmarshaller a -> Int -> Ptr () -> IO a)
-> Int
-> Ptr ()
-> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_convFromNetwork" Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_convFromNetwork
    , u_convToNetwork :: Int -> Ptr () -> IO a
u_convToNetwork    = String
-> (Unmarshaller a -> Int -> Ptr () -> IO a)
-> Int
-> Ptr ()
-> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_convToNetwork" Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_convToNetwork
    , u_convFromUtf8 :: Int -> Ptr () -> IO a
u_convFromUtf8     = String
-> (Unmarshaller a -> Int -> Ptr () -> IO a)
-> Int
-> Ptr ()
-> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_convFromUtf8" Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_convFromUtf8
    , u_sockoptFun :: Int -> Ptr () -> IO a
u_sockoptFun       = String
-> (Unmarshaller a -> Int -> Ptr () -> IO a)
-> Int
-> Ptr ()
-> IO a
forall t t b.
(Show t, Show t) =>
String -> (Unmarshaller a -> t -> t -> IO b) -> t -> t -> IO b
twoS String
"u_sockoptFun" Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_sockoptFun
    }


u_bool :: Unmarshaller a -> Int -> Bool -> IO a
u_bool :: Unmarshaller a -> Int -> Bool -> IO a
u_bool Unmarshaller a
um Int
x Bool
b = Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um Int
x (if Bool
b then Long
1 else Long
0)

u_enum :: Enum b => Unmarshaller a -> Int -> b -> IO a
u_enum :: Unmarshaller a -> Int -> b -> IO a
u_enum Unmarshaller a
um Int
x b
b = Unmarshaller a -> Int -> Long -> IO a
forall a. Unmarshaller a -> Int -> Long -> IO a
u_long Unmarshaller a
um Int
x (Int -> Long
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Long) -> Int -> Long
forall a b. (a -> b) -> a -> b
$ b -> Int
forall a. Enum a => a -> Int
fromEnum b
b)

u_cptr :: Unmarshaller a -> Int -> Ptr CChar -> IO a
u_cptr :: Unmarshaller a -> Int -> Ptr CChar -> IO a
u_cptr Unmarshaller a
um Int
x Ptr CChar
p = Unmarshaller a -> Int -> Ptr () -> IO a
forall a. Unmarshaller a -> Int -> Ptr () -> IO a
u_ptr Unmarshaller a
um Int
x (Ptr CChar -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr CChar
p)

showCurlOption :: CurlOption -> String
showCurlOption :: CurlOption -> String
showCurlOption CurlOption
o = 
  case CurlOption
o of
    CurlFileObj Ptr ()
p  -> String
"CurlFileObj " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlURL String
u      -> String
"CurlURL " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
u
    CurlPort Long
p     -> String
"CurlPort " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlProxy String
s    -> String
"CurlProxy " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
s
    CurlUserPwd String
p  -> String
"CurlUserPwd " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlProxyUserPwd String
p -> String
"CurlProxyUserPwd " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlRange String
p -> String
"CurlRange " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlInFile String
p -> String
"CurlInFile " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlErrorBuffer Ptr CChar
p -> String
"CurlErrorBuffer " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr CChar -> String
forall a. Show a => a -> String
show Ptr CChar
p
    CurlWriteFunction{} -> String
"CurlWriteFunction <fun>"
    CurlReadFunction{}  -> String
"CurlReadFunction <fun>"
    CurlTimeout Long
l       -> String
"CurlTimeout " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
l
    CurlInFileSize Long
l    -> String
"CurlInFileSize " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
l
    CurlPostFields [String]
p    -> String
"CurlPostFields " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
forall a. Show a => a -> String
show [String]
p
    CurlReferer String
p       -> String
"CurlReferer " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlFtpPort String
p       -> String
"CurlFtpPort " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlUserAgent String
p     -> String
"CurlUserAgent " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlLowSpeed  Long
p     -> String
"CurlLowSpeed " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlLowSpeedTime Long
p  -> String
"CurlLowSpeedTime " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlResumeFrom Long
p    -> String
"CurlResumeFrom " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlCookie String
p        -> String
"CurlCookie " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlHttpHeaders [String]
p   -> String
"CurlHttpHeaders " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
forall a. Show a => a -> String
show [String]
p
    CurlHttpPost [HttpPost]
p      -> String
"CurlHttpPost " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [HttpPost] -> String
forall a. Show a => a -> String
show [HttpPost]
p
    CurlSSLCert String
p       -> String
"CurlSSLCert " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLPassword String
p   -> String
"CurlSSLPassword " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLKeyPassword String
p -> String
"CurlSSLKeyPassword " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlCRLF Bool
p -> String
"CurlCRLF " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlQuote [String]
p -> String
"CurlQuote " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
forall a. Show a => a -> String
show [String]
p
    CurlWriteHeader Ptr ()
p -> String
"CurlWriteHeader " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlCookieFile String
p -> String
"CurlCookieFile " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLVersion Long
p -> String
"CurlSSLVersion " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlTimeCondition TimeCond
p -> String
"CurlTimeCondition " String -> ShowS
forall a. [a] -> [a] -> [a]
++ TimeCond -> String
forall a. Show a => a -> String
show TimeCond
p
    CurlTimeValue Long
p -> String
"CurlTimeValue " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlCustomRequest String
p -> String
"CurlCustomRequest " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlPostQuote [String]
p -> String
"CurlPostQuote " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
forall a. Show a => a -> String
show [String]
p
    CurlWriteInfo String
p -> String
"CurlWriteInfo " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlVerbose Bool
p -> String
"CurlVerbose " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlHeader Bool
p -> String
"CurlHeader " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlNoProgress Bool
p -> String
"CurlNoProgress " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlNoBody Bool
p -> String
"CurlNoBody " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlFailOnError Bool
p -> String
"CurlFailOnError " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlUpload Bool
p -> String
"CurlUpload " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlPost Bool
p -> String
"CurlPost " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlFtpListOnly Bool
p -> String
"CurlFtpListOnly " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlFtpAppend Bool
p -> String
"CurlFtpAppend " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlUseNetRc NetRcOption
p -> String
"CurlUseNetRc " String -> ShowS
forall a. [a] -> [a] -> [a]
++ NetRcOption -> String
forall a. Show a => a -> String
show NetRcOption
p
    CurlFollowLocation Bool
p -> String
"CurlFollowLocation " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlTransferTextASCII Bool
p -> String
"CurlTransferTextASCII " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlPut Bool
p -> String
"CurlPut " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlProgressFunction{} -> String
"CurlProgressFunction <fun>"
    CurlProgressData Ptr ()
p -> String
"CurlProgressData " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlAutoReferer Bool
p -> String
"CurlAutoReferer " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlProxyPort Long
p -> String
"CurlProxyPort " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlPostFieldSize Long
p -> String
"CurlPostFieldSize " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlHttpProxyTunnel Bool
p -> String
"CurlHttpProxyTunnel " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlInterface String
p -> String
"CurlInterface " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlKrb4Level String
p -> String
"CurlKrb4Level " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLVerifyPeer Bool
p -> String
"CurlSSLVerifyPeer " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlCAInfo String
p -> String
"CurlCAInfo " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlMaxRedirs Long
p -> String
"CurlMaxRedirs " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlFiletime Bool
p -> String
"CurlFiletime " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlTelnetOptions [String]
p -> String
"CurlTelnetOptions " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
forall a. Show a => a -> String
show [String]
p
    CurlMaxConnects Long
p -> String
"CurlMaxConnects " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlClosePolicy Long
p -> String
"CurlClosePolicy " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlFreshConnect Bool
p -> String
"CurlFreshConnect " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlForbidReuse Bool
p -> String
"CurlForbidReuse " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlRandomFile String
p -> String
"CurlRandomFile " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlEgdSocket String
p -> String
"CurlEgdSocket " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlConnectTimeout Long
p -> String
"CurlConnectTimeout " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlHeaderFunction{} -> String
"CurlHeaderFunction <fun>"
    CurlHttpGet Bool
p -> String
"CurlHttpGet " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlSSLVerifyHost Long
p -> String
"CurlSSLVerifyHost " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlCookieJar String
p -> String
"CurlCookieJar " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLCipherList String
p -> String
"CurlSSLCipherList " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlHttpVersion HttpVersion
p -> String
"CurlHttpVersion " String -> ShowS
forall a. [a] -> [a] -> [a]
++ HttpVersion -> String
forall a. Show a => a -> String
show HttpVersion
p
    CurlFtpUseEPSV Bool
p -> String
"CurlFtpUseEPSV " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlSSLCertType String
p -> String
"CurlSSLCertType " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLKey String
p -> String
"CurlSSLKey " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLKeyType String
p -> String
"CurlSSLKeyType " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSLEngine String
p -> String
"CurlSSLEngine " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlOption
CurlSSLEngineDefault-> String
"CurlSSLEngineDefault"
    CurlDNSUseGlobalCache Bool
p -> String
"CurlDNSUseGlobalCache " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlDNSCacheTimeout Long
p -> String
"CurlDNSCacheTimeout " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlPreQuote [String]
p -> String
"CurlPreQuote " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
forall a. Show a => a -> String
show [String]
p
    CurlDebugFunction{} -> String
"CurlDebugFunction <fun>"
    CurlDebugData Ptr ()
p -> String
"CurlDebugData " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlCookieSession Bool
p -> String
"CurlCookieSession " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlCAPath String
p -> String
"CurlCAPath " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlBufferSize Long
p -> String
"CurlBufferSize " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlNoSignal Bool
p -> String
"CurlNoSignal " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlShare Ptr ()
p -> String
"CurlShare " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlProxyType Long
p -> String
"CurlProxyType " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlEncoding String
p -> String
"CurlEncoding " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlPrivate Ptr ()
p -> String
"CurlPrivate " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlHttp200Aliases String
p -> String
"CurlHttp200Aliases " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlUnrestrictedAuth Bool
p -> String
"CurlUnrestrictedAuth " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlFtppUseEPRT Bool
p -> String
"CurlFtppUseEPRT " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlHttpAuth [HttpAuth]
p -> String
"CurlHttpAuth " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [HttpAuth] -> String
forall a. Show a => a -> String
show [HttpAuth]
p
    CurlSSLCtxFunction{} -> String
"CurlSSLCtxFunction <fun>"
    CurlSSLCtxData Ptr ()
p -> String
"CurlSSLCtxData " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlFtpCreateMissingDirs Bool
p -> String
"CurlFtpCreateMissingDirs " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlProxyAuth [HttpAuth]
p -> String
"CurlProxyAuth " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [HttpAuth] -> String
forall a. Show a => a -> String
show [HttpAuth]
p
    CurlFtpResponseTimeout Long
p -> String
"CurlFtpResponseTimeout " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlIPResolve Long
p -> String
"CurlIPResolve " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlMaxFileSize Long
p -> String
"CurlMaxFileSize " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlInFileSizeLarge LLong
p -> String
"CurlInFileSizeLarge " String -> ShowS
forall a. [a] -> [a] -> [a]
++ LLong -> String
forall a. Show a => a -> String
show LLong
p
    CurlResumeFromLarge LLong
p -> String
"CurlResumeFromLarge " String -> ShowS
forall a. [a] -> [a] -> [a]
++ LLong -> String
forall a. Show a => a -> String
show LLong
p
    CurlMaxFileSizeLarge LLong
p -> String
"CurlMaxFileSizeLarge " String -> ShowS
forall a. [a] -> [a] -> [a]
++ LLong -> String
forall a. Show a => a -> String
show LLong
p
    CurlNetrcFile String
p -> String
"CurlNetrcFile " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlFtpSSL Long
p -> String
"CurlFtpSSL " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlPostFieldSizeLarge LLong
p -> String
"CurlPostFieldSizeLarge " String -> ShowS
forall a. [a] -> [a] -> [a]
++ LLong -> String
forall a. Show a => a -> String
show LLong
p
    CurlTCPNoDelay Bool
p -> String
"CurlTCPNoDelay " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlFtpSSLAuth Long
p -> String
"CurlFtpSSLAuth " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlIOCTLFunction Ptr ()
p -> String
"CurlIOCTLFunction " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlIOCTLData Ptr ()
p -> String
"CurlIOCTLData " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlFtpAccount String
p -> String
"CurlFtpAccount " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlCookieList String
p -> String
"CurlCookieList " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlIgnoreContentLength Bool
p -> String
"CurlIgnoreContentLength " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlFtpSkipPASVIP Bool
p -> String
"CurlFtpSkipPASVIP " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlFtpFileMethod Long
p -> String
"CurlFtpFileMethod " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlLocalPort Long
p -> String
"CurlLocalPort " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlLocalPortRange Long
p -> String
"CurlLocalPortRange " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlConnectOnly Bool
p -> String
"CurlConnectOnly " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlConvFromNetworkFunction Ptr ()
p -> String
"CurlConvFromNetworkFunction " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlConvToNetworkFunction Ptr ()
p -> String
"CurlConvToNetworkFunction " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlConvFromUtf8Function Ptr ()
p -> String
"CurlConvFromUtf8Function " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlMaxSendSpeedLarge LLong
p -> String
"CurlMaxSendSpeedLarge " String -> ShowS
forall a. [a] -> [a] -> [a]
++ LLong -> String
forall a. Show a => a -> String
show LLong
p
    CurlMaxRecvSpeedLarge LLong
p -> String
"CurlMaxRecvSpeedLarge " String -> ShowS
forall a. [a] -> [a] -> [a]
++ LLong -> String
forall a. Show a => a -> String
show LLong
p
    CurlFtpAlternativeToUser String
p -> String
"CurlFtpAlternativeToUser " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSockOptFunction Ptr ()
p -> String
"CurlSockOptFunction " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlSockOptData Ptr ()
p -> String
"CurlSockOptData " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Ptr () -> String
forall a. Show a => a -> String
show Ptr ()
p
    CurlSSLSessionIdCache Bool
p -> String
"CurlSSLSessionIdCache " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlSSHAuthTypes [SSHAuthType]
p -> String
"CurlSSHAuthTypes " String -> ShowS
forall a. [a] -> [a] -> [a]
++ [SSHAuthType] -> String
forall a. Show a => a -> String
show [SSHAuthType]
p
    CurlSSHPublicKeyFile String
p -> String
"CurlSSHPublicKeyFile " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlSSHPrivateKeyFile String
p -> String
"CurlSSHPrivateKeyFile " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlFtpSSLCCC Bool
p -> String
"CurlFtpSSLCCC " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlTimeoutMS Long
p -> String
"CurlTimeoutMS " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlConnectTimeoutMS Long
p -> String
"CurlConnectTimeoutMS " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlHttpTransferDecoding Bool
p -> String
"CurlHttpTransferDecoding " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlHttpContentDecoding Bool
p -> String
"CurlHttpContentDecoding " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlNewFilePerms Long
l -> String
"CurlNewFilePerms " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
l
    CurlNewDirectoryPerms Long
p -> String
"CurlNewDirectoryPerms " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlPostRedirect Bool
p -> String
"CurlPostRedirect " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlSSHHostPublicKeyMD5 String
p -> String
"CurlSSHHostPublicKeyMD5 " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlCopyPostFields Bool
p -> String
"CurlCopyPostFields " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Bool -> String
forall a. Show a => a -> String
show Bool
p
    CurlProxyTransferMode Long
p -> String
"CurlProxyTransferMode " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlCRLFile       String
p -> String
"CurlCRLFile " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlIssuerCert    String
p -> String
"CurlIssuerCert " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlAddressScope  Long
p -> String
"CurlAddressScope " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlCertInfo      Long
p -> String
"CurlCertInfo " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Long -> String
forall a. Show a => a -> String
show Long
p
    CurlUserName      String
p -> String
"CurlUserName " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlUserPassword  String
p -> String
"CurlUserPassword " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlProxyUser     String
p -> String
"CurlProxyUser " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p
    CurlProxyPassword String
p -> String
"CurlProxyPassword " String -> ShowS
forall a. [a] -> [a] -> [a]
++ ShowS
forall a. Show a => a -> String
show String
p