summaryrefslogtreecommitdiff
path: root/main/minimime/mm-docs/latex/group__envelope.tex
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-04-06 21:16:38 +0000
committerRussell Bryant <russell@russellbryant.com>2007-04-06 21:16:38 +0000
commit0a9750ef9f61a12070797f3475f8f5b6b07f21b4 (patch)
treed1a8725b9d1a7d8508205ad650f4a6ed1de11339 /main/minimime/mm-docs/latex/group__envelope.tex
parente3192c77f2e1afacef8ce5a20ee14ef70c1aba9e (diff)
Merged revisions 60603 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60603 | russell | 2007-04-06 15:58:43 -0500 (Fri, 06 Apr 2007) | 13 lines To be able to achieve the things that we would like to achieve with the Asterisk GUI project, we need a fully functional HTTP interface with access to the Asterisk manager interface. One of the things that was intended to be a part of this system, but was never actually implemented, was the ability for the GUI to be able to upload files to Asterisk. So, this commit adds this in the most minimally invasive way that we could come up with. A lot of work on minimime was done by Steve Murphy. He fixed a lot of bugs in the parser, and updated it to be thread-safe. The ability to check permissions of active manager sessions was added by Dwayne Hubbard. Then, hacking this all together and do doing the modifications necessary to the HTTP interface was done by me. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/minimime/mm-docs/latex/group__envelope.tex')
-rw-r--r--main/minimime/mm-docs/latex/group__envelope.tex65
1 files changed, 65 insertions, 0 deletions
diff --git a/main/minimime/mm-docs/latex/group__envelope.tex b/main/minimime/mm-docs/latex/group__envelope.tex
new file mode 100644
index 000000000..613c87948
--- /dev/null
+++ b/main/minimime/mm-docs/latex/group__envelope.tex
@@ -0,0 +1,65 @@
+\section{Accessing and manipulating a message's envelope}
+\label{group__envelope}\index{Accessing and manipulating a message's envelope@{Accessing and manipulating a message's envelope}}
+\subsection*{Accessing and manipulating a message's envelope}
+\begin{CompactItemize}
+\item
+int {\bf mm\_\-envelope\_\-getheaders} (MM\_\-CTX $\ast$ctx, char $\ast$$\ast$result, size\_\-t $\ast$length)
+\item
+int {\bf mm\_\-envelope\_\-setheader} (MM\_\-CTX $\ast$ctx, const char $\ast$name, const char $\ast$fmt,...)
+\item
+int {\bf mm\_\-envelope\_\-getrecipients} (MM\_\-CTX $\ast$ctx, char $\ast$$\ast$result, size\_\-t $\ast$length)
+\end{CompactItemize}
+
+
+\subsection{Function Documentation}
+\index{envelope@{envelope}!mm_envelope_getheaders@{mm\_\-envelope\_\-getheaders}}
+\index{mm_envelope_getheaders@{mm\_\-envelope\_\-getheaders}!envelope@{envelope}}
+\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-envelope\_\-getheaders (MM\_\-CTX $\ast$ {\em ctx}, char $\ast$$\ast$ {\em result}, size\_\-t $\ast$ {\em length})}\label{group__envelope_g38f1164142cedfc3253b068a81f85563}
+
+
+Gets an ASCII representation of all envelope headers
+
+\begin{Desc}
+\item[Parameters:]
+\begin{description}
+\item[{\em ctx}]A valid Mini\-MIME context \item[{\em result}]Where to store the resulting ASCII headers \item[{\em length}]Where to store the length of the result \end{description}
+\end{Desc}
+\begin{Desc}
+\item[Returns:]0 on success or -1 on failure. \end{Desc}
+\begin{Desc}
+\item[Note:]Sets mm\_\-errno on failure\end{Desc}
+This is mainly a convinience function. It constructs an ASCII representation from all of the message's envelope headers and stores the result in headers. Memory is allocated dynamically, and the total length of the result is stored in length. This function takes care that the output is MIME conform, and folds long lines according to the MIME standard at position 78 of the string. It also nicely formats all MIME related header fields, such as the Content-Type header.
+
+Since the memory needed to store the result is allocated dynamically, one should take care of freeing it again when it's not needed anymore. If an error occurs, $\ast$result will be set to NULL, $\ast$length will be set to zero and mm\_\-errno will be set to a reasonable value. \index{envelope@{envelope}!mm_envelope_getrecipients@{mm\_\-envelope\_\-getrecipients}}
+\index{mm_envelope_getrecipients@{mm\_\-envelope\_\-getrecipients}!envelope@{envelope}}
+\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-envelope\_\-getrecipients (MM\_\-CTX $\ast$ {\em ctx}, char $\ast$$\ast$ {\em result}, size\_\-t $\ast$ {\em length})}\label{group__envelope_ge63da17c56867ca2406a4eaf73230baf}
+
+
+Gets the list of recipients for a MIME message
+
+\begin{Desc}
+\item[Parameters:]
+\begin{description}
+\item[{\em ctx}]A valid Mini\-MIME context \item[{\em result}]Where to store the result \item[{\em length}]Where to store the length of the result \end{description}
+\end{Desc}
+\begin{Desc}
+\item[Returns:]0 on success or -1 on error \end{Desc}
+\begin{Desc}
+\item[Note:]Sets mm\_\-errno on error\end{Desc}
+This functions gets the list of recipients for a given MIME message. It does so by concatenating the \char`\"{}From\char`\"{} and \char`\"{}Cc\char`\"{} header fields, and storing the results in recipients. The memory needed to store the result is allocated dynamically, and the total length of the result is stored in length.
+
+One should take care to free() the result once it's not needed anymore. \index{envelope@{envelope}!mm_envelope_setheader@{mm\_\-envelope\_\-setheader}}
+\index{mm_envelope_setheader@{mm\_\-envelope\_\-setheader}!envelope@{envelope}}
+\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int mm\_\-envelope\_\-setheader (MM\_\-CTX $\ast$ {\em ctx}, const char $\ast$ {\em name}, const char $\ast$ {\em fmt}, {\em ...})}\label{group__envelope_gb2c43c1645e42ae0860c902ce1dda788}
+
+
+Sets a header field in the envelope
+
+\begin{Desc}
+\item[Parameters:]
+\begin{description}
+\item[{\em ctx}]A valid Mini\-MIME context \item[{\em name}]The name of the header field to set \item[{\em fmt}]A format string specifying the value of the header field \end{description}
+\end{Desc}
+\begin{Desc}
+\item[Returns:]0 on success or -1 on failure\end{Desc}
+This function generates a new MIME header and attaches it to the first MIME part (the envelope) found in the given context. If no part is attached already, the function will return an error. The function will store a copy of ``name'' as the header's name field, and dynamically allocate the memory needed to build the format string. \ No newline at end of file