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

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

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

<synopsis>
                    <link linkend="flags-diff-t">flags_diff_t</link>;
<link linkend="void">void</link>                <link linkend="camel-imap4-flags-diff">camel_imap4_flags_diff</link>              (<link linkend="flags-diff-t">flags_diff_t</link> *diff,
                                                         <link linkend="guint32">guint32</link> old,
                                                         <link linkend="guint32">guint32</link> new);
<link linkend="guint32">guint32</link>             <link linkend="camel-imap4-flags-merge">camel_imap4_flags_merge</link>             (<link linkend="flags-diff-t">flags_diff_t</link> *diff,
                                                         <link linkend="guint32">guint32</link> flags);
<link linkend="guint32">guint32</link>             <link linkend="camel-imap4-merge-flags">camel_imap4_merge_flags</link>             (<link linkend="guint32">guint32</link> original,
                                                         <link linkend="guint32">guint32</link> local,
                                                         <link linkend="guint32">guint32</link> server);
struct <link linkend="CamelFolderInfo">_CamelFolderInfo</link>* <link linkend="camel-imap4-build-folder-info-tree">camel_imap4_build_folder_info_tree</link>
                                                        (<link linkend="GPtrArray">GPtrArray</link> *array,
                                                         const <link linkend="char">char</link> *top);
<link linkend="void">void</link>                <link linkend="camel-imap4-namespace-clear">camel_imap4_namespace_clear</link>         (<link linkend="struct--CamelIMAP4Namespace">struct _CamelIMAP4Namespace</link> **ns);
struct <link linkend="CamelIMAP4NamespaceList">_CamelIMAP4NamespaceList</link>* <link linkend="camel-imap4-namespace-list-copy">camel_imap4_namespace_list_copy</link>
                                                        (const <link linkend="struct--CamelIMAP4NamespaceList">struct _CamelIMAP4NamespaceList</link> *nsl);
<link linkend="void">void</link>                <link linkend="camel-imap4-namespace-list-free">camel_imap4_namespace_list_free</link>     (<link linkend="struct--CamelIMAP4NamespaceList">struct _CamelIMAP4NamespaceList</link> *nsl);
<link linkend="char">char</link>                <link linkend="camel-imap4-get-path-delim">camel_imap4_get_path_delim</link>          (<link linkend="struct--CamelIMAP4StoreSummary">struct _CamelIMAP4StoreSummary</link> *s,
                                                         const <link linkend="char">char</link> *full_name);
<link linkend="int">int</link>                 <link linkend="camel-imap4-get-uid-set">camel_imap4_get_uid_set</link>             (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelFolderSummary">struct _CamelFolderSummary</link> *summary,
                                                         <link linkend="GPtrArray">GPtrArray</link> *infos,
                                                         <link linkend="int">int</link> cur,
                                                         <link linkend="size-t">size_t</link> linelen,
                                                         <link linkend="char">char</link> **set);
