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

<refnamediv>
<refname>camel-folder-thread</refname>
<refpurpose></refpurpose>
</refnamediv>

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

<synopsis>
                    <link linkend="CamelFolderThreadNode">CamelFolderThreadNode</link>;
                    <link linkend="CamelFolderThread">CamelFolderThread</link>;
<link linkend="CamelFolderThread">CamelFolderThread</link> * <link linkend="camel-folder-thread-messages-new">camel_folder_thread_messages_new</link>    (<link linkend="CamelFolder">CamelFolder</link> *folder,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids,
                                                         <link linkend="gboolean">gboolean</link> thread_subject);
<link linkend="void">void</link>                <link linkend="camel-folder-thread-messages-apply">camel_folder_thread_messages_apply</link>  (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids);
<link linkend="CamelFolderThread">CamelFolderThread</link> * <link linkend="camel-folder-thread-messages-new-summary">camel_folder_thread_messages_new_summary</link>
                                                        (<link linkend="GPtrArray">GPtrArray</link> *summary);
<link linkend="void">void</link>                <link linkend="camel-folder-thread-messages-add">camel_folder_thread_messages_add</link>    (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread,
                                                         <link linkend="GPtrArray">GPtrArray</link> *summary);
<link linkend="void">void</link>                <link linkend="camel-folder-thread-messages-remove">camel_folder_thread_messages_remove</link> (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids);
<link linkend="void">void</link>                <link linkend="camel-folder-thread-messages-ref">camel_folder_thread_messages_ref</link>    (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread);
<link linkend="void">void</link>                <link linkend="camel-folder-thread-messages-unref">camel_folder_thread_messages_unref</link>  (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread);
<link linkend="int">int</link>                 <link linkend="camel-folder-threaded-messages-dump">camel_folder_threaded_messages_dump</link> (<link linkend="CamelFolderThreadNode">CamelFolderThreadNode</link> *c);
</synopsis>
</refsynopsisdiv>









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

<refsect1 id="camel-camel-folder-thread.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CamelFolderThreadNode" role="struct">
<title>CamelFolderThreadNode</title>
<indexterm zone="CamelFolderThreadNode"><primary sortas="CamelFolderThreadNode">CamelFolderThreadNode</primary></indexterm><programlisting>typedef struct {
	struct _CamelFolderThreadNode *next, *parent, *child;
	const CamelMessageInfo *message;
	char *root_subject;	/* cached root equivalent subject */
	guint32 order:31;
	guint32 re:1;			/* re version of subject? */
} CamelFolderThreadNode;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="CamelFolderThread" role="struct">
<title>CamelFolderThread</title>
<indexterm zone="CamelFolderThread"><primary sortas="CamelFolderThread">CamelFolderThread</primary></indexterm><programlisting>typedef struct {
	guint32 refcount  : 31;
	guint32 subject   : 1;
	
	struct _CamelFolderThreadNode *tree;
	struct _EMemChunk *node_chunks;
	CamelFolder *folder;
	GPtrArray *summary;
} CamelFolderThread;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="camel-folder-thread-messages-new" role="function">
<title>camel_folder_thread_messages_new ()</title>
<indexterm zone="camel-folder-thread-messages-new"><primary sortas="camel_folder_thread_messages_new">camel_folder_thread_messages_new</primary></indexterm><programlisting><link linkend="CamelFolderThread">CamelFolderThread</link> * camel_folder_thread_messages_new    (<link linkend="CamelFolder">CamelFolder</link> *folder,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids,
                                                         <link linkend="gboolean">gboolean</link> thread_subject);</programlisting>
