X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2699a55464f7b43171c7b0e64d095640904e9e21..f2b31075364c17574955493ec5effa7baa12ee24:/src/gnutls.h diff --git a/src/gnutls.h b/src/gnutls.h index 2669317e97..83eeb7247e 100644 --- a/src/gnutls.h +++ b/src/gnutls.h @@ -1,5 +1,5 @@ /* GnuTLS glue for GNU Emacs. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2011 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see . */ #ifdef HAVE_GNUTLS #include +#include typedef enum { @@ -28,6 +29,7 @@ typedef enum GNUTLS_STAGE_EMPTY = 0, GNUTLS_STAGE_CRED_ALLOC, GNUTLS_STAGE_FILES, + GNUTLS_STAGE_CALLBACKS, GNUTLS_STAGE_INIT, GNUTLS_STAGE_PRIORITY, GNUTLS_STAGE_CRED_SET, @@ -40,6 +42,7 @@ typedef enum GNUTLS_STAGE_READY, } gnutls_initstage_t; +#define GNUTLS_EMACS_ERROR_NOT_LOADED GNUTLS_E_APPLICATION_ERROR_MIN + 1 #define GNUTLS_EMACS_ERROR_INVALID_TYPE GNUTLS_E_APPLICATION_ERROR_MIN #define GNUTLS_INITSTAGE(proc) (XPROCESS (proc)->gnutls_initstage) @@ -50,15 +53,16 @@ typedef enum #define GNUTLS_LOG2(level, max, string, extra) if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); } -int -emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf, - unsigned int nbyte); -int -emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf, - unsigned int nbyte); +extern ptrdiff_t +emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t nbyte); +extern ptrdiff_t +emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte); + +extern int emacs_gnutls_record_check_pending (gnutls_session_t state); +extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err); extern void syms_of_gnutls (void); -#endif +#endif #endif