{-# LINE 1 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 2 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 3 "src/Bindings/Gpgme.hsc" #-}

-- | <http://www.gnupg.org/gpgme.html>

module Bindings.Gpgme where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word

{-# LINE 8 "src/Bindings/Gpgme.hsc" #-}

-- * Basic types
type C'off_t = Int64

{-# LINE 11 "src/Bindings/Gpgme.hsc" #-}
type C'ssize_t = Int64

{-# LINE 12 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_ctx_t = Word64

{-# LINE 14 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_data_t = Word64

{-# LINE 15 "src/Bindings/Gpgme.hsc" #-}

-- * Errors
type C'gpg_error_t = CUInt

{-# LINE 18 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_error_t = CUInt

{-# LINE 19 "src/Bindings/Gpgme.hsc" #-}
type C'gpg_err_code_t = CUInt

{-# LINE 20 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_err_code_t = CUInt

{-# LINE 21 "src/Bindings/Gpgme.hsc" #-}
type C'gpg_err_source_t = CUInt

{-# LINE 22 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_err_source_t = CUInt

{-# LINE 23 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "inline_gpgme_err_make" c'gpgme_err_make
  :: C'gpgme_err_source_t -> C'gpgme_err_code_t -> IO C'gpgme_error_t

{-# LINE 25 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "inline_gpgme_error" c'gpgme_error
  :: C'gpgme_err_code_t -> IO C'gpgme_error_t

{-# LINE 26 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "inline_gpgme_err_code" c'gpgme_err_code
  :: C'gpgme_error_t -> IO C'gpgme_err_code_t

{-# LINE 27 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "inline_gpgme_err_source" c'gpgme_err_source
  :: C'gpgme_error_t -> IO C'gpgme_err_source_t

{-# LINE 28 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_strerror" c'gpgme_strerror
  :: C'gpgme_error_t -> IO CString
foreign import ccall "&gpgme_strerror" p'gpgme_strerror
  :: FunPtr (C'gpgme_error_t -> IO CString)

{-# LINE 30 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_strerror_r" c'gpgme_strerror_r
  :: C'gpg_error_t -> CString -> CSize -> IO CInt
foreign import ccall "&gpgme_strerror_r" p'gpgme_strerror_r
  :: FunPtr (C'gpg_error_t -> CString -> CSize -> IO CInt)

{-# LINE 31 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_strsource" c'gpgme_strsource
  :: C'gpgme_error_t -> IO CString
foreign import ccall "&gpgme_strsource" p'gpgme_strsource
  :: FunPtr (C'gpgme_error_t -> IO CString)

{-# LINE 32 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_err_code_from_errno" c'gpgme_err_code_from_errno
  :: CInt -> IO C'gpgme_err_code_t
foreign import ccall "&gpgme_err_code_from_errno" p'gpgme_err_code_from_errno
  :: FunPtr (CInt -> IO C'gpgme_err_code_t)

{-# LINE 33 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_err_code_to_errno" c'gpgme_err_code_to_errno
  :: C'gpgme_err_code_t -> IO CInt
foreign import ccall "&gpgme_err_code_to_errno" p'gpgme_err_code_to_errno
  :: FunPtr (C'gpgme_err_code_t -> IO CInt)

{-# LINE 34 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_err_make_from_errno" c'gpgme_err_make_from_errno
  :: C'gpgme_err_source_t -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_err_make_from_errno" p'gpgme_err_make_from_errno
  :: FunPtr (C'gpgme_err_source_t -> CInt -> IO C'gpgme_error_t)

{-# LINE 35 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_error_from_errno" c'gpgme_error_from_errno
  :: CInt -> IO C'gpgme_err_code_t
foreign import ccall "&gpgme_error_from_errno" p'gpgme_error_from_errno
  :: FunPtr (CInt -> IO C'gpgme_err_code_t)

{-# LINE 36 "src/Bindings/Gpgme.hsc" #-}

-- * Data encoding
type C'gpgme_data_encoding_t = CUInt

{-# LINE 39 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_DATA_ENCODING_NONE = 0
c'GPGME_DATA_ENCODING_NONE :: (Num a) => a

{-# LINE 40 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_DATA_ENCODING_BINARY = 1
c'GPGME_DATA_ENCODING_BINARY :: (Num a) => a

{-# LINE 41 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_DATA_ENCODING_BASE64 = 2
c'GPGME_DATA_ENCODING_BASE64 :: (Num a) => a

{-# LINE 42 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_DATA_ENCODING_ARMOR = 3
c'GPGME_DATA_ENCODING_ARMOR :: (Num a) => a

{-# LINE 43 "src/Bindings/Gpgme.hsc" #-}

-- * Algorithms
-- ** Public key algorithms
type C'gpgme_pubkey_algo_t = CUInt

{-# LINE 47 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PK_RSA = 1
c'GPGME_PK_RSA :: (Num a) => a

{-# LINE 48 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PK_RSA_E = 2
c'GPGME_PK_RSA_E :: (Num a) => a

{-# LINE 49 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PK_RSA_S = 3
c'GPGME_PK_RSA_S :: (Num a) => a

{-# LINE 50 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PK_ELG_E = 16
c'GPGME_PK_ELG_E :: (Num a) => a

{-# LINE 51 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PK_DSA = 17
c'GPGME_PK_DSA :: (Num a) => a

{-# LINE 52 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PK_ELG = 20
c'GPGME_PK_ELG :: (Num a) => a

{-# LINE 53 "src/Bindings/Gpgme.hsc" #-}

-- ** Hash algorithms
type C'gpgme_hash_algo_t = CUInt

{-# LINE 56 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_NONE = 0
c'GPGME_MD_NONE :: (Num a) => a

{-# LINE 57 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_MD5 = 1
c'GPGME_MD_MD5 :: (Num a) => a

{-# LINE 58 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_SHA1 = 2
c'GPGME_MD_SHA1 :: (Num a) => a

{-# LINE 59 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_RMD160 = 3
c'GPGME_MD_RMD160 :: (Num a) => a

{-# LINE 60 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_MD2 = 5
c'GPGME_MD_MD2 :: (Num a) => a

{-# LINE 61 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_TIGER = 6
c'GPGME_MD_TIGER :: (Num a) => a

{-# LINE 62 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_HAVAL = 7
c'GPGME_MD_HAVAL :: (Num a) => a

{-# LINE 63 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_SHA256 = 8
c'GPGME_MD_SHA256 :: (Num a) => a

{-# LINE 64 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_SHA384 = 9
c'GPGME_MD_SHA384 :: (Num a) => a

{-# LINE 65 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_SHA512 = 10
c'GPGME_MD_SHA512 :: (Num a) => a

{-# LINE 66 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_MD4 = 301
c'GPGME_MD_MD4 :: (Num a) => a

{-# LINE 67 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_CRC32 = 302
c'GPGME_MD_CRC32 :: (Num a) => a

{-# LINE 68 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_CRC32_RFC1510 = 303
c'GPGME_MD_CRC32_RFC1510 :: (Num a) => a

{-# LINE 69 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_MD_CRC24_RFC2440 = 304
c'GPGME_MD_CRC24_RFC2440 :: (Num a) => a

{-# LINE 70 "src/Bindings/Gpgme.hsc" #-}

-- * Signature mode
type C'gpgme_sig_mode_t = CUInt

{-# LINE 73 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIG_MODE_NORMAL = 0
c'GPGME_SIG_MODE_NORMAL :: (Num a) => a

{-# LINE 74 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIG_MODE_DETACH = 1
c'GPGME_SIG_MODE_DETACH :: (Num a) => a

{-# LINE 75 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIG_MODE_CLEAR = 2
c'GPGME_SIG_MODE_CLEAR :: (Num a) => a

{-# LINE 76 "src/Bindings/Gpgme.hsc" #-}

-- * Identity validity
type C'gpgme_validity_t = CUInt

{-# LINE 79 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_VALIDITY_UNKNOWN = 0
c'GPGME_VALIDITY_UNKNOWN :: (Num a) => a

{-# LINE 80 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_VALIDITY_UNDEFINED = 1
c'GPGME_VALIDITY_UNDEFINED :: (Num a) => a

{-# LINE 81 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_VALIDITY_NEVER = 2
c'GPGME_VALIDITY_NEVER :: (Num a) => a

{-# LINE 82 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_VALIDITY_MARGINAL = 3
c'GPGME_VALIDITY_MARGINAL :: (Num a) => a

{-# LINE 83 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_VALIDITY_FULL = 4
c'GPGME_VALIDITY_FULL :: (Num a) => a

{-# LINE 84 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_VALIDITY_ULTIMATE = 5
c'GPGME_VALIDITY_ULTIMATE :: (Num a) => a

{-# LINE 85 "src/Bindings/Gpgme.hsc" #-}

-- * Protocols
type C'gpgme_protocol_t = CUInt

{-# LINE 88 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PROTOCOL_OpenPGP = 0
c'GPGME_PROTOCOL_OpenPGP :: (Num a) => a

{-# LINE 89 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PROTOCOL_CMS = 1
c'GPGME_PROTOCOL_CMS :: (Num a) => a

{-# LINE 90 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PROTOCOL_GPGCONF = 2
c'GPGME_PROTOCOL_GPGCONF :: (Num a) => a

{-# LINE 91 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PROTOCOL_UNKNOWN = 255
c'GPGME_PROTOCOL_UNKNOWN :: (Num a) => a

{-# LINE 92 "src/Bindings/Gpgme.hsc" #-}

-- * Key list modes
type C'gpgme_keylist_mode_t = CUInt

{-# LINE 95 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_KEYLIST_MODE_LOCAL = 1
c'GPGME_KEYLIST_MODE_LOCAL :: (Num a) => a

{-# LINE 96 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_KEYLIST_MODE_EXTERN = 2
c'GPGME_KEYLIST_MODE_EXTERN :: (Num a) => a

{-# LINE 97 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_KEYLIST_MODE_SIGS = 4
c'GPGME_KEYLIST_MODE_SIGS :: (Num a) => a

{-# LINE 98 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_KEYLIST_MODE_SIG_NOTATIONS = 8
c'GPGME_KEYLIST_MODE_SIG_NOTATIONS :: (Num a) => a

{-# LINE 99 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_KEYLIST_MODE_VALIDATE = 256
c'GPGME_KEYLIST_MODE_VALIDATE :: (Num a) => a

{-# LINE 100 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_AUDITLOG_HTML = 1
c'GPGME_AUDITLOG_HTML :: (Num a) => a

{-# LINE 101 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_AUDITLOG_WITH_HELP = 128
c'GPGME_AUDITLOG_WITH_HELP :: (Num a) => a

{-# LINE 102 "src/Bindings/Gpgme.hsc" #-}

-- * Signature notations
type C'gpgme_sig_notation_flags_t = CUInt

{-# LINE 105 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIG_NOTATION_HUMAN_READABLE = 1
c'GPGME_SIG_NOTATION_HUMAN_READABLE :: (Num a) => a

{-# LINE 106 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIG_NOTATION_CRITICAL = 2
c'GPGME_SIG_NOTATION_CRITICAL :: (Num a) => a

{-# LINE 107 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 109 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 110 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 111 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 112 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 113 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 114 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 115 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_sig_notation = C'_gpgme_sig_notation{
  c'_gpgme_sig_notation'next :: Ptr C'_gpgme_sig_notation,
  c'_gpgme_sig_notation'name :: CString,
  c'_gpgme_sig_notation'value :: CString,
  c'_gpgme_sig_notation'name_len :: CInt,
  c'_gpgme_sig_notation'value_len :: CInt,
  c'_gpgme_sig_notation'flags :: C'gpgme_sig_notation_flags_t
} deriving (Eq,Show)
p'_gpgme_sig_notation'next p = plusPtr p 0
p'_gpgme_sig_notation'next :: Ptr (C'_gpgme_sig_notation) -> Ptr (Ptr C'_gpgme_sig_notation)
p'_gpgme_sig_notation'name p = plusPtr p 8
p'_gpgme_sig_notation'name :: Ptr (C'_gpgme_sig_notation) -> Ptr (CString)
p'_gpgme_sig_notation'value p = plusPtr p 16
p'_gpgme_sig_notation'value :: Ptr (C'_gpgme_sig_notation) -> Ptr (CString)
p'_gpgme_sig_notation'name_len p = plusPtr p 24
p'_gpgme_sig_notation'name_len :: Ptr (C'_gpgme_sig_notation) -> Ptr (CInt)
p'_gpgme_sig_notation'value_len p = plusPtr p 28
p'_gpgme_sig_notation'value_len :: Ptr (C'_gpgme_sig_notation) -> Ptr (CInt)
p'_gpgme_sig_notation'flags p = plusPtr p 32
p'_gpgme_sig_notation'flags :: Ptr (C'_gpgme_sig_notation) -> Ptr (C'gpgme_sig_notation_flags_t)
instance Storable C'_gpgme_sig_notation where
  sizeOf _ = 40
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 24
    v4 <- peekByteOff p 28
    v5 <- peekByteOff p 32
    return $ C'_gpgme_sig_notation v0 v1 v2 v3 v4 v5
  poke p (C'_gpgme_sig_notation v0 v1 v2 v3 v4 v5) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 24 v3
    pokeByteOff p 28 v4
    pokeByteOff p 32 v5
    return ()

{-# LINE 116 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_sig_notation_t = Ptr C'_gpgme_sig_notation

{-# LINE 117 "src/Bindings/Gpgme.hsc" #-}

-- * Status codes
type C'gpgme_status_code_t = CUInt

{-# LINE 120 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_EOF = 0
c'GPGME_STATUS_EOF :: (Num a) => a

{-# LINE 121 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_ENTER = 1
c'GPGME_STATUS_ENTER :: (Num a) => a

{-# LINE 122 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_LEAVE = 2
c'GPGME_STATUS_LEAVE :: (Num a) => a

{-# LINE 123 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_ABORT = 3
c'GPGME_STATUS_ABORT :: (Num a) => a

{-# LINE 124 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_GOODSIG = 4
c'GPGME_STATUS_GOODSIG :: (Num a) => a

{-# LINE 125 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BADSIG = 5
c'GPGME_STATUS_BADSIG :: (Num a) => a

{-# LINE 126 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_ERRSIG = 6
c'GPGME_STATUS_ERRSIG :: (Num a) => a

{-# LINE 127 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BADARMOR = 7
c'GPGME_STATUS_BADARMOR :: (Num a) => a

{-# LINE 128 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_RSA_OR_IDEA = 8
c'GPGME_STATUS_RSA_OR_IDEA :: (Num a) => a

{-# LINE 129 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_KEYEXPIRED = 9
c'GPGME_STATUS_KEYEXPIRED :: (Num a) => a

{-# LINE 130 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_KEYREVOKED = 10
c'GPGME_STATUS_KEYREVOKED :: (Num a) => a

{-# LINE 131 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_TRUST_UNDEFINED = 11
c'GPGME_STATUS_TRUST_UNDEFINED :: (Num a) => a

{-# LINE 132 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_TRUST_NEVER = 12
c'GPGME_STATUS_TRUST_NEVER :: (Num a) => a

{-# LINE 133 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_TRUST_MARGINAL = 13
c'GPGME_STATUS_TRUST_MARGINAL :: (Num a) => a

{-# LINE 134 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_TRUST_FULLY = 14
c'GPGME_STATUS_TRUST_FULLY :: (Num a) => a

{-# LINE 135 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_TRUST_ULTIMATE = 15
c'GPGME_STATUS_TRUST_ULTIMATE :: (Num a) => a

{-# LINE 136 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SHM_INFO = 16
c'GPGME_STATUS_SHM_INFO :: (Num a) => a

{-# LINE 137 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SHM_GET = 17
c'GPGME_STATUS_SHM_GET :: (Num a) => a

{-# LINE 138 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SHM_GET_BOOL = 18
c'GPGME_STATUS_SHM_GET_BOOL :: (Num a) => a

{-# LINE 139 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SHM_GET_HIDDEN = 19
c'GPGME_STATUS_SHM_GET_HIDDEN :: (Num a) => a

{-# LINE 140 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NEED_PASSPHRASE = 20
c'GPGME_STATUS_NEED_PASSPHRASE :: (Num a) => a

{-# LINE 141 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_VALIDSIG = 21
c'GPGME_STATUS_VALIDSIG :: (Num a) => a

{-# LINE 142 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SIG_ID = 22
c'GPGME_STATUS_SIG_ID :: (Num a) => a

{-# LINE 143 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_ENC_TO = 23
c'GPGME_STATUS_ENC_TO :: (Num a) => a

{-# LINE 144 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NODATA = 24
c'GPGME_STATUS_NODATA :: (Num a) => a

{-# LINE 145 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BAD_PASSPHRASE = 25
c'GPGME_STATUS_BAD_PASSPHRASE :: (Num a) => a

{-# LINE 146 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NO_PUBKEY = 26
c'GPGME_STATUS_NO_PUBKEY :: (Num a) => a

{-# LINE 147 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NO_SECKEY = 27
c'GPGME_STATUS_NO_SECKEY :: (Num a) => a

{-# LINE 148 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NEED_PASSPHRASE_SYM = 28
c'GPGME_STATUS_NEED_PASSPHRASE_SYM :: (Num a) => a

{-# LINE 149 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_DECRYPTION_FAILED = 29
c'GPGME_STATUS_DECRYPTION_FAILED :: (Num a) => a

{-# LINE 150 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_DECRYPTION_OKAY = 30
c'GPGME_STATUS_DECRYPTION_OKAY :: (Num a) => a

{-# LINE 151 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_MISSING_PASSPHRASE = 31
c'GPGME_STATUS_MISSING_PASSPHRASE :: (Num a) => a

{-# LINE 152 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_GOOD_PASSPHRASE = 32
c'GPGME_STATUS_GOOD_PASSPHRASE :: (Num a) => a

{-# LINE 153 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_GOODMDC = 33
c'GPGME_STATUS_GOODMDC :: (Num a) => a

{-# LINE 154 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BADMDC = 34
c'GPGME_STATUS_BADMDC :: (Num a) => a

{-# LINE 155 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_ERRMDC = 35
c'GPGME_STATUS_ERRMDC :: (Num a) => a

{-# LINE 156 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_IMPORTED = 36
c'GPGME_STATUS_IMPORTED :: (Num a) => a

{-# LINE 157 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_IMPORT_OK = 37
c'GPGME_STATUS_IMPORT_OK :: (Num a) => a

{-# LINE 158 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_IMPORT_PROBLEM = 38
c'GPGME_STATUS_IMPORT_PROBLEM :: (Num a) => a

{-# LINE 159 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_IMPORT_RES = 39
c'GPGME_STATUS_IMPORT_RES :: (Num a) => a

{-# LINE 160 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_FILE_START = 40
c'GPGME_STATUS_FILE_START :: (Num a) => a

{-# LINE 161 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_FILE_DONE = 41
c'GPGME_STATUS_FILE_DONE :: (Num a) => a

{-# LINE 162 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_FILE_ERROR = 42
c'GPGME_STATUS_FILE_ERROR :: (Num a) => a

{-# LINE 163 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BEGIN_DECRYPTION = 43
c'GPGME_STATUS_BEGIN_DECRYPTION :: (Num a) => a

{-# LINE 164 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_END_DECRYPTION = 44
c'GPGME_STATUS_END_DECRYPTION :: (Num a) => a

{-# LINE 165 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BEGIN_ENCRYPTION = 45
c'GPGME_STATUS_BEGIN_ENCRYPTION :: (Num a) => a

{-# LINE 166 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_END_ENCRYPTION = 46
c'GPGME_STATUS_END_ENCRYPTION :: (Num a) => a

{-# LINE 167 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_DELETE_PROBLEM = 47
c'GPGME_STATUS_DELETE_PROBLEM :: (Num a) => a

{-# LINE 168 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_GET_BOOL = 48
c'GPGME_STATUS_GET_BOOL :: (Num a) => a

{-# LINE 169 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_GET_LINE = 49
c'GPGME_STATUS_GET_LINE :: (Num a) => a

{-# LINE 170 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_GET_HIDDEN = 50
c'GPGME_STATUS_GET_HIDDEN :: (Num a) => a

{-# LINE 171 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_GOT_IT = 51
c'GPGME_STATUS_GOT_IT :: (Num a) => a

{-# LINE 172 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_PROGRESS = 52
c'GPGME_STATUS_PROGRESS :: (Num a) => a

{-# LINE 173 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SIG_CREATED = 53
c'GPGME_STATUS_SIG_CREATED :: (Num a) => a

{-# LINE 174 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SESSION_KEY = 54
c'GPGME_STATUS_SESSION_KEY :: (Num a) => a

{-# LINE 175 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NOTATION_NAME = 55
c'GPGME_STATUS_NOTATION_NAME :: (Num a) => a

{-# LINE 176 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NOTATION_DATA = 56
c'GPGME_STATUS_NOTATION_DATA :: (Num a) => a

{-# LINE 177 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_POLICY_URL = 57
c'GPGME_STATUS_POLICY_URL :: (Num a) => a

{-# LINE 178 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BEGIN_STREAM = 58
c'GPGME_STATUS_BEGIN_STREAM :: (Num a) => a

{-# LINE 179 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_END_STREAM = 59
c'GPGME_STATUS_END_STREAM :: (Num a) => a

{-# LINE 180 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_KEY_CREATED = 60
c'GPGME_STATUS_KEY_CREATED :: (Num a) => a

{-# LINE 181 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_USERID_HINT = 61
c'GPGME_STATUS_USERID_HINT :: (Num a) => a

{-# LINE 182 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_UNEXPECTED = 62
c'GPGME_STATUS_UNEXPECTED :: (Num a) => a

{-# LINE 183 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_INV_RECP = 63
c'GPGME_STATUS_INV_RECP :: (Num a) => a

{-# LINE 184 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NO_RECP = 64
c'GPGME_STATUS_NO_RECP :: (Num a) => a

{-# LINE 185 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_ALREADY_SIGNED = 65
c'GPGME_STATUS_ALREADY_SIGNED :: (Num a) => a

{-# LINE 186 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SIGEXPIRED = 66
c'GPGME_STATUS_SIGEXPIRED :: (Num a) => a

{-# LINE 187 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_EXPSIG = 67
c'GPGME_STATUS_EXPSIG :: (Num a) => a

{-# LINE 188 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_EXPKEYSIG = 68
c'GPGME_STATUS_EXPKEYSIG :: (Num a) => a

{-# LINE 189 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_TRUNCATED = 69
c'GPGME_STATUS_TRUNCATED :: (Num a) => a

{-# LINE 190 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_ERROR = 70
c'GPGME_STATUS_ERROR :: (Num a) => a

{-# LINE 191 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NEWSIG = 71
c'GPGME_STATUS_NEWSIG :: (Num a) => a

{-# LINE 192 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_REVKEYSIG = 72
c'GPGME_STATUS_REVKEYSIG :: (Num a) => a

{-# LINE 193 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SIG_SUBPACKET = 73
c'GPGME_STATUS_SIG_SUBPACKET :: (Num a) => a

{-# LINE 194 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_NEED_PASSPHRASE_PIN = 74
c'GPGME_STATUS_NEED_PASSPHRASE_PIN :: (Num a) => a

{-# LINE 195 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SC_OP_FAILURE = 75
c'GPGME_STATUS_SC_OP_FAILURE :: (Num a) => a

{-# LINE 196 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_SC_OP_SUCCESS = 76
c'GPGME_STATUS_SC_OP_SUCCESS :: (Num a) => a

{-# LINE 197 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_CARDCTRL = 77
c'GPGME_STATUS_CARDCTRL :: (Num a) => a

{-# LINE 198 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_BACKUP_KEY_CREATED = 78
c'GPGME_STATUS_BACKUP_KEY_CREATED :: (Num a) => a

{-# LINE 199 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_PKA_TRUST_BAD = 79
c'GPGME_STATUS_PKA_TRUST_BAD :: (Num a) => a

{-# LINE 200 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_PKA_TRUST_GOOD = 80
c'GPGME_STATUS_PKA_TRUST_GOOD :: (Num a) => a

{-# LINE 201 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_STATUS_PLAINTEXT = 81
c'GPGME_STATUS_PLAINTEXT :: (Num a) => a

{-# LINE 202 "src/Bindings/Gpgme.hsc" #-}

-- * Engine information

{-# LINE 205 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 206 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 207 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 208 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 209 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 210 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 211 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_engine_info = C'_gpgme_engine_info{
  c'_gpgme_engine_info'next :: Ptr C'_gpgme_engine_info,
  c'_gpgme_engine_info'protocol :: C'gpgme_protocol_t,
  c'_gpgme_engine_info'file_name :: CString,
  c'_gpgme_engine_info'version :: CString,
  c'_gpgme_engine_info'req_version :: CString,
  c'_gpgme_engine_info'home_dir :: CString
} deriving (Eq,Show)
p'_gpgme_engine_info'next p = plusPtr p 0
p'_gpgme_engine_info'next :: Ptr (C'_gpgme_engine_info) -> Ptr (Ptr C'_gpgme_engine_info)
p'_gpgme_engine_info'protocol p = plusPtr p 8
p'_gpgme_engine_info'protocol :: Ptr (C'_gpgme_engine_info) -> Ptr (C'gpgme_protocol_t)
p'_gpgme_engine_info'file_name p = plusPtr p 16
p'_gpgme_engine_info'file_name :: Ptr (C'_gpgme_engine_info) -> Ptr (CString)
p'_gpgme_engine_info'version p = plusPtr p 24
p'_gpgme_engine_info'version :: Ptr (C'_gpgme_engine_info) -> Ptr (CString)
p'_gpgme_engine_info'req_version p = plusPtr p 32
p'_gpgme_engine_info'req_version :: Ptr (C'_gpgme_engine_info) -> Ptr (CString)
p'_gpgme_engine_info'home_dir p = plusPtr p 40
p'_gpgme_engine_info'home_dir :: Ptr (C'_gpgme_engine_info) -> Ptr (CString)
instance Storable C'_gpgme_engine_info where
  sizeOf _ = 48
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 24
    v4 <- peekByteOff p 32
    v5 <- peekByteOff p 40
    return $ C'_gpgme_engine_info v0 v1 v2 v3 v4 v5
  poke p (C'_gpgme_engine_info v0 v1 v2 v3 v4 v5) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 24 v3
    pokeByteOff p 32 v4
    pokeByteOff p 40 v5
    return ()

{-# LINE 212 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_engine_info_t = Ptr C'_gpgme_engine_info

{-# LINE 213 "src/Bindings/Gpgme.hsc" #-}

-- * Keys

{-# LINE 216 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 217 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 218 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 219 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 220 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 221 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 222 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 223 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 224 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 227 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_subkey = C'_gpgme_subkey{
  c'_gpgme_subkey'next :: Ptr C'_gpgme_subkey,
  c'_gpgme_subkey'pubkey_algo :: C'gpgme_pubkey_algo_t,
  c'_gpgme_subkey'length :: CUInt,
  c'_gpgme_subkey'keyid :: CString,
  c'_gpgme_subkey'fpr :: CString,
  c'_gpgme_subkey'timestamp :: CLong,
  c'_gpgme_subkey'expires :: CLong,
  c'_gpgme_subkey'card_number :: CString
} deriving (Eq,Show)
p'_gpgme_subkey'next p = plusPtr p 0
p'_gpgme_subkey'next :: Ptr (C'_gpgme_subkey) -> Ptr (Ptr C'_gpgme_subkey)
p'_gpgme_subkey'pubkey_algo p = plusPtr p 12
p'_gpgme_subkey'pubkey_algo :: Ptr (C'_gpgme_subkey) -> Ptr (C'gpgme_pubkey_algo_t)
p'_gpgme_subkey'length p = plusPtr p 16
p'_gpgme_subkey'length :: Ptr (C'_gpgme_subkey) -> Ptr (CUInt)
p'_gpgme_subkey'keyid p = plusPtr p 24
p'_gpgme_subkey'keyid :: Ptr (C'_gpgme_subkey) -> Ptr (CString)
p'_gpgme_subkey'fpr p = plusPtr p 56
p'_gpgme_subkey'fpr :: Ptr (C'_gpgme_subkey) -> Ptr (CString)
p'_gpgme_subkey'timestamp p = plusPtr p 64
p'_gpgme_subkey'timestamp :: Ptr (C'_gpgme_subkey) -> Ptr (CLong)
p'_gpgme_subkey'expires p = plusPtr p 72
p'_gpgme_subkey'expires :: Ptr (C'_gpgme_subkey) -> Ptr (CLong)
p'_gpgme_subkey'card_number p = plusPtr p 80
p'_gpgme_subkey'card_number :: Ptr (C'_gpgme_subkey) -> Ptr (CString)
instance Storable C'_gpgme_subkey where
  sizeOf _ = 88
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 12
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 24
    v4 <- peekByteOff p 56
    v5 <- peekByteOff p 64
    v6 <- peekByteOff p 72
    v7 <- peekByteOff p 80
    return $ C'_gpgme_subkey v0 v1 v2 v3 v4 v5 v6 v7
  poke p (C'_gpgme_subkey v0 v1 v2 v3 v4 v5 v6 v7) = do
    pokeByteOff p 0 v0
    pokeByteOff p 12 v1
    pokeByteOff p 16 v2
    pokeByteOff p 24 v3
    pokeByteOff p 56 v4
    pokeByteOff p 64 v5
    pokeByteOff p 72 v6
    pokeByteOff p 80 v7
    return ()

{-# LINE 228 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_subkey_t = Ptr C'_gpgme_subkey

{-# LINE 229 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 231 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 232 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 233 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 234 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 235 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 236 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 237 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 238 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 239 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 240 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 241 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 242 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 243 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_key_sig = C'_gpgme_key_sig{
  c'_gpgme_key_sig'next :: Ptr C'_gpgme_key_sig,
  c'_gpgme_key_sig'pubkey_algo :: C'gpgme_pubkey_algo_t,
  c'_gpgme_key_sig'keyid :: CString,
  c'_gpgme_key_sig'timestamp :: CLong,
  c'_gpgme_key_sig'expires :: CLong,
  c'_gpgme_key_sig'status :: C'gpgme_error_t,
  c'_gpgme_key_sig'uid :: CString,
  c'_gpgme_key_sig'name :: CString,
  c'_gpgme_key_sig'email :: CString,
  c'_gpgme_key_sig'comment :: CString,
  c'_gpgme_key_sig'sig_class :: CUInt,
  c'_gpgme_key_sig'notations :: C'gpgme_sig_notation_t
} deriving (Eq,Show)
p'_gpgme_key_sig'next p = plusPtr p 0
p'_gpgme_key_sig'next :: Ptr (C'_gpgme_key_sig) -> Ptr (Ptr C'_gpgme_key_sig)
p'_gpgme_key_sig'pubkey_algo p = plusPtr p 12
p'_gpgme_key_sig'pubkey_algo :: Ptr (C'_gpgme_key_sig) -> Ptr (C'gpgme_pubkey_algo_t)
p'_gpgme_key_sig'keyid p = plusPtr p 16
p'_gpgme_key_sig'keyid :: Ptr (C'_gpgme_key_sig) -> Ptr (CString)
p'_gpgme_key_sig'timestamp p = plusPtr p 48
p'_gpgme_key_sig'timestamp :: Ptr (C'_gpgme_key_sig) -> Ptr (CLong)
p'_gpgme_key_sig'expires p = plusPtr p 56
p'_gpgme_key_sig'expires :: Ptr (C'_gpgme_key_sig) -> Ptr (CLong)
p'_gpgme_key_sig'status p = plusPtr p 64
p'_gpgme_key_sig'status :: Ptr (C'_gpgme_key_sig) -> Ptr (C'gpgme_error_t)
p'_gpgme_key_sig'uid p = plusPtr p 72
p'_gpgme_key_sig'uid :: Ptr (C'_gpgme_key_sig) -> Ptr (CString)
p'_gpgme_key_sig'name p = plusPtr p 80
p'_gpgme_key_sig'name :: Ptr (C'_gpgme_key_sig) -> Ptr (CString)
p'_gpgme_key_sig'email p = plusPtr p 88
p'_gpgme_key_sig'email :: Ptr (C'_gpgme_key_sig) -> Ptr (CString)
p'_gpgme_key_sig'comment p = plusPtr p 96
p'_gpgme_key_sig'comment :: Ptr (C'_gpgme_key_sig) -> Ptr (CString)
p'_gpgme_key_sig'sig_class p = plusPtr p 104
p'_gpgme_key_sig'sig_class :: Ptr (C'_gpgme_key_sig) -> Ptr (CUInt)
p'_gpgme_key_sig'notations p = plusPtr p 112
p'_gpgme_key_sig'notations :: Ptr (C'_gpgme_key_sig) -> Ptr (C'gpgme_sig_notation_t)
instance Storable C'_gpgme_key_sig where
  sizeOf _ = 128
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 12
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 48
    v4 <- peekByteOff p 56
    v5 <- peekByteOff p 64
    v6 <- peekByteOff p 72
    v7 <- peekByteOff p 80
    v8 <- peekByteOff p 88
    v9 <- peekByteOff p 96
    v10 <- peekByteOff p 104
    v11 <- peekByteOff p 112
    return $ C'_gpgme_key_sig v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11
  poke p (C'_gpgme_key_sig v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11) = do
    pokeByteOff p 0 v0
    pokeByteOff p 12 v1
    pokeByteOff p 16 v2
    pokeByteOff p 48 v3
    pokeByteOff p 56 v4
    pokeByteOff p 64 v5
    pokeByteOff p 72 v6
    pokeByteOff p 80 v7
    pokeByteOff p 88 v8
    pokeByteOff p 96 v9
    pokeByteOff p 104 v10
    pokeByteOff p 112 v11
    return ()

{-# LINE 244 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_key_sig_t = Ptr C'_gpgme_key_sig

{-# LINE 245 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 247 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 248 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 249 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 250 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 251 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 252 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 253 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 254 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_user_id = C'_gpgme_user_id{
  c'_gpgme_user_id'next :: Ptr C'_gpgme_user_id,
  c'_gpgme_user_id'validity :: C'gpgme_validity_t,
  c'_gpgme_user_id'uid :: CString,
  c'_gpgme_user_id'name :: CString,
  c'_gpgme_user_id'email :: CString,
  c'_gpgme_user_id'comment :: CString,
  c'_gpgme_user_id'signatures :: C'gpgme_key_sig_t
} deriving (Eq,Show)
p'_gpgme_user_id'next p = plusPtr p 0
p'_gpgme_user_id'next :: Ptr (C'_gpgme_user_id) -> Ptr (Ptr C'_gpgme_user_id)
p'_gpgme_user_id'validity p = plusPtr p 12
p'_gpgme_user_id'validity :: Ptr (C'_gpgme_user_id) -> Ptr (C'gpgme_validity_t)
p'_gpgme_user_id'uid p = plusPtr p 16
p'_gpgme_user_id'uid :: Ptr (C'_gpgme_user_id) -> Ptr (CString)
p'_gpgme_user_id'name p = plusPtr p 24
p'_gpgme_user_id'name :: Ptr (C'_gpgme_user_id) -> Ptr (CString)
p'_gpgme_user_id'email p = plusPtr p 32
p'_gpgme_user_id'email :: Ptr (C'_gpgme_user_id) -> Ptr (CString)
p'_gpgme_user_id'comment p = plusPtr p 40
p'_gpgme_user_id'comment :: Ptr (C'_gpgme_user_id) -> Ptr (CString)
p'_gpgme_user_id'signatures p = plusPtr p 48
p'_gpgme_user_id'signatures :: Ptr (C'_gpgme_user_id) -> Ptr (C'gpgme_key_sig_t)
instance Storable C'_gpgme_user_id where
  sizeOf _ = 64
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 12
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 24
    v4 <- peekByteOff p 32
    v5 <- peekByteOff p 40
    v6 <- peekByteOff p 48
    return $ C'_gpgme_user_id v0 v1 v2 v3 v4 v5 v6
  poke p (C'_gpgme_user_id v0 v1 v2 v3 v4 v5 v6) = do
    pokeByteOff p 0 v0
    pokeByteOff p 12 v1
    pokeByteOff p 16 v2
    pokeByteOff p 24 v3
    pokeByteOff p 32 v4
    pokeByteOff p 40 v5
    pokeByteOff p 48 v6
    return ()

{-# LINE 255 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_user_id_t = Ptr C'_gpgme_user_id

{-# LINE 256 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 258 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 259 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 260 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 261 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 262 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 263 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 264 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 265 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 266 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_key = C'_gpgme_key{
  c'_gpgme_key'protocol :: C'gpgme_protocol_t,
  c'_gpgme_key'issuer_serial :: CString,
  c'_gpgme_key'issuer_name :: CString,
  c'_gpgme_key'chain_id :: CString,
  c'_gpgme_key'owner_trust :: C'gpgme_validity_t,
  c'_gpgme_key'subkeys :: C'gpgme_subkey_t,
  c'_gpgme_key'uids :: C'gpgme_user_id_t,
  c'_gpgme_key'keylist_mode :: C'gpgme_keylist_mode_t
} deriving (Eq,Show)
p'_gpgme_key'protocol p = plusPtr p 8
p'_gpgme_key'protocol :: Ptr (C'_gpgme_key) -> Ptr (C'gpgme_protocol_t)
p'_gpgme_key'issuer_serial p = plusPtr p 16
p'_gpgme_key'issuer_serial :: Ptr (C'_gpgme_key) -> Ptr (CString)
p'_gpgme_key'issuer_name p = plusPtr p 24
p'_gpgme_key'issuer_name :: Ptr (C'_gpgme_key) -> Ptr (CString)
p'_gpgme_key'chain_id p = plusPtr p 32
p'_gpgme_key'chain_id :: Ptr (C'_gpgme_key) -> Ptr (CString)
p'_gpgme_key'owner_trust p = plusPtr p 40
p'_gpgme_key'owner_trust :: Ptr (C'_gpgme_key) -> Ptr (C'gpgme_validity_t)
p'_gpgme_key'subkeys p = plusPtr p 48
p'_gpgme_key'subkeys :: Ptr (C'_gpgme_key) -> Ptr (C'gpgme_subkey_t)
p'_gpgme_key'uids p = plusPtr p 56
p'_gpgme_key'uids :: Ptr (C'_gpgme_key) -> Ptr (C'gpgme_user_id_t)
p'_gpgme_key'keylist_mode p = plusPtr p 80
p'_gpgme_key'keylist_mode :: Ptr (C'_gpgme_key) -> Ptr (C'gpgme_keylist_mode_t)
instance Storable C'_gpgme_key where
  sizeOf _ = 88
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 8
    v1 <- peekByteOff p 16
    v2 <- peekByteOff p 24
    v3 <- peekByteOff p 32
    v4 <- peekByteOff p 40
    v5 <- peekByteOff p 48
    v6 <- peekByteOff p 56
    v7 <- peekByteOff p 80
    return $ C'_gpgme_key v0 v1 v2 v3 v4 v5 v6 v7
  poke p (C'_gpgme_key v0 v1 v2 v3 v4 v5 v6 v7) = do
    pokeByteOff p 8 v0
    pokeByteOff p 16 v1
    pokeByteOff p 24 v2
    pokeByteOff p 32 v3
    pokeByteOff p 40 v4
    pokeByteOff p 48 v5
    pokeByteOff p 56 v6
    pokeByteOff p 80 v7
    return ()

{-# LINE 267 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_key_t = Ptr C'_gpgme_key

{-# LINE 268 "src/Bindings/Gpgme.hsc" #-}

-- * Callback types
type C'gpgme_passphrase_cb_t = FunPtr (Ptr () -> CString -> CString -> CInt -> CInt -> IO C'gpgme_error_t)
foreign import ccall "wrapper" mk'gpgme_passphrase_cb_t
  :: (Ptr () -> CString -> CString -> CInt -> CInt -> IO C'gpgme_error_t) -> IO C'gpgme_passphrase_cb_t
foreign import ccall "dynamic" mK'gpgme_passphrase_cb_t
  :: C'gpgme_passphrase_cb_t -> (Ptr () -> CString -> CString -> CInt -> CInt -> IO C'gpgme_error_t)

{-# LINE 271 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_progress_cb_t = FunPtr (Ptr () -> CString -> CInt -> CInt -> CInt -> IO ())
foreign import ccall "wrapper" mk'gpgme_progress_cb_t
  :: (Ptr () -> CString -> CInt -> CInt -> CInt -> IO ()) -> IO C'gpgme_progress_cb_t
foreign import ccall "dynamic" mK'gpgme_progress_cb_t
  :: C'gpgme_progress_cb_t -> (Ptr () -> CString -> CInt -> CInt -> CInt -> IO ())

{-# LINE 272 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_edit_cb_t = FunPtr (Ptr () -> C'gpgme_status_code_t -> CString -> CInt -> IO C'gpgme_error_t)
foreign import ccall "wrapper" mk'gpgme_edit_cb_t
  :: (Ptr () -> C'gpgme_status_code_t -> CString -> CInt -> IO C'gpgme_error_t) -> IO C'gpgme_edit_cb_t
foreign import ccall "dynamic" mK'gpgme_edit_cb_t
  :: C'gpgme_edit_cb_t -> (Ptr () -> C'gpgme_status_code_t -> CString -> CInt -> IO C'gpgme_error_t)

{-# LINE 273 "src/Bindings/Gpgme.hsc" #-}

-- * Creating and configuring contexts
foreign import ccall "gpgme_new" c'gpgme_new
  :: Ptr C'gpgme_ctx_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_new" p'gpgme_new
  :: FunPtr (Ptr C'gpgme_ctx_t -> IO C'gpgme_error_t)

{-# LINE 276 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_release" c'gpgme_release
  :: C'gpgme_ctx_t -> IO ()
foreign import ccall "&gpgme_release" p'gpgme_release
  :: FunPtr (C'gpgme_ctx_t -> IO ())

{-# LINE 277 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_protocol" c'gpgme_set_protocol
  :: C'gpgme_ctx_t -> C'gpgme_protocol_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_set_protocol" p'gpgme_set_protocol
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_protocol_t -> IO C'gpgme_error_t)

{-# LINE 278 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_protocol" c'gpgme_get_protocol
  :: C'gpgme_ctx_t -> IO C'gpgme_protocol_t
foreign import ccall "&gpgme_get_protocol" p'gpgme_get_protocol
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_protocol_t)

{-# LINE 279 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_protocol_name" c'gpgme_get_protocol_name
  :: C'gpgme_protocol_t -> IO CString
foreign import ccall "&gpgme_get_protocol_name" p'gpgme_get_protocol_name
  :: FunPtr (C'gpgme_protocol_t -> IO CString)

{-# LINE 280 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_armor" c'gpgme_set_armor
  :: C'gpgme_ctx_t -> CInt -> IO ()
foreign import ccall "&gpgme_set_armor" p'gpgme_set_armor
  :: FunPtr (C'gpgme_ctx_t -> CInt -> IO ())

{-# LINE 281 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_armor" c'gpgme_get_armor
  :: C'gpgme_ctx_t -> IO CInt
foreign import ccall "&gpgme_get_armor" p'gpgme_get_armor
  :: FunPtr (C'gpgme_ctx_t -> IO CInt)

{-# LINE 282 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_textmode" c'gpgme_set_textmode
  :: C'gpgme_ctx_t -> CInt -> IO ()
foreign import ccall "&gpgme_set_textmode" p'gpgme_set_textmode
  :: FunPtr (C'gpgme_ctx_t -> CInt -> IO ())

{-# LINE 283 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_textmode" c'gpgme_get_textmode
  :: C'gpgme_ctx_t -> IO CInt
foreign import ccall "&gpgme_get_textmode" p'gpgme_get_textmode
  :: FunPtr (C'gpgme_ctx_t -> IO CInt)

{-# LINE 284 "src/Bindings/Gpgme.hsc" #-}

c'GPGME_INCLUDE_CERTS_DEFAULT = -256
c'GPGME_INCLUDE_CERTS_DEFAULT :: (Num a) => a

{-# LINE 286 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_set_include_certs" c'gpgme_set_include_certs
  :: C'gpgme_ctx_t -> CInt -> IO ()
foreign import ccall "&gpgme_set_include_certs" p'gpgme_set_include_certs
  :: FunPtr (C'gpgme_ctx_t -> CInt -> IO ())

{-# LINE 288 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_include_certs" c'gpgme_get_include_certs
  :: C'gpgme_ctx_t -> IO CInt
foreign import ccall "&gpgme_get_include_certs" p'gpgme_get_include_certs
  :: FunPtr (C'gpgme_ctx_t -> IO CInt)

{-# LINE 289 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_keylist_mode" c'gpgme_set_keylist_mode
  :: C'gpgme_ctx_t -> C'gpgme_keylist_mode_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_set_keylist_mode" p'gpgme_set_keylist_mode
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_keylist_mode_t -> IO C'gpgme_error_t)

{-# LINE 290 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_keylist_mode" c'gpgme_get_keylist_mode
  :: C'gpgme_ctx_t -> IO C'gpgme_keylist_mode_t
foreign import ccall "&gpgme_get_keylist_mode" p'gpgme_get_keylist_mode
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_keylist_mode_t)

{-# LINE 291 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_passphrase_cb" c'gpgme_set_passphrase_cb
  :: C'gpgme_ctx_t -> C'gpgme_passphrase_cb_t -> Ptr () -> IO ()
foreign import ccall "&gpgme_set_passphrase_cb" p'gpgme_set_passphrase_cb
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_passphrase_cb_t -> Ptr () -> IO ())

{-# LINE 292 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_passphrase_cb" c'gpgme_get_passphrase_cb
  :: C'gpgme_ctx_t -> Ptr C'gpgme_passphrase_cb_t -> Ptr (Ptr ()) -> IO ()
foreign import ccall "&gpgme_get_passphrase_cb" p'gpgme_get_passphrase_cb
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_passphrase_cb_t -> Ptr (Ptr ()) -> IO ())

{-# LINE 293 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_progress_cb" c'gpgme_set_progress_cb
  :: C'gpgme_ctx_t -> C'gpgme_progress_cb_t -> Ptr () -> IO ()
foreign import ccall "&gpgme_set_progress_cb" p'gpgme_set_progress_cb
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_progress_cb_t -> Ptr () -> IO ())

{-# LINE 294 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_progress_cb" c'gpgme_get_progress_cb
  :: C'gpgme_ctx_t -> Ptr C'gpgme_progress_cb_t -> Ptr (Ptr ()) -> IO ()
foreign import ccall "&gpgme_get_progress_cb" p'gpgme_get_progress_cb
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_progress_cb_t -> Ptr (Ptr ()) -> IO ())

{-# LINE 295 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_locale" c'gpgme_set_locale
  :: C'gpgme_ctx_t -> CInt -> CString -> IO C'gpgme_error_t
foreign import ccall "&gpgme_set_locale" p'gpgme_set_locale
  :: FunPtr (C'gpgme_ctx_t -> CInt -> CString -> IO C'gpgme_error_t)

{-# LINE 296 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_ctx_get_engine_info" c'gpgme_ctx_get_engine_info
  :: C'gpgme_ctx_t -> IO C'gpgme_engine_info_t
foreign import ccall "&gpgme_ctx_get_engine_info" p'gpgme_ctx_get_engine_info
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_engine_info_t)

{-# LINE 297 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_ctx_set_engine_info" c'gpgme_ctx_set_engine_info
  :: C'gpgme_ctx_t -> C'gpgme_protocol_t -> CString -> CString -> IO C'gpgme_error_t
foreign import ccall "&gpgme_ctx_set_engine_info" p'gpgme_ctx_set_engine_info
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_protocol_t -> CString -> CString -> IO C'gpgme_error_t)

{-# LINE 298 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_pubkey_algo_name" c'gpgme_pubkey_algo_name
  :: C'gpgme_pubkey_algo_t -> IO CString
foreign import ccall "&gpgme_pubkey_algo_name" p'gpgme_pubkey_algo_name
  :: FunPtr (C'gpgme_pubkey_algo_t -> IO CString)

{-# LINE 299 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_hash_algo_name" c'gpgme_hash_algo_name
  :: C'gpgme_hash_algo_t -> IO CString
foreign import ccall "&gpgme_hash_algo_name" p'gpgme_hash_algo_name
  :: FunPtr (C'gpgme_hash_algo_t -> IO CString)

{-# LINE 300 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_signers_clear" c'gpgme_signers_clear
  :: C'gpgme_ctx_t -> IO ()
foreign import ccall "&gpgme_signers_clear" p'gpgme_signers_clear
  :: FunPtr (C'gpgme_ctx_t -> IO ())

{-# LINE 301 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_signers_add" c'gpgme_signers_add
  :: C'gpgme_ctx_t -> C'gpgme_key_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_signers_add" p'gpgme_signers_add
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_key_t -> IO C'gpgme_error_t)

{-# LINE 302 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_signers_enum" c'gpgme_signers_enum
  :: C'gpgme_ctx_t -> CInt -> IO C'gpgme_key_t
foreign import ccall "&gpgme_signers_enum" p'gpgme_signers_enum
  :: FunPtr (C'gpgme_ctx_t -> CInt -> IO C'gpgme_key_t)

{-# LINE 303 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_sig_notation_clear" c'gpgme_sig_notation_clear
  :: C'gpgme_ctx_t -> IO ()
foreign import ccall "&gpgme_sig_notation_clear" p'gpgme_sig_notation_clear
  :: FunPtr (C'gpgme_ctx_t -> IO ())

{-# LINE 304 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_sig_notation_add" c'gpgme_sig_notation_add
  :: C'gpgme_ctx_t -> CString -> CString -> C'gpgme_sig_notation_flags_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_sig_notation_add" p'gpgme_sig_notation_add
  :: FunPtr (C'gpgme_ctx_t -> CString -> CString -> C'gpgme_sig_notation_flags_t -> IO C'gpgme_error_t)

{-# LINE 305 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_sig_notation_get" c'gpgme_sig_notation_get
  :: C'gpgme_ctx_t -> IO C'gpgme_sig_notation_t
foreign import ccall "&gpgme_sig_notation_get" p'gpgme_sig_notation_get
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_sig_notation_t)

{-# LINE 306 "src/Bindings/Gpgme.hsc" #-}

-- * IO events
type C'gpgme_io_cb_t = FunPtr (Ptr () -> CInt -> IO C'gpgme_error_t)
foreign import ccall "wrapper" mk'gpgme_io_cb_t
  :: (Ptr () -> CInt -> IO C'gpgme_error_t) -> IO C'gpgme_io_cb_t
foreign import ccall "dynamic" mK'gpgme_io_cb_t
  :: C'gpgme_io_cb_t -> (Ptr () -> CInt -> IO C'gpgme_error_t)

{-# LINE 309 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_register_io_cb_t = FunPtr (Ptr () -> CInt -> CInt -> C'gpgme_io_cb_t -> Ptr () -> Ptr (Ptr ()) -> IO C'gpgme_error_t)
foreign import ccall "wrapper" mk'gpgme_register_io_cb_t
  :: (Ptr () -> CInt -> CInt -> C'gpgme_io_cb_t -> Ptr () -> Ptr (Ptr ()) -> IO C'gpgme_error_t) -> IO C'gpgme_register_io_cb_t
foreign import ccall "dynamic" mK'gpgme_register_io_cb_t
  :: C'gpgme_register_io_cb_t -> (Ptr () -> CInt -> CInt -> C'gpgme_io_cb_t -> Ptr () -> Ptr (Ptr ()) -> IO C'gpgme_error_t)

{-# LINE 310 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_remove_io_cb_t = FunPtr (Ptr () -> IO ())
foreign import ccall "wrapper" mk'gpgme_remove_io_cb_t
  :: (Ptr () -> IO ()) -> IO C'gpgme_remove_io_cb_t
foreign import ccall "dynamic" mK'gpgme_remove_io_cb_t
  :: C'gpgme_remove_io_cb_t -> (Ptr () -> IO ())

{-# LINE 311 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_event_io_t = CUInt

{-# LINE 313 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_EVENT_START = 0
c'GPGME_EVENT_START :: (Num a) => a

{-# LINE 314 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_EVENT_DONE = 1
c'GPGME_EVENT_DONE :: (Num a) => a

{-# LINE 315 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_EVENT_NEXT_KEY = 2
c'GPGME_EVENT_NEXT_KEY :: (Num a) => a

{-# LINE 316 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_EVENT_NEXT_TRUSTITEM = 3
c'GPGME_EVENT_NEXT_TRUSTITEM :: (Num a) => a

{-# LINE 317 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_event_io_cb_t = FunPtr (Ptr () -> C'gpgme_event_io_t -> Ptr () -> IO ())
foreign import ccall "wrapper" mk'gpgme_event_io_cb_t
  :: (Ptr () -> C'gpgme_event_io_t -> Ptr () -> IO ()) -> IO C'gpgme_event_io_cb_t
foreign import ccall "dynamic" mK'gpgme_event_io_cb_t
  :: C'gpgme_event_io_cb_t -> (Ptr () -> C'gpgme_event_io_t -> Ptr () -> IO ())

{-# LINE 319 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 321 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 322 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 323 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 324 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 325 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 326 "src/Bindings/Gpgme.hsc" #-}
data C'gpgme_io_cbs = C'gpgme_io_cbs{
  c'gpgme_io_cbs'add :: C'gpgme_register_io_cb_t,
  c'gpgme_io_cbs'add_priv :: Ptr (),
  c'gpgme_io_cbs'remove :: C'gpgme_remove_io_cb_t,
  c'gpgme_io_cbs'event :: C'gpgme_event_io_cb_t,
  c'gpgme_io_cbs'event_priv :: Ptr ()
} deriving (Eq,Show)
p'gpgme_io_cbs'add p = plusPtr p 0
p'gpgme_io_cbs'add :: Ptr (C'gpgme_io_cbs) -> Ptr (C'gpgme_register_io_cb_t)
p'gpgme_io_cbs'add_priv p = plusPtr p 8
p'gpgme_io_cbs'add_priv :: Ptr (C'gpgme_io_cbs) -> Ptr (Ptr ())
p'gpgme_io_cbs'remove p = plusPtr p 16
p'gpgme_io_cbs'remove :: Ptr (C'gpgme_io_cbs) -> Ptr (C'gpgme_remove_io_cb_t)
p'gpgme_io_cbs'event p = plusPtr p 24
p'gpgme_io_cbs'event :: Ptr (C'gpgme_io_cbs) -> Ptr (C'gpgme_event_io_cb_t)
p'gpgme_io_cbs'event_priv p = plusPtr p 32
p'gpgme_io_cbs'event_priv :: Ptr (C'gpgme_io_cbs) -> Ptr (Ptr ())
instance Storable C'gpgme_io_cbs where
  sizeOf _ = 40
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 24
    v4 <- peekByteOff p 32
    return $ C'gpgme_io_cbs v0 v1 v2 v3 v4
  poke p (C'gpgme_io_cbs v0 v1 v2 v3 v4) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 24 v3
    pokeByteOff p 32 v4
    return ()

{-# LINE 327 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_io_cbs_t = Ptr C'gpgme_io_cbs

{-# LINE 329 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_set_io_cbs" c'gpgme_set_io_cbs
  :: C'gpgme_ctx_t -> C'gpgme_io_cbs_t -> IO ()
foreign import ccall "&gpgme_set_io_cbs" p'gpgme_set_io_cbs
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_io_cbs_t -> IO ())

{-# LINE 331 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_io_cbs" c'gpgme_get_io_cbs
  :: C'gpgme_ctx_t -> C'gpgme_io_cbs_t -> IO ()
foreign import ccall "&gpgme_get_io_cbs" p'gpgme_get_io_cbs
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_io_cbs_t -> IO ())

{-# LINE 332 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_wait" c'gpgme_wait
  :: C'gpgme_ctx_t -> Ptr C'gpgme_error_t -> CInt -> IO C'gpgme_ctx_t
foreign import ccall "&gpgme_wait" p'gpgme_wait
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_error_t -> CInt -> IO C'gpgme_ctx_t)

{-# LINE 333 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_cancel" c'gpgme_cancel
  :: C'gpgme_ctx_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_cancel" p'gpgme_cancel
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_error_t)

{-# LINE 334 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_cancel_async" c'gpgme_cancel_async
  :: C'gpgme_ctx_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_cancel_async" p'gpgme_cancel_async
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_error_t)

{-# LINE 335 "src/Bindings/Gpgme.hsc" #-}

-- * Data buffers
type C'gpgme_data_read_cb_t = FunPtr (Ptr () -> Ptr () -> CSize -> IO C'ssize_t)
foreign import ccall "wrapper" mk'gpgme_data_read_cb_t
  :: (Ptr () -> Ptr () -> CSize -> IO C'ssize_t) -> IO C'gpgme_data_read_cb_t
foreign import ccall "dynamic" mK'gpgme_data_read_cb_t
  :: C'gpgme_data_read_cb_t -> (Ptr () -> Ptr () -> CSize -> IO C'ssize_t)

{-# LINE 338 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_data_write_cb_t = FunPtr (Ptr () -> Ptr () -> CSize -> IO C'ssize_t)
foreign import ccall "wrapper" mk'gpgme_data_write_cb_t
  :: (Ptr () -> Ptr () -> CSize -> IO C'ssize_t) -> IO C'gpgme_data_write_cb_t
foreign import ccall "dynamic" mK'gpgme_data_write_cb_t
  :: C'gpgme_data_write_cb_t -> (Ptr () -> Ptr () -> CSize -> IO C'ssize_t)

{-# LINE 339 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_data_seek_cb_t = FunPtr (Ptr () -> C'off_t -> CInt -> IO C'off_t)
foreign import ccall "wrapper" mk'gpgme_data_seek_cb_t
  :: (Ptr () -> C'off_t -> CInt -> IO C'off_t) -> IO C'gpgme_data_seek_cb_t
foreign import ccall "dynamic" mK'gpgme_data_seek_cb_t
  :: C'gpgme_data_seek_cb_t -> (Ptr () -> C'off_t -> CInt -> IO C'off_t)

{-# LINE 340 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_data_release_cb_t = FunPtr (Ptr () -> IO ())
foreign import ccall "wrapper" mk'gpgme_data_release_cb_t
  :: (Ptr () -> IO ()) -> IO C'gpgme_data_release_cb_t
foreign import ccall "dynamic" mK'gpgme_data_release_cb_t
  :: C'gpgme_data_release_cb_t -> (Ptr () -> IO ())

{-# LINE 341 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 343 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 344 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 345 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 346 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 347 "src/Bindings/Gpgme.hsc" #-}
data C'gpgme_data_cbs = C'gpgme_data_cbs{
  c'gpgme_data_cbs'read :: C'gpgme_data_read_cb_t,
  c'gpgme_data_cbs'write :: C'gpgme_data_write_cb_t,
  c'gpgme_data_cbs'seek :: C'gpgme_data_seek_cb_t,
  c'gpgme_data_cbs'release :: C'gpgme_data_release_cb_t
} deriving (Eq,Show)
p'gpgme_data_cbs'read p = plusPtr p 0
p'gpgme_data_cbs'read :: Ptr (C'gpgme_data_cbs) -> Ptr (C'gpgme_data_read_cb_t)
p'gpgme_data_cbs'write p = plusPtr p 8
p'gpgme_data_cbs'write :: Ptr (C'gpgme_data_cbs) -> Ptr (C'gpgme_data_write_cb_t)
p'gpgme_data_cbs'seek p = plusPtr p 16
p'gpgme_data_cbs'seek :: Ptr (C'gpgme_data_cbs) -> Ptr (C'gpgme_data_seek_cb_t)
p'gpgme_data_cbs'release p = plusPtr p 24
p'gpgme_data_cbs'release :: Ptr (C'gpgme_data_cbs) -> Ptr (C'gpgme_data_release_cb_t)
instance Storable C'gpgme_data_cbs where
  sizeOf _ = 32
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 24
    return $ C'gpgme_data_cbs v0 v1 v2 v3
  poke p (C'gpgme_data_cbs v0 v1 v2 v3) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 24 v3
    return ()

{-# LINE 348 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_data_cbs_t = Ptr C'gpgme_data_cbs

{-# LINE 350 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_data_read" c'gpgme_data_read
  :: C'gpgme_data_t -> Ptr () -> CSize -> IO C'ssize_t
foreign import ccall "&gpgme_data_read" p'gpgme_data_read
  :: FunPtr (C'gpgme_data_t -> Ptr () -> CSize -> IO C'ssize_t)

{-# LINE 352 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_write" c'gpgme_data_write
  :: C'gpgme_data_t -> Ptr () -> CSize -> IO C'ssize_t
foreign import ccall "&gpgme_data_write" p'gpgme_data_write
  :: FunPtr (C'gpgme_data_t -> Ptr () -> CSize -> IO C'ssize_t)

{-# LINE 353 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_seek" c'gpgme_data_seek
  :: C'gpgme_data_t -> C'off_t -> CInt -> IO C'off_t
foreign import ccall "&gpgme_data_seek" p'gpgme_data_seek
  :: FunPtr (C'gpgme_data_t -> C'off_t -> CInt -> IO C'off_t)

{-# LINE 354 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_new" c'gpgme_data_new
  :: Ptr C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_new" p'gpgme_data_new
  :: FunPtr (Ptr C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 355 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_release" c'gpgme_data_release
  :: C'gpgme_data_t -> IO ()
foreign import ccall "&gpgme_data_release" p'gpgme_data_release
  :: FunPtr (C'gpgme_data_t -> IO ())

{-# LINE 356 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_new_from_mem" c'gpgme_data_new_from_mem
  :: Ptr C'gpgme_data_t -> CString -> CSize -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_new_from_mem" p'gpgme_data_new_from_mem
  :: FunPtr (Ptr C'gpgme_data_t -> CString -> CSize -> CInt -> IO C'gpgme_error_t)

{-# LINE 357 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_release_and_get_mem" c'gpgme_data_release_and_get_mem
  :: C'gpgme_data_t -> Ptr CSize -> IO CString
foreign import ccall "&gpgme_data_release_and_get_mem" p'gpgme_data_release_and_get_mem
  :: FunPtr (C'gpgme_data_t -> Ptr CSize -> IO CString)

{-# LINE 358 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_free" c'gpgme_free
  :: Ptr () -> IO ()
foreign import ccall "&gpgme_free" p'gpgme_free
  :: FunPtr (Ptr () -> IO ())

{-# LINE 359 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_new_from_cbs" c'gpgme_data_new_from_cbs
  :: Ptr C'gpgme_data_t -> C'gpgme_data_cbs_t -> Ptr () -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_new_from_cbs" p'gpgme_data_new_from_cbs
  :: FunPtr (Ptr C'gpgme_data_t -> C'gpgme_data_cbs_t -> Ptr () -> IO C'gpgme_error_t)

{-# LINE 360 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_new_from_fd" c'gpgme_data_new_from_fd
  :: Ptr C'gpgme_data_t -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_new_from_fd" p'gpgme_data_new_from_fd
  :: FunPtr (Ptr C'gpgme_data_t -> CInt -> IO C'gpgme_error_t)

{-# LINE 361 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_new_from_stream" c'gpgme_data_new_from_stream
  :: Ptr C'gpgme_data_t -> Ptr CFile -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_new_from_stream" p'gpgme_data_new_from_stream
  :: FunPtr (Ptr C'gpgme_data_t -> Ptr CFile -> IO C'gpgme_error_t)

{-# LINE 362 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_get_encoding" c'gpgme_data_get_encoding
  :: C'gpgme_data_t -> IO C'gpgme_data_encoding_t
foreign import ccall "&gpgme_data_get_encoding" p'gpgme_data_get_encoding
  :: FunPtr (C'gpgme_data_t -> IO C'gpgme_data_encoding_t)

{-# LINE 363 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_set_encoding" c'gpgme_data_set_encoding
  :: C'gpgme_data_t -> C'gpgme_data_encoding_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_set_encoding" p'gpgme_data_set_encoding
  :: FunPtr (C'gpgme_data_t -> C'gpgme_data_encoding_t -> IO C'gpgme_error_t)

{-# LINE 364 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_get_file_name" c'gpgme_data_get_file_name
  :: C'gpgme_data_t -> IO CString
foreign import ccall "&gpgme_data_get_file_name" p'gpgme_data_get_file_name
  :: FunPtr (C'gpgme_data_t -> IO CString)

{-# LINE 365 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_set_file_name" c'gpgme_data_set_file_name
  :: C'gpgme_data_t -> CString -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_set_file_name" p'gpgme_data_set_file_name
  :: FunPtr (C'gpgme_data_t -> CString -> IO C'gpgme_error_t)

{-# LINE 366 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_new_from_file" c'gpgme_data_new_from_file
  :: Ptr C'gpgme_data_t -> CString -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_new_from_file" p'gpgme_data_new_from_file
  :: FunPtr (Ptr C'gpgme_data_t -> CString -> CInt -> IO C'gpgme_error_t)

{-# LINE 367 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_data_new_from_filepart" c'gpgme_data_new_from_filepart
  :: Ptr C'gpgme_data_t -> CString -> Ptr CFile -> C'off_t -> CSize -> IO C'gpgme_error_t
foreign import ccall "&gpgme_data_new_from_filepart" p'gpgme_data_new_from_filepart
  :: FunPtr (Ptr C'gpgme_data_t -> CString -> Ptr CFile -> C'off_t -> CSize -> IO C'gpgme_error_t)

{-# LINE 368 "src/Bindings/Gpgme.hsc" #-}

-- * Key management
foreign import ccall "gpgme_get_key" c'gpgme_get_key
  :: C'gpgme_ctx_t -> CString -> Ptr C'gpgme_key_t -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_get_key" p'gpgme_get_key
  :: FunPtr (C'gpgme_ctx_t -> CString -> Ptr C'gpgme_key_t -> CInt -> IO C'gpgme_error_t)

{-# LINE 371 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_key_ref" c'gpgme_key_ref
  :: C'gpgme_key_t -> IO ()
foreign import ccall "&gpgme_key_ref" p'gpgme_key_ref
  :: FunPtr (C'gpgme_key_t -> IO ())

{-# LINE 372 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_key_unref" c'gpgme_key_unref
  :: C'gpgme_key_t -> IO ()
foreign import ccall "&gpgme_key_unref" p'gpgme_key_unref
  :: FunPtr (C'gpgme_key_t -> IO ())

{-# LINE 373 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_key_release" c'gpgme_key_release
  :: C'gpgme_key_t -> IO ()
foreign import ccall "&gpgme_key_release" p'gpgme_key_release
  :: FunPtr (C'gpgme_key_t -> IO ())

{-# LINE 374 "src/Bindings/Gpgme.hsc" #-}

-- * Encryption

{-# LINE 377 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 378 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 379 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 380 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_invalid_key = C'_gpgme_invalid_key{
  c'_gpgme_invalid_key'next :: C'_gpgme_invalid_key,
  c'_gpgme_invalid_key'fpr :: CString,
  c'_gpgme_invalid_key'reason :: C'gpgme_error_t
} deriving (Eq,Show)
p'_gpgme_invalid_key'next p = plusPtr p 0
p'_gpgme_invalid_key'next :: Ptr (C'_gpgme_invalid_key) -> Ptr (C'_gpgme_invalid_key)
p'_gpgme_invalid_key'fpr p = plusPtr p 8
p'_gpgme_invalid_key'fpr :: Ptr (C'_gpgme_invalid_key) -> Ptr (CString)
p'_gpgme_invalid_key'reason p = plusPtr p 16
p'_gpgme_invalid_key'reason :: Ptr (C'_gpgme_invalid_key) -> Ptr (C'gpgme_error_t)
instance Storable C'_gpgme_invalid_key where
  sizeOf _ = 24
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    return $ C'_gpgme_invalid_key v0 v1 v2
  poke p (C'_gpgme_invalid_key v0 v1 v2) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    return ()

{-# LINE 381 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_invalid_key_t = Ptr C'_gpgme_invalid_key

{-# LINE 382 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 384 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 385 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_op_encrypt_result = C'_gpgme_op_encrypt_result{
  c'_gpgme_op_encrypt_result'invalid_recipients :: C'gpgme_invalid_key_t
} deriving (Eq,Show)
p'_gpgme_op_encrypt_result'invalid_recipients p = plusPtr p 0
p'_gpgme_op_encrypt_result'invalid_recipients :: Ptr (C'_gpgme_op_encrypt_result) -> Ptr (C'gpgme_invalid_key_t)
instance Storable C'_gpgme_op_encrypt_result where
  sizeOf _ = 8
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    return $ C'_gpgme_op_encrypt_result v0
  poke p (C'_gpgme_op_encrypt_result v0) = do
    pokeByteOff p 0 v0
    return ()

{-# LINE 386 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_encrypt_result_t = Ptr C'_gpgme_op_encrypt_result

{-# LINE 387 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_encrypt_result" c'gpgme_op_encrypt_result
  :: C'gpgme_ctx_t -> IO C'gpgme_encrypt_result_t
foreign import ccall "&gpgme_op_encrypt_result" p'gpgme_op_encrypt_result
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_encrypt_result_t)

{-# LINE 389 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_encrypt_flags_t = CUInt

{-# LINE 391 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_ENCRYPT_ALWAYS_TRUST = 1
c'GPGME_ENCRYPT_ALWAYS_TRUST :: (Num a) => a

{-# LINE 392 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_encrypt_start" c'gpgme_op_encrypt_start
  :: C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_encrypt_start" p'gpgme_op_encrypt_start
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 394 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_encrypt" c'gpgme_op_encrypt
  :: C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_encrypt" p'gpgme_op_encrypt
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 395 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_encrypt_sign_start" c'gpgme_op_encrypt_sign_start
  :: C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_encrypt_sign_start" p'gpgme_op_encrypt_sign_start
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 396 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_encrypt_sign" c'gpgme_op_encrypt_sign
  :: C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_encrypt_sign" p'gpgme_op_encrypt_sign
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> C'gpgme_encrypt_flags_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 397 "src/Bindings/Gpgme.hsc" #-}

-- * Decryption

{-# LINE 400 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 401 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 402 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 403 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 404 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_recipient = C'_gpgme_recipient{
  c'_gpgme_recipient'next :: Ptr C'_gpgme_recipient,
  c'_gpgme_recipient'keyid :: CString,
  c'_gpgme_recipient'pubkey_algo :: C'gpgme_pubkey_algo_t,
  c'_gpgme_recipient'status :: C'gpgme_error_t
} deriving (Eq,Show)
p'_gpgme_recipient'next p = plusPtr p 0
p'_gpgme_recipient'next :: Ptr (C'_gpgme_recipient) -> Ptr (Ptr C'_gpgme_recipient)
p'_gpgme_recipient'keyid p = plusPtr p 8
p'_gpgme_recipient'keyid :: Ptr (C'_gpgme_recipient) -> Ptr (CString)
p'_gpgme_recipient'pubkey_algo p = plusPtr p 36
p'_gpgme_recipient'pubkey_algo :: Ptr (C'_gpgme_recipient) -> Ptr (C'gpgme_pubkey_algo_t)
p'_gpgme_recipient'status p = plusPtr p 40
p'_gpgme_recipient'status :: Ptr (C'_gpgme_recipient) -> Ptr (C'gpgme_error_t)
instance Storable C'_gpgme_recipient where
  sizeOf _ = 48
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 36
    v3 <- peekByteOff p 40
    return $ C'_gpgme_recipient v0 v1 v2 v3
  poke p (C'_gpgme_recipient v0 v1 v2 v3) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 36 v2
    pokeByteOff p 40 v3
    return ()

{-# LINE 405 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_recipient_t = Ptr C'_gpgme_recipient

{-# LINE 406 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 408 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 409 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 410 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 411 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_op_decrypt_result = C'_gpgme_op_decrypt_result{
  c'_gpgme_op_decrypt_result'unsupported_algorithm :: CString,
  c'_gpgme_op_decrypt_result'recipients :: C'gpgme_recipient_t,
  c'_gpgme_op_decrypt_result'file_name :: CString
} deriving (Eq,Show)
p'_gpgme_op_decrypt_result'unsupported_algorithm p = plusPtr p 0
p'_gpgme_op_decrypt_result'unsupported_algorithm :: Ptr (C'_gpgme_op_decrypt_result) -> Ptr (CString)
p'_gpgme_op_decrypt_result'recipients p = plusPtr p 16
p'_gpgme_op_decrypt_result'recipients :: Ptr (C'_gpgme_op_decrypt_result) -> Ptr (C'gpgme_recipient_t)
p'_gpgme_op_decrypt_result'file_name p = plusPtr p 24
p'_gpgme_op_decrypt_result'file_name :: Ptr (C'_gpgme_op_decrypt_result) -> Ptr (CString)
instance Storable C'_gpgme_op_decrypt_result where
  sizeOf _ = 32
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 16
    v2 <- peekByteOff p 24
    return $ C'_gpgme_op_decrypt_result v0 v1 v2
  poke p (C'_gpgme_op_decrypt_result v0 v1 v2) = do
    pokeByteOff p 0 v0
    pokeByteOff p 16 v1
    pokeByteOff p 24 v2
    return ()

{-# LINE 412 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_decrypt_result_t = Ptr C'_gpgme_op_decrypt_result

{-# LINE 413 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_decrypt_result" c'gpgme_op_decrypt_result
  :: C'gpgme_ctx_t -> IO C'gpgme_decrypt_result_t
foreign import ccall "&gpgme_op_decrypt_result" p'gpgme_op_decrypt_result
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_decrypt_result_t)

{-# LINE 415 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_decrypt_start" c'gpgme_op_decrypt_start
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_decrypt_start" p'gpgme_op_decrypt_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 416 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_decrypt" c'gpgme_op_decrypt
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_decrypt" p'gpgme_op_decrypt
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 417 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_decrypt_verify_start" c'gpgme_op_decrypt_verify_start
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_decrypt_verify_start" p'gpgme_op_decrypt_verify_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 418 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_decrypt_verify" c'gpgme_op_decrypt_verify
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_decrypt_verify" p'gpgme_op_decrypt_verify
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 419 "src/Bindings/Gpgme.hsc" #-}

-- * Signing

{-# LINE 422 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 423 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 424 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 425 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 426 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 427 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 428 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 429 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_new_signature = C'_gpgme_new_signature{
  c'_gpgme_new_signature'next :: Ptr C'_gpgme_new_signature,
  c'_gpgme_new_signature'type :: C'gpgme_sig_mode_t,
  c'_gpgme_new_signature'pubkey_algo :: C'gpgme_pubkey_algo_t,
  c'_gpgme_new_signature'hash_algo :: C'gpgme_hash_algo_t,
  c'_gpgme_new_signature'timestamp :: CLong,
  c'_gpgme_new_signature'fpr :: CString,
  c'_gpgme_new_signature'sig_class :: CUInt
} deriving (Eq,Show)
p'_gpgme_new_signature'next p = plusPtr p 0
p'_gpgme_new_signature'next :: Ptr (C'_gpgme_new_signature) -> Ptr (Ptr C'_gpgme_new_signature)
p'_gpgme_new_signature'type p = plusPtr p 8
p'_gpgme_new_signature'type :: Ptr (C'_gpgme_new_signature) -> Ptr (C'gpgme_sig_mode_t)
p'_gpgme_new_signature'pubkey_algo p = plusPtr p 12
p'_gpgme_new_signature'pubkey_algo :: Ptr (C'_gpgme_new_signature) -> Ptr (C'gpgme_pubkey_algo_t)
p'_gpgme_new_signature'hash_algo p = plusPtr p 16
p'_gpgme_new_signature'hash_algo :: Ptr (C'_gpgme_new_signature) -> Ptr (C'gpgme_hash_algo_t)
p'_gpgme_new_signature'timestamp p = plusPtr p 32
p'_gpgme_new_signature'timestamp :: Ptr (C'_gpgme_new_signature) -> Ptr (CLong)
p'_gpgme_new_signature'fpr p = plusPtr p 40
p'_gpgme_new_signature'fpr :: Ptr (C'_gpgme_new_signature) -> Ptr (CString)
p'_gpgme_new_signature'sig_class p = plusPtr p 52
p'_gpgme_new_signature'sig_class :: Ptr (C'_gpgme_new_signature) -> Ptr (CUInt)
instance Storable C'_gpgme_new_signature where
  sizeOf _ = 56
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 12
    v3 <- peekByteOff p 16
    v4 <- peekByteOff p 32
    v5 <- peekByteOff p 40
    v6 <- peekByteOff p 52
    return $ C'_gpgme_new_signature v0 v1 v2 v3 v4 v5 v6
  poke p (C'_gpgme_new_signature v0 v1 v2 v3 v4 v5 v6) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 12 v2
    pokeByteOff p 16 v3
    pokeByteOff p 32 v4
    pokeByteOff p 40 v5
    pokeByteOff p 52 v6
    return ()

{-# LINE 430 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_new_signature_t = Ptr C'_gpgme_new_signature

{-# LINE 431 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 433 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 434 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 435 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_op_sign_result = C'_gpgme_op_sign_result{
  c'_gpgme_op_sign_result'invalid_signers :: C'gpgme_invalid_key_t,
  c'_gpgme_op_sign_result'signatures :: C'gpgme_new_signature_t
} deriving (Eq,Show)
p'_gpgme_op_sign_result'invalid_signers p = plusPtr p 0
p'_gpgme_op_sign_result'invalid_signers :: Ptr (C'_gpgme_op_sign_result) -> Ptr (C'gpgme_invalid_key_t)
p'_gpgme_op_sign_result'signatures p = plusPtr p 8
p'_gpgme_op_sign_result'signatures :: Ptr (C'_gpgme_op_sign_result) -> Ptr (C'gpgme_new_signature_t)
instance Storable C'_gpgme_op_sign_result where
  sizeOf _ = 16
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    return $ C'_gpgme_op_sign_result v0 v1
  poke p (C'_gpgme_op_sign_result v0 v1) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    return ()

{-# LINE 436 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_sign_result_t = Ptr C'_gpgme_op_sign_result

{-# LINE 437 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_sign_result" c'gpgme_op_sign_result
  :: C'gpgme_ctx_t -> IO C'gpgme_sign_result_t
foreign import ccall "&gpgme_op_sign_result" p'gpgme_op_sign_result
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_sign_result_t)

{-# LINE 439 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_sign_start" c'gpgme_op_sign_start
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_sig_mode_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_sign_start" p'gpgme_op_sign_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_sig_mode_t -> IO C'gpgme_error_t)

{-# LINE 440 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_sign" c'gpgme_op_sign
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_sig_mode_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_sign" p'gpgme_op_sign
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_sig_mode_t -> IO C'gpgme_error_t)

{-# LINE 441 "src/Bindings/Gpgme.hsc" #-}

-- * Signature verification
type C'gpgme_sigsum_t = CUInt

{-# LINE 444 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_VALID = 1
c'GPGME_SIGSUM_VALID :: (Num a) => a

{-# LINE 445 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_GREEN = 2
c'GPGME_SIGSUM_GREEN :: (Num a) => a

{-# LINE 446 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_RED = 4
c'GPGME_SIGSUM_RED :: (Num a) => a

{-# LINE 447 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_KEY_REVOKED = 16
c'GPGME_SIGSUM_KEY_REVOKED :: (Num a) => a

{-# LINE 448 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_KEY_EXPIRED = 32
c'GPGME_SIGSUM_KEY_EXPIRED :: (Num a) => a

{-# LINE 449 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_SIG_EXPIRED = 64
c'GPGME_SIGSUM_SIG_EXPIRED :: (Num a) => a

{-# LINE 450 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_KEY_MISSING = 128
c'GPGME_SIGSUM_KEY_MISSING :: (Num a) => a

{-# LINE 451 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_CRL_MISSING = 256
c'GPGME_SIGSUM_CRL_MISSING :: (Num a) => a

{-# LINE 452 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_CRL_TOO_OLD = 512
c'GPGME_SIGSUM_CRL_TOO_OLD :: (Num a) => a

{-# LINE 453 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_BAD_POLICY = 1024
c'GPGME_SIGSUM_BAD_POLICY :: (Num a) => a

{-# LINE 454 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_SIGSUM_SYS_ERROR = 2048
c'GPGME_SIGSUM_SYS_ERROR :: (Num a) => a

{-# LINE 455 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 457 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 458 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 459 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 460 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 461 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 462 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 463 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 464 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 465 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 466 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 467 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 468 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 469 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_signature = C'_gpgme_signature{
  c'_gpgme_signature'next :: Ptr C'_gpgme_signature,
  c'_gpgme_signature'summary :: C'gpgme_sigsum_t,
  c'_gpgme_signature'fpr :: CString,
  c'_gpgme_signature'status :: C'gpgme_error_t,
  c'_gpgme_signature'notations :: C'gpgme_sig_notation_t,
  c'_gpgme_signature'timestamp :: CULong,
  c'_gpgme_signature'exp_timestamp :: CULong,
  c'_gpgme_signature'validity :: C'gpgme_validity_t,
  c'_gpgme_signature'validity_reason :: C'gpgme_error_t,
  c'_gpgme_signature'pubkey_algo :: C'gpgme_pubkey_algo_t,
  c'_gpgme_signature'hash_algo :: C'gpgme_hash_algo_t,
  c'_gpgme_signature'pka_address :: CString
} deriving (Eq,Show)
p'_gpgme_signature'next p = plusPtr p 0
p'_gpgme_signature'next :: Ptr (C'_gpgme_signature) -> Ptr (Ptr C'_gpgme_signature)
p'_gpgme_signature'summary p = plusPtr p 8
p'_gpgme_signature'summary :: Ptr (C'_gpgme_signature) -> Ptr (C'gpgme_sigsum_t)
p'_gpgme_signature'fpr p = plusPtr p 16
p'_gpgme_signature'fpr :: Ptr (C'_gpgme_signature) -> Ptr (CString)
p'_gpgme_signature'status p = plusPtr p 24
p'_gpgme_signature'status :: Ptr (C'_gpgme_signature) -> Ptr (C'gpgme_error_t)
p'_gpgme_signature'notations p = plusPtr p 32
p'_gpgme_signature'notations :: Ptr (C'_gpgme_signature) -> Ptr (C'gpgme_sig_notation_t)
p'_gpgme_signature'timestamp p = plusPtr p 40
p'_gpgme_signature'timestamp :: Ptr (C'_gpgme_signature) -> Ptr (CULong)
p'_gpgme_signature'exp_timestamp p = plusPtr p 48
p'_gpgme_signature'exp_timestamp :: Ptr (C'_gpgme_signature) -> Ptr (CULong)
p'_gpgme_signature'validity p = plusPtr p 60
p'_gpgme_signature'validity :: Ptr (C'_gpgme_signature) -> Ptr (C'gpgme_validity_t)
p'_gpgme_signature'validity_reason p = plusPtr p 64
p'_gpgme_signature'validity_reason :: Ptr (C'_gpgme_signature) -> Ptr (C'gpgme_error_t)
p'_gpgme_signature'pubkey_algo p = plusPtr p 68
p'_gpgme_signature'pubkey_algo :: Ptr (C'_gpgme_signature) -> Ptr (C'gpgme_pubkey_algo_t)
p'_gpgme_signature'hash_algo p = plusPtr p 72
p'_gpgme_signature'hash_algo :: Ptr (C'_gpgme_signature) -> Ptr (C'gpgme_hash_algo_t)
p'_gpgme_signature'pka_address p = plusPtr p 80
p'_gpgme_signature'pka_address :: Ptr (C'_gpgme_signature) -> Ptr (CString)
instance Storable C'_gpgme_signature where
  sizeOf _ = 88
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 24
    v4 <- peekByteOff p 32
    v5 <- peekByteOff p 40
    v6 <- peekByteOff p 48
    v7 <- peekByteOff p 60
    v8 <- peekByteOff p 64
    v9 <- peekByteOff p 68
    v10 <- peekByteOff p 72
    v11 <- peekByteOff p 80
    return $ C'_gpgme_signature v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11
  poke p (C'_gpgme_signature v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 24 v3
    pokeByteOff p 32 v4
    pokeByteOff p 40 v5
    pokeByteOff p 48 v6
    pokeByteOff p 60 v7
    pokeByteOff p 64 v8
    pokeByteOff p 68 v9
    pokeByteOff p 72 v10
    pokeByteOff p 80 v11
    return ()

{-# LINE 470 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_signature_t = Ptr C'_gpgme_signature

{-# LINE 471 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 473 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 474 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 475 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_op_verify_result = C'_gpgme_op_verify_result{
  c'_gpgme_op_verify_result'signatures :: C'gpgme_signature_t,
  c'_gpgme_op_verify_result'file_name :: CString
} deriving (Eq,Show)
p'_gpgme_op_verify_result'signatures p = plusPtr p 0
p'_gpgme_op_verify_result'signatures :: Ptr (C'_gpgme_op_verify_result) -> Ptr (C'gpgme_signature_t)
p'_gpgme_op_verify_result'file_name p = plusPtr p 8
p'_gpgme_op_verify_result'file_name :: Ptr (C'_gpgme_op_verify_result) -> Ptr (CString)
instance Storable C'_gpgme_op_verify_result where
  sizeOf _ = 16
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    return $ C'_gpgme_op_verify_result v0 v1
  poke p (C'_gpgme_op_verify_result v0 v1) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    return ()

{-# LINE 476 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_verify_result_t = Ptr C'_gpgme_op_verify_result

{-# LINE 477 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_verify_result" c'gpgme_op_verify_result
  :: C'gpgme_ctx_t -> IO C'gpgme_verify_result_t
foreign import ccall "&gpgme_op_verify_result" p'gpgme_op_verify_result
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_verify_result_t)

{-# LINE 479 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_verify_start" c'gpgme_op_verify_start
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_verify_start" p'gpgme_op_verify_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 480 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_verify" c'gpgme_op_verify
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_verify" p'gpgme_op_verify
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 481 "src/Bindings/Gpgme.hsc" #-}

-- * Importing keys
c'GPGME_IMPORT_NEW = 1
c'GPGME_IMPORT_NEW :: (Num a) => a

{-# LINE 484 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_IMPORT_UID = 2
c'GPGME_IMPORT_UID :: (Num a) => a

{-# LINE 485 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_IMPORT_SIG = 4
c'GPGME_IMPORT_SIG :: (Num a) => a

{-# LINE 486 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_IMPORT_SUBKEY = 8
c'GPGME_IMPORT_SUBKEY :: (Num a) => a

{-# LINE 487 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_IMPORT_SECRET = 16
c'GPGME_IMPORT_SECRET :: (Num a) => a

{-# LINE 488 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 490 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 491 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 492 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 493 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 494 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_import_status = C'_gpgme_import_status{
  c'_gpgme_import_status'next :: Ptr C'_gpgme_import_status,
  c'_gpgme_import_status'fpr :: CString,
  c'_gpgme_import_status'result :: C'gpgme_error_t,
  c'_gpgme_import_status'status :: CUInt
} deriving (Eq,Show)
p'_gpgme_import_status'next p = plusPtr p 0
p'_gpgme_import_status'next :: Ptr (C'_gpgme_import_status) -> Ptr (Ptr C'_gpgme_import_status)
p'_gpgme_import_status'fpr p = plusPtr p 8
p'_gpgme_import_status'fpr :: Ptr (C'_gpgme_import_status) -> Ptr (CString)
p'_gpgme_import_status'result p = plusPtr p 16
p'_gpgme_import_status'result :: Ptr (C'_gpgme_import_status) -> Ptr (C'gpgme_error_t)
p'_gpgme_import_status'status p = plusPtr p 20
p'_gpgme_import_status'status :: Ptr (C'_gpgme_import_status) -> Ptr (CUInt)
instance Storable C'_gpgme_import_status where
  sizeOf _ = 24
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 20
    return $ C'_gpgme_import_status v0 v1 v2 v3
  poke p (C'_gpgme_import_status v0 v1 v2 v3) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 20 v3
    return ()

{-# LINE 495 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_import_status_t = Ptr C'_gpgme_import_status

{-# LINE 496 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 498 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 499 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 500 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 501 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 502 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 503 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 504 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 505 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 506 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 507 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 508 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 509 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 510 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 511 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 512 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 513 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_op_import_result = C'_gpgme_op_import_result{
  c'_gpgme_op_import_result'considered :: CInt,
  c'_gpgme_op_import_result'no_user_id :: CInt,
  c'_gpgme_op_import_result'imported :: CInt,
  c'_gpgme_op_import_result'imported_rsa :: CInt,
  c'_gpgme_op_import_result'unchanged :: CInt,
  c'_gpgme_op_import_result'new_user_ids :: CInt,
  c'_gpgme_op_import_result'new_sub_keys :: CInt,
  c'_gpgme_op_import_result'new_signatures :: CInt,
  c'_gpgme_op_import_result'new_revocations :: CInt,
  c'_gpgme_op_import_result'secret_read :: CInt,
  c'_gpgme_op_import_result'secret_imported :: CInt,
  c'_gpgme_op_import_result'secret_unchanged :: CInt,
  c'_gpgme_op_import_result'skipped_new_keys :: CInt,
  c'_gpgme_op_import_result'not_imported :: CInt,
  c'_gpgme_op_import_result'imports :: C'gpgme_import_status_t
} deriving (Eq,Show)
p'_gpgme_op_import_result'considered p = plusPtr p 0
p'_gpgme_op_import_result'considered :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'no_user_id p = plusPtr p 4
p'_gpgme_op_import_result'no_user_id :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'imported p = plusPtr p 8
p'_gpgme_op_import_result'imported :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'imported_rsa p = plusPtr p 12
p'_gpgme_op_import_result'imported_rsa :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'unchanged p = plusPtr p 16
p'_gpgme_op_import_result'unchanged :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'new_user_ids p = plusPtr p 20
p'_gpgme_op_import_result'new_user_ids :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'new_sub_keys p = plusPtr p 24
p'_gpgme_op_import_result'new_sub_keys :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'new_signatures p = plusPtr p 28
p'_gpgme_op_import_result'new_signatures :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'new_revocations p = plusPtr p 32
p'_gpgme_op_import_result'new_revocations :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'secret_read p = plusPtr p 36
p'_gpgme_op_import_result'secret_read :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'secret_imported p = plusPtr p 40
p'_gpgme_op_import_result'secret_imported :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'secret_unchanged p = plusPtr p 44
p'_gpgme_op_import_result'secret_unchanged :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'skipped_new_keys p = plusPtr p 48
p'_gpgme_op_import_result'skipped_new_keys :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'not_imported p = plusPtr p 52
p'_gpgme_op_import_result'not_imported :: Ptr (C'_gpgme_op_import_result) -> Ptr (CInt)
p'_gpgme_op_import_result'imports p = plusPtr p 56
p'_gpgme_op_import_result'imports :: Ptr (C'_gpgme_op_import_result) -> Ptr (C'gpgme_import_status_t)
instance Storable C'_gpgme_op_import_result where
  sizeOf _ = 64
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 4
    v2 <- peekByteOff p 8
    v3 <- peekByteOff p 12
    v4 <- peekByteOff p 16
    v5 <- peekByteOff p 20
    v6 <- peekByteOff p 24
    v7 <- peekByteOff p 28
    v8 <- peekByteOff p 32
    v9 <- peekByteOff p 36
    v10 <- peekByteOff p 40
    v11 <- peekByteOff p 44
    v12 <- peekByteOff p 48
    v13 <- peekByteOff p 52
    v14 <- peekByteOff p 56
    return $ C'_gpgme_op_import_result v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14
  poke p (C'_gpgme_op_import_result v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14) = do
    pokeByteOff p 0 v0
    pokeByteOff p 4 v1
    pokeByteOff p 8 v2
    pokeByteOff p 12 v3
    pokeByteOff p 16 v4
    pokeByteOff p 20 v5
    pokeByteOff p 24 v6
    pokeByteOff p 28 v7
    pokeByteOff p 32 v8
    pokeByteOff p 36 v9
    pokeByteOff p 40 v10
    pokeByteOff p 44 v11
    pokeByteOff p 48 v12
    pokeByteOff p 52 v13
    pokeByteOff p 56 v14
    return ()

{-# LINE 514 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_import_result_t = Ptr C'_gpgme_op_import_result

{-# LINE 515 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_import_result" c'gpgme_op_import_result
  :: C'gpgme_ctx_t -> IO C'gpgme_import_result_t
foreign import ccall "&gpgme_op_import_result" p'gpgme_op_import_result
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_import_result_t)

{-# LINE 517 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_import_start" c'gpgme_op_import_start
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_import_start" p'gpgme_op_import_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 518 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_import" c'gpgme_op_import
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_import" p'gpgme_op_import
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 519 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_export_start" c'gpgme_op_export_start
  :: C'gpgme_ctx_t -> CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_export_start" p'gpgme_op_export_start
  :: FunPtr (C'gpgme_ctx_t -> CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 520 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_export" c'gpgme_op_export
  :: C'gpgme_ctx_t -> CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_export" p'gpgme_op_export
  :: FunPtr (C'gpgme_ctx_t -> CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 521 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_export_ext_start" c'gpgme_op_export_ext_start
  :: C'gpgme_ctx_t -> Ptr CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_export_ext_start" p'gpgme_op_export_ext_start
  :: FunPtr (C'gpgme_ctx_t -> Ptr CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 522 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_export_ext" c'gpgme_op_export_ext
  :: C'gpgme_ctx_t -> Ptr CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_export_ext" p'gpgme_op_export_ext
  :: FunPtr (C'gpgme_ctx_t -> Ptr CString -> CUInt -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 523 "src/Bindings/Gpgme.hsc" #-}

-- * Key generation and editing

{-# LINE 526 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 527 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_op_genkey_result = C'_gpgme_op_genkey_result{
  c'_gpgme_op_genkey_result'fpr :: CString
} deriving (Eq,Show)
p'_gpgme_op_genkey_result'fpr p = plusPtr p 8
p'_gpgme_op_genkey_result'fpr :: Ptr (C'_gpgme_op_genkey_result) -> Ptr (CString)
instance Storable C'_gpgme_op_genkey_result where
  sizeOf _ = 16
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 8
    return $ C'_gpgme_op_genkey_result v0
  poke p (C'_gpgme_op_genkey_result v0) = do
    pokeByteOff p 8 v0
    return ()

{-# LINE 528 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_genkey_result_t = Ptr C'_gpgme_op_genkey_result

{-# LINE 529 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_genkey_start" c'gpgme_op_genkey_start
  :: C'gpgme_ctx_t -> CString -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_genkey_start" p'gpgme_op_genkey_start
  :: FunPtr (C'gpgme_ctx_t -> CString -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 531 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_genkey" c'gpgme_op_genkey
  :: C'gpgme_ctx_t -> CString -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_genkey" p'gpgme_op_genkey
  :: FunPtr (C'gpgme_ctx_t -> CString -> C'gpgme_data_t -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 532 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_genkey_result" c'gpgme_op_genkey_result
  :: C'gpgme_ctx_t -> IO C'gpgme_genkey_result_t
foreign import ccall "&gpgme_op_genkey_result" p'gpgme_op_genkey_result
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_genkey_result_t)

{-# LINE 533 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_delete_start" c'gpgme_op_delete_start
  :: C'gpgme_ctx_t -> C'gpgme_key_t -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_delete_start" p'gpgme_op_delete_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_key_t -> CInt -> IO C'gpgme_error_t)

{-# LINE 534 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_delete" c'gpgme_op_delete
  :: C'gpgme_ctx_t -> C'gpgme_key_t -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_delete" p'gpgme_op_delete
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_key_t -> CInt -> IO C'gpgme_error_t)

{-# LINE 535 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_edit_start" c'gpgme_op_edit_start
  :: C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_edit_start" p'gpgme_op_edit_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 536 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_edit" c'gpgme_op_edit
  :: C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_edit" p'gpgme_op_edit
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 537 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_card_edit_start" c'gpgme_op_card_edit_start
  :: C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_card_edit_start" p'gpgme_op_card_edit_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 538 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_card_edit" c'gpgme_op_card_edit
  :: C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_card_edit" p'gpgme_op_card_edit
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_key_t -> C'gpgme_edit_cb_t -> Ptr () -> C'gpgme_data_t -> IO C'gpgme_error_t)

{-# LINE 539 "src/Bindings/Gpgme.hsc" #-}

-- * Listing keys

{-# LINE 542 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_op_keylist_result = C'_gpgme_op_keylist_result{
} deriving (Eq,Show)
instance Storable C'_gpgme_op_keylist_result where
  sizeOf _ = 4
  alignment _ = 4
  peek p = do
    return $ C'_gpgme_op_keylist_result
  poke p (C'_gpgme_op_keylist_result) = do
    return ()

{-# LINE 543 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_keylist_result_t = Ptr C'_gpgme_op_keylist_result

{-# LINE 544 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_keylist_result" c'gpgme_op_keylist_result
  :: C'gpgme_ctx_t -> IO C'gpgme_keylist_result_t
foreign import ccall "&gpgme_op_keylist_result" p'gpgme_op_keylist_result
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_keylist_result_t)

{-# LINE 546 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_keylist_start" c'gpgme_op_keylist_start
  :: C'gpgme_ctx_t -> CString -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_keylist_start" p'gpgme_op_keylist_start
  :: FunPtr (C'gpgme_ctx_t -> CString -> CInt -> IO C'gpgme_error_t)

{-# LINE 547 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_keylist_ext_start" c'gpgme_op_keylist_ext_start
  :: C'gpgme_ctx_t -> Ptr CString -> CInt -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_keylist_ext_start" p'gpgme_op_keylist_ext_start
  :: FunPtr (C'gpgme_ctx_t -> Ptr CString -> CInt -> CInt -> IO C'gpgme_error_t)

{-# LINE 548 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_keylist_next" c'gpgme_op_keylist_next
  :: C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_keylist_next" p'gpgme_op_keylist_next
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_key_t -> IO C'gpgme_error_t)

{-# LINE 549 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_keylist_end" c'gpgme_op_keylist_end
  :: C'gpgme_ctx_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_keylist_end" p'gpgme_op_keylist_end
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_error_t)

{-# LINE 550 "src/Bindings/Gpgme.hsc" #-}

-- * Trust items

{-# LINE 553 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 554 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 555 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 556 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 557 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 558 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 559 "src/Bindings/Gpgme.hsc" #-}
data C'_gpgme_trust_item = C'_gpgme_trust_item{
  c'_gpgme_trust_item'keyid :: CString,
  c'_gpgme_trust_item'type :: CInt,
  c'_gpgme_trust_item'level :: CInt,
  c'_gpgme_trust_item'owner_trust :: CString,
  c'_gpgme_trust_item'validity :: CString,
  c'_gpgme_trust_item'name :: CString
} deriving (Eq,Show)
p'_gpgme_trust_item'keyid p = plusPtr p 8
p'_gpgme_trust_item'keyid :: Ptr (C'_gpgme_trust_item) -> Ptr (CString)
p'_gpgme_trust_item'type p = plusPtr p 36
p'_gpgme_trust_item'type :: Ptr (C'_gpgme_trust_item) -> Ptr (CInt)
p'_gpgme_trust_item'level p = plusPtr p 40
p'_gpgme_trust_item'level :: Ptr (C'_gpgme_trust_item) -> Ptr (CInt)
p'_gpgme_trust_item'owner_trust p = plusPtr p 48
p'_gpgme_trust_item'owner_trust :: Ptr (C'_gpgme_trust_item) -> Ptr (CString)
p'_gpgme_trust_item'validity p = plusPtr p 64
p'_gpgme_trust_item'validity :: Ptr (C'_gpgme_trust_item) -> Ptr (CString)
p'_gpgme_trust_item'name p = plusPtr p 80
p'_gpgme_trust_item'name :: Ptr (C'_gpgme_trust_item) -> Ptr (CString)
instance Storable C'_gpgme_trust_item where
  sizeOf _ = 88
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 8
    v1 <- peekByteOff p 36
    v2 <- peekByteOff p 40
    v3 <- peekByteOff p 48
    v4 <- peekByteOff p 64
    v5 <- peekByteOff p 80
    return $ C'_gpgme_trust_item v0 v1 v2 v3 v4 v5
  poke p (C'_gpgme_trust_item v0 v1 v2 v3 v4 v5) = do
    pokeByteOff p 8 v0
    pokeByteOff p 36 v1
    pokeByteOff p 40 v2
    pokeByteOff p 48 v3
    pokeByteOff p 64 v4
    pokeByteOff p 80 v5
    return ()

{-# LINE 560 "src/Bindings/Gpgme.hsc" #-}
type C'gpgme_trust_item_t = Ptr C'_gpgme_trust_item

{-# LINE 561 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_op_trustlist_start" c'gpgme_op_trustlist_start
  :: C'gpgme_ctx_t -> CString -> CInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_trustlist_start" p'gpgme_op_trustlist_start
  :: FunPtr (C'gpgme_ctx_t -> CString -> CInt -> IO C'gpgme_error_t)

{-# LINE 563 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_trustlist_next" c'gpgme_op_trustlist_next
  :: C'gpgme_ctx_t -> Ptr C'gpgme_trust_item_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_trustlist_next" p'gpgme_op_trustlist_next
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_trust_item_t -> IO C'gpgme_error_t)

{-# LINE 564 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_trustlist_end" c'gpgme_op_trustlist_end
  :: C'gpgme_ctx_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_trustlist_end" p'gpgme_op_trustlist_end
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_error_t)

{-# LINE 565 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_trust_item_ref" c'gpgme_trust_item_ref
  :: C'gpgme_trust_item_t -> IO ()
foreign import ccall "&gpgme_trust_item_ref" p'gpgme_trust_item_ref
  :: FunPtr (C'gpgme_trust_item_t -> IO ())

{-# LINE 566 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_trust_item_unref" c'gpgme_trust_item_unref
  :: C'gpgme_trust_item_t -> IO ()
foreign import ccall "&gpgme_trust_item_unref" p'gpgme_trust_item_unref
  :: FunPtr (C'gpgme_trust_item_t -> IO ())

{-# LINE 567 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_getauditlog_start" c'gpgme_op_getauditlog_start
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> CUInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_getauditlog_start" p'gpgme_op_getauditlog_start
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> CUInt -> IO C'gpgme_error_t)

{-# LINE 568 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_getauditlog" c'gpgme_op_getauditlog
  :: C'gpgme_ctx_t -> C'gpgme_data_t -> CUInt -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_getauditlog" p'gpgme_op_getauditlog
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_data_t -> CUInt -> IO C'gpgme_error_t)

{-# LINE 569 "src/Bindings/Gpgme.hsc" #-}

-- * Configuration
type C'gpgme_conf_level_t = CUInt

{-# LINE 572 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_BASIC = 0
c'GPGME_CONF_BASIC :: (Num a) => a

{-# LINE 573 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_ADVANCED = 1
c'GPGME_CONF_ADVANCED :: (Num a) => a

{-# LINE 574 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_EXPERT = 2
c'GPGME_CONF_EXPERT :: (Num a) => a

{-# LINE 575 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_INVISIBLE = 3
c'GPGME_CONF_INVISIBLE :: (Num a) => a

{-# LINE 576 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_INTERNAL = 4
c'GPGME_CONF_INTERNAL :: (Num a) => a

{-# LINE 577 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_conf_type_t = CUInt

{-# LINE 579 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_NONE = 0
c'GPGME_CONF_NONE :: (Num a) => a

{-# LINE 580 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_STRING = 1
c'GPGME_CONF_STRING :: (Num a) => a

{-# LINE 581 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_INT32 = 2
c'GPGME_CONF_INT32 :: (Num a) => a

{-# LINE 582 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_UINT32 = 3
c'GPGME_CONF_UINT32 :: (Num a) => a

{-# LINE 583 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_FILENAME = 32
c'GPGME_CONF_FILENAME :: (Num a) => a

{-# LINE 584 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_LDAP_SERVER = 33
c'GPGME_CONF_LDAP_SERVER :: (Num a) => a

{-# LINE 585 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_KEY_FPR = 34
c'GPGME_CONF_KEY_FPR :: (Num a) => a

{-# LINE 586 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_PUB_KEY = 35
c'GPGME_CONF_PUB_KEY :: (Num a) => a

{-# LINE 587 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_SEC_KEY = 36
c'GPGME_CONF_SEC_KEY :: (Num a) => a

{-# LINE 588 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_ALIAS_LIST = 37
c'GPGME_CONF_ALIAS_LIST :: (Num a) => a

{-# LINE 589 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 591 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 592 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 593 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 594 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 595 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 596 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 597 "src/Bindings/Gpgme.hsc" #-}
data C'gpgme_conf_arg = C'gpgme_conf_arg{
  c'gpgme_conf_arg'next :: Ptr C'gpgme_conf_arg,
  c'gpgme_conf_arg'no_arg :: CUInt,
  c'gpgme_conf_arg'value'count :: CUInt,
  c'gpgme_conf_arg'value'uint32 :: CUInt,
  c'gpgme_conf_arg'value'int32 :: CInt,
  c'gpgme_conf_arg'value'string :: CString
} deriving (Eq,Show)
p'gpgme_conf_arg'next p = plusPtr p 0
p'gpgme_conf_arg'next :: Ptr (C'gpgme_conf_arg) -> Ptr (Ptr C'gpgme_conf_arg)
p'gpgme_conf_arg'no_arg p = plusPtr p 8
p'gpgme_conf_arg'no_arg :: Ptr (C'gpgme_conf_arg) -> Ptr (CUInt)
p'gpgme_conf_arg'value'count p = plusPtr p 16
p'gpgme_conf_arg'value'count :: Ptr (C'gpgme_conf_arg) -> Ptr (CUInt)
p'gpgme_conf_arg'value'uint32 p = plusPtr p 16
p'gpgme_conf_arg'value'uint32 :: Ptr (C'gpgme_conf_arg) -> Ptr (CUInt)
p'gpgme_conf_arg'value'int32 p = plusPtr p 16
p'gpgme_conf_arg'value'int32 :: Ptr (C'gpgme_conf_arg) -> Ptr (CInt)
p'gpgme_conf_arg'value'string p = plusPtr p 16
p'gpgme_conf_arg'value'string :: Ptr (C'gpgme_conf_arg) -> Ptr (CString)
instance Storable C'gpgme_conf_arg where
  sizeOf _ = 24
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 16
    v4 <- peekByteOff p 16
    v5 <- peekByteOff p 16
    return $ C'gpgme_conf_arg v0 v1 v2 v3 v4 v5
  poke p (C'gpgme_conf_arg v0 v1 v2 v3 v4 v5) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 16 v3
    pokeByteOff p 16 v4
    pokeByteOff p 16 v5
    return ()

{-# LINE 598 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_conf_arg_t = Ptr C'gpgme_conf_arg

{-# LINE 600 "src/Bindings/Gpgme.hsc" #-}

c'GPGME_CONF_GROUP = 1
c'GPGME_CONF_GROUP :: (Num a) => a

{-# LINE 602 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_OPTIONAL = 2
c'GPGME_CONF_OPTIONAL :: (Num a) => a

{-# LINE 603 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_LIST = 4
c'GPGME_CONF_LIST :: (Num a) => a

{-# LINE 604 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_RUNTIME = 8
c'GPGME_CONF_RUNTIME :: (Num a) => a

{-# LINE 605 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_DEFAULT = 16
c'GPGME_CONF_DEFAULT :: (Num a) => a

{-# LINE 606 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_DEFAULT_DESC = 32
c'GPGME_CONF_DEFAULT_DESC :: (Num a) => a

{-# LINE 607 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_NO_ARG_DESC = 64
c'GPGME_CONF_NO_ARG_DESC :: (Num a) => a

{-# LINE 608 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_CONF_NO_CHANGE = 128
c'GPGME_CONF_NO_CHANGE :: (Num a) => a

{-# LINE 609 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 611 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 612 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 613 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 614 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 615 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 616 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 617 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 618 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 619 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 620 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 621 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 622 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 623 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 624 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 625 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 626 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 627 "src/Bindings/Gpgme.hsc" #-}
data C'gpgme_conf_opt = C'gpgme_conf_opt{
  c'gpgme_conf_opt'next :: Ptr C'gpgme_conf_opt,
  c'gpgme_conf_opt'name :: CString,
  c'gpgme_conf_opt'flags :: CUInt,
  c'gpgme_conf_opt'level :: C'gpgme_conf_level_t,
  c'gpgme_conf_opt'description :: CString,
  c'gpgme_conf_opt'type :: C'gpgme_conf_type_t,
  c'gpgme_conf_opt'alt_type :: C'gpgme_conf_type_t,
  c'gpgme_conf_opt'argname :: CString,
  c'gpgme_conf_opt'default_value :: C'gpgme_conf_arg_t,
  c'gpgme_conf_opt'default_description :: CString,
  c'gpgme_conf_opt'no_arg_value :: C'gpgme_conf_arg_t,
  c'gpgme_conf_opt'no_arg_description :: CString,
  c'gpgme_conf_opt'value :: C'gpgme_conf_arg_t,
  c'gpgme_conf_opt'change_value :: CInt,
  c'gpgme_conf_opt'new_value :: C'gpgme_conf_arg_t,
  c'gpgme_conf_opt'user_data :: Ptr ()
} deriving (Eq,Show)
p'gpgme_conf_opt'next p = plusPtr p 0
p'gpgme_conf_opt'next :: Ptr (C'gpgme_conf_opt) -> Ptr (Ptr C'gpgme_conf_opt)
p'gpgme_conf_opt'name p = plusPtr p 8
p'gpgme_conf_opt'name :: Ptr (C'gpgme_conf_opt) -> Ptr (CString)
p'gpgme_conf_opt'flags p = plusPtr p 16
p'gpgme_conf_opt'flags :: Ptr (C'gpgme_conf_opt) -> Ptr (CUInt)
p'gpgme_conf_opt'level p = plusPtr p 20
p'gpgme_conf_opt'level :: Ptr (C'gpgme_conf_opt) -> Ptr (C'gpgme_conf_level_t)
p'gpgme_conf_opt'description p = plusPtr p 24
p'gpgme_conf_opt'description :: Ptr (C'gpgme_conf_opt) -> Ptr (CString)
p'gpgme_conf_opt'type p = plusPtr p 32
p'gpgme_conf_opt'type :: Ptr (C'gpgme_conf_opt) -> Ptr (C'gpgme_conf_type_t)
p'gpgme_conf_opt'alt_type p = plusPtr p 36
p'gpgme_conf_opt'alt_type :: Ptr (C'gpgme_conf_opt) -> Ptr (C'gpgme_conf_type_t)
p'gpgme_conf_opt'argname p = plusPtr p 40
p'gpgme_conf_opt'argname :: Ptr (C'gpgme_conf_opt) -> Ptr (CString)
p'gpgme_conf_opt'default_value p = plusPtr p 48
p'gpgme_conf_opt'default_value :: Ptr (C'gpgme_conf_opt) -> Ptr (C'gpgme_conf_arg_t)
p'gpgme_conf_opt'default_description p = plusPtr p 56
p'gpgme_conf_opt'default_description :: Ptr (C'gpgme_conf_opt) -> Ptr (CString)
p'gpgme_conf_opt'no_arg_value p = plusPtr p 64
p'gpgme_conf_opt'no_arg_value :: Ptr (C'gpgme_conf_opt) -> Ptr (C'gpgme_conf_arg_t)
p'gpgme_conf_opt'no_arg_description p = plusPtr p 72
p'gpgme_conf_opt'no_arg_description :: Ptr (C'gpgme_conf_opt) -> Ptr (CString)
p'gpgme_conf_opt'value p = plusPtr p 80
p'gpgme_conf_opt'value :: Ptr (C'gpgme_conf_opt) -> Ptr (C'gpgme_conf_arg_t)
p'gpgme_conf_opt'change_value p = plusPtr p 88
p'gpgme_conf_opt'change_value :: Ptr (C'gpgme_conf_opt) -> Ptr (CInt)
p'gpgme_conf_opt'new_value p = plusPtr p 96
p'gpgme_conf_opt'new_value :: Ptr (C'gpgme_conf_opt) -> Ptr (C'gpgme_conf_arg_t)
p'gpgme_conf_opt'user_data p = plusPtr p 104
p'gpgme_conf_opt'user_data :: Ptr (C'gpgme_conf_opt) -> Ptr (Ptr ())
instance Storable C'gpgme_conf_opt where
  sizeOf _ = 112
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 8
    v2 <- peekByteOff p 16
    v3 <- peekByteOff p 20
    v4 <- peekByteOff p 24
    v5 <- peekByteOff p 32
    v6 <- peekByteOff p 36
    v7 <- peekByteOff p 40
    v8 <- peekByteOff p 48
    v9 <- peekByteOff p 56
    v10 <- peekByteOff p 64
    v11 <- peekByteOff p 72
    v12 <- peekByteOff p 80
    v13 <- peekByteOff p 88
    v14 <- peekByteOff p 96
    v15 <- peekByteOff p 104
    return $ C'gpgme_conf_opt v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
  poke p (C'gpgme_conf_opt v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15) = do
    pokeByteOff p 0 v0
    pokeByteOff p 8 v1
    pokeByteOff p 16 v2
    pokeByteOff p 20 v3
    pokeByteOff p 24 v4
    pokeByteOff p 32 v5
    pokeByteOff p 36 v6
    pokeByteOff p 40 v7
    pokeByteOff p 48 v8
    pokeByteOff p 56 v9
    pokeByteOff p 64 v10
    pokeByteOff p 72 v11
    pokeByteOff p 80 v12
    pokeByteOff p 88 v13
    pokeByteOff p 96 v14
    pokeByteOff p 104 v15
    return ()

{-# LINE 628 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_conf_opt_t = Ptr C'gpgme_conf_opt

{-# LINE 630 "src/Bindings/Gpgme.hsc" #-}


{-# LINE 632 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 633 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 634 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 635 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 636 "src/Bindings/Gpgme.hsc" #-}

{-# LINE 637 "src/Bindings/Gpgme.hsc" #-}
data C'gpgme_conf_comp = C'gpgme_conf_comp{
  c'gpgme_conf_comp'next :: Ptr C'gpgme_conf_comp,
  c'gpgme_conf_comp'name :: CString,
  c'gpgme_conf_comp'description :: CString,
  c'gpgme_conf_comp'program_name :: CString,
  c'gpgme_conf_comp'options :: Ptr C'gpgme_conf_opt
} deriving (Eq,Show)
p'gpgme_conf_comp'next p = plusPtr p 0
p'gpgme_conf_comp'next :: Ptr (C'gpgme_conf_comp) -> Ptr (Ptr C'gpgme_conf_comp)
p'gpgme_conf_comp'name p = plusPtr p 16
p'gpgme_conf_comp'name :: Ptr (C'gpgme_conf_comp) -> Ptr (CString)
p'gpgme_conf_comp'description p = plusPtr p 24
p'gpgme_conf_comp'description :: Ptr (C'gpgme_conf_comp) -> Ptr (CString)
p'gpgme_conf_comp'program_name p = plusPtr p 32
p'gpgme_conf_comp'program_name :: Ptr (C'gpgme_conf_comp) -> Ptr (CString)
p'gpgme_conf_comp'options p = plusPtr p 40
p'gpgme_conf_comp'options :: Ptr (C'gpgme_conf_comp) -> Ptr (Ptr C'gpgme_conf_opt)
instance Storable C'gpgme_conf_comp where
  sizeOf _ = 48
  alignment _ = 8
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 16
    v2 <- peekByteOff p 24
    v3 <- peekByteOff p 32
    v4 <- peekByteOff p 40
    return $ C'gpgme_conf_comp v0 v1 v2 v3 v4
  poke p (C'gpgme_conf_comp v0 v1 v2 v3 v4) = do
    pokeByteOff p 0 v0
    pokeByteOff p 16 v1
    pokeByteOff p 24 v2
    pokeByteOff p 32 v3
    pokeByteOff p 40 v4
    return ()

{-# LINE 638 "src/Bindings/Gpgme.hsc" #-}

type C'gpgme_conf_comp_t = Ptr C'gpgme_conf_comp

{-# LINE 640 "src/Bindings/Gpgme.hsc" #-}

foreign import ccall "gpgme_conf_arg_new" c'gpgme_conf_arg_new
  :: Ptr C'gpgme_conf_arg_t -> C'gpgme_conf_type_t -> Ptr () -> IO C'gpgme_error_t
foreign import ccall "&gpgme_conf_arg_new" p'gpgme_conf_arg_new
  :: FunPtr (Ptr C'gpgme_conf_arg_t -> C'gpgme_conf_type_t -> Ptr () -> IO C'gpgme_error_t)

{-# LINE 642 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_conf_arg_release" c'gpgme_conf_arg_release
  :: C'gpgme_conf_arg_t -> C'gpgme_conf_type_t -> IO ()
foreign import ccall "&gpgme_conf_arg_release" p'gpgme_conf_arg_release
  :: FunPtr (C'gpgme_conf_arg_t -> C'gpgme_conf_type_t -> IO ())

{-# LINE 643 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_conf_opt_change" c'gpgme_conf_opt_change
  :: C'gpgme_conf_opt_t -> CInt -> C'gpgme_conf_arg_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_conf_opt_change" p'gpgme_conf_opt_change
  :: FunPtr (C'gpgme_conf_opt_t -> CInt -> C'gpgme_conf_arg_t -> IO C'gpgme_error_t)

{-# LINE 644 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_conf_release" c'gpgme_conf_release
  :: C'gpgme_conf_comp_t -> IO ()
foreign import ccall "&gpgme_conf_release" p'gpgme_conf_release
  :: FunPtr (C'gpgme_conf_comp_t -> IO ())

{-# LINE 645 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_conf_load" c'gpgme_op_conf_load
  :: C'gpgme_ctx_t -> Ptr C'gpgme_conf_comp_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_conf_load" p'gpgme_op_conf_load
  :: FunPtr (C'gpgme_ctx_t -> Ptr C'gpgme_conf_comp_t -> IO C'gpgme_error_t)

{-# LINE 646 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_op_conf_save" c'gpgme_op_conf_save
  :: C'gpgme_ctx_t -> C'gpgme_conf_comp_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_op_conf_save" p'gpgme_op_conf_save
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_conf_comp_t -> IO C'gpgme_error_t)

{-# LINE 647 "src/Bindings/Gpgme.hsc" #-}

-- * Engine information
foreign import ccall "gpgme_check_version" c'gpgme_check_version
  :: CString -> IO CString
foreign import ccall "&gpgme_check_version" p'gpgme_check_version
  :: FunPtr (CString -> IO CString)

{-# LINE 650 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_engine_info" c'gpgme_get_engine_info
  :: Ptr C'gpgme_engine_info_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_get_engine_info" p'gpgme_get_engine_info
  :: FunPtr (Ptr C'gpgme_engine_info_t -> IO C'gpgme_error_t)

{-# LINE 651 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_engine_info" c'gpgme_set_engine_info
  :: C'gpgme_protocol_t -> CString -> CString -> IO C'gpgme_error_t
foreign import ccall "&gpgme_set_engine_info" p'gpgme_set_engine_info
  :: FunPtr (C'gpgme_protocol_t -> CString -> CString -> IO C'gpgme_error_t)

{-# LINE 652 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_engine_check_version" c'gpgme_engine_check_version
  :: C'gpgme_protocol_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_engine_check_version" p'gpgme_engine_check_version
  :: FunPtr (C'gpgme_protocol_t -> IO C'gpgme_error_t)

{-# LINE 653 "src/Bindings/Gpgme.hsc" #-}

-- * Pinentry modes
type C'gpgme_pinentry_mode_t = CUInt

{-# LINE 656 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PINENTRY_MODE_DEFAULT = 0
c'GPGME_PINENTRY_MODE_DEFAULT :: (Num a) => a

{-# LINE 657 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PINENTRY_MODE_ASK = 1
c'GPGME_PINENTRY_MODE_ASK :: (Num a) => a

{-# LINE 658 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PINENTRY_MODE_CANCEL = 2
c'GPGME_PINENTRY_MODE_CANCEL :: (Num a) => a

{-# LINE 659 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PINENTRY_MODE_ERROR = 3
c'GPGME_PINENTRY_MODE_ERROR :: (Num a) => a

{-# LINE 660 "src/Bindings/Gpgme.hsc" #-}
c'GPGME_PINENTRY_MODE_LOOPBACK = 4
c'GPGME_PINENTRY_MODE_LOOPBACK :: (Num a) => a

{-# LINE 661 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_set_pinentry_mode" c'gpgme_set_pinentry_mode
  :: C'gpgme_ctx_t -> C'gpgme_pinentry_mode_t -> IO C'gpgme_error_t
foreign import ccall "&gpgme_set_pinentry_mode" p'gpgme_set_pinentry_mode
  :: FunPtr (C'gpgme_ctx_t -> C'gpgme_pinentry_mode_t -> IO C'gpgme_error_t)

{-# LINE 662 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_get_pinentry_mode" c'gpgme_get_pinentry_mode
  :: C'gpgme_ctx_t -> IO C'gpgme_pinentry_mode_t
foreign import ccall "&gpgme_get_pinentry_mode" p'gpgme_get_pinentry_mode
  :: FunPtr (C'gpgme_ctx_t -> IO C'gpgme_pinentry_mode_t)

{-# LINE 663 "src/Bindings/Gpgme.hsc" #-}

-- * I/O wrappers
-- These are needed when implementing passphrase callbacks.
foreign import ccall "gpgme_io_read" c'gpgme_io_read
  :: CInt -> Ptr () -> CSize -> IO CSize
foreign import ccall "&gpgme_io_read" p'gpgme_io_read
  :: FunPtr (CInt -> Ptr () -> CSize -> IO CSize)

{-# LINE 667 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_io_write" c'gpgme_io_write
  :: CInt -> Ptr () -> CSize -> IO CSize
foreign import ccall "&gpgme_io_write" p'gpgme_io_write
  :: FunPtr (CInt -> Ptr () -> CSize -> IO CSize)

{-# LINE 668 "src/Bindings/Gpgme.hsc" #-}
foreign import ccall "gpgme_io_writen" c'gpgme_io_writen
  :: CInt -> Ptr () -> CSize -> IO CSize
foreign import ccall "&gpgme_io_writen" p'gpgme_io_writen
  :: FunPtr (CInt -> Ptr () -> CSize -> IO CSize)

{-# LINE 669 "src/Bindings/Gpgme.hsc" #-}