diff options
Diffstat (limited to 'main/minimime/mm-docs/latex/group__contenttype.tex')
-rw-r--r-- | main/minimime/mm-docs/latex/group__contenttype.tex | 246 |
1 files changed, 246 insertions, 0 deletions
diff --git a/main/minimime/mm-docs/latex/group__contenttype.tex b/main/minimime/mm-docs/latex/group__contenttype.tex new file mode 100644 index 000000000..166261a62 --- /dev/null +++ b/main/minimime/mm-docs/latex/group__contenttype.tex @@ -0,0 +1,246 @@ +\section{Accessing and manipulating Content-Type objects} +\label{group__contenttype}\index{Accessing and manipulating Content-Type objects@{Accessing and manipulating Content-Type objects}} +\subsection*{Functions for manipulating Content-Type objects} +\begin{CompactItemize} +\item +mm\_\-content $\ast$ {\bf mm\_\-content\_\-new} (void) +\item +void {\bf mm\_\-content\_\-free} (struct mm\_\-content $\ast$ct) +\item +int {\bf mm\_\-content\_\-attachparam} (struct mm\_\-content $\ast$ct, struct mm\_\-param $\ast$param) +\item +char $\ast$ {\bf mm\_\-content\_\-getparambyname} (struct mm\_\-content $\ast$ct, const char $\ast$name) +\item +mm\_\-param $\ast$ \textbf{mm\_\-content\_\-getparamobjbyname} (struct mm\_\-content $\ast$ct, const char $\ast$name)\label{group__contenttype_g1ba63e679d2b49aceb6cfec8a6752581} + +\item +int {\bf mm\_\-content\_\-setmaintype} (struct mm\_\-content $\ast$ct, char $\ast$value, int copy) +\item +char $\ast$ {\bf mm\_\-content\_\-getmaintype} (struct mm\_\-content $\ast$ct) +\item +char $\ast$ {\bf mm\_\-content\_\-getsubtype} (struct mm\_\-content $\ast$ct) +\item +char $\ast$ \textbf{mm\_\-content\_\-gettype} (struct mm\_\-content $\ast$ct)\label{group__contenttype_ga6d8453eb35bd695c4944e53b7040b65} + +\item +int {\bf mm\_\-content\_\-setsubtype} (struct mm\_\-content $\ast$ct, char $\ast$value, int copy) +\item +int \textbf{mm\_\-content\_\-settype} (struct mm\_\-content $\ast$ct, const char $\ast$fmt,...)\label{group__contenttype_g878686678ea2ba97aa8edb1206a564d8} + +\item +int {\bf mm\_\-content\_\-iscomposite} (struct mm\_\-content $\ast$ct) +\item +int {\bf mm\_\-content\_\-isvalidencoding} (const char $\ast$encoding) +\item +int {\bf mm\_\-content\_\-setencoding} (struct mm\_\-content $\ast$ct, const char $\ast$encoding) +\item +int {\bf mm\_\-content\_\-getencoding} (struct mm\_\-content $\ast$ct, const char $\ast$encoding) +\item +char $\ast$ {\bf mm\_\-content\_\-paramstostring} (struct mm\_\-content $\ast$ct) +\item +char $\ast$ {\bf mm\_\-content\_\-tostring} (struct mm\_\-content $\ast$ct) +\end{CompactItemize} +\subsection*{Variables} +\begin{CompactItemize} +\item +int \textbf{mm\_\-encoding\_\-mappings::type}\label{group__contenttype_g6c458a8611981109bf0519b5ae21e12e} + +\end{CompactItemize} + + +\subsection{Function Documentation} +\index{contenttype@{contenttype}!mm_content_attachparam@{mm\_\-content\_\-attachparam}} +\index{mm_content_attachparam@{mm\_\-content\_\-attachparam}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-content\_\-attachparam (struct mm\_\-content $\ast$ {\em ct}, struct mm\_\-param $\ast$ {\em param})}\label{group__contenttype_g080b7ed798ed497dcd635a6bab86962f} + + +Attaches a parameter to a Content-Type object + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]The target Content-Type object \item[{\em param}]The Content-Type parameter which to attach \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]0 on success and -1 on failure \end{Desc} +\index{contenttype@{contenttype}!mm_content_free@{mm\_\-content\_\-free}} +\index{mm_content_free@{mm\_\-content\_\-free}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mm\_\-content\_\-free (struct mm\_\-content $\ast$ {\em ct})}\label{group__contenttype_g404314481125849bce869ee4b0f647af} + + +Releases all memory associated with an Content-Type object + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A Content-Type object \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]Nothing \end{Desc} +\index{contenttype@{contenttype}!mm_content_getencoding@{mm\_\-content\_\-getencoding}} +\index{mm_content_getencoding@{mm\_\-content\_\-getencoding}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-content\_\-getencoding (struct mm\_\-content $\ast$ {\em ct}, const char $\ast$ {\em encoding})}\label{group__contenttype_gbff87e581cd04db16e91245e9e9de67d} + + +Gets the numerical ID of a content encoding identifier + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A valid Content Type object \item[{\em encoding}]A string representing the content encoding identifier \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]The numerical ID of the content encoding \end{Desc} +\index{contenttype@{contenttype}!mm_content_getmaintype@{mm\_\-content\_\-getmaintype}} +\index{mm_content_getmaintype@{mm\_\-content\_\-getmaintype}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ mm\_\-content\_\-getmaintype (struct mm\_\-content $\ast$ {\em ct})}\label{group__contenttype_gb213081017abf6bc7e601c6bf4214924} + + +Retrieves the main MIME type stored in a Content-Type object + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A valid Content-Type object \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]A pointer to the string representing the main type \end{Desc} +\index{contenttype@{contenttype}!mm_content_getparambyname@{mm\_\-content\_\-getparambyname}} +\index{mm_content_getparambyname@{mm\_\-content\_\-getparambyname}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ mm\_\-content\_\-getparambyname (struct mm\_\-content $\ast$ {\em ct}, const char $\ast$ {\em name})}\label{group__contenttype_g451441ee557ab5ef29477f3dc8330bf6} + + +Gets a parameter value from a Content-Type object. + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]the Content-Type object \item[{\em name}]the name of the parameter to retrieve \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]The value of the parameter on success or a NULL pointer on failure \end{Desc} +\index{contenttype@{contenttype}!mm_content_getsubtype@{mm\_\-content\_\-getsubtype}} +\index{mm_content_getsubtype@{mm\_\-content\_\-getsubtype}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ mm\_\-content\_\-getsubtype (struct mm\_\-content $\ast$ {\em ct})}\label{group__contenttype_g97f77ef40c14cd0fb397bad358ee5d49} + + +Retrieves the sub MIME type stored in a Content-Type object + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A valid Content-Type object \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]A pointer to the string holding the current sub MIME type \end{Desc} +\index{contenttype@{contenttype}!mm_content_iscomposite@{mm\_\-content\_\-iscomposite}} +\index{mm_content_iscomposite@{mm\_\-content\_\-iscomposite}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-content\_\-iscomposite (struct mm\_\-content $\ast$ {\em ct})}\label{group__contenttype_ga7fa479f27e73dea57257421d8fc9fc5} + + +Checks whether the Content-Type represents a composite message or not + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A valid Content-Type object \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]1 if the Content-Type object represents a composite message or 0 if not. \end{Desc} +\index{contenttype@{contenttype}!mm_content_isvalidencoding@{mm\_\-content\_\-isvalidencoding}} +\index{mm_content_isvalidencoding@{mm\_\-content\_\-isvalidencoding}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-content\_\-isvalidencoding (const char $\ast$ {\em encoding})}\label{group__contenttype_gb724b5979182fa272fe4fd1b72b395d5} + + +Verifies whether a string represents a valid encoding or not. + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em encoding}]The string to verify \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]1 if the encoding string is valid or 0 if not \end{Desc} +\index{contenttype@{contenttype}!mm_content_new@{mm\_\-content\_\-new}} +\index{mm_content_new@{mm\_\-content\_\-new}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}struct mm\_\-content$\ast$ mm\_\-content\_\-new (void)}\label{group__contenttype_g3880ac74a20b4a9f610a4159568e1801} + + +Creates a new object to hold a Content-Type representation. The allocated memory must later be freed using \doxyref{mm\_\-content\_\-free()}{p.}{group__contenttype_g404314481125849bce869ee4b0f647af} + +\begin{Desc} +\item[Returns:]An object representing a MIME Content-Type \end{Desc} +\begin{Desc} +\item[See also:]\doxyref{mm\_\-content\_\-free}{p.}{group__contenttype_g404314481125849bce869ee4b0f647af} \end{Desc} +\index{contenttype@{contenttype}!mm_content_paramstostring@{mm\_\-content\_\-paramstostring}} +\index{mm_content_paramstostring@{mm\_\-content\_\-paramstostring}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ mm\_\-content\_\-paramstostring (struct mm\_\-content $\ast$ {\em ct})}\label{group__contenttype_g792e7d33fbb30e0123408bcef9d3204c} + + +Constructs a MIME conform string of Content-Type parameters. + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A valid Content Type object \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]A pointer to a string representing the Content-Type parameters in MIME terminology, or NULL if either the Content-Type object is invalid, has no parameters or no memory could be allocated.\end{Desc} +This function constructs a MIME conform string including all the parameters associated with the given Content-Type object. It should NOT be used if you need an opaque copy of the current MIME part (e.g. for PGP purposes). \index{contenttype@{contenttype}!mm_content_setencoding@{mm\_\-content\_\-setencoding}} +\index{mm_content_setencoding@{mm\_\-content\_\-setencoding}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-content\_\-setencoding (struct mm\_\-content $\ast$ {\em ct}, const char $\ast$ {\em encoding})}\label{group__contenttype_gea945e48ac5cca846715543634b9afe4} + + +Set the encoding of a MIME entitity according to a mapping table + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A valid content type object \item[{\em encoding}]A string representing the content encoding \end{description} +\end{Desc} +\begin{Desc} +\item[Returns:]0 if successfull or -1 if not (i.e. unknown content encoding) \end{Desc} +\index{contenttype@{contenttype}!mm_content_setmaintype@{mm\_\-content\_\-setmaintype}} +\index{mm_content_setmaintype@{mm\_\-content\_\-setmaintype}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-content\_\-setmaintype (struct mm\_\-content $\ast$ {\em ct}, char $\ast$ {\em value}, int {\em copy})}\label{group__contenttype_g7bab273d117c6c0cacad20361d8fb1c8} + + +Sets the MIME main type for a MIME Content-Type object + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]The MIME Content-Type object \item[{\em value}]The value which to set the main type to \item[{\em copy}]Whether to make a copy of the value (original value must be freed afterwards to prevent memory leaks). \end{description} +\end{Desc} + + +\begin{Desc} +\item[{\bf Bug}]The xfree() call could lead to undesirable results. Do we really need it? \end{Desc} +\index{contenttype@{contenttype}!mm_content_setsubtype@{mm\_\-content\_\-setsubtype}} +\index{mm_content_setsubtype@{mm\_\-content\_\-setsubtype}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-content\_\-setsubtype (struct mm\_\-content $\ast$ {\em ct}, char $\ast$ {\em value}, int {\em copy})}\label{group__contenttype_g14b0738410d566ad2312405946f22212} + + +Sets the MIME sub type for a MIME Content-Type object + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]The MIME Content-Type object \item[{\em value}]The value which to set the sub type to \item[{\em copy}]Whether to make a copy of the value (original value must be freed afterwards to prevent memory leaks). \end{description} +\end{Desc} + + +\begin{Desc} +\item[{\bf Bug}]The xfree() call could lead to undesirable results. Do we really need it? \end{Desc} +\index{contenttype@{contenttype}!mm_content_tostring@{mm\_\-content\_\-tostring}} +\index{mm_content_tostring@{mm\_\-content\_\-tostring}!contenttype@{contenttype}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ mm\_\-content\_\-tostring (struct mm\_\-content $\ast$ {\em ct})}\label{group__contenttype_g18a99c95e35a76f13a77a83c4231e738} + + +Creates a Content-Type header according to the object given + +\begin{Desc} +\item[Parameters:] +\begin{description} +\item[{\em ct}]A valid Content-Type object \end{description} +\end{Desc} |