Postfix3.3.1
smtp_stream.h
[詳解]
1 #ifndef _SMTP_STREAM_H_INCLUDED_
2 #define _SMTP_STREAM_H_INCLUDED_
3 
4 /*++
5 /* NAME
6 /* smtp_stream 3h
7 /* SUMMARY
8 /* smtp stream I/O support
9 /* SYNOPSIS
10 /* #include <smtp_stream.h>
11 /* DESCRIPTION
12 /* .nf
13 
14  /*
15  * System library.
16  */
17 #include <stdarg.h>
18 #include <setjmp.h>
19 
20  /*
21  * Utility library.
22  */
23 #include <vstring.h>
24 #include <vstream.h>
25 
26  /*
27  * External interface. The following codes are meant for use in longjmp(),
28  * so they must all be non-zero.
29  */
30 #define SMTP_ERR_EOF 1 /* unexpected client disconnect */
31 #define SMTP_ERR_TIME 2 /* time out */
32 #define SMTP_ERR_QUIET 3 /* silent cleanup (application) */
33 #define SMTP_ERR_NONE 4 /* non-error case */
34 #define SMTP_ERR_DATA 5 /* application data error */
35 
36 extern void smtp_stream_setup(VSTREAM *, int, int);
37 extern void PRINTFLIKE(2, 3) smtp_printf(VSTREAM *, const char *,...);
38 extern void smtp_flush(VSTREAM *);
39 extern int smtp_fgetc(VSTREAM *);
40 extern int smtp_get(VSTRING *, VSTREAM *, ssize_t, int);
41 extern void smtp_fputs(const char *, ssize_t len, VSTREAM *);
42 extern void smtp_fwrite(const char *, ssize_t len, VSTREAM *);
43 extern void smtp_fputc(int, VSTREAM *);
44 
45 extern void smtp_vprintf(VSTREAM *, const char *, va_list);
46 
47 #define smtp_timeout_setup(stream, timeout) \
48  smtp_stream_setup((stream), (timeout), 0)
49 
50 #define SMTP_GET_FLAG_NONE 0
51 #define SMTP_GET_FLAG_SKIP (1<<0) /* skip over excess input */
52 
53 /* LICENSE
54 /* .ad
55 /* .fi
56 /* The Secure Mailer license must be distributed with this software.
57 /* AUTHOR(S)
58 /* Wietse Venema
59 /* IBM T.J. Watson Research
60 /* P.O. Box 704
61 /* Yorktown Heights, NY 10598, USA
62 /*--*/
63 
64 #endif
int smtp_fgetc(VSTREAM *)
Definition: smtp_stream.c:283
void const char void smtp_flush(VSTREAM *)
Definition: smtp_stream.c:228
void smtp_stream_setup(VSTREAM *, int, int)
Definition: smtp_stream.c:209
void smtp_vprintf(VSTREAM *, const char *, va_list)
Definition: smtp_stream.c:249
void smtp_fputs(const char *, ssize_t len, VSTREAM *)
Definition: smtp_stream.c:383
void smtp_fputc(int, VSTREAM *)
Definition: smtp_stream.c:432
void smtp_printf(VSTREAM *stream, const char *fmt,...)
Definition: smtp_stream.c:272
void smtp_fwrite(const char *, ssize_t len, VSTREAM *)
Definition: smtp_stream.c:408
void PRINTFLIKE(2, 3) smtp_printf(VSTREAM *
int smtp_get(VSTRING *, VSTREAM *, ssize_t, int)
Definition: smtp_stream.c:305