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

<refnamediv>
<refname>camel-imap-utils</refname>
<refpurpose></refpurpose>
</refnamediv>

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

<synopsis>
const <link linkend="char">char</link> *        <link linkend="imap-next-word">imap_next_word</link>                      (const <link linkend="char">char</link> *buf);
struct              <link linkend="namespace">namespace</link>;
struct              <link linkend="namespaces">namespaces</link>;
<link linkend="void">void</link>                <link linkend="imap-namespaces-destroy">imap_namespaces_destroy</link>             (<link linkend="struct--namespaces">struct _namespaces</link> *namespaces);
struct <link linkend="namespaces">_namespaces</link> * <link linkend="imap-parse-namespace-response">imap_parse_namespace_response</link>      (const <link linkend="char">char</link> *response);
<link linkend="gboolean">gboolean</link>            <link linkend="imap-parse-list-response">imap_parse_list_response</link>            (<link linkend="CamelImapStore">CamelImapStore</link> *store,
                                                         const <link linkend="char">char</link> *buf,
                                                         <link linkend="int">int</link> *flags,
                                                         <link linkend="char">char</link> *sep,
                                                         <link linkend="char">char</link> **folder);
<link linkend="char">char</link> **             <link linkend="imap-parse-folder-name">imap_parse_folder_name</link>              (<link linkend="CamelImapStore">CamelImapStore</link> *store,
                                                         const <link linkend="char">char</link> *folder_name);
<link linkend="char">char</link> *              <link linkend="imap-create-flag-list">imap_create_flag_list</link>               (<link linkend="guint32">guint32</link> flags,
                                                         <link linkend="CamelMessageInfo">CamelMessageInfo</link> *info,
                                                         <link linkend="guint32">guint32</link> permanent_flags);
<link linkend="gboolean">gboolean</link>            <link linkend="imap-parse-flag-list">imap_parse_flag_list</link>                (<link linkend="char">char</link> **flag_list_p,
                                                         <link linkend="guint32">guint32</link> *flags_out,
                                                         <link linkend="char">char</link> **custom_flags_out);
<link linkend="char">char</link> *              <link linkend="imap-parse-string-generic">imap_parse_string_generic</link>           (const <link linkend="char">char</link> **str_p,
                                                         <link linkend="size-t">size_t</link> *len,
                                                         <link linkend="int">int</link> type);
#define             <link linkend="imap-parse-string">imap_parse_string</link>                   (str_p, len_p)
#define             <link linkend="imap-parse-nstring">imap_parse_nstring</link>                  (str_p, len_p)
#define             <link linkend="imap-parse-astring">imap_parse_astring</link>                  (str_p, len_p)
<link linkend="void">void</link>                <link linkend="imap-parse-body">imap_parse_body</link>                     (const <link linkend="char">char</link> **body_p,
                                                         <link linkend="CamelFolder">CamelFolder</link> *folder,
                                                         <link linkend="CamelMessageContentInfo">CamelMessageContentInfo</link> *ci);
<link linkend="gboolean">gboolean</link>            <link linkend="imap-is-atom">imap_is_atom</link>                        (const <link linkend="char">char</link> *in);
<link linkend="char">char</link> *              <link linkend="imap-quote-string">imap_quote_string</link>                   (const <link linkend="char">char</link> *str);
<link linkend="void">void</link>                <link linkend="imap-skip-list">imap_skip_list</link>                      (const <link linkend="char">char</link> **str_p);
<link linkend="char">char</link> *              <link linkend="imap-uid-array-to-set">imap_uid_array_to_set</link>               (<link linkend="CamelFolderSummary">CamelFolderSummary</link> *summary,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids,
                                                         <link linkend="int">int</link> uid,
                                                         <link linkend="ssize-t">ssize_t</link> maxlen,
                                                         <link linkend="int">int</link> *lastuid);
<link linkend="GPtrArray">GPtrArray</link> *         <link linkend="imap-uid-set-to-array">imap_uid_set_to_array</link>               (<link linkend="CamelFolderSummary">CamelFolderSummary</link> *summary,
                                                         const <link linkend="char">char</link> *uids);
<link linkend="void">void</link>                <link linkend="imap-uid-array-free">imap_uid_array_free</link>                 (<link linkend="GPtrArray">GPtrArray</link> *arr);
<link linkend="char">char</link> *              <link linkend="imap-concat">imap_concat</link>                         (<link linkend="CamelImapStore">CamelImapStore</link> *imap_store,
                                                         const <link linkend="char">char</link> *prefix,
                                                         const <link linkend="char">char</link> *suffix);
