indent is a fool
[apps/madmutt.git] / mime.h
1 /*
2  * Copyright notice from original mutt:
3  * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4  *
5  * This file is part of mutt-ng, see http://www.muttng.org/.
6  * It's licensed under the GNU General Public License,
7  * please see the file GPL in the top level source directory.
8  */
9
10 /* Content-Type */
11 enum {
12   TYPEOTHER,
13   TYPEAUDIO,
14   TYPEAPPLICATION,
15   TYPEIMAGE,
16   TYPEMESSAGE,
17   TYPEMODEL,
18   TYPEMULTIPART,
19   TYPETEXT,
20   TYPEVIDEO,
21   TYPEANY
22 };
23
24 /* Content-Transfer-Encoding */
25 enum {
26   ENCOTHER,
27   ENC7BIT,
28   ENC8BIT,
29   ENCQUOTEDPRINTABLE,
30   ENCBASE64,
31   ENCBINARY,
32   ENCUUENCODED
33 };
34
35 /* Content-Disposition values */
36 enum {
37   DISPINLINE,
38   DISPATTACH,
39   DISPFORMDATA
40 };
41
42 /* MIME encoding/decoding global vars */
43
44 #define is_multipart(x) \
45     ((x)->type == TYPEMULTIPART \
46      || ((x)->type == TYPEMESSAGE && (!strcasecmp((x)->subtype, "rfc822") \
47                                       || !strcasecmp((x)->subtype, "news"))))
48
49 extern const char *BodyTypes[];
50 extern const char *BodyEncodings[];
51
52 #define TYPE(X) ((X->type == TYPEOTHER) && (X->xtype != NULL) ? X->xtype : BodyTypes[(X->type)])
53 #define ENCODING(X) BodyEncodings[(X)]
54
55 /* other MIME-related global variables */
56 #ifndef _SENDLIB_C
57 extern char MimeSpecials[];
58 #endif