<refentry id="camel-CamelMimePart">
<refmeta>
<refentrytitle role="top_of_page" id="camel-CamelMimePart.top_of_page">CamelMimePart</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAMEL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>CamelMimePart</refname>
<refpurpose></refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="camel-CamelMimePart.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
struct              <link linkend="CamelMimePart">CamelMimePart</link>;
<link linkend="CamelMimePart">CamelMimePart</link>*      <link linkend="camel-mime-part-new">camel_mime_part_new</link>                 (void);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-description">camel_mime_part_set_description</link>     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *description);
const     <link linkend="char">char</link>*     <link linkend="camel-mime-part-get-description">camel_mime_part_get_description</link>     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-disposition">camel_mime_part_set_disposition</link>     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *disposition);
const     <link linkend="char">char</link>*     <link linkend="camel-mime-part-get-disposition">camel_mime_part_get_disposition</link>     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-filename">camel_mime_part_set_filename</link>        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *filename);
const	  <link linkend="char">char</link>*       <link linkend="camel-mime-part-get-filename">camel_mime_part_get_filename</link>        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-content-id">camel_mime_part_set_content_id</link>      (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *contentid);
const	  <link linkend="char">char</link>*       <link linkend="camel-mime-part-get-content-id">camel_mime_part_get_content_id</link>      (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-content-MD5">camel_mime_part_set_content_MD5</link>     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *md5sum);
const	  <link linkend="char">char</link>*       <link linkend="camel-mime-part-get-content-MD5">camel_mime_part_get_content_MD5</link>     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-content-location">camel_mime_part_set_content_location</link>
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *location);
const	  <link linkend="char">char</link>*       <link linkend="camel-mime-part-get-content-location">camel_mime_part_get_content_location</link>
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-encoding">camel_mime_part_set_encoding</link>        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         <link linkend="CamelTransferEncoding">CamelTransferEncoding</link> encoding);
<link linkend="CamelTransferEncoding">CamelTransferEncoding</link> <link linkend="camel-mime-part-get-encoding">camel_mime_part_get_encoding</link>      (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-content-languages">camel_mime_part_set_content_languages</link>
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         <link linkend="GList">GList</link> *content_languages);
const	  <link linkend="GList">GList</link>*      <link linkend="camel-mime-part-get-content-languages">camel_mime_part_get_content_languages</link>
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-content-type">camel_mime_part_set_content_type</link>    (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *content_type);
<link linkend="CamelContentType">CamelContentType</link>*   <link linkend="camel-mime-part-get-content-type">camel_mime_part_get_content_type</link>    (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
<link linkend="int">int</link>                 <link linkend="camel-mime-part-construct-from-parser">camel_mime_part_construct_from_parser</link>
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         <link linkend="CamelMimeParser">CamelMimeParser</link> *parser);
<link linkend="void">void</link>                <link linkend="camel-mime-part-set-content">camel_mime_part_set_content</link>         (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *content,
                                                         <link linkend="int">int</link> length,
                                                         const <link linkend="char">char</link> *type);
<link linkend="size-t">size_t</link>              <link linkend="camel-mime-part-get-content-size">camel_mime_part_get_content_size</link>    (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);
</synopsis>
</refsynopsisdiv>









