NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
mime.h
Go to the documentation of this file.
1
22
23
#ifndef MUTT_EMAIL_MIME_H
24
#define MUTT_EMAIL_MIME_H
25
29
enum
ContentType
30
{
31
TYPE_OTHER
,
32
TYPE_AUDIO
,
33
TYPE_APPLICATION
,
34
TYPE_IMAGE
,
35
TYPE_MESSAGE
,
36
TYPE_MODEL
,
37
TYPE_MULTIPART
,
38
TYPE_TEXT
,
39
TYPE_VIDEO
,
40
TYPE_ANY
,
41
};
42
46
enum
ContentEncoding
47
{
48
ENC_OTHER
,
49
ENC_7BIT
,
50
ENC_8BIT
,
51
ENC_QUOTED_PRINTABLE
,
52
ENC_BASE64
,
53
ENC_BINARY
,
54
ENC_UUENCODED
,
55
};
56
60
enum
ContentDisposition
61
{
62
DISP_INLINE
,
63
DISP_ATTACH
,
64
DISP_FORM_DATA
,
65
DISP_NONE
,
66
};
67
69
#define MUTT_MIME_MAX_DEPTH 50
71
#define MUTT_MIME_MAX_PARTS 500
72
73
/* MIME encoding/decoding global vars */
74
75
extern
const
int
IndexHex
[128];
76
extern
const
char
*
const
BodyTypes
[];
77
extern
const
char
*
const
BodyEncodings
[];
78
extern
const
char
MimeSpecials
[];
79
81
#define hexval(ch) IndexHex[(unsigned int) (ch)]
82
84
#define is_multipart(body) \
85
(((body)->type == TYPE_MULTIPART) || \
86
(((body)->type == TYPE_MESSAGE) && ((body)->subtype) && \
87
((strcasecmp((body)->subtype, "rfc822") == 0) || \
88
(strcasecmp((body)->subtype, "news") == 0) || \
89
(strcasecmp((body)->subtype, "global") == 0))))
90
92
#define BODY_TYPE(body) \
93
(((body)->type == TYPE_OTHER) && (body)->xtype ? (body)->xtype : \
94
BodyTypes[((body)->type)])
95
97
#define ENCODING(x) BodyEncodings[(x)]
98
99
#endif
/* MUTT_EMAIL_MIME_H */
MimeSpecials
const char MimeSpecials[]
Characters that need special treatment in MIME.
Definition
mime.c:69
BodyTypes
const char *const BodyTypes[]
Common MIME body types.
Definition
mime.c:51
IndexHex
const int IndexHex[128]
Lookup table for ASCII hex digits.
Definition
mime.c:35
BodyEncodings
const char *const BodyEncodings[]
Common MIME body encodings.
Definition
mime.c:59
ContentEncoding
ContentEncoding
Content-Transfer-Encoding.
Definition
mime.h:47
ENC_7BIT
@ ENC_7BIT
7-bit text
Definition
mime.h:49
ENC_UUENCODED
@ ENC_UUENCODED
UUEncoded text.
Definition
mime.h:54
ENC_OTHER
@ ENC_OTHER
Encoding unknown.
Definition
mime.h:48
ENC_BINARY
@ ENC_BINARY
Binary.
Definition
mime.h:53
ENC_BASE64
@ ENC_BASE64
Base-64 encoded text.
Definition
mime.h:52
ENC_8BIT
@ ENC_8BIT
8-bit text
Definition
mime.h:50
ENC_QUOTED_PRINTABLE
@ ENC_QUOTED_PRINTABLE
Quoted-printable text.
Definition
mime.h:51
ContentType
ContentType
Content-Type.
Definition
mime.h:30
TYPE_AUDIO
@ TYPE_AUDIO
Type: 'audio/*'.
Definition
mime.h:32
TYPE_IMAGE
@ TYPE_IMAGE
Type: 'image/*'.
Definition
mime.h:34
TYPE_OTHER
@ TYPE_OTHER
Unknown Content-Type.
Definition
mime.h:31
TYPE_MESSAGE
@ TYPE_MESSAGE
Type: 'message/*'.
Definition
mime.h:35
TYPE_MODEL
@ TYPE_MODEL
Type: 'model/*'.
Definition
mime.h:36
TYPE_MULTIPART
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition
mime.h:37
TYPE_APPLICATION
@ TYPE_APPLICATION
Type: 'application/*'.
Definition
mime.h:33
TYPE_TEXT
@ TYPE_TEXT
Type: 'text/*'.
Definition
mime.h:38
TYPE_ANY
@ TYPE_ANY
Type: '' or '.'.
Definition
mime.h:40
TYPE_VIDEO
@ TYPE_VIDEO
Type: 'video/*'.
Definition
mime.h:39
ContentDisposition
ContentDisposition
Content-Disposition values.
Definition
mime.h:61
DISP_ATTACH
@ DISP_ATTACH
Content is attached.
Definition
mime.h:63
DISP_INLINE
@ DISP_INLINE
Content is inline.
Definition
mime.h:62
DISP_NONE
@ DISP_NONE
No preferred disposition.
Definition
mime.h:65
DISP_FORM_DATA
@ DISP_FORM_DATA
Content is form-data.
Definition
mime.h:64