CamelAddress: Camel Reference Manual

## CamelAddress CamelAddress |

## Functions

CamelAddress * | camel_address_new ()
CamelAddress * | camel_address_new_clone ()
gint | camel_address_length ()
gint | camel_address_decode ()
gchar * | camel_address_encode ()
gint | camel_address_unformat ()
gchar * | camel_address_format ()
gint | camel_address_cat ()
gint | camel_address_copy ()
void | camel_address_remove ()

## Types and Values

struct | CamelAddress

## Object Hierarchy

        GObject
        ╰── CamelAddress
            ├── CamelInternetAddress
            ╰── CamelNNTPAddress

## Description

## Functions

### 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.

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

## Types and Values

### struct CamelAddress

    struct CamelAddress;