aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-07-19 07:50:30 +0000
committerWerner Koch <[email protected]>2018-07-19 07:51:45 +0000
commitf42cd70f18d53df47cc2d027bade736377d39b71 (patch)
treeb469244807ce0d6ddf7ef751edaa268a9ccbbb16 /doc
parentjson: Fix memleak in native msging repl (diff)
downloadgpgme-f42cd70f18d53df47cc2d027bade736377d39b71.tar.gz
gpgme-f42cd70f18d53df47cc2d027bade736377d39b71.zip
core: New interface gpgme_data_new_from_estream.
* src/gpgme.h.in (gpgme_data_new_from_estream): New. * src/data-estream.c: New. * src/data.h (gpgme_data): New union member e_stream. -- The estream functions (gpgrt_fopen et al.) are any waypart of the required libgpg-error library and thus it makes sense to provide this convenience interface. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r--doc/gpgme.texi19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 38d34809..aff72405 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -1909,6 +1909,25 @@ data object was successfully created, and @code{GPG_ERR_ENOMEM} if not
enough memory is available.
@end deftypefun
+@deftypefun gpgme_error_t gpgme_data_new_from_estream (@w{gpgme_data_t *@var{dh}}, @w{gpgrt_stream_t @var{stream}})
+The function @code{gpgme_data_new_from_estream} creates a new
+@code{gpgme_data_t} object and uses the gpgrt stream @var{stream} to read
+from (if used as an input data object) and write to (if used as an
+output data object).
+
+When using the data object as an input buffer, the function might read
+a bit more from the stream than is actually needed by the crypto
+engine in the desired operation because of internal buffering.
+
+Note that GPGME assumes that the stream is in blocking mode. Errors
+during I/O operations, except for EINTR, are usually fatal for crypto
+operations.
+
+The function returns the error code @code{GPG_ERR_NO_ERROR} if the
+data object was successfully created, and @code{GPG_ERR_ENOMEM} if not
+enough memory is available.
+@end deftypefun
+
@node Callback Based Data Buffers
@subsection Callback Based Data Buffers