diff options
author | Sam Roberts <sroberts@uniserve.com> | 2001-12-16 19:17:28 +0000 |
---|---|---|
committer | Sam Roberts <sroberts@uniserve.com> | 2001-12-16 19:17:28 +0000 |
commit | fe6f7d3cf6dad6a1d17a33889ca5a3b4ec6a74c4 (patch) | |
tree | b804be807598142a9fcadeaa22e4d8a94ffd6217 | |
parent | d216457b82f63d123ddd468e27d9bfe7bf758c75 (diff) | |
download | mailutils-fe6f7d3cf6dad6a1d17a33889ca5a3b4ec6a74c4.tar.gz mailutils-fe6f7d3cf6dad6a1d17a33889ca5a3b4ec6a74c4.tar.bz2 |
updated - not much text, but at least the args are correct.
-rw-r--r-- | doc/texinfo/stream.texi | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/doc/texinfo/stream.texi b/doc/texinfo/stream.texi index fff2e2352..706af4c36 100644 --- a/doc/texinfo/stream.texi +++ b/doc/texinfo/stream.texi @@ -1,6 +1,8 @@ @code{#include <mailutils/stream.h>} -@deftypefun int stream_create (stream_t *@var{pstream}, int @var{flags}, void *@var{owner}) +These generic flags are interpreted as appropriate to the specific +streams. + @table @code @item MU_STREAM_READ @findex MU_STREAM_READ @@ -16,25 +18,49 @@ The stream is open read and write. The stream is open in append mode for writing. @item MU_STREAM_CREAT @findex MU_STREAM_CREAT -The stream is created. +The stream open will create the underlying resource (such as a file) +if it doesn't exist already. @item MU_STREAM_NONBLOCK @findex MU_STREAM_NONBLOCK The stream is set non blocking. @item MU_STREAM_NO_CHECK @findex MU_STREAM_NO_CHECK Stream is destroyed without checking for the owner. +@item MU_STREAM_NO_CLOSE +@findex MU_STREAM_NO_CLOSE +Stream doesn't close it's underlying resource when it is closed or destroyed. @end table + +@deftypefun int file_stream_create (stream_t *@var{pstream}, const char *@var{filename}, int @var{flags}) +@end deftypefun + +@deftypefun int tcp_stream_create (stream_t *@var{pstream}, const char *@var{host}, int @var{port}, int @var{flags}) +@end deftypefun + +@deftypefun int mapfile_stream_create (stream_t *@var{pstream}, const char *@var{filename}, int @var{flags}) +@end deftypefun + +@deftypefun int memory_stream_create (stream_t *@var{pstream}, const char *@var{filename}, int @var{flags}) +@end deftypefun + +@deftypefun int encoder_stream_create (stream_t *@var{pstream}, stream_t @var{iostream}, const char *@var{encoding}) +@end deftypefun + +@deftypefun int decoder_stream_create (stream_t *@var{pstream}, stream_t @var{iostream}, const char *@var{encoding}) @end deftypefun @deftypefun void stream_destroy (stream_t *@var{pstream}, void *@var{owner}) @end deftypefun -@deftypefun int stream_open (stream_t @var{stream}, const char *@var{name}, int@var{port}, int @var{flag}) +@deftypefun int stream_open (stream_t @var{stream}) @end deftypefun @deftypefun int stream_close (stream_t @var{stream}) @end deftypefun +@deftypefun int stream_is_seekable (stream_t @var{stream}) +@end deftypefun + @deftypefun int stream_get_fd (stream_t @var{stream}, int *@var{pfd}) @end deftypefun @@ -53,9 +79,18 @@ Stream is destroyed without checking for the owner. @deftypefun int stream_write (stream_t @var{stream}, const char *@var{buffer}, size_t @var{buflen}, off_t @var{offset}, size_t *@var{pwriten}) @end deftypefun +@deftypefun int stream_setbufsiz (stream_t @var{stream}, size_t @var{size}) +@end deftypefun + @deftypefun int stream_flush (stream_t @var{stream}) @end deftypefun +These functions will typically only be useful to implementors of streams. + +@deftypefun int stream_create (stream_t *@var{pstream}, int @var{flags}, void *@var{owner}) +Used to implement a new kind of stream. +@end deftypefun + @deftypefun int stream_get_flags (stream_t @var{stream}, int *@var{pflags}) @end deftypefun @@ -72,23 +107,10 @@ Last action was @code{stream_close}. @end table @end deftypefun -@deftypefun int file_stream_create (stream_t *@var{pstream}) -@end deftypefun - -@deftypefun int mapfile_stream_create (stream_t *@var{pstream}) -@end deftypefun - -@deftypefun int encoder_stream_create (stream_t *@var{pstream}, stream_t @var{iostream}, const char *@var{encoding}) -@end deftypefun - -@deftypefun int decoder_stream_create (stream_t *@var{pstream}, stream_t @var{iostream}, const char *@var{encoding}) -@end deftypefun - -@deftypefun int tcp_stream_create (stream_t *@var{pstream}) -@end deftypefun +An example using @code{tcp_stream_create} to make a simple web client: +FIXME: this example won't build anymore. -An example using @code{tcp_stream_create} to make a simple web client: @example #include <stdlib.h> #include <stdio.h> |