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
type C'off_t = Int64
type C'ssize_t = Int64
type C'gpgme_ctx_t = Word64
type C'gpgme_data_t = Word64
type C'gpg_error_t = CUInt
type C'gpgme_error_t = CUInt
type C'gpg_err_code_t = CUInt
type C'gpgme_err_code_t = CUInt
type C'gpg_err_source_t = CUInt
type C'gpgme_err_source_t = CUInt
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
foreign import ccall "inline_gpgme_error" c'gpgme_error
:: C'gpgme_err_code_t -> IO C'gpgme_error_t
foreign import ccall "inline_gpgme_err_code" c'gpgme_err_code
:: C'gpgme_error_t -> IO C'gpgme_err_code_t
foreign import ccall "inline_gpgme_err_source" c'gpgme_err_source
:: C'gpgme_error_t -> IO C'gpgme_err_source_t
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)
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)
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)
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)
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)
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)
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)
type C'gpgme_data_encoding_t = CUInt
c'GPGME_DATA_ENCODING_NONE = 0
c'GPGME_DATA_ENCODING_NONE :: (Num a) => a
c'GPGME_DATA_ENCODING_BINARY = 1
c'GPGME_DATA_ENCODING_BINARY :: (Num a) => a
c'GPGME_DATA_ENCODING_BASE64 = 2
c'GPGME_DATA_ENCODING_BASE64 :: (Num a) => a
c'GPGME_DATA_ENCODING_ARMOR = 3
c'GPGME_DATA_ENCODING_ARMOR :: (Num a) => a
type C'gpgme_pubkey_algo_t = CUInt
c'GPGME_PK_RSA = 1
c'GPGME_PK_RSA :: (Num a) => a
c'GPGME_PK_RSA_E = 2
c'GPGME_PK_RSA_E :: (Num a) => a
c'GPGME_PK_RSA_S = 3
c'GPGME_PK_RSA_S :: (Num a) => a
c'GPGME_PK_ELG_E = 16
c'GPGME_PK_ELG_E :: (Num a) => a
c'GPGME_PK_DSA = 17
c'GPGME_PK_DSA :: (Num a) => a
c'GPGME_PK_ELG = 20
c'GPGME_PK_ELG :: (Num a) => a
type C'gpgme_hash_algo_t = CUInt
c'GPGME_MD_NONE = 0
c'GPGME_MD_NONE :: (Num a) => a
c'GPGME_MD_MD5 = 1
c'GPGME_MD_MD5 :: (Num a) => a
c'GPGME_MD_SHA1 = 2
c'GPGME_MD_SHA1 :: (Num a) => a
c'GPGME_MD_RMD160 = 3
c'GPGME_MD_RMD160 :: (Num a) => a
c'GPGME_MD_MD2 = 5
c'GPGME_MD_MD2 :: (Num a) => a
c'GPGME_MD_TIGER = 6
c'GPGME_MD_TIGER :: (Num a) => a
c'GPGME_MD_HAVAL = 7
c'GPGME_MD_HAVAL :: (Num a) => a
c'GPGME_MD_SHA256 = 8
c'GPGME_MD_SHA256 :: (Num a) => a
c'GPGME_MD_SHA384 = 9
c'GPGME_MD_SHA384 :: (Num a) => a
c'GPGME_MD_SHA512 = 10
c'GPGME_MD_SHA512 :: (Num a) => a
c'GPGME_MD_MD4 = 301
c'GPGME_MD_MD4 :: (Num a) => a
c'GPGME_MD_CRC32 = 302
c'GPGME_MD_CRC32 :: (Num a) => a
c'GPGME_MD_CRC32_RFC1510 = 303
c'GPGME_MD_CRC32_RFC1510 :: (Num a) => a
c'GPGME_MD_CRC24_RFC2440 = 304
c'GPGME_MD_CRC24_RFC2440 :: (Num a) => a
type C'gpgme_sig_mode_t = CUInt
c'GPGME_SIG_MODE_NORMAL = 0
c'GPGME_SIG_MODE_NORMAL :: (Num a) => a
c'GPGME_SIG_MODE_DETACH = 1
c'GPGME_SIG_MODE_DETACH :: (Num a) => a
c'GPGME_SIG_MODE_CLEAR = 2
c'GPGME_SIG_MODE_CLEAR :: (Num a) => a
type C'gpgme_validity_t = CUInt
c'GPGME_VALIDITY_UNKNOWN = 0
c'GPGME_VALIDITY_UNKNOWN :: (Num a) => a
c'GPGME_VALIDITY_UNDEFINED = 1
c'GPGME_VALIDITY_UNDEFINED :: (Num a) => a
c'GPGME_VALIDITY_NEVER = 2
c'GPGME_VALIDITY_NEVER :: (Num a) => a
c'GPGME_VALIDITY_MARGINAL = 3
c'GPGME_VALIDITY_MARGINAL :: (Num a) => a
c'GPGME_VALIDITY_FULL = 4
c'GPGME_VALIDITY_FULL :: (Num a) => a
c'GPGME_VALIDITY_ULTIMATE = 5
c'GPGME_VALIDITY_ULTIMATE :: (Num a) => a
type C'gpgme_protocol_t = CUInt
c'GPGME_PROTOCOL_OpenPGP = 0
c'GPGME_PROTOCOL_OpenPGP :: (Num a) => a
c'GPGME_PROTOCOL_CMS = 1
c'GPGME_PROTOCOL_CMS :: (Num a) => a
c'GPGME_PROTOCOL_GPGCONF = 2
c'GPGME_PROTOCOL_GPGCONF :: (Num a) => a
c'GPGME_PROTOCOL_UNKNOWN = 255
c'GPGME_PROTOCOL_UNKNOWN :: (Num a) => a
type C'gpgme_keylist_mode_t = CUInt
c'GPGME_KEYLIST_MODE_LOCAL = 1
c'GPGME_KEYLIST_MODE_LOCAL :: (Num a) => a
c'GPGME_KEYLIST_MODE_EXTERN = 2
c'GPGME_KEYLIST_MODE_EXTERN :: (Num a) => a
c'GPGME_KEYLIST_MODE_SIGS = 4
c'GPGME_KEYLIST_MODE_SIGS :: (Num a) => a
c'GPGME_KEYLIST_MODE_SIG_NOTATIONS = 8
c'GPGME_KEYLIST_MODE_SIG_NOTATIONS :: (Num a) => a
c'GPGME_KEYLIST_MODE_VALIDATE = 256
c'GPGME_KEYLIST_MODE_VALIDATE :: (Num a) => a
c'GPGME_AUDITLOG_HTML = 1
c'GPGME_AUDITLOG_HTML :: (Num a) => a
c'GPGME_AUDITLOG_WITH_HELP = 128
c'GPGME_AUDITLOG_WITH_HELP :: (Num a) => a
type C'gpgme_sig_notation_flags_t = CUInt
c'GPGME_SIG_NOTATION_HUMAN_READABLE = 1
c'GPGME_SIG_NOTATION_HUMAN_READABLE :: (Num a) => a
c'GPGME_SIG_NOTATION_CRITICAL = 2
c'GPGME_SIG_NOTATION_CRITICAL :: (Num a) => a
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 ()
type C'gpgme_sig_notation_t = Ptr C'_gpgme_sig_notation
type C'gpgme_status_code_t = CUInt
c'GPGME_STATUS_EOF = 0
c'GPGME_STATUS_EOF :: (Num a) => a
c'GPGME_STATUS_ENTER = 1
c'GPGME_STATUS_ENTER :: (Num a) => a
c'GPGME_STATUS_LEAVE = 2
c'GPGME_STATUS_LEAVE :: (Num a) => a
c'GPGME_STATUS_ABORT = 3
c'GPGME_STATUS_ABORT :: (Num a) => a
c'GPGME_STATUS_GOODSIG = 4
c'GPGME_STATUS_GOODSIG :: (Num a) => a
c'GPGME_STATUS_BADSIG = 5
c'GPGME_STATUS_BADSIG :: (Num a) => a
c'GPGME_STATUS_ERRSIG = 6
c'GPGME_STATUS_ERRSIG :: (Num a) => a
c'GPGME_STATUS_BADARMOR = 7
c'GPGME_STATUS_BADARMOR :: (Num a) => a
c'GPGME_STATUS_RSA_OR_IDEA = 8
c'GPGME_STATUS_RSA_OR_IDEA :: (Num a) => a
c'GPGME_STATUS_KEYEXPIRED = 9
c'GPGME_STATUS_KEYEXPIRED :: (Num a) => a
c'GPGME_STATUS_KEYREVOKED = 10
c'GPGME_STATUS_KEYREVOKED :: (Num a) => a
c'GPGME_STATUS_TRUST_UNDEFINED = 11
c'GPGME_STATUS_TRUST_UNDEFINED :: (Num a) => a
c'GPGME_STATUS_TRUST_NEVER = 12
c'GPGME_STATUS_TRUST_NEVER :: (Num a) => a
c'GPGME_STATUS_TRUST_MARGINAL = 13
c'GPGME_STATUS_TRUST_MARGINAL :: (Num a) => a
c'GPGME_STATUS_TRUST_FULLY = 14
c'GPGME_STATUS_TRUST_FULLY :: (Num a) => a
c'GPGME_STATUS_TRUST_ULTIMATE = 15
c'GPGME_STATUS_TRUST_ULTIMATE :: (Num a) => a
c'GPGME_STATUS_SHM_INFO = 16
c'GPGME_STATUS_SHM_INFO :: (Num a) => a
c'GPGME_STATUS_SHM_GET = 17
c'GPGME_STATUS_SHM_GET :: (Num a) => a
c'GPGME_STATUS_SHM_GET_BOOL = 18
c'GPGME_STATUS_SHM_GET_BOOL :: (Num a) => a
c'GPGME_STATUS_SHM_GET_HIDDEN = 19
c'GPGME_STATUS_SHM_GET_HIDDEN :: (Num a) => a
c'GPGME_STATUS_NEED_PASSPHRASE = 20
c'GPGME_STATUS_NEED_PASSPHRASE :: (Num a) => a
c'GPGME_STATUS_VALIDSIG = 21
c'GPGME_STATUS_VALIDSIG :: (Num a) => a
c'GPGME_STATUS_SIG_ID = 22
c'GPGME_STATUS_SIG_ID :: (Num a) => a
c'GPGME_STATUS_ENC_TO = 23
c'GPGME_STATUS_ENC_TO :: (Num a) => a
c'GPGME_STATUS_NODATA = 24
c'GPGME_STATUS_NODATA :: (Num a) => a
c'GPGME_STATUS_BAD_PASSPHRASE = 25
c'GPGME_STATUS_BAD_PASSPHRASE :: (Num a) => a
c'GPGME_STATUS_NO_PUBKEY = 26
c'GPGME_STATUS_NO_PUBKEY :: (Num a) => a
c'GPGME_STATUS_NO_SECKEY = 27
c'GPGME_STATUS_NO_SECKEY :: (Num a) => a
c'GPGME_STATUS_NEED_PASSPHRASE_SYM = 28
c'GPGME_STATUS_NEED_PASSPHRASE_SYM :: (Num a) => a
c'GPGME_STATUS_DECRYPTION_FAILED = 29
c'GPGME_STATUS_DECRYPTION_FAILED :: (Num a) => a
c'GPGME_STATUS_DECRYPTION_OKAY = 30
c'GPGME_STATUS_DECRYPTION_OKAY :: (Num a) => a
c'GPGME_STATUS_MISSING_PASSPHRASE = 31
c'GPGME_STATUS_MISSING_PASSPHRASE :: (Num a) => a
c'GPGME_STATUS_GOOD_PASSPHRASE = 32
c'GPGME_STATUS_GOOD_PASSPHRASE :: (Num a) => a
c'GPGME_STATUS_GOODMDC = 33
c'GPGME_STATUS_GOODMDC :: (Num a) => a
c'GPGME_STATUS_BADMDC = 34
c'GPGME_STATUS_BADMDC :: (Num a) => a
c'GPGME_STATUS_ERRMDC = 35
c'GPGME_STATUS_ERRMDC :: (Num a) => a
c'GPGME_STATUS_IMPORTED = 36
c'GPGME_STATUS_IMPORTED :: (Num a) => a
c'GPGME_STATUS_IMPORT_OK = 37
c'GPGME_STATUS_IMPORT_OK :: (Num a) => a
c'GPGME_STATUS_IMPORT_PROBLEM = 38
c'GPGME_STATUS_IMPORT_PROBLEM :: (Num a) => a
c'GPGME_STATUS_IMPORT_RES = 39
c'GPGME_STATUS_IMPORT_RES :: (Num a) => a
c'GPGME_STATUS_FILE_START = 40
c'GPGME_STATUS_FILE_START :: (Num a) => a
c'GPGME_STATUS_FILE_DONE = 41
c'GPGME_STATUS_FILE_DONE :: (Num a) => a
c'GPGME_STATUS_FILE_ERROR = 42
c'GPGME_STATUS_FILE_ERROR :: (Num a) => a
c'GPGME_STATUS_BEGIN_DECRYPTION = 43
c'GPGME_STATUS_BEGIN_DECRYPTION :: (Num a) => a
c'GPGME_STATUS_END_DECRYPTION = 44
c'GPGME_STATUS_END_DECRYPTION :: (Num a) => a
c'GPGME_STATUS_BEGIN_ENCRYPTION = 45
c'GPGME_STATUS_BEGIN_ENCRYPTION :: (Num a) => a
c'GPGME_STATUS_END_ENCRYPTION = 46
c'GPGME_STATUS_END_ENCRYPTION :: (Num a) => a
c'GPGME_STATUS_DELETE_PROBLEM = 47
c'GPGME_STATUS_DELETE_PROBLEM :: (Num a) => a
c'GPGME_STATUS_GET_BOOL = 48
c'GPGME_STATUS_GET_BOOL :: (Num a) => a
c'GPGME_STATUS_GET_LINE = 49
c'GPGME_STATUS_GET_LINE :: (Num a) => a
c'GPGME_STATUS_GET_HIDDEN = 50
c'GPGME_STATUS_GET_HIDDEN :: (Num a) => a
c'GPGME_STATUS_GOT_IT = 51
c'GPGME_STATUS_GOT_IT :: (Num a) => a
c'GPGME_STATUS_PROGRESS = 52
c'GPGME_STATUS_PROGRESS :: (Num a) => a
c'GPGME_STATUS_SIG_CREATED = 53
c'GPGME_STATUS_SIG_CREATED :: (Num a) => a
c'GPGME_STATUS_SESSION_KEY = 54
c'GPGME_STATUS_SESSION_KEY :: (Num a) => a
c'GPGME_STATUS_NOTATION_NAME = 55
c'GPGME_STATUS_NOTATION_NAME :: (Num a) => a
c'GPGME_STATUS_NOTATION_DATA = 56
c'GPGME_STATUS_NOTATION_DATA :: (Num a) => a
c'GPGME_STATUS_POLICY_URL = 57
c'GPGME_STATUS_POLICY_URL :: (Num a) => a
c'GPGME_STATUS_BEGIN_STREAM = 58
c'GPGME_STATUS_BEGIN_STREAM :: (Num a) => a
c'GPGME_STATUS_END_STREAM = 59
c'GPGME_STATUS_END_STREAM :: (Num a) => a
c'GPGME_STATUS_KEY_CREATED = 60
c'GPGME_STATUS_KEY_CREATED :: (Num a) => a
c'GPGME_STATUS_USERID_HINT = 61
c'GPGME_STATUS_USERID_HINT :: (Num a) => a
c'GPGME_STATUS_UNEXPECTED = 62
c'GPGME_STATUS_UNEXPECTED :: (Num a) => a
c'GPGME_STATUS_INV_RECP = 63
c'GPGME_STATUS_INV_RECP :: (Num a) => a
c'GPGME_STATUS_NO_RECP = 64
c'GPGME_STATUS_NO_RECP :: (Num a) => a
c'GPGME_STATUS_ALREADY_SIGNED = 65
c'GPGME_STATUS_ALREADY_SIGNED :: (Num a) => a
c'GPGME_STATUS_SIGEXPIRED = 66
c'GPGME_STATUS_SIGEXPIRED :: (Num a) => a
c'GPGME_STATUS_EXPSIG = 67
c'GPGME_STATUS_EXPSIG :: (Num a) => a
c'GPGME_STATUS_EXPKEYSIG = 68
c'GPGME_STATUS_EXPKEYSIG :: (Num a) => a
c'GPGME_STATUS_TRUNCATED = 69
c'GPGME_STATUS_TRUNCATED :: (Num a) => a
c'GPGME_STATUS_ERROR = 70
c'GPGME_STATUS_ERROR :: (Num a) => a
c'GPGME_STATUS_NEWSIG = 71
c'GPGME_STATUS_NEWSIG :: (Num a) => a
c'GPGME_STATUS_REVKEYSIG = 72
c'GPGME_STATUS_REVKEYSIG :: (Num a) => a
c'GPGME_STATUS_SIG_SUBPACKET = 73
c'GPGME_STATUS_SIG_SUBPACKET :: (Num a) => a
c'GPGME_STATUS_NEED_PASSPHRASE_PIN = 74
c'GPGME_STATUS_NEED_PASSPHRASE_PIN :: (Num a) => a
c'GPGME_STATUS_SC_OP_FAILURE = 75
c'GPGME_STATUS_SC_OP_FAILURE :: (Num a) => a
c'GPGME_STATUS_SC_OP_SUCCESS = 76
c'GPGME_STATUS_SC_OP_SUCCESS :: (Num a) => a
c'GPGME_STATUS_CARDCTRL = 77
c'GPGME_STATUS_CARDCTRL :: (Num a) => a
c'GPGME_STATUS_BACKUP_KEY_CREATED = 78
c'GPGME_STATUS_BACKUP_KEY_CREATED :: (Num a) => a
c'GPGME_STATUS_PKA_TRUST_BAD = 79
c'GPGME_STATUS_PKA_TRUST_BAD :: (Num a) => a
c'GPGME_STATUS_PKA_TRUST_GOOD = 80
c'GPGME_STATUS_PKA_TRUST_GOOD :: (Num a) => a
c'GPGME_STATUS_PLAINTEXT = 81
c'GPGME_STATUS_PLAINTEXT :: (Num a) => a
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 ()
type C'gpgme_engine_info_t = Ptr C'_gpgme_engine_info
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 ()
type C'gpgme_subkey_t = Ptr C'_gpgme_subkey
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 ()
type C'gpgme_key_sig_t = Ptr C'_gpgme_key_sig
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 ()
type C'gpgme_user_id_t = Ptr C'_gpgme_user_id
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 ()
type C'gpgme_key_t = Ptr C'_gpgme_key
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)
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 ())
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)
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)
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 ())
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)
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)
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)
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 ())
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)
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 ())
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)
c'GPGME_INCLUDE_CERTS_DEFAULT = 256
c'GPGME_INCLUDE_CERTS_DEFAULT :: (Num a) => a
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 ())
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)
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)
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)
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 ())
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 ())
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 ())
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 ())
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)
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)
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)
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)
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)
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 ())
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)
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)
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 ())
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)
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)
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)
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)
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 ())
type C'gpgme_event_io_t = CUInt
c'GPGME_EVENT_START = 0
c'GPGME_EVENT_START :: (Num a) => a
c'GPGME_EVENT_DONE = 1
c'GPGME_EVENT_DONE :: (Num a) => a
c'GPGME_EVENT_NEXT_KEY = 2
c'GPGME_EVENT_NEXT_KEY :: (Num a) => a
c'GPGME_EVENT_NEXT_TRUSTITEM = 3
c'GPGME_EVENT_NEXT_TRUSTITEM :: (Num a) => a
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 ())
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 ()
type C'gpgme_io_cbs_t = Ptr C'gpgme_io_cbs
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 ())
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 ())
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)
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)
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)
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)
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)
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)
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 ())
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 ()
type C'gpgme_data_cbs_t = Ptr C'gpgme_data_cbs
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)
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)
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)
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)
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 ())
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)
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)
foreign import ccall "gpgme_free" c'gpgme_free
:: Ptr () -> IO ()
foreign import ccall "&gpgme_free" p'gpgme_free
:: FunPtr (Ptr () -> IO ())
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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 ())
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 ())
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 ())
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 ()
type C'gpgme_invalid_key_t = Ptr C'_gpgme_invalid_key
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 ()
type C'gpgme_encrypt_result_t = Ptr C'_gpgme_op_encrypt_result
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)
type C'gpgme_encrypt_flags_t = CUInt
c'GPGME_ENCRYPT_ALWAYS_TRUST = 1
c'GPGME_ENCRYPT_ALWAYS_TRUST :: (Num a) => a
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)
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)
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)
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)
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 ()
type C'gpgme_recipient_t = Ptr C'_gpgme_recipient
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 ()
type C'gpgme_decrypt_result_t = Ptr C'_gpgme_op_decrypt_result
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)
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)
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)
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)
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)
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 ()
type C'gpgme_new_signature_t = Ptr C'_gpgme_new_signature
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 ()
type C'gpgme_sign_result_t = Ptr C'_gpgme_op_sign_result
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)
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)
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)
type C'gpgme_sigsum_t = CUInt
c'GPGME_SIGSUM_VALID = 1
c'GPGME_SIGSUM_VALID :: (Num a) => a
c'GPGME_SIGSUM_GREEN = 2
c'GPGME_SIGSUM_GREEN :: (Num a) => a
c'GPGME_SIGSUM_RED = 4
c'GPGME_SIGSUM_RED :: (Num a) => a
c'GPGME_SIGSUM_KEY_REVOKED = 16
c'GPGME_SIGSUM_KEY_REVOKED :: (Num a) => a
c'GPGME_SIGSUM_KEY_EXPIRED = 32
c'GPGME_SIGSUM_KEY_EXPIRED :: (Num a) => a
c'GPGME_SIGSUM_SIG_EXPIRED = 64
c'GPGME_SIGSUM_SIG_EXPIRED :: (Num a) => a
c'GPGME_SIGSUM_KEY_MISSING = 128
c'GPGME_SIGSUM_KEY_MISSING :: (Num a) => a
c'GPGME_SIGSUM_CRL_MISSING = 256
c'GPGME_SIGSUM_CRL_MISSING :: (Num a) => a
c'GPGME_SIGSUM_CRL_TOO_OLD = 512
c'GPGME_SIGSUM_CRL_TOO_OLD :: (Num a) => a
c'GPGME_SIGSUM_BAD_POLICY = 1024
c'GPGME_SIGSUM_BAD_POLICY :: (Num a) => a
c'GPGME_SIGSUM_SYS_ERROR = 2048
c'GPGME_SIGSUM_SYS_ERROR :: (Num a) => a
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 ()
type C'gpgme_signature_t = Ptr C'_gpgme_signature
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 ()
type C'gpgme_verify_result_t = Ptr C'_gpgme_op_verify_result
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)
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)
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)
c'GPGME_IMPORT_NEW = 1
c'GPGME_IMPORT_NEW :: (Num a) => a
c'GPGME_IMPORT_UID = 2
c'GPGME_IMPORT_UID :: (Num a) => a
c'GPGME_IMPORT_SIG = 4
c'GPGME_IMPORT_SIG :: (Num a) => a
c'GPGME_IMPORT_SUBKEY = 8
c'GPGME_IMPORT_SUBKEY :: (Num a) => a
c'GPGME_IMPORT_SECRET = 16
c'GPGME_IMPORT_SECRET :: (Num a) => a
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 ()
type C'gpgme_import_status_t = Ptr C'_gpgme_import_status
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 ()
type C'gpgme_import_result_t = Ptr C'_gpgme_op_import_result
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)
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)
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)
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)
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)
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)
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)
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 ()
type C'gpgme_genkey_result_t = Ptr C'_gpgme_op_genkey_result
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)
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)
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)
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)
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)
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)
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)
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)
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)
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 ()
type C'gpgme_keylist_result_t = Ptr C'_gpgme_op_keylist_result
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)
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)
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)
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)
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)
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 ()
type C'gpgme_trust_item_t = Ptr C'_gpgme_trust_item
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)
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)
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)
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 ())
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 ())
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)
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)
type C'gpgme_conf_level_t = CUInt
c'GPGME_CONF_BASIC = 0
c'GPGME_CONF_BASIC :: (Num a) => a
c'GPGME_CONF_ADVANCED = 1
c'GPGME_CONF_ADVANCED :: (Num a) => a
c'GPGME_CONF_EXPERT = 2
c'GPGME_CONF_EXPERT :: (Num a) => a
c'GPGME_CONF_INVISIBLE = 3
c'GPGME_CONF_INVISIBLE :: (Num a) => a
c'GPGME_CONF_INTERNAL = 4
c'GPGME_CONF_INTERNAL :: (Num a) => a
type C'gpgme_conf_type_t = CUInt
c'GPGME_CONF_NONE = 0
c'GPGME_CONF_NONE :: (Num a) => a
c'GPGME_CONF_STRING = 1
c'GPGME_CONF_STRING :: (Num a) => a
c'GPGME_CONF_INT32 = 2
c'GPGME_CONF_INT32 :: (Num a) => a
c'GPGME_CONF_UINT32 = 3
c'GPGME_CONF_UINT32 :: (Num a) => a
c'GPGME_CONF_FILENAME = 32
c'GPGME_CONF_FILENAME :: (Num a) => a
c'GPGME_CONF_LDAP_SERVER = 33
c'GPGME_CONF_LDAP_SERVER :: (Num a) => a
c'GPGME_CONF_KEY_FPR = 34
c'GPGME_CONF_KEY_FPR :: (Num a) => a
c'GPGME_CONF_PUB_KEY = 35
c'GPGME_CONF_PUB_KEY :: (Num a) => a
c'GPGME_CONF_SEC_KEY = 36
c'GPGME_CONF_SEC_KEY :: (Num a) => a
c'GPGME_CONF_ALIAS_LIST = 37
c'GPGME_CONF_ALIAS_LIST :: (Num a) => a
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 ()
type C'gpgme_conf_arg_t = Ptr C'gpgme_conf_arg
c'GPGME_CONF_GROUP = 1
c'GPGME_CONF_GROUP :: (Num a) => a
c'GPGME_CONF_OPTIONAL = 2
c'GPGME_CONF_OPTIONAL :: (Num a) => a
c'GPGME_CONF_LIST = 4
c'GPGME_CONF_LIST :: (Num a) => a
c'GPGME_CONF_RUNTIME = 8
c'GPGME_CONF_RUNTIME :: (Num a) => a
c'GPGME_CONF_DEFAULT = 16
c'GPGME_CONF_DEFAULT :: (Num a) => a
c'GPGME_CONF_DEFAULT_DESC = 32
c'GPGME_CONF_DEFAULT_DESC :: (Num a) => a
c'GPGME_CONF_NO_ARG_DESC = 64
c'GPGME_CONF_NO_ARG_DESC :: (Num a) => a
c'GPGME_CONF_NO_CHANGE = 128
c'GPGME_CONF_NO_CHANGE :: (Num a) => a
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 ()
type C'gpgme_conf_opt_t = Ptr C'gpgme_conf_opt
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 ()
type C'gpgme_conf_comp_t = Ptr C'gpgme_conf_comp
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)
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 ())
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)
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 ())
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)
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)
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)
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)
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)
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)
type C'gpgme_pinentry_mode_t = CUInt
c'GPGME_PINENTRY_MODE_DEFAULT = 0
c'GPGME_PINENTRY_MODE_DEFAULT :: (Num a) => a
c'GPGME_PINENTRY_MODE_ASK = 1
c'GPGME_PINENTRY_MODE_ASK :: (Num a) => a
c'GPGME_PINENTRY_MODE_CANCEL = 2
c'GPGME_PINENTRY_MODE_CANCEL :: (Num a) => a
c'GPGME_PINENTRY_MODE_ERROR = 3
c'GPGME_PINENTRY_MODE_ERROR :: (Num a) => a
c'GPGME_PINENTRY_MODE_LOOPBACK = 4
c'GPGME_PINENTRY_MODE_LOOPBACK :: (Num a) => a
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)
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)
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)
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)
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)