No empty .Rs/.Re
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / header_body_checks.h
blob3e7c7803c180312bf8c637f6517118fd942ad02c
1 /* $NetBSD$ */
3 #ifndef _HBC_H_INCLUDED_
4 #define _HBC_H_INCLUDED_
6 /*++
7 /* NAME
8 /* header_body_checks 3h
9 /* SUMMARY
10 /* delivery agent header/body checks
11 /* SYNOPSIS
12 /* #include <header_body_checks.h>
13 /* DESCRIPTION
14 /* .nf
17 * Global library.
19 #include <mime_state.h>
20 #include <maps.h>
23 * Postfix < 2.5 compatibility.
25 #ifndef MIME_HDR_FIRST
26 #define MIME_HDR_FIRST (1)
27 #define MIME_HDR_LAST (3)
28 #endif
31 * External interface.
33 typedef struct {
34 const char *map_class; /* parameter name */
35 MAPS *maps; /* map handle */
36 } HBC_MAP_INFO;
38 typedef struct {
39 void (*logger) (void *, const char *, const char *, const char *, const char *);
40 void (*prepend) (void *, int, const char *, ssize_t, off_t);
41 char *(*extend) (void *, const char *, int, const char *, const char *, const char *, ssize_t, off_t);
42 } HBC_CALL_BACKS;
44 typedef struct {
45 HBC_CALL_BACKS *call_backs;
46 HBC_MAP_INFO map_info[1]; /* actually, a bunch */
47 } HBC_CHECKS;
49 #define HBC_CHECKS_STAT_IGNORE ((char *) 0)
50 #define HBC_CHECKS_STAT_UNKNOWN (&hbc_checks_unknown)
52 extern HBC_CHECKS *hbc_header_checks_create(const char *, const char *,
53 const char *, const char *,
54 const char *, const char *,
55 HBC_CALL_BACKS *);
56 extern HBC_CHECKS *hbc_body_checks_create(const char *, const char *,
57 HBC_CALL_BACKS *);
58 extern char *hbc_header_checks(void *, HBC_CHECKS *, int, const HEADER_OPTS *,
59 VSTRING *, off_t);
60 extern char *hbc_body_checks(void *, HBC_CHECKS *, const char *, ssize_t, off_t);
62 #define hbc_header_checks_free(hbc) _hbc_checks_free((hbc), HBC_HEADER_SIZE)
63 #define hbc_body_checks_free(hbc) _hbc_checks_free((hbc), 1)
66 * The following are NOT part of the external API.
68 #define HBC_HEADER_SIZE (MIME_HDR_LAST - MIME_HDR_FIRST + 1)
69 extern void _hbc_checks_free(HBC_CHECKS *, ssize_t);
70 extern const char hbc_checks_unknown;
72 /* LICENSE
73 /* .ad
74 /* .fi
75 /* The Secure Mailer license must be distributed with this software.
76 /* AUTHOR(S)
77 /* Wietse Venema
78 /* IBM T.J. Watson Research
79 /* P.O. Box 704
80 /* Yorktown Heights, NY 10598, USA
81 /*--*/
83 #endif