version 0.1.0
[fms.git] / src / nntp / mime / MimeType.cpp
diff --git a/src/nntp/mime/MimeType.cpp b/src/nntp/mime/MimeType.cpp
new file mode 100644 (file)
index 0000000..d046533
--- /dev/null
@@ -0,0 +1,45 @@
+//////////////////////////////////////////////////////////////////////\r
+//\r
+// MIME message encoding/decoding\r
+//\r
+// Jeff Lee\r
+// Dec 22, 2000\r
+//\r
+//////////////////////////////////////////////////////////////////////\r
+//#include "stdafx.h"\r
+#include "../../../include/nntp/mime/Mime.h"\r
+\r
+// Content-Type header field specifies the media type of a body part. it coule be:\r
+// text/image/audio/vedio/application (discrete type) or message/multipart (composite type).\r
+// the default Content-Type is: text/plain; charset=us-ascii (RFC 2046)\r
+\r
+const char* CMimeHeader::m_TypeTable[] =\r
+{\r
+       "text", "image", "audio", "vedio", "application", "multipart", "message", NULL\r
+};\r
+\r
+const CMimeHeader::MediaTypeCvt CMimeHeader::m_TypeCvtTable[] =\r
+{\r
+       // media-type, sub-type, file extension\r
+       { MEDIA_APPLICATION, "xml", "xml" },\r
+       { MEDIA_APPLICATION, "msword", "doc" },\r
+       { MEDIA_APPLICATION, "rtf", "rtf" },\r
+       { MEDIA_APPLICATION, "vnd.ms-excel", "xls" },\r
+       { MEDIA_APPLICATION, "vnd.ms-powerpoint", "ppt" },\r
+       { MEDIA_APPLICATION, "pdf", "pdf" },\r
+       { MEDIA_APPLICATION, "zip", "zip" },\r
+\r
+       { MEDIA_IMAGE, "jpeg", "jpeg" },\r
+       { MEDIA_IMAGE, "jpeg", "jpg" },\r
+       { MEDIA_IMAGE, "gif", "gif" },\r
+       { MEDIA_IMAGE, "tiff", "tif" },\r
+       { MEDIA_IMAGE, "tiff", "tiff" },\r
+\r
+       { MEDIA_AUDIO, "basic", "wav" },\r
+       { MEDIA_AUDIO, "basic", "mp3" },\r
+\r
+       { MEDIA_VEDIO, "mpeg", "mpg" },\r
+       { MEDIA_VEDIO, "mpeg", "mpeg" },\r
+\r
+       { MEDIA_UNKNOWN, "", "" }               // add new subtypes before this line\r
+};\r