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

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

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

<synopsis>
                    <link linkend="CamelIMAP4Command">CamelIMAP4Command</link>;
                    <link linkend="CamelIMAP4Literal">CamelIMAP4Literal</link>;
<link linkend="int">int</link>                 (<link linkend="CamelIMAP4PlusCallback">*CamelIMAP4PlusCallback</link>)           (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic,
                                                         unsigned <link linkend="char">char</link> *linebuf,
                                                         <link linkend="size-t">size_t</link> linelen,
                                                         <link linkend="CamelException">CamelException</link> *ex);
<link linkend="int">int</link>                 (<link linkend="CamelIMAP4UntaggedCallback">*CamelIMAP4UntaggedCallback</link>)       (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="CamelIMAP4Command">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="void">void</link>                (<link linkend="CamelIMAP4CommandReset">*CamelIMAP4CommandReset</link>)           (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic,
                                                         <link linkend="void">void</link> *user_data);
                    <link linkend="CamelIMAP4CommandPart">CamelIMAP4CommandPart</link>;
<link linkend="CamelIMAP4Command">CamelIMAP4Command</link>*  <link linkend="camel-imap4-command-new">camel_imap4_command_new</link>             (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Folder">struct _CamelIMAP4Folder</link> *folder,
                                                         const <link linkend="char">char</link> *format,
                                                         ...);
<link linkend="CamelIMAP4Command">CamelIMAP4Command</link>*  <link linkend="camel-imap4-command-newv">camel_imap4_command_newv</link>            (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Folder">struct _CamelIMAP4Folder</link> *folder,
                                                         const <link linkend="char">char</link> *format,
                                                         <link linkend="va-list">va_list</link> args);
<link linkend="void">void</link>                <link linkend="camel-imap4-command-register-untagged">camel_imap4_command_register_untagged</link>
                                                        (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic,
                                                         const <link linkend="char">char</link> *atom,
                                                         <link linkend="CamelIMAP4UntaggedCallback">CamelIMAP4UntaggedCallback</link> untagged);
<link linkend="void">void</link>                <link linkend="camel-imap4-command-ref">camel_imap4_command_ref</link>             (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);
<link linkend="void">void</link>                <link linkend="camel-imap4-command-unref">camel_imap4_command_unref</link>           (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);
<link linkend="int">int</link>                 <link linkend="camel-imap4-command-step">camel_imap4_command_step</link>            (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);
<link linkend="void">void</link>                <link linkend="camel-imap4-command-reset">camel_imap4_command_reset</link>           (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);
</synopsis>
</refsynopsisdiv>









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

</para>
</refsect1>

<refsect1 id="camel-camel-imap4-command.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CamelIMAP4Command" role="struct">
<title>CamelIMAP4Command</title>
<indexterm zone="CamelIMAP4Command"><primary>CamelIMAP4Command</primary></indexterm><programlisting>typedef struct {
	EDListNode node;
	
	struct _CamelIMAP4Engine *engine;
	
	unsigned int ref_count:26;
	unsigned int status:3;
	unsigned int result:3;
	int id;
	
	char *tag;
	
	GPtrArray *resp_codes;
	
	struct _CamelIMAP4Folder *folder;
	CamelException ex;
	
	/* command parts - logical breaks in the overall command based on literals */
	CamelIMAP4CommandPart *parts;
	
	/* current part */
	CamelIMAP4CommandPart *part;
	
	/* untagged handlers */
	GHashTable *untagged;
	
	/* '+' callback/data */
	CamelIMAP4PlusCallback plus;
	CamelIMAP4CommandReset reset;
	void *user_data;
} CamelIMAP4Command;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CamelIMAP4Literal" role="struct">
<title>CamelIMAP4Literal</title>
<indexterm zone="CamelIMAP4Literal"><primary>CamelIMAP4Literal</primary></indexterm><programlisting>typedef struct {
	int type;
	union {
		char *string;
		CamelStream *stream;
		CamelDataWrapper *wrapper;
	} literal;
} CamelIMAP4Literal;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="CamelIMAP4PlusCallback" role="function">
<title>CamelIMAP4PlusCallback ()</title>
<indexterm zone="CamelIMAP4PlusCallback"><primary>CamelIMAP4PlusCallback</primary></indexterm><programlisting><link linkend="int">int</link>                 (*CamelIMAP4PlusCallback)           (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic,
                                                         unsigned <link linkend="char">char</link> *linebuf,
                                                         <link linkend="size-t">size_t</link> linelen,
                                                         <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>linebuf</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>linelen</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="CamelIMAP4UntaggedCallback" role="function">
<title>CamelIMAP4UntaggedCallback ()</title>
<indexterm zone="CamelIMAP4UntaggedCallback"><primary>CamelIMAP4UntaggedCallback</primary></indexterm><programlisting><link linkend="int">int</link>                 (*CamelIMAP4UntaggedCallback)       (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="CamelIMAP4Command">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="CamelIMAP4CommandReset" role="function">
<title>CamelIMAP4CommandReset ()</title>
<indexterm zone="CamelIMAP4CommandReset"><primary>CamelIMAP4CommandReset</primary></indexterm><programlisting><link linkend="void">void</link>                (*CamelIMAP4CommandReset)           (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic,
                                                         <link linkend="void">void</link> *user_data);</programlisting>
<para>

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


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="CamelIMAP4CommandPart" role="struct">
<title>CamelIMAP4CommandPart</title>
<indexterm zone="CamelIMAP4CommandPart"><primary>CamelIMAP4CommandPart</primary></indexterm><programlisting>typedef struct {
	struct _CamelIMAP4CommandPart *next;
	unsigned char *buffer;
	size_t buflen;
	
	CamelIMAP4Literal *literal;
} CamelIMAP4CommandPart;
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-imap4-command-new" role="function">
<title>camel_imap4_command_new ()</title>
<indexterm zone="camel-imap4-command-new"><primary>camel_imap4_command_new</primary></indexterm><programlisting><link linkend="CamelIMAP4Command">CamelIMAP4Command</link>*  camel_imap4_command_new             (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Folder">struct _CamelIMAP4Folder</link> *folder,
                                                         const <link linkend="char">char</link> *format,
                                                         ...);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>engine</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>folder</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</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-command-newv" role="function">
<title>camel_imap4_command_newv ()</title>
<indexterm zone="camel-imap4-command-newv"><primary>camel_imap4_command_newv</primary></indexterm><programlisting><link linkend="CamelIMAP4Command">CamelIMAP4Command</link>*  camel_imap4_command_newv            (<link linkend="struct--CamelIMAP4Engine">struct _CamelIMAP4Engine</link> *engine,
                                                         <link linkend="struct--CamelIMAP4Folder">struct _CamelIMAP4Folder</link> *folder,
                                                         const <link linkend="char">char</link> *format,
                                                         <link linkend="va-list">va_list</link> args);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>engine</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>folder</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>format</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>args</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-command-register-untagged" role="function">
<title>camel_imap4_command_register_untagged ()</title>
<indexterm zone="camel-imap4-command-register-untagged"><primary>camel_imap4_command_register_untagged</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_command_register_untagged
                                                        (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic,
                                                         const <link linkend="char">char</link> *atom,
                                                         <link linkend="CamelIMAP4UntaggedCallback">CamelIMAP4UntaggedCallback</link> untagged);</programlisting>
<para>

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


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-command-ref" role="function">
<title>camel_imap4_command_ref ()</title>
<indexterm zone="camel-imap4-command-ref"><primary>camel_imap4_command_ref</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_command_ref             (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);</programlisting>
<para>

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


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-command-unref" role="function">
<title>camel_imap4_command_unref ()</title>
<indexterm zone="camel-imap4-command-unref"><primary>camel_imap4_command_unref</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_command_unref           (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);</programlisting>
<para>

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


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-imap4-command-step" role="function">
<title>camel_imap4_command_step ()</title>
<indexterm zone="camel-imap4-command-step"><primary>camel_imap4_command_step</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_imap4_command_step            (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ic</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-command-reset" role="function">
<title>camel_imap4_command_reset ()</title>
<indexterm zone="camel-imap4-command-reset"><primary>camel_imap4_command_reset</primary></indexterm><programlisting><link linkend="void">void</link>                camel_imap4_command_reset           (<link linkend="CamelIMAP4Command">CamelIMAP4Command</link> *ic);</programlisting>
<para>

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


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

</refsect1>




</refentry>
