Bug 1869043 assert that graph set access is main thread only r=padenot
[gecko.git] / netwerk / mime / nsMimeTypes.h
blob86934d44fd8aae752035b9f514f405e310ad89f3
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /*
7 * This interface allows any module to access the encoder/decoder
8 * routines for RFC822 headers. This will allow any mail/news module
9 * to call on these routines.
11 #ifndef nsMimeTypes_h_
12 #define nsMimeTypes_h_
14 /* Defines for various MIME content-types and encodings.
15 Whenever you type in a content-type, you should use one of these defines
16 instead, to help catch typos, and make central management of them easier.
19 #define ANY_WILDCARD "*/*"
20 #define AUDIO_WILDCARD "audio/*"
21 #define IMAGE_WILDCARD "image/*"
23 #define APPLICATION_APPLEFILE "application/applefile"
24 #define APPLICATION_BINHEX "application/mac-binhex40"
25 #define APPLICATION_MACBINARY "application/x-macbinary"
26 #define APPLICATION_COMPRESS "application/x-compress"
27 #define APPLICATION_COMPRESS2 "application/compress"
28 #define APPLICATION_FORTEZZA_CKL "application/x-fortezza-ckl"
29 #define APPLICATION_FORTEZZA_KRL "application/x-fortezza-krl"
30 #define APPLICATION_GZIP "application/x-gzip"
31 #define APPLICATION_GZIP2 "application/gzip"
32 #define APPLICATION_GZIP3 "application/x-gunzip"
33 #define APPLICATION_BROTLI "application/brotli"
34 #define APPLICATION_ZIP "application/zip"
35 #define APPLICATION_HTTP_INDEX_FORMAT "application/http-index-format"
36 #define APPLICATION_ECMASCRIPT "application/ecmascript"
37 #define APPLICATION_JAVASCRIPT "application/javascript"
38 #define APPLICATION_XJAVASCRIPT "application/x-javascript"
39 #define APPLICATION_JSON "application/json"
40 #define APPLICATION_NETSCAPE_REVOCATION "application/x-netscape-revocation"
41 #define APPLICATION_NS_PROXY_AUTOCONFIG "application/x-ns-proxy-autoconfig"
42 #define APPLICATION_NS_JAVASCRIPT_AUTOCONFIG "application/x-javascript-config"
43 #define APPLICATION_OCTET_STREAM "application/octet-stream"
44 #define APPLICATION_PGP "application/pgp"
45 #define APPLICATION_PGP2 "application/x-pgp-message"
46 #define APPLICATION_POSTSCRIPT "application/postscript"
47 #define APPLICATION_PDF "application/pdf"
48 #define APPLICATION_PRE_ENCRYPTED "application/pre-encrypted"
49 #define APPLICATION_RDF "application/rdf+xml"
50 #define APPLICATION_UUENCODE "application/x-uuencode"
51 #define APPLICATION_UUENCODE2 "application/x-uue"
52 #define APPLICATION_UUENCODE3 "application/uuencode"
53 #define APPLICATION_UUENCODE4 "application/uue"
54 #define APPLICATION_X509_CA_CERT "application/x-x509-ca-cert"
55 #define APPLICATION_X509_SERVER_CERT "application/x-x509-server-cert"
56 #define APPLICATION_X509_EMAIL_CERT "application/x-x509-email-cert"
57 #define APPLICATION_X509_USER_CERT "application/x-x509-user-cert"
58 #define APPLICATION_X509_CRL "application/x-pkcs7-crl"
59 #define APPLICATION_XPKCS7_MIME "application/x-pkcs7-mime"
60 #define APPLICATION_PKCS7_MIME "application/pkcs7-mime"
61 #define APPLICATION_XPKCS7_SIGNATURE "application/x-pkcs7-signature"
62 #define APPLICATION_PKCS7_SIGNATURE "application/pkcs7-signature"
63 #define APPLICATION_WWW_FORM_URLENCODED "application/x-www-form-urlencoded"
64 #define APPLICATION_OLEOBJECT "application/oleobject"
65 #define APPLICATION_OLEOBJECT2 "application/x-oleobject"
66 #define APPLICATION_JAVAARCHIVE "application/java-archive"
67 #define APPLICATION_MARIMBA "application/marimba"
68 #define APPLICATION_WEB_MANIFEST "application/manifest+json"
69 #define APPLICATION_XMARIMBA "application/x-marimba"
70 #define APPLICATION_XPINSTALL "application/x-xpinstall"
71 #define APPLICATION_XML "application/xml"
72 #define APPLICATION_XHTML_XML "application/xhtml+xml"
73 #define APPLICATION_XSLT_XML "application/xslt+xml"
74 #define APPLICATION_MATHML_XML "application/mathml+xml"
75 #define APPLICATION_RDF_XML "application/rdf+xml"
76 #define APPLICATION_WAPXHTML_XML "application/vnd.wap.xhtml+xml"
77 #define APPLICATION_PACKAGE "application/package"
78 #define APPLICATION_WASM "application/wasm"
79 #define APPLICATION_MSEXCEL "application/msexcel"
80 #define APPLICATION_MSPPT "application/mspowerpoint"
81 #define APPLICATION_MSWORD "application/msword"
82 #define APPLICATION_MSWORD_TEMPLATE "application/msword-template"
83 #define APPLICATION_VND_CES_QUICKPOINT "application/vnd.ces-quickpoint"
84 #define APPLICATION_VND_CES_QUICKSHEET "application/vnd.ces-quicksheet"
85 #define APPLICATION_VND_CES_QUICKWORD "application/vnd.ces-quickword"
86 #define APPLICATION_VND_MS_EXCEL "application/vnd.ms-excel"
87 #define APPLICATION_VND_MS_EXCEL2 \
88 "application/vnd.ms-excel.sheet.macroenabled.12"
89 #define APPLICATION_VND_MS_PPT "application/vnd.ms-powerpoint"
90 #define APPLICATION_VND_MS_PPT2 \
91 "application/vnd.ms-powerpoint.presentation.macroenabled.12"
92 #define APPLICATION_VND_MS_WORD "application/vnd.ms-word"
93 #define APPLICATION_VND_MS_WORD2 "application/vnd.ms-word.document.12"
94 #define APPLICATION_VND_MS_WORD3 \
95 "application/vnd.ms-word.document.macroenabled.12"
96 #define APPLICATION_VND_MSWORD "application/vnd.msword"
97 #define APPLICATION_VND_PRESENTATIONML_PRESENTATION \
98 "application/vnd.openxmlformats-officedocument.presentationml.presentation"
99 #define APPLICATION_VND_PRESENTATIONML_TEMPLATE \
100 "application/vnd.openxmlformats-officedocument.presentationml.template"
101 #define APPLICATION_VND_SPREADSHEETML_SHEET \
102 "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
103 #define APPLICATION_VND_SPREADSHEETML_TEMPLATE \
104 "application/vnd.openxmlformats-officedocument.spreadsheetml.template"
105 #define APPLICATION_VND_WORDPROCESSINGML_DOCUMENT \
106 "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
107 #define APPLICATION_VND_WORDPROCESSINGML_TEMPLATE \
108 "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
109 #define APPLICATION_VND_PRESENTATION_OPENXML \
110 "application/vnd.presentation-openxml"
111 #define APPLICATION_VND_PRESENTATION_OPENXMLM \
112 "application/vnd.presentation-openxmlm"
113 #define APPLICATION_VND_SPREADSHEET_OPENXML \
114 "application/vnd.spreadsheet-openxml"
115 #define APPLICATION_VND_WORDPROSSING_OPENXML \
116 "application/vnd.wordprocessing-openxml"
117 #define APPLICATION_XPROTOBUF "application/x-protobuf"
118 #define APPLICATION_XPROTOBUFFER "application/x-protobuffer"
120 #define AUDIO_BASIC "audio/basic"
121 #define AUDIO_OGG "audio/ogg"
122 #define AUDIO_WAV "audio/x-wav"
123 #define AUDIO_WEBM "audio/webm"
124 #define AUDIO_MP3 "audio/mpeg"
125 #define AUDIO_MP4 "audio/mp4"
126 #define AUDIO_AMR "audio/amr"
127 #define AUDIO_FLAC "audio/flac"
128 #define AUDIO_3GPP "audio/3gpp"
129 #define AUDIO_3GPP2 "audio/3gpp2"
130 #define AUDIO_MIDI "audio/x-midi"
131 #define AUDIO_MATROSKA "audio/x-matroska"
132 #define AUDIO_AAC "audio/aac"
133 #define AUDIO_AACP "audio/aacp"
134 #define AUDIO_MPEG_TS "audio/mp2t"
135 #define AUDIO_MPEG_URL "audio/mpegurl"
137 #define BINARY_OCTET_STREAM "binary/octet-stream"
139 #define IMAGE_GIF "image/gif"
140 #define IMAGE_JPEG "image/jpeg"
141 #define IMAGE_JPG "image/jpg"
142 #define IMAGE_PJPEG "image/pjpeg"
143 #define IMAGE_PNG "image/png"
144 #define IMAGE_APNG "image/apng"
145 #define IMAGE_X_PNG "image/x-png"
146 #define IMAGE_PPM "image/x-portable-pixmap"
147 #define IMAGE_XBM "image/x-xbitmap"
148 #define IMAGE_XBM2 "image/x-xbm"
149 #define IMAGE_XBM3 "image/xbm"
150 #define IMAGE_ART "image/x-jg"
151 #define IMAGE_TIFF "image/tiff"
152 #define IMAGE_BMP "image/bmp"
153 #define IMAGE_BMP_MS "image/x-ms-bmp"
154 // This is used internally to represent Windows clipboard BMPs which remove
155 // part of the header.
156 #define IMAGE_BMP_MS_CLIPBOARD "image/x-ms-clipboard-bmp"
157 #define IMAGE_ICO "image/x-icon"
158 #define IMAGE_ICO_MS "image/vnd.microsoft.icon"
159 #define IMAGE_ICON_MS "image/icon"
160 #define IMAGE_MNG "video/x-mng"
161 #define IMAGE_JNG "image/x-jng"
162 #define IMAGE_SVG_XML "image/svg+xml"
163 #define IMAGE_WEBP "image/webp"
164 #define IMAGE_AVIF "image/avif"
165 #define IMAGE_JXL "image/jxl"
167 #define MESSAGE_EXTERNAL_BODY "message/external-body"
168 #define MESSAGE_NEWS "message/news"
169 #define MESSAGE_RFC822 "message/rfc822"
171 #define MULTIPART_ALTERNATIVE "multipart/alternative"
172 #define MULTIPART_APPLEDOUBLE "multipart/appledouble"
173 #define MULTIPART_DIGEST "multipart/digest"
174 #define MULTIPART_FORM_DATA "multipart/form-data"
175 #define MULTIPART_HEADER_SET "multipart/header-set"
176 #define MULTIPART_MIXED "multipart/mixed"
177 #define MULTIPART_PARALLEL "multipart/parallel"
178 #define MULTIPART_SIGNED "multipart/signed"
179 #define MULTIPART_RELATED "multipart/related"
180 #define MULTIPART_MIXED_REPLACE "multipart/x-mixed-replace"
181 #define MULTIPART_BYTERANGES "multipart/byteranges"
183 #define SUN_ATTACHMENT "x-sun-attachment"
185 #define TEXT_ENRICHED "text/enriched"
186 #define TEXT_CALENDAR "text/calendar"
187 #define TEXT_HTML "text/html"
188 #define TEXT_MDL "text/mdl"
189 #define TEXT_PLAIN "text/plain"
190 #define TEXT_RICHTEXT "text/richtext"
191 #define TEXT_VCARD "text/vcard"
192 #define TEXT_CSS "text/css"
193 #define TEXT_JSSS "text/jsss"
194 #define TEXT_JSON "text/json"
195 #define TEXT_XML "text/xml"
196 #define TEXT_RDF "text/rdf"
197 #define TEXT_VTT "text/vtt"
198 #define TEXT_ECMASCRIPT "text/ecmascript"
199 #define TEXT_JAVASCRIPT "text/javascript"
200 #define TEXT_XSL "text/xsl"
201 #define TEXT_EVENT_STREAM "text/event-stream"
202 #define TEXT_CACHE_MANIFEST "text/cache-manifest"
203 #define TEXT_CSV "text/csv"
205 #define VIDEO_MPEG "video/mpeg"
206 #define VIDEO_MP4 "video/mp4"
207 #define VIDEO_QUICKTIME "video/quicktime"
208 #define VIDEO_RAW "video/x-raw-yuv"
209 #define VIDEO_OGG "video/ogg"
210 #define VIDEO_WEBM "video/webm"
211 #define VIDEO_3GPP "video/3gpp"
212 #define VIDEO_3GPP2 "video/3gpp2"
213 #define VIDEO_MPEG_TS "video/mp2t"
214 #define VIDEO_AVI "video/avi"
215 #define VIDEO_MATROSKA "video/x-matroska"
216 #define APPLICATION_OGG "application/ogg"
217 #define APPLICATION_MPEGURL "application/vnd.apple.mpegurl"
218 #define APPLICATION_DASH_XML "application/dash+xml"
220 /* x-uuencode-apple-single. QuickMail made me do this. */
221 #define UUENCODE_APPLE_SINGLE "x-uuencode-apple-single"
223 /* The standard MIME message-content-encoding values:
225 #define ENCODING_7BIT "7bit"
226 #define ENCODING_8BIT "8bit"
227 #define ENCODING_BINARY "binary"
228 #define ENCODING_BASE64 "base64"
229 #define ENCODING_QUOTED_PRINTABLE "quoted-printable"
231 /* Some nonstandard encodings. Note that the names are TOTALLY RANDOM,
232 and code that looks for these in network-provided data must look for
233 all the possibilities.
235 #define ENCODING_COMPRESS "x-compress"
236 #define ENCODING_COMPRESS2 "compress"
237 #define ENCODING_ZLIB "x-zlib"
238 #define ENCODING_ZLIB2 "zlib"
239 #define ENCODING_GZIP "x-gzip"
240 #define ENCODING_GZIP2 "gzip"
241 #define ENCODING_DEFLATE "x-deflate"
242 #define ENCODING_DEFLATE2 "deflate"
243 #define ENCODING_UUENCODE "x-uuencode"
244 #define ENCODING_UUENCODE2 "x-uue"
245 #define ENCODING_UUENCODE3 "uuencode"
246 #define ENCODING_UUENCODE4 "uue"
247 #define ENCODING_YENCODE "x-yencode"
249 /* Some names of parameters that various MIME headers include.
251 #define PARAM_PROTOCOL "protocol"
252 #define PARAM_MICALG "micalg"
253 #define PARAM_MICALG_MD2 "rsa-md2"
254 #define PARAM_MICALG_MD5 "rsa-md5"
255 #define PARAM_MICALG_MD5_2 "md5"
256 #define PARAM_MICALG_SHA1 "sha1"
257 #define PARAM_MICALG_SHA1_2 "sha-1"
258 #define PARAM_MICALG_SHA1_3 "rsa-sha1"
259 #define PARAM_MICALG_SHA1_4 "rsa-sha-1"
260 #define PARAM_MICALG_SHA1_5 "rsa-sha"
261 #define PARAM_MICALG_SHA256 "sha-256"
262 #define PARAM_MICALG_SHA256_2 "sha256"
263 #define PARAM_MICALG_SHA256_3 "2.16.840.1.101.3.4.2.1"
264 #define PARAM_MICALG_SHA384 "sha-384"
265 #define PARAM_MICALG_SHA384_2 "sha384"
266 #define PARAM_MICALG_SHA384_3 "2.16.840.1.101.3.4.2.2"
267 #define PARAM_MICALG_SHA512 "sha-512"
268 #define PARAM_MICALG_SHA512_2 "sha512"
269 #define PARAM_MICALG_SHA512_3 "2.16.840.1.101.3.4.2.3"
270 #define PARAM_X_MAC_CREATOR "x-mac-creator"
271 #define PARAM_X_MAC_TYPE "x-mac-type"
272 #define PARAM_FORMAT "format"
274 #define UNKNOWN_CONTENT_TYPE "application/x-unknown-content-type"
275 #define APPLICATION_GUESS_FROM_EXT "application/x-vnd.mozilla.guess-from-ext"
276 #define VIEWSOURCE_CONTENT_TYPE "application/x-view-source"
278 #define APPLICATION_DIRECTORY \
279 "application/directory" /* text/x-vcard is synonym */
281 #endif /* nsMimeTypes_h_ */