aboutsummaryrefslogtreecommitdiffstats
path: root/src/ops.h
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2022-05-04 12:23:42 +0000
committerIngo Klöcker <[email protected]>2022-05-04 12:23:42 +0000
commitf3ca57dfd7af19f9b2fd01616a81dc889707a4d3 (patch)
tree3d958974b5cace276b2ce0da846c6ee63c005362 /src/ops.h
parentcpp: Allow merging the results of two imports (diff)
downloadgpgme-f3ca57dfd7af19f9b2fd01616a81dc889707a4d3.tar.gz
gpgme-f3ca57dfd7af19f9b2fd01616a81dc889707a4d3.zip
core: Handle import status lines during keylist operation
* src/import.c (import_status_handler): Rename to ... (_gpgme_import_status_handler): this. Make non-static. (_gpgme_op_import_init_result): New. (_gpgme_op_import_start, _gpgme_op_import_keys_start, _gpgme_op_receive_keys_start): Call _gpgme_op_import_init_result. * src/keylist.c (keylist_status_handler): Call _gpgme_import_status_handler to handle import status lines. (gpgme_op_keylist_start, gpgme_op_keylist_ext_start): Call _gpgme_op_import_init_result. * src/ops.h (_gpgme_op_import_init_result, _gpgme_import_status_handler): New prototypes. -- If a keylist operation with keylist mode GPGME_KEYLIST_MODE_LOCATE is run, then gpg emits import status lines. Handling those status lines allows users to retrieve the result of a --locate-(external)-keys command. GnuPG-bug-id: 5951
Diffstat (limited to 'src/ops.h')
-rw-r--r--src/ops.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ops.h b/src/ops.h
index 3b9728dd..cde63a4e 100644
--- a/src/ops.h
+++ b/src/ops.h
@@ -192,4 +192,16 @@ gpgme_error_t _gpgme_parse_notation (gpgme_sig_notation_t *notationp,
int type, int pkflags, int len,
char *data);
+
+/* From import.c. */
+
+/* Create an initial op data object for import. Needs to be called
+ once before calling _gpgme_import_status_handler. */
+gpgme_error_t _gpgme_op_import_init_result (gpgme_ctx_t ctx);
+
+/* Process a status line for import operations. */
+gpgme_error_t _gpgme_import_status_handler (void *priv,
+ gpgme_status_code_t code,
+ char *args);
+
#endif /* OPS_H */