core: Add gpgme_op_query_swdb and helper.
authorWerner Koch <wk@gnupg.org>
Thu, 3 Nov 2016 15:29:45 +0000 (16:29 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 3 Nov 2016 16:32:30 +0000 (17:32 +0100)
commitaad94cb7c313d4501bed748f48830cbb93c67e20
tree86fe8e503361c4f1b48a0acbfbdc8dfb8e622c64
parent34a4e8017be452e8ead6b9c2da84be1ec7929cae
core: Add gpgme_op_query_swdb and helper.

* src/gpgme.h.in (gpgme_query_swdb_result_t): New.
(gpgme_op_query_swdb): New.
(gpgme_op_query_swdb_result): New.
* src/libgpgme.vers, src/gpgme.def: Add the two new functions.
* src/queryswdb.c: New.
* src/Makefile.am (main_sources): Add new file.
* src/context.h (OPDATA_QUERY_SWDB): New.
* src/engine-backend.h (struct engine_ops): Add field 'query_swdb'.
Adjust all initializer.
* src/engine.c (_gpgme_engine_op_query_swdb): New.
* src/engine-gpgconf.c (parse_swdb_line): New.
(gpgconf_query_swdb): New.
(_gpgme_engine_ops_gpgconf): Register that function.

* src/util.h (GPG_ERR_TOO_OLD): Define for older libgpg-error.
(GPG_ERR_ENGINE_TOO_OLD): Ditto.

* tests/run-swdb.c: New.
* tests/Makefile.am (noinst_PROGRAMS): Add new debug tool.

Signed-off-by: Werner Koch <wk@gnupg.org>
22 files changed:
NEWS
doc/gpgme.texi
src/Makefile.am
src/context.h
src/engine-assuan.c
src/engine-backend.h
src/engine-g13.c
src/engine-gpg.c
src/engine-gpgconf.c
src/engine-gpgsm.c
src/engine-spawn.c
src/engine-uiserver.c
src/engine.c
src/engine.h
src/gpgconf.c
src/gpgme.def
src/gpgme.h.in
src/libgpgme.vers
src/queryswdb.c [new file with mode: 0644]
src/util.h
tests/Makefile.am
tests/run-swdb.c [new file with mode: 0644]