aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.h.in
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-04-10 11:01:00 +0000
committerWerner Koch <[email protected]>2014-04-10 11:01:00 +0000
commit4f2d652e60700e03809307a10015ff9003ac3579 (patch)
tree9abc417b8a7ba1fca91c0986e921288480441d84 /src/gpgme.h.in
parentAdd gpgme_get_dirinfo. (diff)
downloadgpgme-4f2d652e60700e03809307a10015ff9003ac3579.tar.gz
gpgme-4f2d652e60700e03809307a10015ff9003ac3579.zip
Add GPGME_PROTOCOL_SPAWN and gpgme_op_spawn.
* src/gpgme.h.in (GPGME_PROTOCOL_SPAWN): New. (GPGME_SPAWN_DETACHED, GPGME_SPAWN_ALLOW_SET_FG): New. * src/gpgme.c (gpgme_set_protocol): Add new protocol. (gpgme_get_protocol_name): Ditto. * src/spawn.c: New. * src/libgpgme.vers, src/gpgme.def: Add new public functions. * src/engine-spawn.c: New. * src/Makefile.am: Add new files. * src/engine-backend.h (struct engine_ops): Add OPSPAWN. * src/engine.c (engine_ops): Add _gpgme_engine_ops_spawn. (gpgme_get_engine_info): Add Spawn to the list of protocols. (_gpgme_engine_op_spawn): New. * src/gpgme-tool.c (gt_protocol_from_name): Add new protocol. (gt_spawn, cmd_spawn): New.
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r--src/gpgme.h.in23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index 050051a4..655602df 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, 2013 g10 Code GmbH
+ 2010, 2011, 2012, 2013, 2014 g10 Code GmbH
This file is part of GPGME.
@@ -354,6 +354,7 @@ typedef enum
GPGME_PROTOCOL_ASSUAN = 3, /* Low-level access to an Assuan server. */
GPGME_PROTOCOL_G13 = 4,
GPGME_PROTOCOL_UISERVER= 5,
+ GPGME_PROTOCOL_SPAWN = 6, /* Direct access to any program. */
GPGME_PROTOCOL_DEFAULT = 254,
GPGME_PROTOCOL_UNKNOWN = 255
}
@@ -1694,6 +1695,26 @@ gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t ctx, gpgme_key_t key,
gpgme_edit_cb_t fnc, void *fnc_value,
gpgme_data_t out);
+
+/* Flags for the spawn operations. */
+#define GPGME_SPAWN_DETACHED 1
+#define GPGME_SPAWN_ALLOW_SET_FG 2
+
+
+/* Run the command FILE with the arguments in ARGV. Connect stdin to
+ DATAIN, stdout to DATAOUT, and STDERR to DATAERR. If one the data
+ streams is NULL, connect to /dev/null instead. */
+gpgme_error_t gpgme_op_spawn_start (gpgme_ctx_t ctx,
+ const char *file, const char *argv[],
+ gpgme_data_t datain,
+ gpgme_data_t dataout, gpgme_data_t dataerr,
+ unsigned int flags);
+gpgme_error_t gpgme_op_spawn (gpgme_ctx_t ctx,
+ const char *file, const char *argv[],
+ gpgme_data_t datain,
+ gpgme_data_t dataout, gpgme_data_t dataerr,
+ unsigned int flags);
+
/* Key management functions. */
struct _gpgme_op_keylist_result