// Licence: wxWindows license (part of wxExtra library)
/////////////////////////////////////////////////////////////////////////////
-#ifndef _MIMETYPE_H
-#define _MIMETYPE_H
+#ifndef _MIMETYPE_H
+#define _MIMETYPE_H
// fwd decls
class wxIcon;
class wxFileTypeImpl;
class wxMimeTypesManagerImpl;
+#include "wx/defs.h"
+
+#if wxUSE_FILE
+
// the things we really need
#include "wx/string.h"
// get file type from MIME type (in format <category>/<format>)
wxFileType *GetFileTypeFromMimeType(const wxString& mimeType);
- // other operations
+ // other operations: return TRUE if there were no errors or FALSE if there
+ // were some unreckognized entries (the good entries are always read anyhow)
// read in additional file (the standard ones are read automatically)
// in mailcap format (see mimetype.cpp for description)
- void ReadMailcap(const wxString& filename);
+ //
+ // 'fallback' parameter may be set to TRUE to avoid overriding the
+ // settings from other, previously parsed, files by this one: normally,
+ // the files read most recently would override the older files, but with
+ // fallback == TRUE this won't happen
+ bool ReadMailcap(const wxString& filename, bool fallback = FALSE);
// read in additional file in mime.types format
- void ReadMimeTypes(const wxString& filename);
+ bool ReadMimeTypes(const wxString& filename);
// dtor (not virtual, shouldn't be derived from)
~wxMimeTypesManager();
wxMimeTypesManagerImpl *m_impl;
};
-#endif //_MIMETYPE_H
+#endif
+ // wxUSE_FILE
+
+#endif
+ //_MIMETYPE_H
/* vi: set cin tw=80 ts=4 sw=4: */