Back to index

lightning-sunbird  0.9+nobinonly
nsMimeTypes.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037  
00038 /*
00039  * This interface allows any module to access the encoder/decoder 
00040  * routines for RFC822 headers. This will allow any mail/news module
00041  * to call on these routines.
00042  */
00043 #ifndef nsMimeTypes_h_
00044 #define nsMimeTypes_h_
00045 
00046 /* Defines for various MIME content-types and encodings.
00047    Whenever you type in a content-type, you should use one of these defines
00048    instead, to help catch typos, and make central management of them easier.
00049  */
00050 
00051 #define AUDIO_WILDCARD                      "audio/*"
00052 #define IMAGE_WILDCARD                      "image/*"
00053 
00054 #define APPLICATION_APPLEFILE               "application/applefile"
00055 #define APPLICATION_BINHEX                  "application/mac-binhex40"
00056 #define APPLICATION_MACBINARY               "application/x-macbinary"
00057 #define APPLICATION_COMPRESS                "application/x-compress"
00058 #define APPLICATION_COMPRESS2               "application/compress"
00059 #define APPLICATION_FORTEZZA_CKL            "application/x-fortezza-ckl"
00060 #define APPLICATION_FORTEZZA_KRL            "application/x-fortezza-krl"
00061 #define APPLICATION_GZIP                    "application/x-gzip"
00062 #define APPLICATION_GZIP2                   "application/gzip"
00063 #define APPLICATION_GZIP3                   "application/x-gunzip"
00064 #define APPLICATION_ZIP                     "application/zip"
00065 #define APPLICATION_HTTP_INDEX_FORMAT       "application/http-index-format"
00066 #define APPLICATION_JAVASCRIPT              "application/x-javascript"
00067 #define APPLICATION_NETSCAPE_REVOCATION     "application/x-netscape-revocation"
00068 #define APPLICATION_NS_PROXY_AUTOCONFIG     "application/x-ns-proxy-autoconfig"
00069 #define APPLICATION_NS_JAVASCRIPT_AUTOCONFIG        "application/x-javascript-config"
00070 #define APPLICATION_OCTET_STREAM            "application/octet-stream"
00071 #define APPLICATION_PGP                     "application/pgp"
00072 #define APPLICATION_PGP2                    "application/x-pgp-message"
00073 #define APPLICATION_POSTSCRIPT              "application/postscript"
00074 #define APPLICATION_PDF                     "application/pdf"
00075 #define APPLICATION_PRE_ENCRYPTED           "application/pre-encrypted"
00076 #define APPLICATION_RDF                     "application/rdf+xml"
00077 #define APPLICATION_UUENCODE                "application/x-uuencode"
00078 #define APPLICATION_UUENCODE2               "application/x-uue"
00079 #define APPLICATION_UUENCODE3               "application/uuencode"
00080 #define APPLICATION_UUENCODE4               "application/uue"
00081 #define APPLICATION_X509_CA_CERT            "application/x-x509-ca-cert"
00082 #define APPLICATION_X509_SERVER_CERT        "application/x-x509-server-cert"
00083 #define APPLICATION_X509_EMAIL_CERT         "application/x-x509-email-cert"
00084 #define APPLICATION_X509_USER_CERT          "application/x-x509-user-cert"
00085 #define APPLICATION_X509_CRL                "application/x-pkcs7-crl"
00086 #define APPLICATION_XPKCS7_MIME             "application/x-pkcs7-mime"
00087 #define APPLICATION_PKCS7_MIME              "application/pkcs7-mime"
00088 #define APPLICATION_XPKCS7_SIGNATURE        "application/x-pkcs7-signature"
00089 #define APPLICATION_PKCS7_SIGNATURE         "application/pkcs7-signature"
00090 #define APPLICATION_WWW_FORM_URLENCODED     "application/x-www-form-urlencoded"
00091 #define APPLICATION_OLEOBJECT               "application/oleobject"
00092 #define APPLICATION_OLEOBJECT2              "application/x-oleobject"
00093 #define APPLICATION_JAVAARCHIVE             "application/java-archive"
00094 #define APPLICATION_MARIMBA                 "application/marimba"
00095 #define APPLICATION_XMARIMBA                "application/x-marimba"
00096 #define APPLICATION_XPINSTALL               "application/x-xpinstall"
00097 
00098 #define AUDIO_BASIC                         "audio/basic"
00099 
00100 #define IMAGE_GIF                           "image/gif"
00101 #define IMAGE_JPG                           "image/jpeg"
00102 #define IMAGE_PJPG                          "image/pjpeg"
00103 #define IMAGE_PNG                           "image/png"
00104 #define IMAGE_PPM                           "image/x-portable-pixmap"
00105 #define IMAGE_XBM                           "image/x-xbitmap"
00106 #define IMAGE_XBM2                          "image/x-xbm"
00107 #define IMAGE_XBM3                          "image/xbm"
00108 #define IMAGE_ART                           "image/x-jg"
00109 #define IMAGE_TIFF                          "image/tiff"
00110 #define IMAGE_BMP                           "image/bmp"
00111 #define IMAGE_ICO                           "image/x-icon"
00112 #define IMAGE_MNG                           "video/x-mng"
00113 #define IMAGE_JNG                           "image/x-jng"
00114 
00115 #define MESSAGE_EXTERNAL_BODY               "message/external-body"
00116 #define MESSAGE_NEWS                        "message/news"
00117 #define MESSAGE_RFC822                      "message/rfc822"
00118 
00119 #define MULTIPART_ALTERNATIVE               "multipart/alternative"
00120 #define MULTIPART_APPLEDOUBLE               "multipart/appledouble"
00121 #define MULTIPART_DIGEST                    "multipart/digest"
00122 #define MULTIPART_HEADER_SET                "multipart/header-set"
00123 #define MULTIPART_MIXED                     "multipart/mixed"
00124 #define MULTIPART_PARALLEL                  "multipart/parallel"
00125 #define MULTIPART_SIGNED                    "multipart/signed"
00126 #define MULTIPART_RELATED                   "multipart/related"
00127 #define MULTIPART_MIXED_REPLACE             "multipart/x-mixed-replace"
00128 #define MULTIPART_BYTERANGES                "multipart/byteranges"
00129 
00130 #define SUN_ATTACHMENT                      "x-sun-attachment"
00131 
00132 #define TEXT_ENRICHED                       "text/enriched"
00133 #define TEXT_CALENDAR                       "text/calendar"
00134 #define TEXT_HTML                           "text/html"
00135 #define TEXT_MDL                            "text/mdl"
00136 #define TEXT_PLAIN                          "text/plain"
00137 #define TEXT_RICHTEXT                       "text/richtext"
00138 #define TEXT_VCARD                          "text/x-vcard"
00139 #define TEXT_CSS                            "text/css"
00140 #define TEXT_JSSS                           "text/jsss"
00141 #define TEXT_XML                            "text/xml"
00142 #define TEXT_RDF                            "text/rdf"
00143 #define TEXT_XUL                            "application/vnd.mozilla.xul+xml"
00144 
00145 #define VIDEO_MPEG                          "video/mpeg"
00146 
00147 /* x-uuencode-apple-single. QuickMail made me do this. */
00148 #define UUENCODE_APPLE_SINGLE               "x-uuencode-apple-single"
00149 
00150 /* The standard MIME message-content-encoding values:
00151  */
00152 #define ENCODING_7BIT                       "7bit"
00153 #define ENCODING_8BIT                       "8bit"
00154 #define ENCODING_BINARY                     "binary"
00155 #define ENCODING_BASE64                     "base64"
00156 #define ENCODING_QUOTED_PRINTABLE           "quoted-printable"
00157 
00158 /* Some nonstandard encodings.  Note that the names are TOTALLY RANDOM,
00159    and code that looks for these in network-provided data must look for
00160    all the possibilities.
00161  */
00162 #define ENCODING_COMPRESS                   "x-compress"
00163 #define ENCODING_COMPRESS2                  "compress"
00164 #define ENCODING_ZLIB                       "x-zlib"
00165 #define ENCODING_ZLIB2                      "zlib"
00166 #define ENCODING_GZIP                       "x-gzip"
00167 #define ENCODING_GZIP2                      "gzip"
00168 #define ENCODING_DEFLATE                    "x-deflate"
00169 #define ENCODING_DEFLATE2                   "deflate"
00170 #define ENCODING_UUENCODE                   "x-uuencode"
00171 #define ENCODING_UUENCODE2                  "x-uue"
00172 #define ENCODING_UUENCODE3                  "uuencode"
00173 #define ENCODING_UUENCODE4                  "uue"
00174 #define ENCODING_YENCODE                    "x-yencode"
00175 
00176 /* Some names of parameters that various MIME headers include.
00177  */
00178 #define PARAM_PROTOCOL                      "protocol"
00179 #define PARAM_MICALG                        "micalg"
00180 #define PARAM_MICALG_MD2                    "rsa-md2"
00181 #define PARAM_MICALG_MD5                    "rsa-md5"
00182 #define PARAM_MICALG_MD5_2                  "md5"
00183 #define PARAM_MICALG_SHA1                   "sha1"
00184 #define PARAM_MICALG_SHA1_2                 "sha-1"
00185 #define PARAM_MICALG_SHA1_3                 "rsa-sha1"
00186 #define PARAM_MICALG_SHA1_4                 "rsa-sha-1"
00187 #define PARAM_MICALG_SHA1_5                 "rsa-sha"
00188 #define PARAM_X_MAC_CREATOR                 "x-mac-creator"
00189 #define PARAM_X_MAC_TYPE                    "x-mac-type"
00190 #define PARAM_FORMAT                        "format"
00191 
00192 #define UNKNOWN_CONTENT_TYPE                "application/x-unknown-content-type"
00193 #define APPLICATION_GUESS_FROM_EXT          "application/x-vnd.mozilla.guess-from-ext"
00194 #define APPLICATION_MAYBE_TEXT              "application/x-vnd.mozilla.maybe-text"
00195 #define VIEWSOURCE_CONTENT_TYPE             "application/x-view-source"
00196 
00197 #define APPLICATION_DIRECTORY                                   "application/directory" /* text/x-vcard is synonym */
00198 
00199 #endif /* nsMimeTypes_h_ */