CamelAddress

## CamelAddress CamelAddress |

## Synopsis

    struct              CamelAddress;
    CamelAddress *      camel_address_new                   (void);
    CamelAddress *      camel_address_new_clone             (CamelAddress *addr);
    gint                camel_address_length                (CamelAddress *addr);
    gint                camel_address_decode                (CamelAddress *addr,
                                                             const gchar *raw);
    gchar *             camel_address_encode                (CamelAddress *addr);
    gint                camel_address_unformat              (CamelAddress *addr,
                                                             const gchar *raw);
    gchar *             camel_address_format                (CamelAddress *addr);
    gint                camel_address_cat                   (CamelAddress *dest,
                                                             CamelAddress *source);
    gint                camel_address_copy                  (CamelAddress *dest,
                                                             CamelAddress *source);
    void                camel_address_remove                (CamelAddress *addr,
                                                             gint index);

## Object Hierarchy

      GObject
       +----CamelObject
             +----CamelAddress
                   +----CamelInternetAddress
                   +----CamelNNTPAddress

## Description

## Details

### struct CamelAddress

    struct CamelAddress;

### camel_address_new ()

    CamelAddress *      camel_address_new                   (void);

Create a new CamelAddress object.

Returns : | a new CamelAddress object

### camel_address_new_clone ()

    CamelAddress *      camel_address_new_clone             (CamelAddress *addr);

Clone an existing address type.

`addr` : | a CamelAddress object
Returns : | the cloned address

### camel_address_length ()

    gint                camel_address_length                (CamelAddress *addr);

Get the number of addresses stored in the address `addr`.

`addr` : | a CamelAddress object
Returns : | the number of addresses contained in `addr`

### camel_address_decode ()

    gint                camel_address_decode                (CamelAddress *addr,
                                                             const gchar *raw);

Construct a new address from a raw address field.

`addr` : | a CamelAddress object
`raw` : | raw address description
Returns : | the number of addresses parsed or `-1` on fail

### camel_address_encode ()

    gchar *             camel_address_encode                (CamelAddress *addr);

Encode an address in a format suitable for a raw header.

`addr` : | a CamelAddress object
Returns : | the encoded address

### camel_address_unformat ()

    gint                camel_address_unformat              (CamelAddress *addr,
                                                             const gchar *raw);

Attempt to convert a previously formatted and/or edited address back into internal form.

`addr` : | a CamelAddress object
`raw` : | raw address description
Returns : | the number of addresses parsed or `-1` on fail

### camel_address_format ()

    gchar *             camel_address_format                (CamelAddress *addr);

Format an address in a format suitable for display.

`addr` : | a CamelAddress object
Returns : | a newly allocated string containing the formatted addresses

### camel_address_cat ()

    gint                camel_address_cat                   (CamelAddress *dest,
                                                             CamelAddress *source);

Concatenate one address onto another. The addresses must be of the same type.

`dest` : | destination CamelAddress object
`source` : | source CamelAddress object
Returns : | the number of addresses concatenated

### camel_address_copy ()

    gint                camel_address_copy                  (CamelAddress *dest,
                                                             CamelAddress *source);

Copy the contents of one address into another.

`dest` : | destination CamelAddress object
`source` : | source CamelAddress object
Returns : | the number of addresses copied

### camel_address_remove ()

    void                camel_address_remove                (CamelAddress *addr,
                                                             gint index);

Remove an address by index, or all addresses.

`addr` : | a CamelAddress object
`index` : | The address to remove, use `-1` to remove all address.