From 8b57f06e0c04f5c9b87a3c76618230d757412076 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 24 May 2016 15:14:53 +0200 Subject: python: Support status callbacks. * lang/python/helpers.c (pyStatusCb): New function. (pygpgme_set_status_cb): Likewise. * lang/python/helpers.h (pygpgme_set_status_cb): New prototype. * lang/python/pyme/core.py (Context.__init__): Initialize 'last_statuscb'. (Context._free_statuscb): New function. (Context.set_status_cb): Likewise. * lang/python/tests/t-callbacks.py: Test status callbacks. Signed-off-by: Justus Winter --- lang/python/helpers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lang/python/helpers.h') diff --git a/lang/python/helpers.h b/lang/python/helpers.h index 4bd8ef81..5dd88a06 100644 --- a/lang/python/helpers.h +++ b/lang/python/helpers.h @@ -35,6 +35,8 @@ PyObject *pygpgme_raise_callback_exception(PyObject *self); void pygpgme_set_passphrase_cb(gpgme_ctx_t ctx, PyObject *cb, PyObject **freelater); void pygpgme_set_progress_cb(gpgme_ctx_t ctx, PyObject *cb, PyObject **freelater); +void pygpgme_set_status_cb(gpgme_ctx_t ctx, PyObject *cb, + PyObject **freelater); gpgme_error_t pyEditCb(void *opaque, gpgme_status_code_t status, const char *args, int fd); -- cgit v1.2.3