<para>
Thread a (subset) of the messages in a folder.  And sort the result
in summary order.
</para>
<para>
If <parameter>thread_subject</parameter> is <link linkend="TRUE--CAPS"><literal>TRUE</literal></link>, messages with
related subjects will also be threaded. The default behaviour is to
only thread based on message-id.
</para>
<para>
This function is probably to be removed soon.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>folder</parameter>&#160;:</term>
<listitem><simpara> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uids</parameter>&#160;:</term>
<listitem><simpara> The subset of uid's to thread.  If NULL. then thread all
uid's in <parameter>folder</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>thread_subject</parameter>&#160;:</term>
<listitem><simpara> thread based on subject also
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A CamelFolderThread contianing a tree of CamelFolderThreadNode's
which represent the threaded structure of the messages.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-folder-thread-messages-apply" role="function">
<title>camel_folder_thread_messages_apply ()</title>
<indexterm zone="camel-folder-thread-messages-apply"><primary sortas="camel_folder_thread_messages_apply">camel_folder_thread_messages_apply</primary></indexterm><programlisting><link linkend="void">void</link>                camel_folder_thread_messages_apply  (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>thread</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uids</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-folder-thread-messages-new-summary" role="function">
<title>camel_folder_thread_messages_new_summary ()</title>
<indexterm zone="camel-folder-thread-messages-new-summary"><primary sortas="camel_folder_thread_messages_new_summary">camel_folder_thread_messages_new_summary</primary></indexterm><programlisting><link linkend="CamelFolderThread">CamelFolderThread</link> * camel_folder_thread_messages_new_summary
                                                        (<link linkend="GPtrArray">GPtrArray</link> *summary);</programlisting>
<para>
Thread a list of MessageInfo's.  The summary must remain valid for the
life of the CamelFolderThread created by this function, and it is upto the
caller to ensure this.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> Array of CamelMessageInfo's to thread.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> A CamelFolderThread contianing a tree of CamelFolderThreadNode's
which represent the threaded structure of the messages.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-folder-thread-messages-add" role="function">
<title>camel_folder_thread_messages_add ()</title>
<indexterm zone="camel-folder-thread-messages-add"><primary sortas="camel_folder_thread_messages_add">camel_folder_thread_messages_add</primary></indexterm><programlisting><link linkend="void">void</link>                camel_folder_thread_messages_add    (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread,
                                                         <link linkend="GPtrArray">GPtrArray</link> *summary);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>thread</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-folder-thread-messages-remove" role="function">
<title>camel_folder_thread_messages_remove ()</title>
<indexterm zone="camel-folder-thread-messages-remove"><primary sortas="camel_folder_thread_messages_remove">camel_folder_thread_messages_remove</primary></indexterm><programlisting><link linkend="void">void</link>                camel_folder_thread_messages_remove (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>thread</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uids</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-folder-thread-messages-ref" role="function">
<title>camel_folder_thread_messages_ref ()</title>
<indexterm zone="camel-folder-thread-messages-ref"><primary sortas="camel_folder_thread_messages_ref">camel_folder_thread_messages_ref</primary></indexterm><programlisting><link linkend="void">void</link>                camel_folder_thread_messages_ref    (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>thread</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-folder-thread-messages-unref" role="function">
<title>camel_folder_thread_messages_unref ()</title>
<indexterm zone="camel-folder-thread-messages-unref"><primary sortas="camel_folder_thread_messages_unref">camel_folder_thread_messages_unref</primary></indexterm><programlisting><link linkend="void">void</link>                camel_folder_thread_messages_unref  (<link linkend="CamelFolderThread">CamelFolderThread</link> *thread);</programlisting>
<para>
Free all memory associated with the thread descriptor <parameter>thread</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>thread</parameter>&#160;:</term>
<listitem><simpara> 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-folder-threaded-messages-dump" role="function">
<title>camel_folder_threaded_messages_dump ()</title>
<indexterm zone="camel-folder-threaded-messages-dump"><primary sortas="camel_folder_threaded_messages_dump">camel_folder_threaded_messages_dump</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_folder_threaded_messages_dump (<link linkend="CamelFolderThreadNode">CamelFolderThreadNode</link> *c);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>c</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
