netwerk/mime/nsMimeTypes.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 /*
michael@0 7 * This interface allows any module to access the encoder/decoder
michael@0 8 * routines for RFC822 headers. This will allow any mail/news module
michael@0 9 * to call on these routines.
michael@0 10 */
michael@0 11 #ifndef nsMimeTypes_h_
michael@0 12 #define nsMimeTypes_h_
michael@0 13
michael@0 14 /* Defines for various MIME content-types and encodings.
michael@0 15 Whenever you type in a content-type, you should use one of these defines
michael@0 16 instead, to help catch typos, and make central management of them easier.
michael@0 17 */
michael@0 18
michael@0 19 #define ANY_WILDCARD "*/*"
michael@0 20 #define AUDIO_WILDCARD "audio/*"
michael@0 21 #define IMAGE_WILDCARD "image/*"
michael@0 22
michael@0 23 #define APPLICATION_APPLEFILE "application/applefile"
michael@0 24 #define APPLICATION_BINHEX "application/mac-binhex40"
michael@0 25 #define APPLICATION_MACBINARY "application/x-macbinary"
michael@0 26 #define APPLICATION_COMPRESS "application/x-compress"
michael@0 27 #define APPLICATION_COMPRESS2 "application/compress"
michael@0 28 #define APPLICATION_FORTEZZA_CKL "application/x-fortezza-ckl"
michael@0 29 #define APPLICATION_FORTEZZA_KRL "application/x-fortezza-krl"
michael@0 30 #define APPLICATION_GZIP "application/x-gzip"
michael@0 31 #define APPLICATION_GZIP2 "application/gzip"
michael@0 32 #define APPLICATION_GZIP3 "application/x-gunzip"
michael@0 33 #define APPLICATION_ZIP "application/zip"
michael@0 34 #define APPLICATION_HTTP_INDEX_FORMAT "application/http-index-format"
michael@0 35 #define APPLICATION_ECMASCRIPT "application/ecmascript"
michael@0 36 #define APPLICATION_JAVASCRIPT "application/javascript"
michael@0 37 #define APPLICATION_XJAVASCRIPT "application/x-javascript"
michael@0 38 #define APPLICATION_JSON "application/json"
michael@0 39 #define APPLICATION_NETSCAPE_REVOCATION "application/x-netscape-revocation"
michael@0 40 #define APPLICATION_NS_PROXY_AUTOCONFIG "application/x-ns-proxy-autoconfig"
michael@0 41 #define APPLICATION_NS_JAVASCRIPT_AUTOCONFIG "application/x-javascript-config"
michael@0 42 #define APPLICATION_OCTET_STREAM "application/octet-stream"
michael@0 43 #define APPLICATION_PGP "application/pgp"
michael@0 44 #define APPLICATION_PGP2 "application/x-pgp-message"
michael@0 45 #define APPLICATION_POSTSCRIPT "application/postscript"
michael@0 46 #define APPLICATION_PDF "application/pdf"
michael@0 47 #define APPLICATION_PRE_ENCRYPTED "application/pre-encrypted"
michael@0 48 #define APPLICATION_RDF "application/rdf+xml"
michael@0 49 #define APPLICATION_UUENCODE "application/x-uuencode"
michael@0 50 #define APPLICATION_UUENCODE2 "application/x-uue"
michael@0 51 #define APPLICATION_UUENCODE3 "application/uuencode"
michael@0 52 #define APPLICATION_UUENCODE4 "application/uue"
michael@0 53 #define APPLICATION_X509_CA_CERT "application/x-x509-ca-cert"
michael@0 54 #define APPLICATION_X509_SERVER_CERT "application/x-x509-server-cert"
michael@0 55 #define APPLICATION_X509_EMAIL_CERT "application/x-x509-email-cert"
michael@0 56 #define APPLICATION_X509_USER_CERT "application/x-x509-user-cert"
michael@0 57 #define APPLICATION_X509_CRL "application/x-pkcs7-crl"
michael@0 58 #define APPLICATION_XPKCS7_MIME "application/x-pkcs7-mime"
michael@0 59 #define APPLICATION_PKCS7_MIME "application/pkcs7-mime"
michael@0 60 #define APPLICATION_XPKCS7_SIGNATURE "application/x-pkcs7-signature"
michael@0 61 #define APPLICATION_PKCS7_SIGNATURE "application/pkcs7-signature"
michael@0 62 #define APPLICATION_WWW_FORM_URLENCODED "application/x-www-form-urlencoded"
michael@0 63 #define APPLICATION_OLEOBJECT "application/oleobject"
michael@0 64 #define APPLICATION_OLEOBJECT2 "application/x-oleobject"
michael@0 65 #define APPLICATION_JAVAARCHIVE "application/java-archive"
michael@0 66 #define APPLICATION_MARIMBA "application/marimba"
michael@0 67 #define APPLICATION_XMARIMBA "application/x-marimba"
michael@0 68 #define APPLICATION_XPINSTALL "application/x-xpinstall"
michael@0 69 #define APPLICATION_XML "application/xml"
michael@0 70 #define APPLICATION_XHTML_XML "application/xhtml+xml"
michael@0 71 #define APPLICATION_XSLT_XML "application/xslt+xml"
michael@0 72 #define APPLICATION_MATHML_XML "application/mathml+xml"
michael@0 73 #define APPLICATION_RDF_XML "application/rdf+xml"
michael@0 74
michael@0 75 #define AUDIO_BASIC "audio/basic"
michael@0 76 #define AUDIO_OGG "audio/ogg"
michael@0 77 #define AUDIO_WAV "audio/x-wav"
michael@0 78 #define AUDIO_WEBM "audio/webm"
michael@0 79 #define AUDIO_MP3 "audio/mpeg"
michael@0 80 #define AUDIO_MP4 "audio/mp4"
michael@0 81 #define AUDIO_AMR "audio/amr"
michael@0 82 #define AUDIO_3GPP "audio/3gpp"
michael@0 83 #define AUDIO_MIDI "audio/x-midi"
michael@0 84
michael@0 85 #define BINARY_OCTET_STREAM "binary/octet-stream"
michael@0 86
michael@0 87 #define IMAGE_GIF "image/gif"
michael@0 88 #define IMAGE_JPEG "image/jpeg"
michael@0 89 #define IMAGE_JPG "image/jpg"
michael@0 90 #define IMAGE_PJPEG "image/pjpeg"
michael@0 91 #define IMAGE_PNG "image/png"
michael@0 92 #define IMAGE_X_PNG "image/x-png"
michael@0 93 #define IMAGE_PPM "image/x-portable-pixmap"
michael@0 94 #define IMAGE_XBM "image/x-xbitmap"
michael@0 95 #define IMAGE_XBM2 "image/x-xbm"
michael@0 96 #define IMAGE_XBM3 "image/xbm"
michael@0 97 #define IMAGE_ART "image/x-jg"
michael@0 98 #define IMAGE_TIFF "image/tiff"
michael@0 99 #define IMAGE_BMP "image/bmp"
michael@0 100 #define IMAGE_BMP_MS "image/x-ms-bmp"
michael@0 101 #define IMAGE_ICO "image/x-icon"
michael@0 102 #define IMAGE_ICO_MS "image/vnd.microsoft.icon"
michael@0 103 #define IMAGE_ICON_MS "image/icon"
michael@0 104 #define IMAGE_MNG "video/x-mng"
michael@0 105 #define IMAGE_JNG "image/x-jng"
michael@0 106 #define IMAGE_SVG_XML "image/svg+xml"
michael@0 107
michael@0 108 #define MESSAGE_EXTERNAL_BODY "message/external-body"
michael@0 109 #define MESSAGE_NEWS "message/news"
michael@0 110 #define MESSAGE_RFC822 "message/rfc822"
michael@0 111
michael@0 112 #define MULTIPART_ALTERNATIVE "multipart/alternative"
michael@0 113 #define MULTIPART_APPLEDOUBLE "multipart/appledouble"
michael@0 114 #define MULTIPART_DIGEST "multipart/digest"
michael@0 115 #define MULTIPART_FORM_DATA "multipart/form-data"
michael@0 116 #define MULTIPART_HEADER_SET "multipart/header-set"
michael@0 117 #define MULTIPART_MIXED "multipart/mixed"
michael@0 118 #define MULTIPART_PARALLEL "multipart/parallel"
michael@0 119 #define MULTIPART_SIGNED "multipart/signed"
michael@0 120 #define MULTIPART_RELATED "multipart/related"
michael@0 121 #define MULTIPART_MIXED_REPLACE "multipart/x-mixed-replace"
michael@0 122 #define MULTIPART_BYTERANGES "multipart/byteranges"
michael@0 123
michael@0 124 #define SUN_ATTACHMENT "x-sun-attachment"
michael@0 125
michael@0 126 #define TEXT_ENRICHED "text/enriched"
michael@0 127 #define TEXT_CALENDAR "text/calendar"
michael@0 128 #define TEXT_HTML "text/html"
michael@0 129 #define TEXT_MDL "text/mdl"
michael@0 130 #define TEXT_PLAIN "text/plain"
michael@0 131 #define TEXT_RICHTEXT "text/richtext"
michael@0 132 #define TEXT_VCARD "text/vcard"
michael@0 133 #define TEXT_CSS "text/css"
michael@0 134 #define TEXT_JSSS "text/jsss"
michael@0 135 #define TEXT_XML "text/xml"
michael@0 136 #define TEXT_RDF "text/rdf"
michael@0 137 #define TEXT_XUL "application/vnd.mozilla.xul+xml"
michael@0 138 #define TEXT_ECMASCRIPT "text/ecmascript"
michael@0 139 #define TEXT_JAVASCRIPT "text/javascript"
michael@0 140 #define TEXT_XSL "text/xsl"
michael@0 141 #define TEXT_EVENT_STREAM "text/event-stream"
michael@0 142 #define TEXT_CACHE_MANIFEST "text/cache-manifest"
michael@0 143
michael@0 144 #define VIDEO_MPEG "video/mpeg"
michael@0 145 #define VIDEO_MP4 "video/mp4"
michael@0 146 #define VIDEO_RAW "video/x-raw-yuv"
michael@0 147 #define VIDEO_OGG "video/ogg"
michael@0 148 #define VIDEO_WEBM "video/webm"
michael@0 149 #define VIDEO_3GPP "video/3gpp"
michael@0 150 #define APPLICATION_OGG "application/ogg"
michael@0 151
michael@0 152 /* x-uuencode-apple-single. QuickMail made me do this. */
michael@0 153 #define UUENCODE_APPLE_SINGLE "x-uuencode-apple-single"
michael@0 154
michael@0 155 /* The standard MIME message-content-encoding values:
michael@0 156 */
michael@0 157 #define ENCODING_7BIT "7bit"
michael@0 158 #define ENCODING_8BIT "8bit"
michael@0 159 #define ENCODING_BINARY "binary"
michael@0 160 #define ENCODING_BASE64 "base64"
michael@0 161 #define ENCODING_QUOTED_PRINTABLE "quoted-printable"
michael@0 162
michael@0 163 /* Some nonstandard encodings. Note that the names are TOTALLY RANDOM,
michael@0 164 and code that looks for these in network-provided data must look for
michael@0 165 all the possibilities.
michael@0 166 */
michael@0 167 #define ENCODING_COMPRESS "x-compress"
michael@0 168 #define ENCODING_COMPRESS2 "compress"
michael@0 169 #define ENCODING_ZLIB "x-zlib"
michael@0 170 #define ENCODING_ZLIB2 "zlib"
michael@0 171 #define ENCODING_GZIP "x-gzip"
michael@0 172 #define ENCODING_GZIP2 "gzip"
michael@0 173 #define ENCODING_DEFLATE "x-deflate"
michael@0 174 #define ENCODING_DEFLATE2 "deflate"
michael@0 175 #define ENCODING_UUENCODE "x-uuencode"
michael@0 176 #define ENCODING_UUENCODE2 "x-uue"
michael@0 177 #define ENCODING_UUENCODE3 "uuencode"
michael@0 178 #define ENCODING_UUENCODE4 "uue"
michael@0 179 #define ENCODING_YENCODE "x-yencode"
michael@0 180
michael@0 181 /* Some names of parameters that various MIME headers include.
michael@0 182 */
michael@0 183 #define PARAM_PROTOCOL "protocol"
michael@0 184 #define PARAM_MICALG "micalg"
michael@0 185 #define PARAM_MICALG_MD2 "rsa-md2"
michael@0 186 #define PARAM_MICALG_MD5 "rsa-md5"
michael@0 187 #define PARAM_MICALG_MD5_2 "md5"
michael@0 188 #define PARAM_MICALG_SHA1 "sha1"
michael@0 189 #define PARAM_MICALG_SHA1_2 "sha-1"
michael@0 190 #define PARAM_MICALG_SHA1_3 "rsa-sha1"
michael@0 191 #define PARAM_MICALG_SHA1_4 "rsa-sha-1"
michael@0 192 #define PARAM_MICALG_SHA1_5 "rsa-sha"
michael@0 193 #define PARAM_MICALG_SHA256 "sha-256"
michael@0 194 #define PARAM_MICALG_SHA256_2 "sha256"
michael@0 195 #define PARAM_MICALG_SHA256_3 "2.16.840.1.101.3.4.2.1"
michael@0 196 #define PARAM_MICALG_SHA384 "sha-384"
michael@0 197 #define PARAM_MICALG_SHA384_2 "sha384"
michael@0 198 #define PARAM_MICALG_SHA384_3 "2.16.840.1.101.3.4.2.2"
michael@0 199 #define PARAM_MICALG_SHA512 "sha-512"
michael@0 200 #define PARAM_MICALG_SHA512_2 "sha512"
michael@0 201 #define PARAM_MICALG_SHA512_3 "2.16.840.1.101.3.4.2.3"
michael@0 202 #define PARAM_X_MAC_CREATOR "x-mac-creator"
michael@0 203 #define PARAM_X_MAC_TYPE "x-mac-type"
michael@0 204 #define PARAM_FORMAT "format"
michael@0 205
michael@0 206 #define UNKNOWN_CONTENT_TYPE "application/x-unknown-content-type"
michael@0 207 #define APPLICATION_GUESS_FROM_EXT "application/x-vnd.mozilla.guess-from-ext"
michael@0 208 #define VIEWSOURCE_CONTENT_TYPE "application/x-view-source"
michael@0 209
michael@0 210 #define APPLICATION_DIRECTORY "application/directory" /* text/x-vcard is synonym */
michael@0 211 #define APPLICATION_CACHED_XUL "mozilla.application/cached-xul"
michael@0 212
michael@0 213 #endif /* nsMimeTypes_h_ */

mercurial