/////////////////////////////////////////////////////////////////////////////
-// Name: common/mimetype.cpp
+// Name: msw/mimetype.cpp
// Purpose: classes and functions to manage MIME types
// Author: Vadim Zeitlin
// Modified by:
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/defs.h"
-#endif
-
-#if (wxUSE_FILE && wxUSE_TEXTFILE) || defined(__WXMSW__)
+// Doesn't compile in WIN16 mode
+#ifndef __WIN16__
#ifndef WX_PRECOMP
#include "wx/string.h"
#endif
#endif //WX_PRECOMP
-// Doesn't compile in WIN16 mode
-#ifndef __WIN16__
-
#include "wx/log.h"
#include "wx/file.h"
#include "wx/intl.h"
#ifdef __WXMSW__
#include "wx/msw/registry.h"
#include "windows.h"
-#elif defined(__UNIX__) || defined(__WXPM__)
- #include "wx/ffile.h"
- #include "wx/textfile.h"
- #include "wx/dir.h"
- #include "wx/utils.h"
- #include "wx/tokenzr.h"
#endif // OS
#include "wx/msw/mimetype.h"
// in case we're compiling in non-GUI mode
class WXDLLEXPORT wxIcon;
-
// These classes use Windows registry to retrieve the required information.
//
// Keys used (not all of them are documented, so it might actually stop working
// location, uses it, so it isn't likely to change
static const wxChar *MIME_DATABASE_KEY = wxT("MIME\\Database\\Content Type\\");
-
-
-
wxString wxFileTypeImpl::GetCommand(const wxChar *verb) const
{
// suppress possible error messages
}
}
+
+bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
+{
+ wxString s;
+
+ if (GetMimeType(&s))
+ {
+ mimeTypes.Clear();
+ mimeTypes.Add(s);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+
bool wxFileTypeImpl::GetIcon(wxIcon *icon) const
{
#if wxUSE_GUI
}
-#endif
- // wxUSE_FILE && wxUSE_TEXTFILE
-
#endif
// __WIN16__