3 #ifndef _MAIL_STREAM_H_INCLUDED_
4 #define _MAIL_STREAM_H_INCLUDED_
10 /* mail stream management
12 /* #include <mail_stream.h>
30 typedef struct MAIL_STREAM MAIL_STREAM
;
32 typedef int (*MAIL_STREAM_FINISH_FN
) (MAIL_STREAM
*, VSTRING
*);
33 typedef int (*MAIL_STREAM_CLOSE_FN
) (VSTREAM
*);
36 VSTREAM
*stream
; /* file or pipe or socket */
37 char *queue
; /* (initial) queue name */
38 char *id
; /* queue id */
39 MAIL_STREAM_FINISH_FN finish
; /* finish code */
40 MAIL_STREAM_CLOSE_FN close
; /* close stream */
41 char *class; /* trigger class */
42 char *service
; /* trigger service */
43 int mode
; /* additional permissions */
45 int delay
; /* deferred delivery */
47 struct timeval ctime
; /* creation time */
50 #define MAIL_STREAM_CTL_END 0 /* Terminator */
51 #define MAIL_STREAM_CTL_QUEUE 1 /* Change queue */
52 #define MAIL_STREAM_CTL_CLASS 2 /* Change notification class */
53 #define MAIL_STREAM_CTL_SERVICE 3 /* Change notification service */
54 #define MAIL_STREAM_CTL_MODE 4 /* Change final queue file mode */
56 #define MAIL_STREAM_CTL_DELAY 5 /* Change final queue file mtime */
59 extern MAIL_STREAM
*mail_stream_file(const char *, const char *, const char *, int);
60 extern MAIL_STREAM
*mail_stream_service(const char *, const char *);
61 extern MAIL_STREAM
*mail_stream_command(const char *);
62 extern void mail_stream_cleanup(MAIL_STREAM
*);
63 extern int mail_stream_finish(MAIL_STREAM
*, VSTRING
*);
64 extern void mail_stream_ctl(MAIL_STREAM
*, int,...);
70 /* The Secure Mailer license must be distributed with this software.
73 /* IBM T.J. Watson Research
75 /* Yorktown Heights, NY 10598, USA