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