<refsect1 id="camel-CamelMimePart.description" role="desc">
<title role="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="camel-CamelMimePart.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CamelMimePart" role="struct">
<title>struct CamelMimePart</title>
<indexterm zone="CamelMimePart"><primary>CamelMimePart</primary></indexterm><programlisting>struct CamelMimePart {
	CamelMedium parent_object;
	
	struct _camel_header_raw *headers; /* mime headers */
	
	/* All fields here are -** PRIVATE **- */
	/* TODO: these should be in a camelcontentinfo */
	char *description;
	CamelContentDisposition *disposition;
	char *content_id;
	char *content_MD5;
	char *content_location;
	GList *content_languages;
	CamelTransferEncoding encoding;
};
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-mime-part-new" role="function">
<title>camel_mime_part_new ()</title>
<indexterm zone="camel-mime-part-new"><primary>camel_mime_part_new</primary></indexterm><programlisting><link linkend="CamelMimePart">CamelMimePart</link>*      camel_mime_part_new                 (void);</programlisting>
<para>
Create a new MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a new <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-description" role="function">
<title>camel_mime_part_set_description ()</title>
<indexterm zone="camel-mime-part-set-description"><primary>camel_mime_part_set_description</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_description     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *description);</programlisting>
<para>
Set a description on the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>description</parameter>&nbsp;:</term>
<listitem><simpara> description of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-description" role="function">
<title>camel_mime_part_get_description ()</title>
<indexterm zone="camel-mime-part-get-description"><primary>camel_mime_part_get_description</primary></indexterm><programlisting>const     <link linkend="char">char</link>*     camel_mime_part_get_description     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the description of the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the description
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-disposition" role="function">
<title>camel_mime_part_set_disposition ()</title>
<indexterm zone="camel-mime-part-set-disposition"><primary>camel_mime_part_set_disposition</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_disposition     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *disposition);</programlisting>
<para>
Set a disposition on the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>disposition</parameter>&nbsp;:</term>
<listitem><simpara> disposition of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-disposition" role="function">
<title>camel_mime_part_get_disposition ()</title>
<indexterm zone="camel-mime-part-get-disposition"><primary>camel_mime_part_get_disposition</primary></indexterm><programlisting>const     <link linkend="char">char</link>*     camel_mime_part_get_disposition     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the disposition of the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the dispisition
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-filename" role="function">
<title>camel_mime_part_set_filename ()</title>
<indexterm zone="camel-mime-part-set-filename"><primary>camel_mime_part_set_filename</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_filename        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *filename);</programlisting>
<para>
Set the filename on a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
<listitem><simpara> filename given to the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-filename" role="function">
<title>camel_mime_part_get_filename ()</title>
<indexterm zone="camel-mime-part-get-filename"><primary>camel_mime_part_get_filename</primary></indexterm><programlisting>const	  <link linkend="char">char</link>*       camel_mime_part_get_filename        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the filename of a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the filename of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-content-id" role="function">
<title>camel_mime_part_set_content_id ()</title>
<indexterm zone="camel-mime-part-set-content-id"><primary>camel_mime_part_set_content_id</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_content_id      (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *contentid);</programlisting>
<para>
Set the content-id field on a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>contentid</parameter>&nbsp;:</term>
<listitem><simpara> content id
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-content-id" role="function">
<title>camel_mime_part_get_content_id ()</title>
<indexterm zone="camel-mime-part-get-content-id"><primary>camel_mime_part_get_content_id</primary></indexterm><programlisting>const	  <link linkend="char">char</link>*       camel_mime_part_get_content_id      (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the content-id field of a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the content-id field of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-content-MD5" role="function">
<title>camel_mime_part_set_content_MD5 ()</title>
<indexterm zone="camel-mime-part-set-content-MD5"><primary>camel_mime_part_set_content_MD5</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_content_MD5     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *md5sum);</programlisting>
<para>
Set the content-md5 field of the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>md5sum</parameter>&nbsp;:</term>
<listitem><simpara> the md5sum of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-content-MD5" role="function">
<title>camel_mime_part_get_content_MD5 ()</title>
<indexterm zone="camel-mime-part-get-content-MD5"><primary>camel_mime_part_get_content_MD5</primary></indexterm><programlisting>const	  <link linkend="char">char</link>*       camel_mime_part_get_content_MD5     (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the content-md5 field of the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the content-md5 field of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-content-location" role="function">
<title>camel_mime_part_set_content_location ()</title>
<indexterm zone="camel-mime-part-set-content-location"><primary>camel_mime_part_set_content_location</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_content_location
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *location);</programlisting>
<para>
Set the content-location field of the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>location</parameter>&nbsp;:</term>
<listitem><simpara> the content-location value of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-content-location" role="function">
<title>camel_mime_part_get_content_location ()</title>
<indexterm zone="camel-mime-part-get-content-location"><primary>camel_mime_part_get_content_location</primary></indexterm><programlisting>const	  <link linkend="char">char</link>*       camel_mime_part_get_content_location
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the content-location field of a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the content-location field of a MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-encoding" role="function">
<title>camel_mime_part_set_encoding ()</title>
<indexterm zone="camel-mime-part-set-encoding"><primary>camel_mime_part_set_encoding</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_encoding        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         <link linkend="CamelTransferEncoding">CamelTransferEncoding</link> encoding);</programlisting>
<para>
Set the Content-Transfer-Encoding to use on a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>encoding</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelTransferEncoding"><type>CamelTransferEncoding</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-encoding" role="function">
<title>camel_mime_part_get_encoding ()</title>
<indexterm zone="camel-mime-part-get-encoding"><primary>camel_mime_part_get_encoding</primary></indexterm><programlisting><link linkend="CamelTransferEncoding">CamelTransferEncoding</link> camel_mime_part_get_encoding      (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the Content-Transfer-Encoding of a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a <link linkend="CamelTransferEncoding"><type>CamelTransferEncoding</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-content-languages" role="function">
<title>camel_mime_part_set_content_languages ()</title>
<indexterm zone="camel-mime-part-set-content-languages"><primary>camel_mime_part_set_content_languages</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_content_languages
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         <link linkend="GList">GList</link> *content_languages);</programlisting>
<para>
Set the Content-Languages field of a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>content_languages</parameter>&nbsp;:</term>
<listitem><simpara> list of languages
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-content-languages" role="function">
<title>camel_mime_part_get_content_languages ()</title>
<indexterm zone="camel-mime-part-get-content-languages"><primary>camel_mime_part_get_content_languages</primary></indexterm><programlisting>const	  <link linkend="GList">GList</link>*      camel_mime_part_get_content_languages
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the Content-Languages set on the MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a <link linkend="GList"><type>GList</type></link> of languages
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-content-type" role="function">
<title>camel_mime_part_set_content_type ()</title>
<indexterm zone="camel-mime-part-set-content-type"><primary>camel_mime_part_set_content_type</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_content_type    (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *content_type);</programlisting>
<para>
Set the content-type on a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>content_type</parameter>&nbsp;:</term>
<listitem><simpara> content-type string
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-content-type" role="function">
<title>camel_mime_part_get_content_type ()</title>
<indexterm zone="camel-mime-part-get-content-type"><primary>camel_mime_part_get_content_type</primary></indexterm><programlisting><link linkend="CamelContentType">CamelContentType</link>*   camel_mime_part_get_content_type    (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the Content-Type of a MIME part.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the parsed <link linkend="CamelContentType"><type>CamelContentType</type></link> of the MIME part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-construct-from-parser" role="function">
<title>camel_mime_part_construct_from_parser ()</title>
<indexterm zone="camel-mime-part-construct-from-parser"><primary>camel_mime_part_construct_from_parser</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_mime_part_construct_from_parser
                                                        (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         <link linkend="CamelMimeParser">CamelMimeParser</link> *parser);</programlisting>
<para>
Constructs a MIME part from a parser.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parser</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimeParser"><type>CamelMimeParser</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>%0 on success or <link linkend="1:CAPS"><literal>-1</literal></link> on fail
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-set-content" role="function">
<title>camel_mime_part_set_content ()</title>
<indexterm zone="camel-mime-part-set-content"><primary>camel_mime_part_set_content</primary></indexterm><programlisting><link linkend="void">void</link>                camel_mime_part_set_content         (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part,
                                                         const <link linkend="char">char</link> *content,
                                                         <link linkend="int">int</link> length,
                                                         const <link linkend="char">char</link> *type);</programlisting>
<para>
Utility function used to set the content of a mime part object to 
be the provided data. If <parameter>length</parameter> is 0, this routine can be used as
a way to remove old content (in which case <parameter>data</parameter> and <parameter>type</parameter> are
ignored and may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>content</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&nbsp;:</term>
<listitem><simpara> length of <parameter>data</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> Content-Type of the data
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-mime-part-get-content-size" role="function">
<title>camel_mime_part_get_content_size ()</title>
<indexterm zone="camel-mime-part-get-content-size"><primary>camel_mime_part_get_content_size</primary></indexterm><programlisting><link linkend="size-t">size_t</link>              camel_mime_part_get_content_size    (<link linkend="CamelMimePart">CamelMimePart</link> *mime_part);</programlisting>
<para>
Get the decoded size of the MIME part's content.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>mime_part</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelMimePart"><type>CamelMimePart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the size of the MIME part's content in bytes.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
