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

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

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

<synopsis>
struct              <link linkend="CamelAddress">CamelAddress</link>;
<link linkend="CamelAddress">CamelAddress</link>*       <link linkend="camel-address-new">camel_address_new</link>                   (void);
<link linkend="CamelAddress">CamelAddress</link>*       <link linkend="camel-address-new-clone">camel_address_new_clone</link>             (const <link linkend="CamelAddress">CamelAddress</link> *addr);
<link linkend="int">int</link>                 <link linkend="camel-address-length">camel_address_length</link>                (<link linkend="CamelAddress">CamelAddress</link> *addr);
<link linkend="int">int</link>                 <link linkend="camel-address-decode">camel_address_decode</link>                (<link linkend="CamelAddress">CamelAddress</link> *addr,
                                                         const <link linkend="char">char</link> *raw);
<link linkend="char">char</link>*               <link linkend="camel-address-encode">camel_address_encode</link>                (<link linkend="CamelAddress">CamelAddress</link> *addr);
<link linkend="int">int</link>                 <link linkend="camel-address-unformat">camel_address_unformat</link>              (<link linkend="CamelAddress">CamelAddress</link> *addr,
                                                         const <link linkend="char">char</link> *raw);
<link linkend="char">char</link>*               <link linkend="camel-address-format">camel_address_format</link>                (<link linkend="CamelAddress">CamelAddress</link> *addr);
<link linkend="int">int</link>                 <link linkend="camel-address-cat">camel_address_cat</link>                   (<link linkend="CamelAddress">CamelAddress</link> *dest,
                                                         const <link linkend="CamelAddress">CamelAddress</link> *source);
<link linkend="int">int</link>                 <link linkend="camel-address-copy">camel_address_copy</link>                  (<link linkend="CamelAddress">CamelAddress</link> *dest,
                                                         const <link linkend="CamelAddress">CamelAddress</link> *source);
<link linkend="void">void</link>                <link linkend="camel-address-remove">camel_address_remove</link>                (<link linkend="CamelAddress">CamelAddress</link> *addr,
                                                         <link linkend="int">int</link> index);
</synopsis>
</refsynopsisdiv>









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

</para>
</refsect1>

<refsect1 id="camel-CamelAddress.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="CamelAddress" role="struct">
<title>struct CamelAddress</title>
<indexterm zone="CamelAddress"><primary>CamelAddress</primary></indexterm><programlisting>struct CamelAddress {
	CamelObject parent;

	GPtrArray *addresses;

	struct _CamelAddressPrivate *priv;
};
</programlisting>
<para>

</para></refsect2>
<refsect2 id="camel-address-new" role="function">
<title>camel_address_new ()</title>
<indexterm zone="camel-address-new"><primary>camel_address_new</primary></indexterm><programlisting><link linkend="CamelAddress">CamelAddress</link>*       camel_address_new                   (void);</programlisting>
<para>
Create a new <link linkend="CamelAddress"><type>CamelAddress</type></link> object.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a new <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-new-clone" role="function">
<title>camel_address_new_clone ()</title>
<indexterm zone="camel-address-new-clone"><primary>camel_address_new_clone</primary></indexterm><programlisting><link linkend="CamelAddress">CamelAddress</link>*       camel_address_new_clone             (const <link linkend="CamelAddress">CamelAddress</link> *addr);</programlisting>
<para>
Clone an existing address type.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>addr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the cloned address
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-length" role="function">
<title>camel_address_length ()</title>
<indexterm zone="camel-address-length"><primary>camel_address_length</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_address_length                (<link linkend="CamelAddress">CamelAddress</link> *addr);</programlisting>
<para>
Get the number of addresses stored in the address <parameter>addr</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>addr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the number of addresses contained in <parameter>addr</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-decode" role="function">
<title>camel_address_decode ()</title>
<indexterm zone="camel-address-decode"><primary>camel_address_decode</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_address_decode                (<link linkend="CamelAddress">CamelAddress</link> *addr,
                                                         const <link linkend="char">char</link> *raw);</programlisting>
<para>
Construct a new address from a raw address field.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>addr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>raw</parameter>&nbsp;:</term>
<listitem><simpara> raw address description
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the number of addresses parsed or <link linkend="1:CAPS"><literal>-1</literal></link> on fail
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-encode" role="function">
<title>camel_address_encode ()</title>
<indexterm zone="camel-address-encode"><primary>camel_address_encode</primary></indexterm><programlisting><link linkend="char">char</link>*               camel_address_encode                (<link linkend="CamelAddress">CamelAddress</link> *addr);</programlisting>
<para>
Encode an address in a format suitable for a raw header.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>addr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the encoded address
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-unformat" role="function">
<title>camel_address_unformat ()</title>
<indexterm zone="camel-address-unformat"><primary>camel_address_unformat</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_address_unformat              (<link linkend="CamelAddress">CamelAddress</link> *addr,
                                                         const <link linkend="char">char</link> *raw);</programlisting>
<para>
Attempt to convert a previously formatted and/or edited
address back into internal form.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>addr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>raw</parameter>&nbsp;:</term>
<listitem><simpara> raw address description
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the number of addresses parsed or <link linkend="1:CAPS"><literal>-1</literal></link> on fail
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-format" role="function">
<title>camel_address_format ()</title>
<indexterm zone="camel-address-format"><primary>camel_address_format</primary></indexterm><programlisting><link linkend="char">char</link>*               camel_address_format                (<link linkend="CamelAddress">CamelAddress</link> *addr);</programlisting>
<para>
Format an address in a format suitable for display.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>addr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a newly allocated string containing the formatted addresses
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-cat" role="function">
<title>camel_address_cat ()</title>
<indexterm zone="camel-address-cat"><primary>camel_address_cat</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_address_cat                   (<link linkend="CamelAddress">CamelAddress</link> *dest,
                                                         const <link linkend="CamelAddress">CamelAddress</link> *source);</programlisting>
<para>
Concatenate one address onto another. The addresses must
be of the same type.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dest</parameter>&nbsp;:</term>
<listitem><simpara> destination <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>source</parameter>&nbsp;:</term>
<listitem><simpara> source <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the number of addresses concatenated
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-copy" role="function">
<title>camel_address_copy ()</title>
<indexterm zone="camel-address-copy"><primary>camel_address_copy</primary></indexterm><programlisting><link linkend="int">int</link>                 camel_address_copy                  (<link linkend="CamelAddress">CamelAddress</link> *dest,
                                                         const <link linkend="CamelAddress">CamelAddress</link> *source);</programlisting>
<para>
Copy the contents of one address into another.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>dest</parameter>&nbsp;:</term>
<listitem><simpara> destination <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>source</parameter>&nbsp;:</term>
<listitem><simpara> source <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>the number of addresses copied
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="camel-address-remove" role="function">
<title>camel_address_remove ()</title>
<indexterm zone="camel-address-remove"><primary>camel_address_remove</primary></indexterm><programlisting><link linkend="void">void</link>                camel_address_remove                (<link linkend="CamelAddress">CamelAddress</link> *addr,
                                                         <link linkend="int">int</link> index);</programlisting>
<para>
Remove an address by index, or all addresses.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>addr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="CamelAddress"><type>CamelAddress</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>index</parameter>&nbsp;:</term>
<listitem><simpara> The address to remove, use <link linkend="1:CAPS"><literal>-1</literal></link> to remove all address.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
