1#ifndef _RCPT_BUF_H_INCLUDED_
2#define _RCPT_BUF_H_INCLUDED_
3
4/*++
5/* NAME
6/*	rcpt_buf 3h
7/* SUMMARY
8/*	recipient buffer manager
9/* SYNOPSIS
10/*	#include <rcpt_buf.h>
11/* DESCRIPTION
12/* .nf
13
14 /*
15  * Utility library.
16  */
17#include <vstream.h>
18#include <vstring.h>
19#include <attr.h>
20
21 /*
22  * Global library.
23  */
24#include <recipient_list.h>
25
26 /*
27  * External interface.
28  */
29typedef struct {
30    RECIPIENT rcpt;			/* convenience */
31    VSTRING *address;			/* final recipient */
32    VSTRING *orig_addr;			/* original recipient */
33    VSTRING *dsn_orcpt;			/* dsn original recipient */
34    int     dsn_notify;			/* DSN notify flags */
35    long    offset;			/* REC_TYPE_RCPT byte */
36} RCPT_BUF;
37
38extern RCPT_BUF *rcpb_create(void);
39extern void rcpb_reset(RCPT_BUF *);
40extern void rcpb_free(RCPT_BUF *);
41extern int rcpb_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
42
43#define RECIPIENT_FROM_RCPT_BUF(buf) \
44    ((buf)->rcpt.address = vstring_str((buf)->address), \
45     (buf)->rcpt.orig_addr = vstring_str((buf)->orig_addr), \
46     (buf)->rcpt.dsn_orcpt = vstring_str((buf)->dsn_orcpt), \
47     (buf)->rcpt.dsn_notify = (buf)->dsn_notify, \
48     (buf)->rcpt.offset = (buf)->offset, \
49     &(buf)->rcpt)
50
51/* LICENSE
52/* .ad
53/* .fi
54/*	The Secure Mailer license must be distributed with this software.
55/* AUTHOR(S)
56/*	Wietse Venema
57/*	IBM T.J. Watson Research
58/*	P.O. Box 704
59/*	Yorktown Heights, NY 10598, USA
60/*--*/
61
62#endif
63