NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mime.h File Reference

Constants and macros for managing MIME encoding. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MUTT_MIME_MAX_DEPTH   50
 
#define MUTT_MIME_MAX_PARTS   500
 
#define hexval(ch)   IndexHex[(unsigned int) (ch)]
 
#define is_multipart(body)
 
#define TYPE(body)    ((body->type == TYPE_OTHER) && body->xtype ? body->xtype : BodyTypes[(body->type)])
 
#define ENCODING(x)   BodyEncodings[(x)]
 

Enumerations

enum  ContentType {
  TYPE_OTHER , TYPE_AUDIO , TYPE_APPLICATION , TYPE_IMAGE ,
  TYPE_MESSAGE , TYPE_MODEL , TYPE_MULTIPART , TYPE_TEXT ,
  TYPE_VIDEO , TYPE_ANY
}
 Content-Type. More...
 
enum  ContentEncoding {
  ENC_OTHER , ENC_7BIT , ENC_8BIT , ENC_QUOTED_PRINTABLE ,
  ENC_BASE64 , ENC_BINARY , ENC_UUENCODED
}
 Content-Transfer-Encoding. More...
 
enum  ContentDisposition { DISP_INLINE , DISP_ATTACH , DISP_FORM_DATA , DISP_NONE }
 Content-Disposition values. More...
 

Variables

const int IndexHex [128]
 Lookup table for ASCII hex digits.
 
const char *const BodyTypes []
 Common MIME body types.
 
const char *const BodyEncodings []
 Common MIME body encodings.
 
const char MimeSpecials []
 Characters that need special treatment in MIME.
 

Detailed Description

Constants and macros for managing MIME encoding.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file mime.h.

Macro Definition Documentation

◆ MUTT_MIME_MAX_DEPTH

#define MUTT_MIME_MAX_DEPTH   50

Definition at line 69 of file mime.h.

◆ MUTT_MIME_MAX_PARTS

#define MUTT_MIME_MAX_PARTS   500

Definition at line 70 of file mime.h.

◆ hexval

#define hexval (   ch)    IndexHex[(unsigned int) (ch)]

Definition at line 80 of file mime.h.

◆ is_multipart

#define is_multipart (   body)
Value:
(((body)->type == TYPE_MULTIPART) || \
(((body)->type == TYPE_MESSAGE) && ((body)->subtype) && \
((strcasecmp((body)->subtype, "rfc822") == 0) || \
(strcasecmp((body)->subtype, "news") == 0) || \
(strcasecmp((body)->subtype, "global") == 0))))
@ TYPE_MESSAGE
Type: 'message/*'.
Definition: mime.h:35
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition: mime.h:37

Definition at line 82 of file mime.h.

◆ TYPE

#define TYPE (   body)     ((body->type == TYPE_OTHER) && body->xtype ? body->xtype : BodyTypes[(body->type)])

Definition at line 89 of file mime.h.

◆ ENCODING

#define ENCODING (   x)    BodyEncodings[(x)]

Definition at line 92 of file mime.h.

Enumeration Type Documentation

◆ ContentType

Content-Type.

Enumerator
TYPE_OTHER 

Unknown Content-Type.

TYPE_AUDIO 

Type: 'audio/*'.

TYPE_APPLICATION 

Type: 'application/*'.

TYPE_IMAGE 

Type: 'image/*'.

TYPE_MESSAGE 

Type: 'message/*'.

TYPE_MODEL 

Type: 'model/*'.

TYPE_MULTIPART 

Type: 'multipart/*'.

TYPE_TEXT 

Type: 'text/*'.

TYPE_VIDEO 

Type: 'video/*'.

TYPE_ANY 

Type: '*' or '.*'.

Definition at line 29 of file mime.h.

30{
38 TYPE_TEXT,
40 TYPE_ANY,
41};
@ TYPE_AUDIO
Type: 'audio/*'.
Definition: mime.h:32
@ TYPE_IMAGE
Type: 'image/*'.
Definition: mime.h:34
@ TYPE_OTHER
Unknown Content-Type.
Definition: mime.h:31
@ TYPE_MODEL
Type: 'model/*'.
Definition: mime.h:36
@ TYPE_APPLICATION
Type: 'application/*'.
Definition: mime.h:33
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
@ TYPE_ANY
Type: '*' or '.*'.
Definition: mime.h:40
@ TYPE_VIDEO
Type: 'video/*'.
Definition: mime.h:39

◆ ContentEncoding

Content-Transfer-Encoding.

Enumerator
ENC_OTHER 

Encoding unknown.

ENC_7BIT 

7-bit text

ENC_8BIT 

8-bit text

ENC_QUOTED_PRINTABLE 

Quoted-printable text.

ENC_BASE64 

Base-64 encoded text.

ENC_BINARY 

Binary.

ENC_UUENCODED 

UUEncoded text.

Definition at line 46 of file mime.h.

47{
48 ENC_OTHER,
49 ENC_7BIT,
50 ENC_8BIT,
55};
@ ENC_7BIT
7-bit text
Definition: mime.h:49
@ ENC_UUENCODED
UUEncoded text.
Definition: mime.h:54
@ ENC_OTHER
Encoding unknown.
Definition: mime.h:48
@ ENC_BINARY
Binary.
Definition: mime.h:53
@ ENC_BASE64
Base-64 encoded text.
Definition: mime.h:52
@ ENC_8BIT
8-bit text
Definition: mime.h:50
@ ENC_QUOTED_PRINTABLE
Quoted-printable text.
Definition: mime.h:51

◆ ContentDisposition

Content-Disposition values.

Enumerator
DISP_INLINE 

Content is inline.

DISP_ATTACH 

Content is attached.

DISP_FORM_DATA 

Content is form-data.

DISP_NONE 

No preferred disposition.

Definition at line 60 of file mime.h.

61{
65 DISP_NONE,
66};
@ DISP_ATTACH
Content is attached.
Definition: mime.h:63
@ DISP_INLINE
Content is inline.
Definition: mime.h:62
@ DISP_NONE
No preferred disposition.
Definition: mime.h:65
@ DISP_FORM_DATA
Content is form-data.
Definition: mime.h:64

Variable Documentation

◆ IndexHex

const int IndexHex[128]
extern

Lookup table for ASCII hex digits.

Definition at line 35 of file mime.c.

◆ BodyTypes

const char* const BodyTypes[]
extern

Common MIME body types.

Definition at line 51 of file mime.c.

◆ BodyEncodings

const char* const BodyEncodings[]
extern

Common MIME body encodings.

Definition at line 59 of file mime.c.

◆ MimeSpecials

const char MimeSpecials[]
extern

Characters that need special treatment in MIME.

Definition at line 67 of file mime.c.