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

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

<synopsis>                    <link linkend="GMimeMessagePartial-struct">GMimeMessagePartial</link>;
<link linkend="GMimeMessagePartial"><returnvalue>GMimeMessagePartial</returnvalue></link> * <link linkend="g-mime-message-partial-new">g_mime_message_partial_new</link>        (<parameter>const <link linkend="char"><type>char</type></link> *id</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> number</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> total</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-message-partial-get-id">g_mime_message_partial_get_id</link>       (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> *partial</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-message-partial-get-number">g_mime_message_partial_get_number</link>   (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> *partial</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-message-partial-get-total">g_mime_message_partial_get_total</link>    (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> *partial</parameter>);
<link linkend="GMimeMessage"><returnvalue>GMimeMessage</returnvalue></link> *      <link linkend="g-mime-message-partial-reconstruct-message">g_mime_message_partial_reconstruct_message</link>
                                                        (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> **partials</parameter>,
                                                         <parameter><link linkend="size-t"><type>size_t</type></link> num</parameter>);
<link linkend="GMimeMessage"><returnvalue>GMimeMessage</returnvalue></link> **     <link linkend="g-mime-message-partial-split-message">g_mime_message_partial_split_message</link>
                                                        (<parameter><link linkend="GMimeMessage"><type>GMimeMessage</type></link> *message</parameter>,
                                                         <parameter><link linkend="size-t"><type>size_t</type></link> max_size</parameter>,
                                                         <parameter><link linkend="size-t"><type>size_t</type></link> *nparts</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeMessagePartial.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeObject">GMimeObject</link>
         +----<link linkend="GMimePart">GMimePart</link>
               +----GMimeMessagePartial
</synopsis>
</refsect1>

<refsect1 id="GMimeMessagePartial.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> represents the message/partial MIME part.
</para>
</refsect1>
<refsect1 id="GMimeMessagePartial.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeMessagePartial-struct" role="struct">
<title>GMimeMessagePartial</title>
<indexterm zone="GMimeMessagePartial-struct"><primary>GMimeMessagePartial</primary></indexterm>
<programlisting>typedef struct _GMimeMessagePartial GMimeMessagePartial;</programlisting>
<para>
A message/partial MIME part.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-message-partial-new" role="function">
<title>g_mime_message_partial_new ()</title>
<indexterm zone="g-mime-message-partial-new"><primary>g_mime_message_partial_new</primary></indexterm>
<programlisting><link linkend="GMimeMessagePartial"><returnvalue>GMimeMessagePartial</returnvalue></link> * g_mime_message_partial_new        (<parameter>const <link linkend="char"><type>char</type></link> *id</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> number</parameter>,
                                                         <parameter><link linkend="int"><type>int</type></link> total</parameter>);</programlisting>
<para>
Creates a new MIME message/partial object.
</para><variablelist role="params">
<varlistentry><term><parameter>id</parameter>&#160;:</term>
<listitem><simpara>message/partial part id
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>number</parameter>&#160;:</term>
<listitem><simpara>message/partial part number
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>total</parameter>&#160;:</term>
<listitem><simpara>total number of message/partial parts
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an empty MIME message/partial object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-message-partial-get-id" role="function">
<title>g_mime_message_partial_get_id ()</title>
<indexterm zone="g-mime-message-partial-get-id"><primary>g_mime_message_partial_get_id</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_message_partial_get_id       (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> *partial</parameter>);</programlisting>
<para>
Gets the message/partial id parameter value.
</para><variablelist role="params">
<varlistentry><term><parameter>partial</parameter>&#160;:</term>
<listitem><simpara>message/partial object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the message/partial id or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-message-partial-get-number" role="function">
<title>g_mime_message_partial_get_number ()</title>
<indexterm zone="g-mime-message-partial-get-number"><primary>g_mime_message_partial_get_number</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_message_partial_get_number   (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> *partial</parameter>);</programlisting>
<para>
Gets the message/partial part number.
</para><variablelist role="params">
<varlistentry><term><parameter>partial</parameter>&#160;:</term>
<listitem><simpara>message/partial object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the message/partial part number or <link linkend="1:CAPS"><literal>-1</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-message-partial-get-total" role="function">
<title>g_mime_message_partial_get_total ()</title>
<indexterm zone="g-mime-message-partial-get-total"><primary>g_mime_message_partial_get_total</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_message_partial_get_total    (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> *partial</parameter>);</programlisting>
<para>
Gets the total number of message/partial parts needed to
reconstruct the original message.
</para><variablelist role="params">
<varlistentry><term><parameter>partial</parameter>&#160;:</term>
<listitem><simpara>message/partial object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the total number of message/partial parts needed to
reconstruct the original message or -1 on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-message-partial-reconstruct-message" role="function">
<title>g_mime_message_partial_reconstruct_message ()</title>
<indexterm zone="g-mime-message-partial-reconstruct-message"><primary>g_mime_message_partial_reconstruct_message</primary></indexterm>
<programlisting><link linkend="GMimeMessage"><returnvalue>GMimeMessage</returnvalue></link> *      g_mime_message_partial_reconstruct_message
                                                        (<parameter><link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> **partials</parameter>,
                                                         <parameter><link linkend="size-t"><type>size_t</type></link> num</parameter>);</programlisting>
<para>
Reconstructs the GMimeMessage from the given message/partial parts
in <parameter>partials</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>partials</parameter>&#160;:</term>
<listitem><simpara>an array of message/partial mime parts
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num</parameter>&#160;:</term>
<listitem><simpara>the number of elements in <parameter>partials</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a GMimeMessage object on success or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-message-partial-split-message" role="function">
<title>g_mime_message_partial_split_message ()</title>
<indexterm zone="g-mime-message-partial-split-message"><primary>g_mime_message_partial_split_message</primary></indexterm>
<programlisting><link linkend="GMimeMessage"><returnvalue>GMimeMessage</returnvalue></link> **     g_mime_message_partial_split_message
                                                        (<parameter><link linkend="GMimeMessage"><type>GMimeMessage</type></link> *message</parameter>,
                                                         <parameter><link linkend="size-t"><type>size_t</type></link> max_size</parameter>,
                                                         <parameter><link linkend="size-t"><type>size_t</type></link> *nparts</parameter>);</programlisting>
<para>
Splits <parameter>message</parameter> into an array of <link linkend="GMimeMessage"><type>GMimeMessage</type></link> objects each
containing a single <link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> object containing
<parameter>max_size</parameter> bytes or fewer. <parameter>nparts</parameter> is set to the number of
<link linkend="GMimeMessagePartial"><type>GMimeMessagePartial</type></link> objects created.
</para><variablelist role="params">
<varlistentry><term><parameter>message</parameter>&#160;:</term>
<listitem><simpara>message object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_size</parameter>&#160;:</term>
<listitem><simpara>max size
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>nparts</parameter>&#160;:</term>
<listitem><simpara>number of parts
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an array of <link linkend="GMimeMessage"><type>GMimeMessage</type></link> objects and sets <parameter>nparts</parameter> to th
number of messages returned or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
