From a6f3857128220cc413434d5fb56cdd7f9a890c4c Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 22 Oct 2009 16:44:07 +0000 Subject: 2009-10-22 Marcus Brinkmann * configure.ac: Add support for G13. src/ 2009-10-22 Marcus Brinkmann * Makefile.am: Remove @NETLIBS@ from LIBADDs. (g13_components): New variable. (main_sources): Add $(g13_components). * g13.c, engine-g13.c: New files. * engine.c (engine_ops): Check for assuan for assuan engine, add g13 engine. * util.h (_gpgme_get_g13_path, _gpgme_encode_percent_string): New prototypes. * conversion.c (_gpgme_encode_percent_string): New function. * gpgme.h.in (gpgme_protocol_t): Add GPGME_PROTOCOL_G13. (struct _gpgme_op_g13_result, gpgme_g13_result_t): New types. (gpgme_op_g13_mount): New function. * gpgme.def, libgpgme.vers: Add gpgme_op_g13_mount. * gpgme.c (gpgme_set_protocol): Allow GPGME_PROTOCOL_G13. (gpgme_get_protocol_name): Add GPGME_PROTOCOL_G13. * posix-util.c (_gpgme_get_g13_path): New function. * w32-util.c (_gpgme_get_g13_path): New function. * engine-backend.h (_gpgme_engine_ops_g13): New declaration. --- src/gpgme.h.in | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/gpgme.h.in') diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 0b42798c..45f5c128 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -324,6 +324,7 @@ typedef enum GPGME_PROTOCOL_CMS = 1, GPGME_PROTOCOL_GPGCONF = 2, /* Special code for gpgconf. */ GPGME_PROTOCOL_ASSUAN = 3, /* Low-level access to an Assuan server. */ + GPGME_PROTOCOL_G13 = 4, GPGME_PROTOCOL_UNKNOWN = 255 } gpgme_protocol_t; @@ -1735,7 +1736,10 @@ typedef gpgme_error_t (*gpgme_assuan_status_cb_t) struct _gpgme_op_assuan_result { /* The result of the actual assuan command. An OK is indicated by a - value of 0 and an ERR by the respective error error value. */ + value of 0 and an ERR by the respective error error value. This + is required because assuan operations use a session-based + interface. The error code of the GPGME function calls just + reflects transmission errors. */ gpgme_error_t err; }; typedef struct _gpgme_op_assuan_result *gpgme_assuan_result_t; @@ -1767,6 +1771,26 @@ gpgme_error_t gpgme_op_assuan_transact (gpgme_ctx_t ctx, void *stat_cb_value); + +/* Crypto container support. */ +struct _gpgme_op_g13_result +{ + /* The result of the actual assuan command. An OK is indicated by a + value of 0 and an ERR by the respective error error value. This + is required because assuan operations use a session-based + interface. The error code of the GPGME function calls just + reflects transmission errors. */ + gpgme_error_t err; +}; +typedef struct _gpgme_op_g13_result *gpgme_g13_result_t; + +/* The container is automatically unmounted when the context is reset + or destroyed. This is a synchronous convenience interface, which + automatically returns an operation error if there is no + transmission error. */ +gpgme_error_t gpgme_op_g13_mount (gpgme_ctx_t ctx, const char *container_file, + const char *mount_dir, int flags); + /* Interface to gpgconf(1). */ -- cgit v1.2.3