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/. */ 5 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. 10 */ 11 #ifndef nsMimeTypes_h_ 12 #define nsMimeTypes_h_ 13 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. 17 */ 18 19 #define ANY_WILDCARD "*/*" 20 #define AUDIO_WILDCARD "audio/*" 21 #define IMAGE_WILDCARD "image/*" 22 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_JAVASCRIPT_BINAST "application/javascript-binast" 79 #define APPLICATION_WASM "application/wasm" 80 81 #define AUDIO_BASIC "audio/basic" 82 #define AUDIO_OGG "audio/ogg" 83 #define AUDIO_WAV "audio/x-wav" 84 #define AUDIO_WEBM "audio/webm" 85 #define AUDIO_MP3 "audio/mpeg" 86 #define AUDIO_MP4 "audio/mp4" 87 #define AUDIO_AMR "audio/amr" 88 #define AUDIO_FLAC "audio/flac" 89 #define AUDIO_3GPP "audio/3gpp" 90 #define AUDIO_3GPP2 "audio/3gpp2" 91 #define AUDIO_MIDI "audio/x-midi" 92 #define AUDIO_MATROSKA "audio/x-matroska" 93 #define AUDIO_AAC "audio/aac" 94 95 #define BINARY_OCTET_STREAM "binary/octet-stream" 96 97 #define IMAGE_GIF "image/gif" 98 #define IMAGE_JPEG "image/jpeg" 99 #define IMAGE_JPG "image/jpg" 100 #define IMAGE_PJPEG "image/pjpeg" 101 #define IMAGE_PNG "image/png" 102 #define IMAGE_APNG "image/apng" 103 #define IMAGE_X_PNG "image/x-png" 104 #define IMAGE_PPM "image/x-portable-pixmap" 105 #define IMAGE_XBM "image/x-xbitmap" 106 #define IMAGE_XBM2 "image/x-xbm" 107 #define IMAGE_XBM3 "image/xbm" 108 #define IMAGE_ART "image/x-jg" 109 #define IMAGE_TIFF "image/tiff" 110 #define IMAGE_BMP "image/bmp" 111 #define IMAGE_BMP_MS "image/x-ms-bmp" 112 // This is used internally to represent Windows clipboard BMPs which remove 113 // part of the header. 114 #define IMAGE_BMP_MS_CLIPBOARD "image/x-ms-clipboard-bmp" 115 #define IMAGE_ICO "image/x-icon" 116 #define IMAGE_ICO_MS "image/vnd.microsoft.icon" 117 #define IMAGE_ICON_MS "image/icon" 118 #define IMAGE_MNG "video/x-mng" 119 #define IMAGE_JNG "image/x-jng" 120 #define IMAGE_SVG_XML "image/svg+xml" 121 #define IMAGE_WEBP "image/webp" 122 #define IMAGE_AVIF "image/avif" 123 124 #define MESSAGE_EXTERNAL_BODY "message/external-body" 125 #define MESSAGE_NEWS "message/news" 126 #define MESSAGE_RFC822 "message/rfc822" 127 128 #define MULTIPART_ALTERNATIVE "multipart/alternative" 129 #define MULTIPART_APPLEDOUBLE "multipart/appledouble" 130 #define MULTIPART_DIGEST "multipart/digest" 131 #define MULTIPART_FORM_DATA "multipart/form-data" 132 #define MULTIPART_HEADER_SET "multipart/header-set" 133 #define MULTIPART_MIXED "multipart/mixed" 134 #define MULTIPART_PARALLEL "multipart/parallel" 135 #define MULTIPART_SIGNED "multipart/signed" 136 #define MULTIPART_RELATED "multipart/related" 137 #define MULTIPART_MIXED_REPLACE "multipart/x-mixed-replace" 138 #define MULTIPART_BYTERANGES "multipart/byteranges" 139 140 #define SUN_ATTACHMENT "x-sun-attachment" 141 142 #define TEXT_ENRICHED "text/enriched" 143 #define TEXT_CALENDAR "text/calendar" 144 #define TEXT_HTML "text/html" 145 #define TEXT_MDL "text/mdl" 146 #define TEXT_PLAIN "text/plain" 147 #define TEXT_RICHTEXT "text/richtext" 148 #define TEXT_VCARD "text/vcard" 149 #define TEXT_CSS "text/css" 150 #define TEXT_JSSS "text/jsss" 151 #define TEXT_JSON "text/json" 152 #define TEXT_XML "text/xml" 153 #define TEXT_RDF "text/rdf" 154 #define TEXT_VTT "text/vtt" 155 #define TEXT_ECMASCRIPT "text/ecmascript" 156 #define TEXT_JAVASCRIPT "text/javascript" 157 #define TEXT_XSL "text/xsl" 158 #define TEXT_EVENT_STREAM "text/event-stream" 159 #define TEXT_CACHE_MANIFEST "text/cache-manifest" 160 161 #define VIDEO_MPEG "video/mpeg" 162 #define VIDEO_MP4 "video/mp4" 163 #define VIDEO_QUICKTIME "video/quicktime" 164 #define VIDEO_RAW "video/x-raw-yuv" 165 #define VIDEO_OGG "video/ogg" 166 #define VIDEO_WEBM "video/webm" 167 #define VIDEO_3GPP "video/3gpp" 168 #define VIDEO_3GPP2 "video/3gpp2" 169 #define VIDEO_MPEG_TS "video/mp2t" 170 #define VIDEO_AVI "video/avi" 171 #define VIDEO_MATROSKA "video/x-matroska" 172 #define APPLICATION_OGG "application/ogg" 173 174 /* x-uuencode-apple-single. QuickMail made me do this. */ 175 #define UUENCODE_APPLE_SINGLE "x-uuencode-apple-single" 176 177 /* The standard MIME message-content-encoding values: 178 */ 179 #define ENCODING_7BIT "7bit" 180 #define ENCODING_8BIT "8bit" 181 #define ENCODING_BINARY "binary" 182 #define ENCODING_BASE64 "base64" 183 #define ENCODING_QUOTED_PRINTABLE "quoted-printable" 184 185 /* Some nonstandard encodings. Note that the names are TOTALLY RANDOM, 186 and code that looks for these in network-provided data must look for 187 all the possibilities. 188 */ 189 #define ENCODING_COMPRESS "x-compress" 190 #define ENCODING_COMPRESS2 "compress" 191 #define ENCODING_ZLIB "x-zlib" 192 #define ENCODING_ZLIB2 "zlib" 193 #define ENCODING_GZIP "x-gzip" 194 #define ENCODING_GZIP2 "gzip" 195 #define ENCODING_DEFLATE "x-deflate" 196 #define ENCODING_DEFLATE2 "deflate" 197 #define ENCODING_UUENCODE "x-uuencode" 198 #define ENCODING_UUENCODE2 "x-uue" 199 #define ENCODING_UUENCODE3 "uuencode" 200 #define ENCODING_UUENCODE4 "uue" 201 #define ENCODING_YENCODE "x-yencode" 202 203 /* Some names of parameters that various MIME headers include. 204 */ 205 #define PARAM_PROTOCOL "protocol" 206 #define PARAM_MICALG "micalg" 207 #define PARAM_MICALG_MD2 "rsa-md2" 208 #define PARAM_MICALG_MD5 "rsa-md5" 209 #define PARAM_MICALG_MD5_2 "md5" 210 #define PARAM_MICALG_SHA1 "sha1" 211 #define PARAM_MICALG_SHA1_2 "sha-1" 212 #define PARAM_MICALG_SHA1_3 "rsa-sha1" 213 #define PARAM_MICALG_SHA1_4 "rsa-sha-1" 214 #define PARAM_MICALG_SHA1_5 "rsa-sha" 215 #define PARAM_MICALG_SHA256 "sha-256" 216 #define PARAM_MICALG_SHA256_2 "sha256" 217 #define PARAM_MICALG_SHA256_3 "2.16.840.1.101.3.4.2.1" 218 #define PARAM_MICALG_SHA384 "sha-384" 219 #define PARAM_MICALG_SHA384_2 "sha384" 220 #define PARAM_MICALG_SHA384_3 "2.16.840.1.101.3.4.2.2" 221 #define PARAM_MICALG_SHA512 "sha-512" 222 #define PARAM_MICALG_SHA512_2 "sha512" 223 #define PARAM_MICALG_SHA512_3 "2.16.840.1.101.3.4.2.3" 224 #define PARAM_X_MAC_CREATOR "x-mac-creator" 225 #define PARAM_X_MAC_TYPE "x-mac-type" 226 #define PARAM_FORMAT "format" 227 228 #define UNKNOWN_CONTENT_TYPE "application/x-unknown-content-type" 229 #define APPLICATION_GUESS_FROM_EXT "application/x-vnd.mozilla.guess-from-ext" 230 #define VIEWSOURCE_CONTENT_TYPE "application/x-view-source" 231 232 #define APPLICATION_DIRECTORY \ 233 "application/directory" /* text/x-vcard is synonym */ 234 235 #endif /* nsMimeTypes_h_ */ 236