~ubuntu-branches/ubuntu/trusty/postfix/trusty-updates

« back to all changes in this revision

Viewing changes to src/global/mime_state.h

Tags: upstream-2.3.1
ImportĀ upstreamĀ versionĀ 2.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
  */
27
27
typedef struct MIME_STATE MIME_STATE;
28
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);
 
29
typedef void (*MIME_STATE_BODY_OUT) (void *, int, const char *, ssize_t, off_t);
30
30
typedef void (*MIME_STATE_ANY_END) (void *);
31
 
typedef void (*MIME_STATE_ERR_PRINT) (void *, int, const char *);
 
31
typedef void (*MIME_STATE_ERR_PRINT) (void *, int, const char *, ssize_t);
32
32
 
33
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);
 
34
extern int mime_state_update(MIME_STATE *, int, const char *, ssize_t);
35
35
extern MIME_STATE *mime_state_free(MIME_STATE *);
36
 
extern const char *mime_state_error(int);
37
36
 
38
37
 /*
39
38
  * Processing options.
58
57
 /*
59
58
  * Processing errors, not necessarily lethal.
60
59
  */
 
60
typedef struct {
 
61
    const int code;                     /* internal error code */
 
62
    const char *dsn;                    /* RFC 3463 */
 
63
    const char *text;                   /* descriptive text */
 
64
} MIME_STATE_DETAIL;
 
65
 
61
66
#define MIME_ERR_NESTING                (1<<0)
62
67
#define MIME_ERR_TRUNC_HEADER           (1<<1)
63
68
#define MIME_ERR_8BIT_IN_HEADER         (1<<2)
64
69
#define MIME_ERR_8BIT_IN_7BIT_BODY      (1<<3)
65
70
#define MIME_ERR_ENCODING_DOMAIN        (1<<4)
66
71
 
 
72
extern MIME_STATE_DETAIL *mime_state_detail(int);
 
73
extern const char *mime_state_error(int);
 
74
 
67
75
 /*
68
76
  * Header classes. Look at the header_opts argument to find out if something
69
77
  * is a MIME header in a primary or nested section.