diff options
author | Werner Koch <wk@gnupg.org> | 2013-02-06 12:49:52 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2013-02-06 12:56:19 +0100 |
commit | 8b2b8dfe5c4cd346bbea2c228e75737bbeeca4c4 (patch) | |
tree | f87e3eeb29b7322fbbf8ced57e70e5b066f9d36c /agent/agent.h | |
parent | agent: Return a better error code if no passphrase was given. (diff) | |
download | gnupg2-8b2b8dfe5c4cd346bbea2c228e75737bbeeca4c4.tar.xz gnupg2-8b2b8dfe5c4cd346bbea2c228e75737bbeeca4c4.zip |
agent: Move a typedef to common and provide parse_pinentry_mode.
* common/agent-opt.c: New.
* common/shareddefs.h: New.
* common/Makefile.am: Add new files.
* agent/agent.h: Include shareddefs.h.
(pinentry_mode_t): Factor out to shareddefs.h.
* agent/command.c (option_handler): Use parse_pinentry_mode.
Diffstat (limited to 'agent/agent.h')
-rw-r--r-- | agent/agent.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/agent/agent.h b/agent/agent.h index 45bc507e3..8b1cae97a 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -34,6 +34,7 @@ #include "../common/membuf.h" #include "../common/sysutils.h" /* (gnupg_fd_t) */ #include "../common/session-env.h" +#include "../common/shareddefs.h" /* To convey some special hash algorithms we use algorithm numbers reserved for application use. */ @@ -46,16 +47,6 @@ #define MAX_DIGEST_LEN 64 -/* Values for the pinentry mode. */ -typedef enum - { - PINENTRY_MODE_ASK = 0, /* Ask via pinentry (default). */ - PINENTRY_MODE_CANCEL, /* Always return a cancel error. */ - PINENTRY_MODE_ERROR, /* Return error code for no pinentry. */ - PINENTRY_MODE_LOOPBACK,/* Use an inquiry to get the value. */ - } -pinentry_mode_t; - /* A large struct name "opt" to keep global flags */ struct |