aboutsummaryrefslogtreecommitdiffstats
path: root/src/context.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-06-13 06:40:33 +0000
committerWerner Koch <[email protected]>2019-06-13 06:40:33 +0000
commit28e620fa169dcbfc2301ae9bea58ebe3ccc3504a (patch)
tree28be2b60116d54a3ba83f8297332bf56e5561728 /src/context.h
parentcore: Use fully correct command args for gpg --verify. (diff)
downloadgpgme-28e620fa169dcbfc2301ae9bea58ebe3ccc3504a.tar.gz
gpgme-28e620fa169dcbfc2301ae9bea58ebe3ccc3504a.zip
core: Refactor the wait code utilizing the new fdtable.
* src/fdtable.c, src/fdtable.h: Largely extend. * src/wait-global.c, src/wait-private.c, src/wait-user.c: Remove and move code to ... * src/wait.c: here. (_gpgme_fd_table_init, fd_table_put): Remove. Do not call them. (_gpgme_add_io_cb, _gpgme_add_io_cb_user): Change to use the fdtable. (_gpgme_remove_io_cb, _gpgme_remove_io_cb_user): Ditto. (_gpgme_wait_global_event_cb): Ditto. (gpgme_wait_ext, _gpgme_wait_on_condition): Ditto. * src/wait.h (struct io_cb_tag_s): Add fields 'serial' and 'desc'. Change 'idx' to 'fd'. (struct fd_table): Remove. * src/context.h (struct gpgme_context): Remoce 'fdt'. Rename io_cbs to user_io_cbs for clarity. * src/engine-gpgsm.c: Unify trace output. (start): Pass a description along with the IO handlers. * src/priv-io.h (struct io_select_fd_s): Rename to io_select_s. (io_select_t): New. * src/gpgme.c (_gpgme_cancel_with_err): Replace arg 'ctx' by 'serial'. (gpgme_cancel): Adjust. -- This is the second part of a larger refactoring of the wait/event code. Does currently only work on Unix and with the private wait functions (i.e. the async operations don't yet work). Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/context.h')
-rw-r--r--src/context.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/context.h b/src/context.h
index 7333d2d5..4142b684 100644
--- a/src/context.h
+++ b/src/context.h
@@ -194,10 +194,8 @@ struct gpgme_context
gpgme_status_cb_t status_cb;
void *status_cb_value;
- /* A list of file descriptors in active use by the current
- operation. */
- struct fd_table fdt;
- struct gpgme_io_cbs io_cbs;
+ /* User specific I/O callbacks. */
+ struct gpgme_io_cbs user_io_cbs;
};
@@ -208,7 +206,7 @@ struct gpgme_context
gpg_error_t _gpgme_get_ctx (uint64_t serial, gpgme_ctx_t *r_ctx);
-gpgme_error_t _gpgme_cancel_with_err (gpgme_ctx_t ctx, gpg_error_t ctx_err,
+gpgme_error_t _gpgme_cancel_with_err (uint64_t serial, gpg_error_t ctx_err,
gpg_error_t op_err);