-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathContentTypes.cpp
53 lines (41 loc) · 1.45 KB
/
ContentTypes.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "wx/wx.h"
#include "ContentTypes.h"
ContentTypes::ContentTypes( )
{
contentTypes[_("txt")] = _("text/plain");
contentTypes[_("html")] = _("text/html");
contentTypes[_("htm")] = _("text/html");
contentTypes[_("css")] = _("text/css");
contentTypes[_("js")] = _("text/javascript");
contentTypes[_("xml")] = _("text/xml");
contentTypes[_("gif")] = _("image/gif");
contentTypes[_("jpg")] = _("image/jpeg");
contentTypes[_("png")] = _("image/png");
contentTypes[_("zip")] = _("application/zip");
contentTypes[_("pdf")] = _("application/pdf");
contentTypes[_("swf")] = _("application/x-shockwave-flash");
contentTypes[_("mp3")] = _("audio/mpeg");
contentTypes[_("wav")] = _("audio/wav");
contentTypes[_("wma")] = _("audio/x-ms-wma");
contentTypes[_("aac")] = _("audio/aac");
contentTypes[_("qt")] = _("video/quicktime");
contentTypes[_("mov")] = _("video/quicktime");
contentTypes[_("3gp")] = _("video/3gpp");
contentTypes[_("avi")] = _("video/avi");
contentTypes[_("wmv")] = _("video/x-ms-wmv");
contentTypes[_("wml")] = _("text/vnd.wap.wml");
contentTypes[_("jad")] = _("text/vnd.sun.j2me.app-descriptor");
contentTypes[_("jar")] = _("application/java-archive");
}
ContentTypes::~ContentTypes()
{
}
wxString ContentTypes::GetContentType( const wxString& fileExt )
{
wxString value = wxEmptyString;
ContentTypesHash::iterator it;
it = contentTypes.find( fileExt );
if( it != contentTypes.end() )
value = it->second;
return value;
}