tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsMimeTypes.h (12085B)


      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_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"
    120 
    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_LEGACY "audio/x-matroska"
    133 #define AUDIO_MATROSKA "audio/matroska"
    134 #define AUDIO_AAC "audio/aac"
    135 #define AUDIO_AACP "audio/aacp"
    136 #define AUDIO_MPEG_TS "audio/mp2t"
    137 #define AUDIO_MPEG_URL "audio/mpegurl"
    138 
    139 #define BINARY_OCTET_STREAM "binary/octet-stream"
    140 
    141 #define IMAGE_GIF "image/gif"
    142 #define IMAGE_JPEG "image/jpeg"
    143 #define IMAGE_JPG "image/jpg"
    144 #define IMAGE_PJPEG "image/pjpeg"
    145 #define IMAGE_JPEG_PDF "image/x-jpeg-pdf"
    146 #define IMAGE_PNG "image/png"
    147 #define IMAGE_APNG "image/apng"
    148 #define IMAGE_X_PNG "image/x-png"
    149 #define IMAGE_PPM "image/x-portable-pixmap"
    150 #define IMAGE_XBM "image/x-xbitmap"
    151 #define IMAGE_XBM2 "image/x-xbm"
    152 #define IMAGE_XBM3 "image/xbm"
    153 #define IMAGE_ART "image/x-jg"
    154 #define IMAGE_TIFF "image/tiff"
    155 #define IMAGE_BMP "image/bmp"
    156 #define IMAGE_BMP_MS "image/x-ms-bmp"
    157 // This is used internally to represent Windows clipboard BMPs which remove
    158 // part of the header.
    159 #define IMAGE_BMP_MS_CLIPBOARD "image/x-ms-clipboard-bmp"
    160 #define IMAGE_ICO "image/x-icon"
    161 #define IMAGE_ICO_MS "image/vnd.microsoft.icon"
    162 #define IMAGE_ICON_MS "image/icon"
    163 #define IMAGE_MNG "video/x-mng"
    164 #define IMAGE_JNG "image/x-jng"
    165 #define IMAGE_SVG_XML "image/svg+xml"
    166 #define IMAGE_WEBP "image/webp"
    167 #define IMAGE_AVIF "image/avif"
    168 #define IMAGE_JXL "image/jxl"
    169 
    170 #define MESSAGE_EXTERNAL_BODY "message/external-body"
    171 #define MESSAGE_NEWS "message/news"
    172 #define MESSAGE_RFC822 "message/rfc822"
    173 
    174 #define MULTIPART_ALTERNATIVE "multipart/alternative"
    175 #define MULTIPART_APPLEDOUBLE "multipart/appledouble"
    176 #define MULTIPART_DIGEST "multipart/digest"
    177 #define MULTIPART_FORM_DATA "multipart/form-data"
    178 #define MULTIPART_HEADER_SET "multipart/header-set"
    179 #define MULTIPART_MIXED "multipart/mixed"
    180 #define MULTIPART_PARALLEL "multipart/parallel"
    181 #define MULTIPART_SIGNED "multipart/signed"
    182 #define MULTIPART_RELATED "multipart/related"
    183 #define MULTIPART_MIXED_REPLACE "multipart/x-mixed-replace"
    184 #define MULTIPART_BYTERANGES "multipart/byteranges"
    185 
    186 #define SUN_ATTACHMENT "x-sun-attachment"
    187 
    188 #define TEXT_ENRICHED "text/enriched"
    189 #define TEXT_CALENDAR "text/calendar"
    190 #define TEXT_HTML "text/html"
    191 #define TEXT_MDL "text/mdl"
    192 #define TEXT_PLAIN "text/plain"
    193 #define TEXT_RICHTEXT "text/richtext"
    194 #define TEXT_VCARD "text/vcard"
    195 #define TEXT_CSS "text/css"
    196 #define TEXT_JSSS "text/jsss"
    197 #define TEXT_JSON "text/json"
    198 #define TEXT_XML "text/xml"
    199 #define TEXT_RDF "text/rdf"
    200 #define TEXT_VTT "text/vtt"
    201 #define TEXT_ECMASCRIPT "text/ecmascript"
    202 #define TEXT_JAVASCRIPT "text/javascript"
    203 #define TEXT_XSL "text/xsl"
    204 #define TEXT_EVENT_STREAM "text/event-stream"
    205 #define TEXT_CACHE_MANIFEST "text/cache-manifest"
    206 #define TEXT_CSV "text/csv"
    207 
    208 #define VIDEO_MPEG "video/mpeg"
    209 #define VIDEO_MP4 "video/mp4"
    210 #define VIDEO_QUICKTIME "video/quicktime"
    211 #define VIDEO_RAW "video/x-raw-yuv"
    212 #define VIDEO_OGG "video/ogg"
    213 #define VIDEO_WEBM "video/webm"
    214 #define VIDEO_3GPP "video/3gpp"
    215 #define VIDEO_3GPP2 "video/3gpp2"
    216 #define VIDEO_MPEG_TS "video/mp2t"
    217 #define VIDEO_AVI "video/avi"
    218 #define VIDEO_MATROSKA_LEGACY "video/x-matroska"
    219 #define VIDEO_MATROSKA "video/matroska"
    220 #define APPLICATION_OGG "application/ogg"
    221 #define APPLICATION_MPEGURL "application/vnd.apple.mpegurl"
    222 #define APPLICATION_DASH_XML "application/dash+xml"
    223 
    224 /* x-uuencode-apple-single. QuickMail made me do this. */
    225 #define UUENCODE_APPLE_SINGLE "x-uuencode-apple-single"
    226 
    227 /* The standard MIME message-content-encoding values:
    228 */
    229 #define ENCODING_7BIT "7bit"
    230 #define ENCODING_8BIT "8bit"
    231 #define ENCODING_BINARY "binary"
    232 #define ENCODING_BASE64 "base64"
    233 #define ENCODING_QUOTED_PRINTABLE "quoted-printable"
    234 
    235 /* Some nonstandard encodings.  Note that the names are TOTALLY RANDOM,
    236   and code that looks for these in network-provided data must look for
    237   all the possibilities.
    238 */
    239 #define ENCODING_COMPRESS "x-compress"
    240 #define ENCODING_COMPRESS2 "compress"
    241 #define ENCODING_ZLIB "x-zlib"
    242 #define ENCODING_ZLIB2 "zlib"
    243 #define ENCODING_GZIP "x-gzip"
    244 #define ENCODING_GZIP2 "gzip"
    245 #define ENCODING_DEFLATE "x-deflate"
    246 #define ENCODING_DEFLATE2 "deflate"
    247 #define ENCODING_UUENCODE "x-uuencode"
    248 #define ENCODING_UUENCODE2 "x-uue"
    249 #define ENCODING_UUENCODE3 "uuencode"
    250 #define ENCODING_UUENCODE4 "uue"
    251 #define ENCODING_YENCODE "x-yencode"
    252 #define ENCODING_ZSTD "zstd"
    253 
    254 /* Some names of parameters that various MIME headers include.
    255 */
    256 #define PARAM_PROTOCOL "protocol"
    257 #define PARAM_MICALG "micalg"
    258 #define PARAM_MICALG_MD2 "rsa-md2"
    259 #define PARAM_MICALG_MD5 "rsa-md5"
    260 #define PARAM_MICALG_MD5_2 "md5"
    261 #define PARAM_MICALG_SHA1 "sha1"
    262 #define PARAM_MICALG_SHA1_2 "sha-1"
    263 #define PARAM_MICALG_SHA1_3 "rsa-sha1"
    264 #define PARAM_MICALG_SHA1_4 "rsa-sha-1"
    265 #define PARAM_MICALG_SHA1_5 "rsa-sha"
    266 #define PARAM_MICALG_SHA256 "sha-256"
    267 #define PARAM_MICALG_SHA256_2 "sha256"
    268 #define PARAM_MICALG_SHA256_3 "2.16.840.1.101.3.4.2.1"
    269 #define PARAM_MICALG_SHA384 "sha-384"
    270 #define PARAM_MICALG_SHA384_2 "sha384"
    271 #define PARAM_MICALG_SHA384_3 "2.16.840.1.101.3.4.2.2"
    272 #define PARAM_MICALG_SHA512 "sha-512"
    273 #define PARAM_MICALG_SHA512_2 "sha512"
    274 #define PARAM_MICALG_SHA512_3 "2.16.840.1.101.3.4.2.3"
    275 #define PARAM_X_MAC_CREATOR "x-mac-creator"
    276 #define PARAM_X_MAC_TYPE "x-mac-type"
    277 #define PARAM_FORMAT "format"
    278 
    279 #define UNKNOWN_CONTENT_TYPE "application/x-unknown-content-type"
    280 #define APPLICATION_GUESS_FROM_EXT "application/x-vnd.mozilla.guess-from-ext"
    281 #define VIEWSOURCE_CONTENT_TYPE "application/x-view-source"
    282 
    283 #define APPLICATION_DIRECTORY \
    284  "application/directory" /* text/x-vcard is synonym */
    285 
    286 #endif /* nsMimeTypes_h_ */