X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c330a2cf9369d3ae2bdb3bd67e995517288b353d..49828363f8186e48468606143820b02b4dbc8a43:/include/wx/mimetype.h diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index 4c5f826a17..d30eb3c70d 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -110,6 +110,15 @@ private: class wxMimeTypesManager { public: + // static helper functions + // ----------------------- + + // check if the given MIME type is the same as the other one: the second + // argument may contain wildcards ('*'), but not the first. If the + // types are equal or if the mimeType matches wildcard the function + // returns TRUE, otherwise it returns FALSE + static bool IsOfType(const wxString& mimeType, const wxString& wildcard); + // ctor wxMimeTypesManager(); @@ -122,12 +131,18 @@ public: // get file type from MIME type (in 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();