#ifndef _MAIL_STREAM_H_INCLUDED_
#define _MAIL_STREAM_H_INCLUDED_
#include <vstream.h>
#include <vstring.h>
typedef struct MAIL_STREAM MAIL_STREAM;
typedef int (*MAIL_STREAM_FINISH_FN) (MAIL_STREAM *, VSTRING *);
typedef int (*MAIL_STREAM_CLOSE_FN) (VSTREAM *);
struct MAIL_STREAM {
VSTREAM *stream;
char *queue;
char *id;
MAIL_STREAM_FINISH_FN finish;
MAIL_STREAM_CLOSE_FN close;
char *class;
char *service;
int mode;
};
extern MAIL_STREAM *mail_stream_file(const char *, const char *, const char *, int);
extern MAIL_STREAM *mail_stream_service(const char *, const char *);
extern MAIL_STREAM *mail_stream_command(const char *);
extern void mail_stream_cleanup(MAIL_STREAM *);
extern int mail_stream_finish(MAIL_STREAM *, VSTRING *);
#endif