<refentry id="GMimeMultipart">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeMultipart.top_of_page">GMimeMultipart</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeMultipart</refname>
<refpurpose>MIME multiparts</refpurpose>
</refnamediv>

<refsynopsisdiv id="GMimeMultipart.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>                    <link linkend="GMimeMultipart-struct">GMimeMultipart</link>;
<link linkend="GMimeMultipart"><returnvalue>GMimeMultipart</returnvalue></link> *    <link linkend="g-mime-multipart-new">g_mime_multipart_new</link>                (<parameter><type>void</type></parameter>);
<link linkend="GMimeMultipart"><returnvalue>GMimeMultipart</returnvalue></link> *    <link linkend="g-mime-multipart-new-with-subtype">g_mime_multipart_new_with_subtype</link>   (<parameter>const <link linkend="char"><type>char</type></link> *subtype</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-multipart-set-preface">g_mime_multipart_set_preface</link>        (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *preface</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-multipart-get-preface">g_mime_multipart_get_preface</link>        (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-multipart-set-postface">g_mime_multipart_set_postface</link>       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *postface</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-multipart-get-postface">g_mime_multipart_get_postface</link>       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-multipart-set-boundary">g_mime_multipart_set_boundary</link>       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *boundary</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-multipart-get-boundary">g_mime_multipart_get_boundary</link>       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-multipart-add">g_mime_multipart_add</link>                (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-multipart-clear">g_mime_multipart_clear</link>              (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-multipart-insert">g_mime_multipart_insert</link>             (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> index</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="g-mime-multipart-remove">g_mime_multipart_remove</link>             (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);
<link linkend="GMimeObject"><returnvalue>GMimeObject</returnvalue></link> *       <link linkend="g-mime-multipart-remove-at">g_mime_multipart_remove_at</link>          (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> index</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-multipart-get-count">g_mime_multipart_get_count</link>          (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="g-mime-multipart-contains">g_mime_multipart_contains</link>           (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-multipart-index-of">g_mime_multipart_index_of</link>           (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);
<link linkend="GMimeObject"><returnvalue>GMimeObject</returnvalue></link> *       <link linkend="g-mime-multipart-get-part">g_mime_multipart_get_part</link>           (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> index</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-multipart-foreach">g_mime_multipart_foreach</link>            (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObjectForeachFunc"><type>GMimeObjectForeachFunc</type></link> callback</parameter>,
                                                         <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);
<link linkend="GMimeObject"><returnvalue>GMimeObject</returnvalue></link> *       <link linkend="g-mime-multipart-get-subpart-from-content-id">g_mime_multipart_get_subpart_from_content_id</link>
                                                        (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *content_id</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeMultipart.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeObject">GMimeObject</link>
         +----GMimeMultipart
               +----<link linkend="GMimeMultipartEncrypted">GMimeMultipartEncrypted</link>
               +----<link linkend="GMimeMultipartSigned">GMimeMultipartSigned</link>
</synopsis>
</refsect1>

<refsect1 id="GMimeMultipart.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> represents all multipart MIME container parts.
</para>
</refsect1>
<refsect1 id="GMimeMultipart.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeMultipart-struct" role="struct">
<title>GMimeMultipart</title>
<indexterm zone="GMimeMultipart-struct"><primary>GMimeMultipart</primary></indexterm>
<programlisting>typedef struct _GMimeMultipart GMimeMultipart;</programlisting>
<para>
A base MIME multipart object.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-new" role="function">
<title>g_mime_multipart_new ()</title>
<indexterm zone="g-mime-multipart-new"><primary>g_mime_multipart_new</primary></indexterm>
<programlisting><link linkend="GMimeMultipart"><returnvalue>GMimeMultipart</returnvalue></link> *    g_mime_multipart_new                (<parameter><type>void</type></parameter>);</programlisting>
<para>
Creates a new MIME multipart object with a default content-type of
multipart/mixed.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an empty MIME multipart object with a default content-type of
multipart/mixed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-new-with-subtype" role="function">
<title>g_mime_multipart_new_with_subtype ()</title>
<indexterm zone="g-mime-multipart-new-with-subtype"><primary>g_mime_multipart_new_with_subtype</primary></indexterm>
<programlisting><link linkend="GMimeMultipart"><returnvalue>GMimeMultipart</returnvalue></link> *    g_mime_multipart_new_with_subtype   (<parameter>const <link linkend="char"><type>char</type></link> *subtype</parameter>);</programlisting>
<para>
Creates a new MIME multipart object with a content-type of
multipart/<parameter>subtype</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>subtype</parameter>&#160;:</term>
<listitem><simpara>content-type subtype
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an empty MIME multipart object with a content-type of
multipart/<parameter>subtype</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-set-preface" role="function">
<title>g_mime_multipart_set_preface ()</title>
<indexterm zone="g-mime-multipart-set-preface"><primary>g_mime_multipart_set_preface</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_multipart_set_preface        (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *preface</parameter>);</programlisting>
<para>
Sets the preface on the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>preface</parameter>&#160;:</term>
<listitem><simpara>preface
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-get-preface" role="function">
<title>g_mime_multipart_get_preface ()</title>
<indexterm zone="g-mime-multipart-get-preface"><primary>g_mime_multipart_get_preface</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_multipart_get_preface        (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);</programlisting>
<para>
Gets the preface on the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a pointer to the preface string on the multipart.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-set-postface" role="function">
<title>g_mime_multipart_set_postface ()</title>
<indexterm zone="g-mime-multipart-set-postface"><primary>g_mime_multipart_set_postface</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_multipart_set_postface       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *postface</parameter>);</programlisting>
<para>
Sets the postface on the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>postface</parameter>&#160;:</term>
<listitem><simpara>postface
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-get-postface" role="function">
<title>g_mime_multipart_get_postface ()</title>
<indexterm zone="g-mime-multipart-get-postface"><primary>g_mime_multipart_get_postface</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_multipart_get_postface       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);</programlisting>
<para>
Gets the postface on the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a pointer to the postface string on the multipart.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-set-boundary" role="function">
<title>g_mime_multipart_set_boundary ()</title>
<indexterm zone="g-mime-multipart-set-boundary"><primary>g_mime_multipart_set_boundary</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_multipart_set_boundary       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *boundary</parameter>);</programlisting>
<para>
Sets <parameter>boundary</parameter> as the boundary on the multipart. If <parameter>boundary</parameter> is
<link linkend="NULL:CAPS"><literal>NULL</literal></link>, then a boundary will be auto-generated for you.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>boundary</parameter>&#160;:</term>
<listitem><simpara>boundary or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to autogenerate one
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-get-boundary" role="function">
<title>g_mime_multipart_get_boundary ()</title>
<indexterm zone="g-mime-multipart-get-boundary"><primary>g_mime_multipart_get_boundary</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_multipart_get_boundary       (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);</programlisting>
<para>
Gets the boundary on the multipart. If the internal boundary is
<link linkend="NULL:CAPS"><literal>NULL</literal></link>, then an auto-generated boundary will be set on the multipart
and returned.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the boundary on the multipart.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-add" role="function">
<title>g_mime_multipart_add ()</title>
<indexterm zone="g-mime-multipart-add"><primary>g_mime_multipart_add</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_multipart_add                (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);</programlisting>
<para>
Adds a mime part to the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>part</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeObject"><type>GMimeObject</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-clear" role="function">
<title>g_mime_multipart_clear ()</title>
<indexterm zone="g-mime-multipart-clear"><primary>g_mime_multipart_clear</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_multipart_clear              (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);</programlisting>
<para>
Removes all subparts from <parameter>multipart</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-insert" role="function">
<title>g_mime_multipart_insert ()</title>
<indexterm zone="g-mime-multipart-insert"><primary>g_mime_multipart_insert</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_multipart_insert             (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> index</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);</programlisting>
<para>
Inserts the specified mime part into the multipart at the position
<parameter>index</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter>&#160;:</term>
<listitem><simpara>position to insert the mime part
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>part</parameter>&#160;:</term>
<listitem><simpara>mime part
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-remove" role="function">
<title>g_mime_multipart_remove ()</title>
<indexterm zone="g-mime-multipart-remove"><primary>g_mime_multipart_remove</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            g_mime_multipart_remove             (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);</programlisting>
<para>
Removes the specified mime part from the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>part</parameter>&#160;:</term>
<listitem><simpara>mime part
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the part was removed or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-remove-at" role="function">
<title>g_mime_multipart_remove_at ()</title>
<indexterm zone="g-mime-multipart-remove-at"><primary>g_mime_multipart_remove_at</primary></indexterm>
<programlisting><link linkend="GMimeObject"><returnvalue>GMimeObject</returnvalue></link> *       g_mime_multipart_remove_at          (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> index</parameter>);</programlisting>
<para>
Removes the mime part at position <parameter>index</parameter> from the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter>&#160;:</term>
<listitem><simpara>position of the mime part to remove
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the mime part that was removed or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the part was
not contained within the multipart.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-get-count" role="function">
<title>g_mime_multipart_get_count ()</title>
<indexterm zone="g-mime-multipart-get-count"><primary>g_mime_multipart_get_count</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_multipart_get_count          (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>);</programlisting>
<para>
Gets the number of mime parts contained within the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the number of mime parts contained within the multipart.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-contains" role="function">
<title>g_mime_multipart_contains ()</title>
<indexterm zone="g-mime-multipart-contains"><primary>g_mime_multipart_contains</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            g_mime_multipart_contains           (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);</programlisting>
<para>
Checks if <parameter>part</parameter> is contained within <parameter>multipart</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>part</parameter>&#160;:</term>
<listitem><simpara>mime part
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>part</parameter> is a subpart of <parameter>multipart</parameter> or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-index-of" role="function">
<title>g_mime_multipart_index_of ()</title>
<indexterm zone="g-mime-multipart-index-of"><primary>g_mime_multipart_index_of</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_multipart_index_of           (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObject"><type>GMimeObject</type></link> *part</parameter>);</programlisting>
<para>
Gets the index of <parameter>part</parameter> within <parameter>multipart</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>part</parameter>&#160;:</term>
<listitem><simpara>mime part
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the index of <parameter>part</parameter> within <parameter>multipart</parameter> or <link linkend="1:CAPS"><literal>-1</literal></link> if not found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-get-part" role="function">
<title>g_mime_multipart_get_part ()</title>
<indexterm zone="g-mime-multipart-get-part"><primary>g_mime_multipart_get_part</primary></indexterm>
<programlisting><link linkend="GMimeObject"><returnvalue>GMimeObject</returnvalue></link> *       g_mime_multipart_get_part           (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> index</parameter>);</programlisting>
<para>
Gets the mime part at position <parameter>index</parameter> within the multipart.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter>&#160;:</term>
<listitem><simpara>position of the mime part
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the mime part at position <parameter>index</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-foreach" role="function">
<title>g_mime_multipart_foreach ()</title>
<indexterm zone="g-mime-multipart-foreach"><primary>g_mime_multipart_foreach</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_multipart_foreach            (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter><link linkend="GMimeObjectForeachFunc"><type>GMimeObjectForeachFunc</type></link> callback</parameter>,
                                                         <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>
Recursively calls <parameter>callback</parameter> on each of <parameter>multipart</parameter>'s subparts.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeMultipart"><type>GMimeMultipart</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara>function to call for each of <parameter>multipart</parameter>'s subparts.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user-supplied callback data
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-multipart-get-subpart-from-content-id" role="function">
<title>g_mime_multipart_get_subpart_from_content_id ()</title>
<indexterm zone="g-mime-multipart-get-subpart-from-content-id"><primary>g_mime_multipart_get_subpart_from_content_id</primary></indexterm>
<programlisting><link linkend="GMimeObject"><returnvalue>GMimeObject</returnvalue></link> *       g_mime_multipart_get_subpart_from_content_id
                                                        (<parameter><link linkend="GMimeMultipart"><type>GMimeMultipart</type></link> *multipart</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *content_id</parameter>);</programlisting>
<para>
Gets the mime part with the content-id <parameter>content_id</parameter> from the
multipart <parameter>multipart</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>multipart</parameter>&#160;:</term>
<listitem><simpara>a multipart
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>content_id</parameter>&#160;:</term>
<listitem><simpara>the content id of the part to look for
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GMimeObject"><type>GMimeObject</type></link> whose content-id matches the search string,
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if a match cannot be found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
