Mercurial > hg > xemacs-beta
diff src/lstream.h @ 5923:61d7d7bcbe76 cygwin
merged heads after pull -u
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Thu, 05 Feb 2015 17:19:05 +0000 |
parents | a216b3c2b09e |
children |
line wrap: on
line diff
--- a/src/lstream.h Wed Apr 23 22:22:37 2014 +0100 +++ b/src/lstream.h Thu Feb 05 17:19:05 2015 +0000 @@ -24,6 +24,8 @@ #ifndef INCLUDED_lstream_h_ #define INCLUDED_lstream_h_ +#include "tls.h" + /************************************************************************/ /* definition of Lstream object */ /************************************************************************/ @@ -174,6 +176,10 @@ in an attempt to block (EWOULDBLOCK). If this method does not exists, the implementation returns 0 */ int (*was_blocked_p) (Lstream *stream); + /* If the reader or writer method returned LSTREAM_ERROR, the errno + associated with the error, or zero if there was no system error or this + method is not implemented. */ + int (*error) (Lstream *stream); /* Rewind the stream. If this is NULL, the stream is not seekable. */ int (*rewinder) (Lstream *stream); /* Indicate whether this stream is seekable -- i.e. it can be rewound. @@ -204,6 +210,12 @@ /* Mark this object for garbage collection. Same semantics as a standard Lisp_Object marker. This function can be NULL. */ Lisp_Object (*marker) (Lisp_Object lstream); + /* Return nonzero if this stream is using a TLS connection */ + int (*tls_p) (Lstream *stream); + /* Perform STARTTLS negotiation on a pair of streams, one for input and one + for output. Both are transformed if negotiation is successful. */ + int (*tls_negotiater) (Lstream *instream, Lstream *outstream, + const Extbyte *host, Lisp_Object keylist); } Lstream_implementation; #define DEFINE_LSTREAM_IMPLEMENTATION(name, c_name) \ @@ -306,6 +318,7 @@ Charcount Lstream_character_tell (Lstream *); int Lstream_write (Lstream *lstr, const void *data, Bytecount size); +int Lstream_errno (Lstream *lstr); int Lstream_was_blocked_p (Lstream *lstr); void Lstream_unread (Lstream *lstr, const void *data, Bytecount size); int Lstream_rewind (Lstream *lstr); @@ -313,6 +326,10 @@ int Lstream_close (Lstream *lstr); int Lstream_close_noflush (Lstream *lstr); +int Lstream_tls_p (Lstream *lstr); +int Lstream_tls_negotiate (Lstream *instr, Lstream *outstr, + const Extbyte *host, Lisp_Object keylist); + void Lstream_delete (Lstream *lstr); void Lstream_set_character_mode (Lstream *str); void Lstream_unset_character_mode (Lstream *lstr); @@ -459,9 +476,9 @@ Lisp_Object make_stdio_input_stream (FILE *stream, int flags); Lisp_Object make_stdio_output_stream (FILE *stream, int flags); Lisp_Object make_filedesc_input_stream (int filedesc, int offset, int count, - int flags); + int flags, tls_state_t *state); Lisp_Object make_filedesc_output_stream (int filedesc, int offset, int count, - int flags); + int flags, tls_state_t *state); void filedesc_stream_set_pty_flushing (Lstream *stream, int pty_max_bytes, Ibyte eof_char);