<link linkend="char">char</link> *              <link linkend="imap-namespace-concat">imap_namespace_concat</link>               (<link linkend="CamelImapStore">CamelImapStore</link> *store,
                                                         const <link linkend="char">char</link> *name);
<link linkend="char">char</link> *              <link linkend="imap-mailbox-encode">imap_mailbox_encode</link>                 (unsigned <link linkend="char">char</link> *in,
                                                         <link linkend="size-t">size_t</link> inlen);
<link linkend="char">char</link> *              <link linkend="imap-mailbox-decode">imap_mailbox_decode</link>                 (unsigned <link linkend="char">char</link> *in,
                                                         <link linkend="size-t">size_t</link> inlen);
<link linkend="gboolean">gboolean</link>            (<link linkend="IMAPPathFindFoldersCallback">*IMAPPathFindFoldersCallback</link>)      (const <link linkend="char">char</link> *physical_path,
                                                         const <link linkend="char">char</link> *path,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="char">char</link> *              <link linkend="imap-path-to-physical">imap_path_to_physical</link>               (const <link linkend="char">char</link> *prefix,
                                                         const <link linkend="char">char</link> *vpath);
<link linkend="gboolean">gboolean</link>            <link linkend="imap-path-find-folders">imap_path_find_folders</link>              (const <link linkend="char">char</link> *prefix,
                                                         <link linkend="IMAPPathFindFoldersCallback">IMAPPathFindFoldersCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> data);
</synopsis>
</refsynopsisdiv>









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

<refsect1 id="camel-camel-imap-utils.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="imap-next-word" role="function">
<title>imap_next_word ()</title>
<indexterm zone="imap-next-word"><primary sortas="imap_next_word">imap_next_word</primary></indexterm><programlisting>const <link linkend="char">char</link> *        imap_next_word                      (const <link linkend="char">char</link> *buf);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>buf</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="namespace" role="struct">
<title>struct namespace</title>
<indexterm zone="namespace"><primary sortas="namespace">namespace</primary></indexterm><programlisting>struct namespace {
	struct _namespace *next;
	char *prefix;
	char delim;
};
</programlisting>
<para>
</para></refsect2>
<refsect2 id="namespaces" role="struct">
<title>struct namespaces</title>
<indexterm zone="namespaces"><primary sortas="namespaces">namespaces</primary></indexterm><programlisting>struct namespaces {
	struct _namespace *personal;
	struct _namespace *other;
	struct _namespace *shared;
};
</programlisting>
<para>
</para></refsect2>
<refsect2 id="imap-namespaces-destroy" role="function">
<title>imap_namespaces_destroy ()</title>
<indexterm zone="imap-namespaces-destroy"><primary sortas="imap_namespaces_destroy">imap_namespaces_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                imap_namespaces_destroy             (<link linkend="struct--namespaces">struct _namespaces</link> *namespaces);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>namespaces</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-namespace-response" role="function">
<title>imap_parse_namespace_response ()</title>
<indexterm zone="imap-parse-namespace-response"><primary sortas="imap_parse_namespace_response">imap_parse_namespace_response</primary></indexterm><programlisting>struct <link linkend="namespaces">_namespaces</link> * imap_parse_namespace_response      (const <link linkend="char">char</link> *response);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>response</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-list-response" role="function">
<title>imap_parse_list_response ()</title>
<indexterm zone="imap-parse-list-response"><primary sortas="imap_parse_list_response">imap_parse_list_response</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            imap_parse_list_response            (<link linkend="CamelImapStore">CamelImapStore</link> *store,
                                                         const <link linkend="char">char</link> *buf,
                                                         <link linkend="int">int</link> *flags,
                                                         <link linkend="char">char</link> *sep,
                                                         <link linkend="char">char</link> **folder);</programlisting>
<para>
Parses a LIST or LSUB response and returns the desired parts of it.
If <parameter>folder</parameter> is non-<link linkend="NULL--CAPS"><literal>NULL</literal></link>, its value must be freed by the caller.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara> the IMAP store whose list response we're parsing
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buf</parameter>&#160;:</term>
<listitem><simpara> the LIST or LSUB response
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> a pointer to a variable to store the flags in, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sep</parameter>&#160;:</term>
<listitem><simpara> a pointer to a variable to store the hierarchy separator in, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>folder</parameter>&#160;:</term>
<listitem><simpara> a pointer to a variable to store the folder name in, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> whether or not the response was successfully parsed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-folder-name" role="function">
<title>imap_parse_folder_name ()</title>
<indexterm zone="imap-parse-folder-name"><primary sortas="imap_parse_folder_name">imap_parse_folder_name</primary></indexterm><programlisting><link linkend="char">char</link> **             imap_parse_folder_name              (<link linkend="CamelImapStore">CamelImapStore</link> *store,
                                                         const <link linkend="char">char</link> *folder_name);</programlisting>
<para>
Return an array of folder paths representing the folder heirarchy.
For example:
  Full/Path/"to / from"/Folder
Results in:
  Full, Full/Path, Full/Path/"to / from", Full/Path/"to / from"/Folder</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>folder_name</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-create-flag-list" role="function">
<title>imap_create_flag_list ()</title>
<indexterm zone="imap-create-flag-list"><primary sortas="imap_create_flag_list">imap_create_flag_list</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_create_flag_list               (<link linkend="guint32">guint32</link> flags,
                                                         <link linkend="CamelMessageInfo">CamelMessageInfo</link> *info,
                                                         <link linkend="guint32">guint32</link> permanent_flags);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>info</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>permanent_flags</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-flag-list" role="function">
<title>imap_parse_flag_list ()</title>
<indexterm zone="imap-parse-flag-list"><primary sortas="imap_parse_flag_list">imap_parse_flag_list</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            imap_parse_flag_list                (<link linkend="char">char</link> **flag_list_p,
                                                         <link linkend="guint32">guint32</link> *flags_out,
                                                         <link linkend="char">char</link> **custom_flags_out);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>flag_list_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags_out</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>custom_flags_out</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-string-generic" role="function">
<title>imap_parse_string_generic ()</title>
<indexterm zone="imap-parse-string-generic"><primary sortas="imap_parse_string_generic">imap_parse_string_generic</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_parse_string_generic           (const <link linkend="char">char</link> **str_p,
                                                         <link linkend="size-t">size_t</link> *len,
                                                         <link linkend="int">int</link> type);</programlisting>
<para>
This parses an IMAP "string" (quoted string or literal), "nstring"
(NIL or string), or "astring" (atom or string) starting at *<parameter>str_p</parameter>.
On success, *<parameter>str_p</parameter> will point to the first character after the end
of the string, and *<parameter>len</parameter> will contain the length of the returned
string. On failure, *<parameter>str_p</parameter> will be set to <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</para>
<para>
This assumes that the string is in the form returned by
<link linkend="camel-imap-command"><function>camel_imap_command()</function></link>: that line breaks are indicated by LF rather
than CRLF.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str_p</parameter>&#160;:</term>
<listitem><simpara> a pointer to a string
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len</parameter>&#160;:</term>
<listitem><simpara> a pointer to a size_t to return the length in
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&#160;:</term>
<listitem><simpara> type of string (<link linkend="IMAP-STRING--CAPS"><type>IMAP_STRING</type></link>, <link linkend="IMAP-ASTRING--CAPS"><type>IMAP_ASTRING</type></link>, or <link linkend="IMAP-NSTRING--CAPS"><type>IMAP_NSTRING</type></link>)
to parse.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the parsed string, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if a NIL or no string
was parsed. (In the former case, *<parameter>str_p</parameter> will be <link linkend="NULL--CAPS"><literal>NULL</literal></link>; in the
latter, it will point to the character after the NIL.)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-string" role="macro">
<title>imap_parse_string()</title>
<indexterm zone="imap-parse-string"><primary sortas="imap_parse_string">imap_parse_string</primary></indexterm><programlisting>#define             imap_parse_string(str_p, len_p)</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-nstring" role="macro">
<title>imap_parse_nstring()</title>
<indexterm zone="imap-parse-nstring"><primary sortas="imap_parse_nstring">imap_parse_nstring</primary></indexterm><programlisting>#define             imap_parse_nstring(str_p, len_p)</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-astring" role="macro">
<title>imap_parse_astring()</title>
<indexterm zone="imap-parse-astring"><primary sortas="imap_parse_astring">imap_parse_astring</primary></indexterm><programlisting>#define             imap_parse_astring(str_p, len_p)</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-parse-body" role="function">
<title>imap_parse_body ()</title>
<indexterm zone="imap-parse-body"><primary sortas="imap_parse_body">imap_parse_body</primary></indexterm><programlisting><link linkend="void">void</link>                imap_parse_body                     (const <link linkend="char">char</link> **body_p,
                                                         <link linkend="CamelFolder">CamelFolder</link> *folder,
                                                         <link linkend="CamelMessageContentInfo">CamelMessageContentInfo</link> *ci);</programlisting>
<para>
This fills in <parameter>ci</parameter> with data from *<parameter>body_p</parameter>. On success *<parameter>body_p</parameter>
will point to the character after the body. On failure, it will be
set to <link linkend="NULL--CAPS"><literal>NULL</literal></link> and <parameter>ci</parameter> will be unchanged.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>body_p</parameter>&#160;:</term>
<listitem><simpara> pointer to the start of an IMAP "body"
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>folder</parameter>&#160;:</term>
<listitem><simpara> an imap folder
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ci</parameter>&#160;:</term>
<listitem><simpara> a CamelMessageContentInfo to fill in
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-is-atom" role="function">
<title>imap_is_atom ()</title>
<indexterm zone="imap-is-atom"><primary sortas="imap_is_atom">imap_is_atom</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            imap_is_atom                        (const <link linkend="char">char</link> *in);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-quote-string" role="function">
<title>imap_quote_string ()</title>
<indexterm zone="imap-quote-string"><primary sortas="imap_quote_string">imap_quote_string</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_quote_string                   (const <link linkend="char">char</link> *str);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> the string to quote, which must not contain CR or LF
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> an IMAP "quoted" corresponding to the string, which
the caller must free.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-skip-list" role="function">
<title>imap_skip_list ()</title>
<indexterm zone="imap-skip-list"><primary sortas="imap_skip_list">imap_skip_list</primary></indexterm><programlisting><link linkend="void">void</link>                imap_skip_list                      (const <link linkend="char">char</link> **str_p);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str_p</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-uid-array-to-set" role="function">
<title>imap_uid_array_to_set ()</title>
<indexterm zone="imap-uid-array-to-set"><primary sortas="imap_uid_array_to_set">imap_uid_array_to_set</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_uid_array_to_set               (<link linkend="CamelFolderSummary">CamelFolderSummary</link> *summary,
                                                         <link linkend="GPtrArray">GPtrArray</link> *uids,
                                                         <link linkend="int">int</link> uid,
                                                         <link linkend="ssize-t">ssize_t</link> maxlen,
                                                         <link linkend="int">int</link> *lastuid);</programlisting>
<para>
Creates an IMAP "set" up to <parameter>maxlen</parameter> bytes long, covering the listed
UIDs starting at index <parameter>uid</parameter> and not covering any UIDs that are in
<parameter>summary</parameter> but not in <parameter>uids</parameter>. It doesn't actually require that all (or
any) of the UIDs be in <parameter>summary</parameter>.
</para>
<para>
After calling, <parameter>lastuid</parameter> will be set the index of the first uid
*not* included in the returned set string.
</para>
<para>
Note: <parameter>uids</parameter> MUST be in sorted order for this code to work properly.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> summary for the folder the UIDs come from
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uids</parameter>&#160;:</term>
<listitem><simpara> a (sorted) array of UIDs
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uid</parameter>&#160;:</term>
<listitem><simpara> uid index to start at
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>maxlen</parameter>&#160;:</term>
<listitem><simpara> max length of the set string (or -1 for infinite)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>lastuid</parameter>&#160;:</term>
<listitem><simpara> index offset of the last uid used
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the set, which the caller must free with <link linkend="g-free"><function>g_free()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-uid-set-to-array" role="function">
<title>imap_uid_set_to_array ()</title>
<indexterm zone="imap-uid-set-to-array"><primary sortas="imap_uid_set_to_array">imap_uid_set_to_array</primary></indexterm><programlisting><link linkend="GPtrArray">GPtrArray</link> *         imap_uid_set_to_array               (<link linkend="CamelFolderSummary">CamelFolderSummary</link> *summary,
                                                         const <link linkend="char">char</link> *uids);</programlisting>
