aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBen Kibbey <[email protected]>2015-07-16 01:41:15 +0000
committerBen Kibbey <[email protected]>2015-07-17 01:10:48 +0000
commit259b61f73cb40fd3cb7da21cba4b1a69bfa2da78 (patch)
tree046ca71e0b6d5ab0834407875175ed587a23bdab /doc
parentPost release updates (diff)
downloadgpgme-bjk/custom-engine-options.tar.gz
gpgme-bjk/custom-engine-options.zip
Add per-ctx custom engine options.bjk/custom-engine-options
* src/gpgme.h.in (gpgme_ctx_set_engine_options): New prototype. (gpgme_ctx_get_engine_options): Ditto. * src/engine-backend.h (engine_ops): Add set_options and get_options. * src/engine.c (gpgme_ctx_set_engine_options): New. (gpgme_ctx_get_engine_options): Ditto. * src/engine-gpg.c (gpg_set_options): New. (gpg_get_options): Ditto. * src/op-support.c (_gpgme_op_reset): Keep custom options. * src/engine-gpg.c (_gpgme_engine_ops_gpg): Adjust for new members. * src/engine-assuan.c (_gpgme_engine_ops_assuan): Ditto. * src/engine-g13.c (_gpgme_engine_ops_g13): Ditto. * src/engine-gpgconf.c (_gpgme_engine_ops_gpgconf): Ditto. * src/engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Ditto. * src/engine-spawn.c (_gpgme_engine_ops_spawn): Ditto. * src/engine-uiserver.c (_gpgme_engine_ops_uiserver): Ditto. * src/gpgme.def: Export new symbols. * src/libgpgme.vers: Ditto. * doc/gpgme.texi: Document these new functions. -- Not all of gpg2's features are exposed to libgpgme and adding these functions makes it possible to do things like specify an --s2k-count, etc.
Diffstat (limited to 'doc')
-rw-r--r--doc/gpgme.texi25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 45c359d0..b3aa369f 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -187,6 +187,7 @@ Context Attributes
* Protocol Selection:: Selecting the protocol used by a context.
* Crypto Engine:: Configuring the crypto engine.
+* Custom Engine Options:: Adding command line options to an engine.
* ASCII Armor:: Requesting @acronym{ASCII} armored output.
* Text Mode:: Choosing canonical text mode.
* Included Certificates:: Including a number of certificates.
@@ -2283,6 +2284,7 @@ started. In fact, these references are accessed through the
@menu
* Protocol Selection:: Selecting the protocol used by a context.
* Crypto Engine:: Configuring the crypto engine.
+* Custom Engine Options:: Adding command line options to an engine.
* ASCII Armor:: Requesting @acronym{ASCII} armored output.
* Text Mode:: Choosing canonical text mode.
* Included Certificates:: Including a number of certificates.
@@ -2362,6 +2364,29 @@ successful, or an eror code on failure.
@end deftypefun
+@node Custom Engine Options
+@subsection Custom Engine Options
+@cindex context, configuring engine
+@cindex engine, configuration per context
+
+Since not all features of all engines may be exposed by @acronym{GPGME},
+additional command line arguments may be needed to allow the wanted
+functionality.
+
+@deftypefun gpgme_error_t gpgme_ctx_set_engine_options (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{options}})
+The function @code{gpgme_ctx_set_engine_options} sets command line options for
+the configured engine in context @var{ctx} to @var{options}. The options are
+passed upon each op call and may be reset by setting @var{options} to
+@code{NULL}. This function returns @code{0} on success or an error on failure.
+@end deftypefun
+
+@deftypefun gpgme_error_t gpgme_ctx_get_engine_options (@w{gpgme_ctx_t @var{ctx}}, @w{char ** @var{result}})
+The function @code{gpgme_ctx_get_engine_options} returns the previously set
+engine options in @var{result}. This function returns @code{0} on success or
+an error on failure.
+@end deftypefun
+
+
@c FIXME: Unfortunately, using @acronym here breaks texi2dvi.
@node ASCII Armor
@subsection @acronym{ASCII} Armor