diff options
author | Werner Koch <[email protected]> | 2013-02-07 19:59:16 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-02-07 19:59:16 +0000 |
commit | 61a0d92b679f248505f1bf16386bc41a5bf2ba1d (patch) | |
tree | 7f3e0358bb4f6004a395a55a2902b27940dcf79e /src/gpgme.h.in | |
parent | Add public function gpgme_io_writen. (diff) | |
download | gpgme-61a0d92b679f248505f1bf16386bc41a5bf2ba1d.tar.gz gpgme-61a0d92b679f248505f1bf16386bc41a5bf2ba1d.zip |
Add public function gpgme_set_pinentry_mode.
* src/gpgme.c (gpgme_set_pinentry_mode): New.
* src/gpgme.h.in (gpgme_pinentry_t): New.
(gpgme_set_pinentry_mode): New.
* src/context.h (struct gpgme_context): Add field pinentry_mode.
* src/engine-backend.h (struct engine_ops): Add field
set_pinentry_mode.
* src/engine-gpg.c (struct engine_gpg): Add field pinentry_mode.
(build_argv): Implement pinentry_mode.
(gpg_set_pinentry_mode): New.
(_gpgme_engine_ops_gpg): Register gpg_set_pinentry_mode.
--
Note that this new fucntion may only be used with gpg 2.1.
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r-- | src/gpgme.h.in | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 27ef195b..4ec2367b 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -1,7 +1,7 @@ /* gpgme.h - Public interface to GnuPG Made Easy. -*- c -*- Copyright (C) 2000 Werner Koch (dd9jn) Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009 - 2010, 2011, 2012 g10 Code GmbH + 2010, 2011, 2012, 2013 g10 Code GmbH This file is part of GPGME. @@ -354,6 +354,18 @@ gpgme_protocol_t; typedef unsigned int gpgme_keylist_mode_t; +/* The pinentry modes. */ +typedef enum + { + GPGME_PINENTRY_MODE_DEFAULT = 0, + GPGME_PINENTRY_MODE_ASK = 1, + GPGME_PINENTRY_MODE_CANCEL = 2, + GPGME_PINENTRY_MODE_ERROR = 3, + GPGME_PINENTRY_MODE_LOOPBACK = 4 + } +gpgme_pinentry_mode_t; + + /* The available export mode flags. */ #define GPGME_EXPORT_MODE_EXTERN 2 #define GPGME_EXPORT_MODE_MINIMAL 4 @@ -859,6 +871,10 @@ gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t ctx, /* Get keylist mode in CTX. */ gpgme_keylist_mode_t gpgme_get_keylist_mode (gpgme_ctx_t ctx); +/* Set the pinentry mode for CTX to MODE. */ +gpgme_error_t gpgme_set_pinentry_mode (gpgme_ctx_t ctx, + gpgme_pinentry_mode_t mode); + /* Set the passphrase callback function in CTX to CB. HOOK_VALUE is passed as first argument to the passphrase callback function. */ void gpgme_set_passphrase_cb (gpgme_ctx_t ctx, |