netwerk/mime/nsMimeTypes.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/mime/nsMimeTypes.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,213 @@
     1.4 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 + 
     1.9 +/*
    1.10 + * This interface allows any module to access the encoder/decoder 
    1.11 + * routines for RFC822 headers. This will allow any mail/news module
    1.12 + * to call on these routines.
    1.13 + */
    1.14 +#ifndef nsMimeTypes_h_
    1.15 +#define nsMimeTypes_h_
    1.16 +
    1.17 +/* Defines for various MIME content-types and encodings.
    1.18 +   Whenever you type in a content-type, you should use one of these defines
    1.19 +   instead, to help catch typos, and make central management of them easier.
    1.20 + */
    1.21 +
    1.22 +#define ANY_WILDCARD                        "*/*"
    1.23 +#define AUDIO_WILDCARD                      "audio/*"
    1.24 +#define IMAGE_WILDCARD                      "image/*"
    1.25 +
    1.26 +#define APPLICATION_APPLEFILE               "application/applefile"
    1.27 +#define APPLICATION_BINHEX                  "application/mac-binhex40"
    1.28 +#define APPLICATION_MACBINARY               "application/x-macbinary"
    1.29 +#define APPLICATION_COMPRESS                "application/x-compress"
    1.30 +#define APPLICATION_COMPRESS2               "application/compress"
    1.31 +#define APPLICATION_FORTEZZA_CKL            "application/x-fortezza-ckl"
    1.32 +#define APPLICATION_FORTEZZA_KRL            "application/x-fortezza-krl"
    1.33 +#define APPLICATION_GZIP                    "application/x-gzip"
    1.34 +#define APPLICATION_GZIP2                   "application/gzip"
    1.35 +#define APPLICATION_GZIP3                   "application/x-gunzip"
    1.36 +#define APPLICATION_ZIP                     "application/zip"
    1.37 +#define APPLICATION_HTTP_INDEX_FORMAT       "application/http-index-format"
    1.38 +#define APPLICATION_ECMASCRIPT              "application/ecmascript"
    1.39 +#define APPLICATION_JAVASCRIPT              "application/javascript"
    1.40 +#define APPLICATION_XJAVASCRIPT             "application/x-javascript"
    1.41 +#define APPLICATION_JSON                    "application/json"
    1.42 +#define APPLICATION_NETSCAPE_REVOCATION     "application/x-netscape-revocation"
    1.43 +#define APPLICATION_NS_PROXY_AUTOCONFIG     "application/x-ns-proxy-autoconfig"
    1.44 +#define APPLICATION_NS_JAVASCRIPT_AUTOCONFIG        "application/x-javascript-config"
    1.45 +#define APPLICATION_OCTET_STREAM            "application/octet-stream"
    1.46 +#define APPLICATION_PGP                     "application/pgp"
    1.47 +#define APPLICATION_PGP2                    "application/x-pgp-message"
    1.48 +#define APPLICATION_POSTSCRIPT              "application/postscript"
    1.49 +#define APPLICATION_PDF                     "application/pdf"
    1.50 +#define APPLICATION_PRE_ENCRYPTED           "application/pre-encrypted"
    1.51 +#define APPLICATION_RDF                     "application/rdf+xml"
    1.52 +#define APPLICATION_UUENCODE                "application/x-uuencode"
    1.53 +#define APPLICATION_UUENCODE2               "application/x-uue"
    1.54 +#define APPLICATION_UUENCODE3               "application/uuencode"
    1.55 +#define APPLICATION_UUENCODE4               "application/uue"
    1.56 +#define APPLICATION_X509_CA_CERT            "application/x-x509-ca-cert"
    1.57 +#define APPLICATION_X509_SERVER_CERT        "application/x-x509-server-cert"
    1.58 +#define APPLICATION_X509_EMAIL_CERT         "application/x-x509-email-cert"
    1.59 +#define APPLICATION_X509_USER_CERT          "application/x-x509-user-cert"
    1.60 +#define APPLICATION_X509_CRL                "application/x-pkcs7-crl"
    1.61 +#define APPLICATION_XPKCS7_MIME             "application/x-pkcs7-mime"
    1.62 +#define APPLICATION_PKCS7_MIME              "application/pkcs7-mime"
    1.63 +#define APPLICATION_XPKCS7_SIGNATURE        "application/x-pkcs7-signature"
    1.64 +#define APPLICATION_PKCS7_SIGNATURE         "application/pkcs7-signature"
    1.65 +#define APPLICATION_WWW_FORM_URLENCODED     "application/x-www-form-urlencoded"
    1.66 +#define APPLICATION_OLEOBJECT               "application/oleobject"
    1.67 +#define APPLICATION_OLEOBJECT2              "application/x-oleobject"
    1.68 +#define APPLICATION_JAVAARCHIVE             "application/java-archive"
    1.69 +#define APPLICATION_MARIMBA                 "application/marimba"
    1.70 +#define APPLICATION_XMARIMBA                "application/x-marimba"
    1.71 +#define APPLICATION_XPINSTALL               "application/x-xpinstall"
    1.72 +#define APPLICATION_XML                     "application/xml"
    1.73 +#define APPLICATION_XHTML_XML               "application/xhtml+xml"
    1.74 +#define APPLICATION_XSLT_XML                "application/xslt+xml"
    1.75 +#define APPLICATION_MATHML_XML              "application/mathml+xml"
    1.76 +#define APPLICATION_RDF_XML                 "application/rdf+xml"
    1.77 +
    1.78 +#define AUDIO_BASIC                         "audio/basic"
    1.79 +#define AUDIO_OGG                           "audio/ogg"
    1.80 +#define AUDIO_WAV                           "audio/x-wav"
    1.81 +#define AUDIO_WEBM                          "audio/webm"
    1.82 +#define AUDIO_MP3                           "audio/mpeg"
    1.83 +#define AUDIO_MP4                           "audio/mp4"
    1.84 +#define AUDIO_AMR                           "audio/amr"
    1.85 +#define AUDIO_3GPP                          "audio/3gpp"
    1.86 +#define AUDIO_MIDI                          "audio/x-midi"
    1.87 +
    1.88 +#define BINARY_OCTET_STREAM                 "binary/octet-stream"
    1.89 +
    1.90 +#define IMAGE_GIF                           "image/gif"
    1.91 +#define IMAGE_JPEG                          "image/jpeg"
    1.92 +#define IMAGE_JPG                           "image/jpg"
    1.93 +#define IMAGE_PJPEG                         "image/pjpeg"
    1.94 +#define IMAGE_PNG                           "image/png"
    1.95 +#define IMAGE_X_PNG                         "image/x-png"
    1.96 +#define IMAGE_PPM                           "image/x-portable-pixmap"
    1.97 +#define IMAGE_XBM                           "image/x-xbitmap"
    1.98 +#define IMAGE_XBM2                          "image/x-xbm"
    1.99 +#define IMAGE_XBM3                          "image/xbm"
   1.100 +#define IMAGE_ART                           "image/x-jg"
   1.101 +#define IMAGE_TIFF                          "image/tiff"
   1.102 +#define IMAGE_BMP                           "image/bmp"
   1.103 +#define IMAGE_BMP_MS                        "image/x-ms-bmp"
   1.104 +#define IMAGE_ICO                           "image/x-icon"
   1.105 +#define IMAGE_ICO_MS                        "image/vnd.microsoft.icon"
   1.106 +#define IMAGE_ICON_MS                       "image/icon"
   1.107 +#define IMAGE_MNG                           "video/x-mng"
   1.108 +#define IMAGE_JNG                           "image/x-jng"
   1.109 +#define IMAGE_SVG_XML                       "image/svg+xml"
   1.110 +
   1.111 +#define MESSAGE_EXTERNAL_BODY               "message/external-body"
   1.112 +#define MESSAGE_NEWS                        "message/news"
   1.113 +#define MESSAGE_RFC822                      "message/rfc822"
   1.114 +
   1.115 +#define MULTIPART_ALTERNATIVE               "multipart/alternative"
   1.116 +#define MULTIPART_APPLEDOUBLE               "multipart/appledouble"
   1.117 +#define MULTIPART_DIGEST                    "multipart/digest"
   1.118 +#define MULTIPART_FORM_DATA                 "multipart/form-data"
   1.119 +#define MULTIPART_HEADER_SET                "multipart/header-set"
   1.120 +#define MULTIPART_MIXED                     "multipart/mixed"
   1.121 +#define MULTIPART_PARALLEL                  "multipart/parallel"
   1.122 +#define MULTIPART_SIGNED                    "multipart/signed"
   1.123 +#define MULTIPART_RELATED                   "multipart/related"
   1.124 +#define MULTIPART_MIXED_REPLACE             "multipart/x-mixed-replace"
   1.125 +#define MULTIPART_BYTERANGES                "multipart/byteranges"
   1.126 +
   1.127 +#define SUN_ATTACHMENT                      "x-sun-attachment"
   1.128 +
   1.129 +#define TEXT_ENRICHED                       "text/enriched"
   1.130 +#define TEXT_CALENDAR                       "text/calendar"
   1.131 +#define TEXT_HTML                           "text/html"
   1.132 +#define TEXT_MDL                            "text/mdl"
   1.133 +#define TEXT_PLAIN                          "text/plain"
   1.134 +#define TEXT_RICHTEXT                       "text/richtext"
   1.135 +#define TEXT_VCARD                          "text/vcard"
   1.136 +#define TEXT_CSS                            "text/css"
   1.137 +#define TEXT_JSSS                           "text/jsss"
   1.138 +#define TEXT_XML                            "text/xml"
   1.139 +#define TEXT_RDF                            "text/rdf"
   1.140 +#define TEXT_XUL                            "application/vnd.mozilla.xul+xml"
   1.141 +#define TEXT_ECMASCRIPT                     "text/ecmascript"
   1.142 +#define TEXT_JAVASCRIPT                     "text/javascript"
   1.143 +#define TEXT_XSL                            "text/xsl"
   1.144 +#define TEXT_EVENT_STREAM                   "text/event-stream"
   1.145 +#define TEXT_CACHE_MANIFEST                 "text/cache-manifest"
   1.146 +
   1.147 +#define VIDEO_MPEG                          "video/mpeg"
   1.148 +#define VIDEO_MP4                           "video/mp4"
   1.149 +#define VIDEO_RAW                           "video/x-raw-yuv"
   1.150 +#define VIDEO_OGG                           "video/ogg"
   1.151 +#define VIDEO_WEBM                          "video/webm"
   1.152 +#define VIDEO_3GPP                          "video/3gpp"
   1.153 +#define APPLICATION_OGG                     "application/ogg"
   1.154 +
   1.155 +/* x-uuencode-apple-single. QuickMail made me do this. */
   1.156 +#define UUENCODE_APPLE_SINGLE               "x-uuencode-apple-single"
   1.157 +
   1.158 +/* The standard MIME message-content-encoding values:
   1.159 + */
   1.160 +#define ENCODING_7BIT                       "7bit"
   1.161 +#define ENCODING_8BIT                       "8bit"
   1.162 +#define ENCODING_BINARY                     "binary"
   1.163 +#define ENCODING_BASE64                     "base64"
   1.164 +#define ENCODING_QUOTED_PRINTABLE           "quoted-printable"
   1.165 +
   1.166 +/* Some nonstandard encodings.  Note that the names are TOTALLY RANDOM,
   1.167 +   and code that looks for these in network-provided data must look for
   1.168 +   all the possibilities.
   1.169 + */
   1.170 +#define ENCODING_COMPRESS                   "x-compress"
   1.171 +#define ENCODING_COMPRESS2                  "compress"
   1.172 +#define ENCODING_ZLIB                       "x-zlib"
   1.173 +#define ENCODING_ZLIB2                      "zlib"
   1.174 +#define ENCODING_GZIP                       "x-gzip"
   1.175 +#define ENCODING_GZIP2                      "gzip"
   1.176 +#define ENCODING_DEFLATE                    "x-deflate"
   1.177 +#define ENCODING_DEFLATE2                   "deflate"
   1.178 +#define ENCODING_UUENCODE                   "x-uuencode"
   1.179 +#define ENCODING_UUENCODE2                  "x-uue"
   1.180 +#define ENCODING_UUENCODE3                  "uuencode"
   1.181 +#define ENCODING_UUENCODE4                  "uue"
   1.182 +#define ENCODING_YENCODE                    "x-yencode"
   1.183 +
   1.184 +/* Some names of parameters that various MIME headers include.
   1.185 + */
   1.186 +#define PARAM_PROTOCOL                      "protocol"
   1.187 +#define PARAM_MICALG                        "micalg"
   1.188 +#define PARAM_MICALG_MD2                    "rsa-md2"
   1.189 +#define PARAM_MICALG_MD5                    "rsa-md5"
   1.190 +#define PARAM_MICALG_MD5_2                  "md5"
   1.191 +#define PARAM_MICALG_SHA1                   "sha1"
   1.192 +#define PARAM_MICALG_SHA1_2                 "sha-1"
   1.193 +#define PARAM_MICALG_SHA1_3                 "rsa-sha1"
   1.194 +#define PARAM_MICALG_SHA1_4                 "rsa-sha-1"
   1.195 +#define PARAM_MICALG_SHA1_5                 "rsa-sha"
   1.196 +#define PARAM_MICALG_SHA256                 "sha-256"
   1.197 +#define PARAM_MICALG_SHA256_2               "sha256"
   1.198 +#define PARAM_MICALG_SHA256_3               "2.16.840.1.101.3.4.2.1"
   1.199 +#define PARAM_MICALG_SHA384                 "sha-384"
   1.200 +#define PARAM_MICALG_SHA384_2               "sha384"
   1.201 +#define PARAM_MICALG_SHA384_3               "2.16.840.1.101.3.4.2.2"
   1.202 +#define PARAM_MICALG_SHA512                 "sha-512"
   1.203 +#define PARAM_MICALG_SHA512_2               "sha512"
   1.204 +#define PARAM_MICALG_SHA512_3               "2.16.840.1.101.3.4.2.3"
   1.205 +#define PARAM_X_MAC_CREATOR                 "x-mac-creator"
   1.206 +#define PARAM_X_MAC_TYPE                    "x-mac-type"
   1.207 +#define PARAM_FORMAT                        "format"
   1.208 +
   1.209 +#define UNKNOWN_CONTENT_TYPE                "application/x-unknown-content-type"
   1.210 +#define APPLICATION_GUESS_FROM_EXT          "application/x-vnd.mozilla.guess-from-ext"
   1.211 +#define VIEWSOURCE_CONTENT_TYPE             "application/x-view-source"
   1.212 +
   1.213 +#define APPLICATION_DIRECTORY				        "application/directory" /* text/x-vcard is synonym */
   1.214 +#define APPLICATION_CACHED_XUL              "mozilla.application/cached-xul"
   1.215 +
   1.216 +#endif /* nsMimeTypes_h_ */

mercurial