diff options
Diffstat (limited to 'src/context.h')
-rw-r--r-- | src/context.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/context.h b/src/context.h index 076d0731..7333d2d5 100644 --- a/src/context.h +++ b/src/context.h @@ -73,9 +73,10 @@ struct ctx_op_data }; typedef struct ctx_op_data *ctx_op_data_t; + /* The context defines an environment in which crypto operations can - be performed (sequentially). */ + * be performed (sequentially). */ struct gpgme_context { DECLARE_LOCK (lock); @@ -86,6 +87,11 @@ struct gpgme_context * freed and reused. */ uint64_t serial; + /* A link to the next context. We keep all contex object in the + * linked list to so that we are abale to find a context by its + * serial number. */ + gpgme_ctx_t next_ctx; + /* True if the context was canceled asynchronously. */ int canceled; @@ -198,5 +204,13 @@ struct gpgme_context /* Macro to retrieve the serial number. Returns 0 if CTX is NULL. */ #define CTXSERIAL(ctx) (ctx? (unsigned long)ctx->serial : 0) +/*-- gpgme.c --*/ + +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, + gpg_error_t op_err); + + #endif /* CONTEXT_H */ |