1 //////////////////////////////////////////////////////////////////////
\r
3 // MIME message encoding/decoding
\r
8 //////////////////////////////////////////////////////////////////////
\r
9 //#include "stdafx.h"
\r
10 #include "../../../include/nntp/mime/Mime.h"
\r
12 // Content-Type header field specifies the media type of a body part. it coule be:
\r
13 // text/image/audio/vedio/application (discrete type) or message/multipart (composite type).
\r
14 // the default Content-Type is: text/plain; charset=us-ascii (RFC 2046)
\r
16 const char* CMimeHeader::m_TypeTable[] =
\r
18 "text", "image", "audio", "vedio", "application", "multipart", "message", NULL
\r
21 const CMimeHeader::MediaTypeCvt CMimeHeader::m_TypeCvtTable[] =
\r
23 // media-type, sub-type, file extension
\r
24 { MEDIA_APPLICATION, "xml", "xml" },
\r
25 { MEDIA_APPLICATION, "msword", "doc" },
\r
26 { MEDIA_APPLICATION, "rtf", "rtf" },
\r
27 { MEDIA_APPLICATION, "vnd.ms-excel", "xls" },
\r
28 { MEDIA_APPLICATION, "vnd.ms-powerpoint", "ppt" },
\r
29 { MEDIA_APPLICATION, "pdf", "pdf" },
\r
30 { MEDIA_APPLICATION, "zip", "zip" },
\r
32 { MEDIA_IMAGE, "jpeg", "jpeg" },
\r
33 { MEDIA_IMAGE, "jpeg", "jpg" },
\r
34 { MEDIA_IMAGE, "gif", "gif" },
\r
35 { MEDIA_IMAGE, "tiff", "tif" },
\r
36 { MEDIA_IMAGE, "tiff", "tiff" },
\r
38 { MEDIA_AUDIO, "basic", "wav" },
\r
39 { MEDIA_AUDIO, "basic", "mp3" },
\r
41 { MEDIA_VEDIO, "mpeg", "mpg" },
\r
42 { MEDIA_VEDIO, "mpeg", "mpeg" },
\r
44 { MEDIA_UNKNOWN, "", "" } // add new subtypes before this line
\r