Address
Object Hierarchy:
Description:
[
CCode ( type_id =
"camel_address_get_type ()" ) ]
public class Address :
Object
Base class for RFC-defined address types.
Address 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 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 encode and
decode.
An existing address can be cloned with new_clone, and addresses can be
concatenated or copied between instances with cat and
copy.
Content:
Creation methods:
Methods:
- public virtual int cat (Address source)
Concatenate one address onto another.
- public int copy (Address source)
Copy the contents of one address into another.
- public virtual int decode (string raw)
Construct a new address from a raw address field.
- public virtual string encode ()
Encode an address in a format suitable for a raw header.
- public virtual string format ()
Format an address in a format suitable for display.
- public virtual int length ()
Get the number of addresses stored in the address
this.
- public Address new_clone ()
Clone an existing address type.
- public virtual void remove (int index)
Remove an address by index, or all addresses.
- public virtual int unformat (string raw)
Attempt to convert a previously formatted and/or edited address back
into internal form.
Inherited Members:
All known members inherited from class GLib.Object