<link linkend="void">void</link>                <link linkend="camel-imap4-utils-set-unexpected-token-error">camel_imap4_utils_set_unexpected_token_error</link>
                                                        (<link linkend="CamelException">CamelException</link> *ex,
                                                         <link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--camel-imap4-token-t">struct _camel_imap4_token_t</link> *token);
<link linkend="int">int</link>                 <link linkend="camel-imap4-parse-flags-list">camel_imap4_parse_flags_list</link>        (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="guint32">guint32</link> *flags,
                                                         <link linkend="CamelException">CamelException</link> *ex);
#define             <link linkend="CAMEL-IMAP4-FOLDER-MARKED:CAPS">CAMEL_IMAP4_FOLDER_MARKED</link>
#define             <link linkend="CAMEL-IMAP4-FOLDER-UNMARKED:CAPS">CAMEL_IMAP4_FOLDER_UNMARKED</link>
                    <link linkend="camel-imap4-list-t">camel_imap4_list_t</link>;
<link linkend="int">int</link>                 <link linkend="camel-imap4-untagged-list">camel_imap4_untagged_list</link>           (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Command">struct _CamelIMAP4Command</link> *ic,
                                                         <link linkend="guint32">guint32</link> index,
                                                         <link linkend="struct--camel-imap4-token-t">struct _camel_imap4_token_t</link> *token,
                                                         <link linkend="CamelException">CamelException</link> *ex);
                    <link linkend="camel-imap4-status-attr-t">camel_imap4_status_attr_t</link>;
                    <link linkend="camel-imap4-status-t">camel_imap4_status_t</link>;
<link linkend="void">void</link>                <link linkend="camel-imap4-status-free">camel_imap4_status_free</link>             (<link linkend="camel-imap4-status-t">camel_imap4_status_t</link> *status);
<link linkend="int">int</link>                 <link linkend="camel-imap4-untagged-status">camel_imap4_untagged_status</link>         (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Command">struct _CamelIMAP4Command</link> *ic,
                                                         <link linkend="guint32">guint32</link> index,
                                                         <link linkend="struct--camel-imap4-token-t">struct _camel_imap4_token_t</link> *token,
                                                         <link linkend="CamelException">CamelException</link> *ex);
</synopsis>
</refsynopsisdiv>









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

</para>
</refsect1>

<refsect1 id="camel-camel-imap4-utils.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="flags-diff-t" role="struct">
<title>flags_diff_t</title>
<indexterm zone="flags-diff-t"><primary>flags_diff_t</primary></indexterm><programlisting>typedef struct {
	guint32 changed;
	guint32 bits;
} flags_diff_t;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-imap4-flags-diff" role="function">
<title>camel_imap4_flags_diff ()</title>
<indexterm zone="camel-imap4-flags-diff"><primary>camel_imap4_flags_diff</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_flags_diff              (<link linkend="flags-diff-t">flags_diff_t</link> *diff,
                                                         <link linkend="guint32">guint32</link> old,
                                                         <link linkend="guint32">guint32</link> new);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>diff</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>old</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-flags-merge" role="function">
<title>camel_imap4_flags_merge ()</title>
<indexterm zone="camel-imap4-flags-merge"><primary>camel_imap4_flags_merge</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             camel_imap4_flags_merge             (<link linkend="flags-diff-t">flags_diff_t</link> *diff,
                                                         <link linkend="guint32">guint32</link> flags);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>diff</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-merge-flags" role="function">
<title>camel_imap4_merge_flags ()</title>
<indexterm zone="camel-imap4-merge-flags"><primary>camel_imap4_merge_flags</primary></indexterm><programlisting><link linkend="guint32">guint32</link>             camel_imap4_merge_flags             (<link linkend="guint32">guint32</link> original,
                                                         <link linkend="guint32">guint32</link> local,
                                                         <link linkend="guint32">guint32</link> server);</programlisting>
<para>
Merge the local flag changes into the new server flags.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>original</parameter>&nbsp;:</term>
<listitem><simpara> original server flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>local</parameter>&nbsp;:</term>
<listitem><simpara> local flags (after changes)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>server</parameter>&nbsp;:</term>
<listitem><simpara> new server flags (another client updated the server flags)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the merged flags.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-build-folder-info-tree" role="function">
<title>camel_imap4_build_folder_info_tree ()</title>
<indexterm zone="camel-imap4-build-folder-info-tree"><primary>camel_imap4_build_folder_info_tree</primary></indexterm><programlisting>struct <link linkend="CamelFolderInfo">_CamelFolderInfo</link>* camel_imap4_build_folder_info_tree
                                                        (<link linkend="GPtrArray">GPtrArray</link> *array,
                                                         const <link linkend="char">char</link> *top);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>array</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>top</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-namespace-clear" role="function">
<title>camel_imap4_namespace_clear ()</title>
<indexterm zone="camel-imap4-namespace-clear"><primary>camel_imap4_namespace_clear</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_namespace_clear         (<link linkend="struct--CamelIMAP4Namespace">struct _CamelIMAP4Namespace</link> **ns);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ns</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-namespace-list-copy" role="function">
<title>camel_imap4_namespace_list_copy ()</title>
<indexterm zone="camel-imap4-namespace-list-copy"><primary>camel_imap4_namespace_list_copy</primary></indexterm><programlisting>struct <link linkend="CamelIMAP4NamespaceList">_CamelIMAP4NamespaceList</link>* camel_imap4_namespace_list_copy
                                                        (const <link linkend="struct--CamelIMAP4NamespaceList">struct _CamelIMAP4NamespaceList</link> *nsl);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>nsl</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-namespace-list-free" role="function">
<title>camel_imap4_namespace_list_free ()</title>
<indexterm zone="camel-imap4-namespace-list-free"><primary>camel_imap4_namespace_list_free</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_namespace_list_free     (<link linkend="struct--CamelIMAP4NamespaceList">struct _CamelIMAP4NamespaceList</link> *nsl);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>nsl</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-get-path-delim" role="function">
<title>camel_imap4_get_path_delim ()</title>
<indexterm zone="camel-imap4-get-path-delim"><primary>camel_imap4_get_path_delim</primary></indexterm><programlisting><link linkend="char">char</link>                camel_imap4_get_path_delim          (<link linkend="struct--CamelIMAP4StoreSummary">struct _CamelIMAP4StoreSummary</link> *s,
                                                         const <link linkend="char">char</link> *full_name);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>s</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>full_name</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-get-uid-set" role="function">
<title>camel_imap4_get_uid_set ()</title>
<indexterm zone="camel-imap4-get-uid-set"><primary>camel_imap4_get_uid_set</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_imap4_get_uid_set             (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelFolderSummary">struct _CamelFolderSummary</link> *summary,
                                                         <link linkend="GPtrArray">GPtrArray</link> *infos,
                                                         <link linkend="int">int</link> cur,
                                                         <link linkend="size-t">size_t</link> linelen,
                                                         <link linkend="char">char</link> **set);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>engine</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>summary</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>infos</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cur</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>linelen</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>set</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-utils-set-unexpected-token-error" role="function">
<title>camel_imap4_utils_set_unexpected_token_error ()</title>
<indexterm zone="camel-imap4-utils-set-unexpected-token-error"><primary>camel_imap4_utils_set_unexpected_token_error</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_utils_set_unexpected_token_error
                                                        (<link linkend="CamelException">CamelException</link> *ex,
                                                         <link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--camel-imap4-token-t">struct _camel_imap4_token_t</link> *token);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>engine</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>token</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-parse-flags-list" role="function">
<title>camel_imap4_parse_flags_list ()</title>
<indexterm zone="camel-imap4-parse-flags-list"><primary>camel_imap4_parse_flags_list</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_imap4_parse_flags_list        (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="guint32">guint32</link> *flags,
                                                         <link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>engine</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="CAMEL-IMAP4-FOLDER-MARKED:CAPS" role="macro">
<title>CAMEL_IMAP4_FOLDER_MARKED</title>
<indexterm zone="CAMEL-IMAP4-FOLDER-MARKED:CAPS"><primary>CAMEL_IMAP4_FOLDER_MARKED</primary></indexterm><programlisting>#define CAMEL_IMAP4_FOLDER_MARKED   (1 &lt;&lt; 17)
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CAMEL-IMAP4-FOLDER-UNMARKED:CAPS" role="macro">
<title>CAMEL_IMAP4_FOLDER_UNMARKED</title>
<indexterm zone="CAMEL-IMAP4-FOLDER-UNMARKED:CAPS"><primary>CAMEL_IMAP4_FOLDER_UNMARKED</primary></indexterm><programlisting>#define CAMEL_IMAP4_FOLDER_UNMARKED (1 &lt;&lt; 18)
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-imap4-list-t" role="struct">
<title>camel_imap4_list_t</title>
<indexterm zone="camel-imap4-list-t"><primary>camel_imap4_list_t</primary></indexterm><programlisting>typedef struct {
	guint32 flags;
	char delim;
	char *name;
} camel_imap4_list_t;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-imap4-untagged-list" role="function">
<title>camel_imap4_untagged_list ()</title>
<indexterm zone="camel-imap4-untagged-list"><primary>camel_imap4_untagged_list</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_imap4_untagged_list           (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Command">struct _CamelIMAP4Command</link> *ic,
                                                         <link linkend="guint32">guint32</link> index,
                                                         <link linkend="struct--camel-imap4-token-t">struct _camel_imap4_token_t</link> *token,
                                                         <link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>engine</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ic</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>token</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-status-attr-t" role="struct">
<title>camel_imap4_status_attr_t</title>
<indexterm zone="camel-imap4-status-attr-t"><primary>camel_imap4_status_attr_t</primary></indexterm><programlisting>typedef struct {
	struct _camel_imap4_status_attr *next;
	guint32 type;
	guint32 value;
} camel_imap4_status_attr_t;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-imap4-status-t" role="struct">
<title>camel_imap4_status_t</title>
<indexterm zone="camel-imap4-status-t"><primary>camel_imap4_status_t</primary></indexterm><programlisting>typedef struct {
	camel_imap4_status_attr_t *attr_list;
	char *mailbox;
} camel_imap4_status_t;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-imap4-status-free" role="function">
<title>camel_imap4_status_free ()</title>
<indexterm zone="camel-imap4-status-free"><primary>camel_imap4_status_free</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_status_free             (<link linkend="camel-imap4-status-t">camel_imap4_status_t</link> *status);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>status</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-untagged-status" role="function">
<title>camel_imap4_untagged_status ()</title>
<indexterm zone="camel-imap4-untagged-status"><primary>camel_imap4_untagged_status</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_imap4_untagged_status         (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Command">struct _CamelIMAP4Command</link> *ic,
                                                         <link linkend="guint32">guint32</link> index,
                                                         <link linkend="struct--camel-imap4-token-t">struct _camel_imap4_token_t</link> *token,
                                                         <link linkend="CamelException">CamelException</link> *ex);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>engine</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ic</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>token</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ex</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
