X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/954b8ae60391d18b87a604e7919c87c0c6ae208b..1a33c3ba91c23c1b143ce2d44a7d23e31220cf30:/docs/latex/wx/mimetype.tex diff --git a/docs/latex/wx/mimetype.tex b/docs/latex/wx/mimetype.tex index f2b8242b77..bd7275d5b9 100644 --- a/docs/latex/wx/mimetype.tex +++ b/docs/latex/wx/mimetype.tex @@ -15,7 +15,7 @@ initialization is needed. (system-wide) and .mailcap and .mime.types in the current user's home directory: all of these files are searched for and loaded if found by default. However, additional functions -\helpref{wxMimeTypesManager::ReadMailcap}{wxmimetypesmanagerreadmailcap} and +\helpref{wxMimeTypesManager::ReadMailcap}{wxmimetypesmanagerreadmailcap} and \helpref{wxMimeTypesManager::ReadMimeTypes}{wxmimetypesmanagerreadmimetypes} are provided to load additional files. @@ -36,6 +36,15 @@ No base class. \latexignore{\rtfignore{\wxheading{Function groups}}} +\membersection{Helper functions} + +All of these functions are static (i.e. don't need a wxMimeTypesManager object +to call them) and provide some useful operations for string representations of +MIME types. Their usage is recommended instead of directly working with MIME +types using wxString functions. + +\helpref{IsOfType}{wxmimetypesmanagerisoftype} + \membersection{Constructor and destructor} NB: You won't normally need to use more than one wxMimeTypesManager object in a @@ -100,19 +109,43 @@ Gather information about the files with given MIME type and return the corresponding \helpref{wxFileType}{wxfiletype} object or NULL if the MIME type is unknown. +\membersection{wxMimeTypesManager::IsOfType}\label{wxmimetypesmanagerisoftype} + +\func{bool}{IsOfType}{\param{const wxString\&}{ mimeType}, \param{const wxString\&}{ wildcard}} + +This function returns TRUE if either the given {\it mimeType} is exactly the +same as {\it wildcard} or if it has the same category and the subtype of +{\it wildcard} is '*'. Note that the '*' wildcard is not allowed in +{\it mimeType} itself. + +The comparaison don by this function is case insensitive so it is not +necessary to convert the strings to the same case before calling it. + \membersection{wxMimeTypesManager::ReadMailcap}\label{wxmimetypesmanagerreadmailcap} -\func{void}{ReadMailcap}{\param{const wxString\&}{ filename}} +\func{bool}{ReadMailcap}{\param{const wxString\&}{ filename}, \param{bool}{ fallback = FALSE}} Load additional file containing information about MIME types and associated information in mailcap format. See metamail(1) and mailcap(5) for more information. +{\it fallback} parameter may be used to load additional mailcap files without +overriding the settings found in the standard files: normally, entries from +files loaded with ReadMailcap will override the entries from files loaded +previously (and the standard ones are loaded in the very beginning), but this +will not happen if this parameter is set to TRUE (default is FALSE). + +The return value is TRUE if there were no errors in the file or FALSE +otherwise. + \membersection{wxMimeTypesManager::ReadMimeTypes}\label{wxmimetypesmanagerreadmimetypes} -\func{void}{ReadMimeTypes}{\param{const wxString\&}{ filename}} +\func{bool}{ReadMimeTypes}{\param{const wxString\&}{ filename}} Load additional file containing information about MIME types and associated information in mime.types file format. See metamail(1) and mailcap(5) for more information. +The return value is TRUE if there were no errors in the file or FALSE +otherwise. +