diff options
Diffstat (limited to '')
| -rw-r--r-- | src/gpgme.c | 28 | 
1 files changed, 28 insertions, 0 deletions
| diff --git a/src/gpgme.c b/src/gpgme.c index b76b3991..203cd711 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -34,6 +34,7 @@  #include "ops.h"  #include "wait.h"  #include "debug.h" +#include "priv-io.h"  /* The default locale.  */ @@ -428,6 +429,33 @@ gpgme_set_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs)  } +/* This function provides access to the internal read function; it is +   normally not used. */ +ssize_t +gpgme_io_read (int fd, void *buffer, size_t count) +{ +  int ret; + +  ret = _gpgme_io_read (fd, buffer, count); + +  return ret; +} + + +/* This function provides access to the internal write function.  It +   is to be used by user callbacks to return data to gpgme.  See +   gpgme_passphrase_cb_t and gpgme_edit_cb_t.  */ +ssize_t +gpgme_io_write (int fd, const void *buffer, size_t count) +{ +  int ret; + +  ret = _gpgme_io_write (fd, buffer, count); + +  return ret; +} + +  /* This function returns the callback function for I/O.  */  void  gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs) | 
