# MIMEDirVCardAddress

## Name

MIMEDirVCardAddress -- vCard address object

## Synopsis

    #include <mimedir/mimedir-vcard-address.h>

                        MIMEDirVCardAddress;

    MIMEDirVCardAddress* mimedir_vcard_address_new          (void);
    MIMEDirVCardAddress* mimedir_vcard_address_new_from_attribute
                                                            (MIMEDirAttribute *attribute,
                                                             GError **error);
    gboolean            mimedir_vcard_address_set_from_attribute
                                                            (MIMEDirVCardAddress *address,
                                                             MIMEDirAttribute *attribute,
                                                             GError **error);
    MIMEDirAttribute*   mimedir_vcard_address_save_to_attribute
                                                            (MIMEDirVCardAddress *address);
    gchar*              mimedir_vcard_address_get_as_string (MIMEDirVCardAddress *address);
    gchar*              mimedir_vcard_address_get_type_string
                                                            (MIMEDirVCardAddress *address);
    gchar*              mimedir_vcard_address_get_title     (MIMEDirVCardAddress *address);

## Description

The MIMEDirVCardAddress object contains information about a particular address that can be found in vCards. It contains some special properties that relate to the type of address.

## Details

### MIMEDirVCardAddress

    typedef struct {
    	GObject parent;

    	MIMEDirVCardAddressPriv *priv;
    } MIMEDirVCardAddress;

The MIMEDirVCardAddress struct contains private data only, and should be accessed using the functions below.

### mimedir_vcard_address_new ()

    MIMEDirVCardAddress* mimedir_vcard_address_new          (void);

Create a new MIMEDirVCardAddress object.

Returns : | the MIMEDirVCardAddress object

### mimedir_vcard_address_new_from_attribute ()

    MIMEDirVCardAddress* mimedir_vcard_address_new_from_attribute
                                                            (MIMEDirAttribute *attribute,
                                                             GError **error);

Creates a new MIMEDirVCardAddress object, initializing it with data taken from the attribute object.

`attribute` : | the object to take data from
`error` : | location to store the error occuring, or `NULL` to ignore
Returns : | the MIMEDirVCardAddress object

### mimedir_vcard_address_set_from_attribute ()

    gboolean            mimedir_vcard_address_set_from_attribute
                                                            (MIMEDirVCardAddress *address,
                                                             MIMEDirAttribute *attribute,
                                                             GError **error);

Initializes the address object to data taken from the attribute object. It is save to use this function, even if the object has been initialized before. All old data will be lost in this case.

`address` : | the object to manipulate
`attribute` : | the object to take data from
`error` : | location to store the error occuring, or `NULL` to ignore
Returns : | success indicator

### mimedir_vcard_address_save_to_attribute ()

    MIMEDirAttribute*   mimedir_vcard_address_save_to_attribute
                                                            (MIMEDirVCardAddress *address);

Returns a new attribute that describes the address.

`address` : | an address object
Returns : | a new attribute

### mimedir_vcard_address_get_as_string ()

    gchar*              mimedir_vcard_address_get_as_string (MIMEDirVCardAddress *address);

Returns the address as a human-readable string. The returned string should be freed with `g_free()`.

`address` : | an address object
Returns : | the address as human-readable string

### mimedir_vcard_address_get_type_string ()

    gchar*              mimedir_vcard_address_get_type_string
                                                            (MIMEDirVCardAddress *address);

Returns the type(s) of the address as a human-readable string. It should be freed with `g_free()`.

`address` : | the address object
Returns : | the type as human-readable string

### mimedir_vcard_address_get_title ()

    gchar*              mimedir_vcard_address_get_title     (MIMEDirVCardAddress *address);

Returns a one-line string with the most important address information. The returned string should be freed with `g_free()`.

`address` : | a vCard address
Returns : | title string