~ubuntu-branches/ubuntu/dapper/postfix/dapper-security

« back to all changes in this revision

Viewing changes to src/global/mime_state.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-02-27 09:33:07 UTC
  • Revision ID: james.westby@ubuntu.com-20050227093307-cn789t27ibnlh6tf
Tags: upstream-2.1.5
ImportĀ upstreamĀ versionĀ 2.1.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _MIME_STATE_H_INCLUDED_
 
2
#define _MIME_STATE_H_INCLUDED_
 
3
 
 
4
/*++
 
5
/* NAME
 
6
/*      mime_state 3h
 
7
/* SUMMARY
 
8
/*      MIME parser state engine
 
9
/* SYNOPSIS
 
10
/*      #include "mime_state.h"
 
11
 DESCRIPTION
 
12
 .nf
 
13
 
 
14
 /*
 
15
  * Utility library.
 
16
  */
 
17
#include <vstring.h>
 
18
 
 
19
 /*
 
20
  * Global library.
 
21
  */
 
22
#include <header_opts.h>
 
23
 
 
24
 /*
 
25
  * External interface. All MIME_STATE structure members are private.
 
26
  */
 
27
typedef struct MIME_STATE MIME_STATE;
 
28
typedef void (*MIME_STATE_HEAD_OUT) (void *, int, HEADER_OPTS *, VSTRING *, off_t);
 
29
typedef void (*MIME_STATE_BODY_OUT) (void *, int, const char *, int, off_t);
 
30
typedef void (*MIME_STATE_ANY_END) (void *);
 
31
typedef void (*MIME_STATE_ERR_PRINT) (void *, int, const char *);
 
32
 
 
33
extern MIME_STATE *mime_state_alloc(int, MIME_STATE_HEAD_OUT, MIME_STATE_ANY_END, MIME_STATE_BODY_OUT, MIME_STATE_ANY_END, MIME_STATE_ERR_PRINT, void *);
 
34
extern int mime_state_update(MIME_STATE *, int, const char *, int);
 
35
extern MIME_STATE *mime_state_free(MIME_STATE *);
 
36
extern const char *mime_state_error(int);
 
37
 
 
38
 /*
 
39
  * Processing options.
 
40
  */
 
41
#define MIME_OPT_NONE                           (0)
 
42
#define MIME_OPT_DOWNGRADE                      (1<<0)
 
43
#define MIME_OPT_REPORT_8BIT_IN_7BIT_BODY       (1<<1)
 
44
#define MIME_OPT_REPORT_8BIT_IN_HEADER          (1<<2)
 
45
#define MIME_OPT_REPORT_ENCODING_DOMAIN         (1<<3)
 
46
#define MIME_OPT_RECURSE_ALL_MESSAGE            (1<<4)
 
47
#define MIME_OPT_REPORT_TRUNC_HEADER            (1<<5)
 
48
#define MIME_OPT_DISABLE_MIME                   (1<<6)
 
49
#define MIME_OPT_REPORT_NESTING                 (1<<7)
 
50
 
 
51
 /*
 
52
  * Body encoding domains.
 
53
  */
 
54
#define MIME_ENC_7BIT   (7)
 
55
#define MIME_ENC_8BIT   (8)
 
56
#define MIME_ENC_BINARY (9)
 
57
 
 
58
 /*
 
59
  * Processing errors, not necessarily lethal.
 
60
  */
 
61
#define MIME_ERR_NESTING                (1<<0)
 
62
#define MIME_ERR_TRUNC_HEADER           (1<<1)
 
63
#define MIME_ERR_8BIT_IN_HEADER         (1<<2)
 
64
#define MIME_ERR_8BIT_IN_7BIT_BODY      (1<<3)
 
65
#define MIME_ERR_ENCODING_DOMAIN        (1<<4)
 
66
 
 
67
 /*
 
68
  * Header classes. Look at the header_opts argument to find out if something
 
69
  * is a MIME header in a primary or nested section.
 
70
  */
 
71
#define MIME_HDR_PRIMARY        (1)     /* initial headers */
 
72
#define MIME_HDR_MULTIPART      (2)     /* headers after multipart boundary */
 
73
#define MIME_HDR_NESTED         (3)     /* attached message initial headers */
 
74
 
 
75
/* LICENSE
 
76
/* .ad
 
77
/* .fi
 
78
/*      The Secure Mailer license must be distributed with this software.
 
79
/* AUTHOR(S)
 
80
/*      Wietse Venema
 
81
/*      IBM T.J. Watson Research
 
82
/*      P.O. Box 704
 
83
/*      Yorktown Heights, NY 10598, USA
 
84
/*--*/
 
85
 
 
86
#endif