<para>
Fills an array with the UIDs corresponding to <parameter>uids</parameter> and <parameter>summary</parameter>.
There can be text after the uid set in <parameter>uids</parameter>, which will be
ignored.
</para>
<para>
If <parameter>uids</parameter> specifies a range of UIDs that extends outside the range
of <parameter>summary</parameter>, the function will assume that all of the "missing" UIDs
do exist.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>summary</parameter>&#160;:</term>
<listitem><simpara> summary for the folder the UIDs come from
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uids</parameter>&#160;:</term>
<listitem><simpara> a pointer to the start of an IMAP "set" of UIDs
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the array of uids, which the caller must free with
<link linkend="imap-uid-array-free"><function>imap_uid_array_free()</function></link>. (Or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if the uid set can't be parsed.)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-uid-array-free" role="function">
<title>imap_uid_array_free ()</title>
<indexterm zone="imap-uid-array-free"><primary sortas="imap_uid_array_free">imap_uid_array_free</primary></indexterm><programlisting><link linkend="void">void</link>                imap_uid_array_free                 (<link linkend="GPtrArray">GPtrArray</link> *arr);</programlisting>
<para>
Frees <parameter>arr</parameter></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>arr</parameter>&#160;:</term>
<listitem><simpara> an array returned from <link linkend="imap-uid-set-to-array"><function>imap_uid_set_to_array()</function></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-concat" role="function">
<title>imap_concat ()</title>
<indexterm zone="imap-concat"><primary sortas="imap_concat">imap_concat</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_concat                         (<link linkend="CamelImapStore">CamelImapStore</link> *imap_store,
                                                         const <link linkend="char">char</link> *prefix,
                                                         const <link linkend="char">char</link> *suffix);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>imap_store</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prefix</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>suffix</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-namespace-concat" role="function">
<title>imap_namespace_concat ()</title>
<indexterm zone="imap-namespace-concat"><primary sortas="imap_namespace_concat">imap_namespace_concat</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_namespace_concat               (<link linkend="CamelImapStore">CamelImapStore</link> *store,
                                                         const <link linkend="char">char</link> *name);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>store</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-mailbox-encode" role="function">
<title>imap_mailbox_encode ()</title>
<indexterm zone="imap-mailbox-encode"><primary sortas="imap_mailbox_encode">imap_mailbox_encode</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_mailbox_encode                 (unsigned <link linkend="char">char</link> *in,
                                                         <link linkend="size-t">size_t</link> inlen);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>inlen</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-mailbox-decode" role="function">
<title>imap_mailbox_decode ()</title>
<indexterm zone="imap-mailbox-decode"><primary sortas="imap_mailbox_decode">imap_mailbox_decode</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_mailbox_decode                 (unsigned <link linkend="char">char</link> *in,
                                                         <link linkend="size-t">size_t</link> inlen);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>in</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>inlen</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="IMAPPathFindFoldersCallback" role="function">
<title>IMAPPathFindFoldersCallback ()</title>
<indexterm zone="IMAPPathFindFoldersCallback"><primary sortas="IMAPPathFindFoldersCallback">IMAPPathFindFoldersCallback</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*IMAPPathFindFoldersCallback)      (const <link linkend="char">char</link> *physical_path,
                                                         const <link linkend="char">char</link> *path,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>physical_path</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-path-to-physical" role="function">
<title>imap_path_to_physical ()</title>
<indexterm zone="imap-path-to-physical"><primary sortas="imap_path_to_physical">imap_path_to_physical</primary></indexterm><programlisting><link linkend="char">char</link> *              imap_path_to_physical               (const <link linkend="char">char</link> *prefix,
                                                         const <link linkend="char">char</link> *vpath);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>prefix</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>vpath</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="imap-path-find-folders" role="function">
<title>imap_path_find_folders ()</title>
<indexterm zone="imap-path-find-folders"><primary sortas="imap_path_find_folders">imap_path_find_folders</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            imap_path_find_folders              (const <link linkend="char">char</link> *prefix,
                                                         <link linkend="IMAPPathFindFoldersCallback">IMAPPathFindFoldersCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Walks the folder tree starting at <parameter>prefix</parameter> and calls <parameter>callback</parameter>
on each folder.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>prefix</parameter>&#160;:</term>
<listitem><simpara> directory to start from
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara> Callback to invoke on each folder
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara> Data for <parameter>callback</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> if an error occurs at any point
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
