Camel.Address
Description: Reference for Camel.Address

### Class

# CamelAddress

#### Description [src]

    class Camel.Address : GObject.Object
    {
      CamelAddressPrivate* priv
    }

Base class for RFC-defined address types.

`CamelAddress` is a base abstract class for address types used in mail headers. It provides structured access to an indexed list of addresses.

Addresses can be represented in two ways:

- The formatted form is a UTF-8 string representation suitable for display to the user. The formatting is not guaranteed to be reversible, but `camel_address_unformat()` will try to reconstruct the address list from such a string.

- The encoded form is the raw transmission version of the address (e.g. RFC 2047-encoded for internet addresses). The encoding process is fully bi-directional via `camel_address_encode()` and camel_address_decode().

An existing address can be cloned with camel_address_new_clone(), and addresses can be concatenated or copied between instances with `camel_address_cat()` and camel_address_copy().

#### Hierarchy

#### Ancestors

- GObject

#### Descendants

- CamelInternetAddress
- CamelNNTPAddress

#### Constructors

###### camel_address_new

Create a new `CamelAddress` object.

#### Instance methods

###### camel_address_cat

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

###### camel_address_copy

Copy the contents of one address into another.

###### camel_address_decode

Construct a new address from a raw address field.

###### camel_address_encode

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

###### camel_address_format

Format an address in a format suitable for display.

###### camel_address_length

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

###### camel_address_new_clone

Clone an existing address type.

###### camel_address_remove

Remove an address by index, or all addresses.

###### camel_address_unformat

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

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct CamelAddressClass {
      GObjectClass parent_class;
      gint (* length) (
        CamelAddress* addr
      );
      gint (* decode) (
        CamelAddress* addr,
        const gchar* raw
      );
      gchar* (* encode) (
        CamelAddress* addr
      );
      gint (* unformat) (
        CamelAddress* addr,
        const gchar* raw
      );
      gchar* (* format) (
        CamelAddress* addr
      );
      gint (* cat) (
        CamelAddress* dest,
        CamelAddress* source
      );
      void (* remove) (
        CamelAddress* addr,
        gint index
      );
      gpointer reserved;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.

`length: gint (* length) ( CamelAddress* addr )`

  No description available.

`decode: gint (* decode) ( CamelAddress* addr, const gchar* raw )`

  No description available.

`encode: gchar* (* encode) ( CamelAddress* addr )`

  No description available.

`unformat: gint (* unformat) ( CamelAddress* addr, const gchar* raw )`

  No description available.

`format: gchar* (* format) ( CamelAddress* addr )`

  No description available.

`cat: gint (* cat) ( CamelAddress* dest, CamelAddress* source )`

  No description available.

`remove: void (* remove) ( CamelAddress* addr, gint index )`

  No description available.

`reserved: gpointer`

  No description available.

#### Virtual methods

###### Camel.AddressClass.cat

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

###### Camel.AddressClass.decode

Construct a new address from a raw address field.

###### Camel.AddressClass.encode

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

###### Camel.AddressClass.format

Format an address in a format suitable for display.

###### Camel.AddressClass.length

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

###### Camel.AddressClass.remove

Remove an address by index, or all addresses.

###### Camel.AddressClass.unformat

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