version 0.1.0
[fms.git] / src / nntp / mime / MimeType.cpp
1 //////////////////////////////////////////////////////////////////////\r
2 //\r
3 // MIME message encoding/decoding\r
4 //\r
5 // Jeff Lee\r
6 // Dec 22, 2000\r
7 //\r
8 //////////////////////////////////////////////////////////////////////\r
9 //#include "stdafx.h"\r
10 #include "../../../include/nntp/mime/Mime.h"\r
11 \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
15 \r
16 const char* CMimeHeader::m_TypeTable[] =\r
17 {\r
18         "text", "image", "audio", "vedio", "application", "multipart", "message", NULL\r
19 };\r
20 \r
21 const CMimeHeader::MediaTypeCvt CMimeHeader::m_TypeCvtTable[] =\r
22 {\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
31 \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
37 \r
38         { MEDIA_AUDIO, "basic", "wav" },\r
39         { MEDIA_AUDIO, "basic", "mp3" },\r
40 \r
41         { MEDIA_VEDIO, "mpeg", "mpg" },\r
42         { MEDIA_VEDIO, "mpeg", "mpeg" },\r
43 \r
44         { MEDIA_UNKNOWN, "", "" }               // add new subtypes before this line\r
45 };\r