# MIMEDirVCardPhone

## Name

MIMEDirVCardPhone -- vCard phone object

## Synopsis

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

                        MIMEDirVCardPhone;

    MIMEDirVCardPhone*  mimedir_vcard_phone_new             (void);
    MIMEDirVCardPhone*  mimedir_vcard_phone_new_from_attribute
                                                            (MIMEDirAttribute *attribute,
                                                             GError **error);
    gboolean            mimedir_vcard_phone_set_from_attribute
                                                            (MIMEDirVCardPhone *phone,
                                                             MIMEDirAttribute *attribute,
                                                             GError **error);
    MIMEDirAttribute*   mimedir_vcard_phone_save_to_attribute
                                                            (MIMEDirVCardPhone *phone);
    gchar*              mimedir_vcard_phone_get_as_string   (MIMEDirVCardPhone *phone);
    gchar*              mimedir_vcard_phone_get_type_string (MIMEDirVCardPhone *phone);

## Description

The MIMEDirVCardPhone object contains information about a particular telephone number that can be found in vCards. It contains some special propertiesthat relate to the type of telephone number.

## Details

### MIMEDirVCardPhone

    typedef struct {
    	GObject parent;

    	MIMEDirVCardPhonePriv *priv;
    } MIMEDirVCardPhone;

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

### mimedir_vcard_phone_new ()

    MIMEDirVCardPhone*  mimedir_vcard_phone_new             (void);

Create a new MIMEDirVCardPhone object.

Returns : | the MIMEDirVCardPhone object

### mimedir_vcard_phone_new_from_attribute ()

    MIMEDirVCardPhone*  mimedir_vcard_phone_new_from_attribute
                                                            (MIMEDirAttribute *attribute,
                                                             GError **error);

Creates a new MIMEDirVCardPhone 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 MIMEDirVCardPhone object

### mimedir_vcard_phone_set_from_attribute ()

    gboolean            mimedir_vcard_phone_set_from_attribute
                                                            (MIMEDirVCardPhone *phone,
                                                             MIMEDirAttribute *attribute,
                                                             GError **error);

Initializes the phone 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.

`phone` : | 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_phone_save_to_attribute ()

    MIMEDirAttribute*   mimedir_vcard_phone_save_to_attribute
                                                            (MIMEDirVCardPhone *phone);

Returns a new attribute that describes the phone number.

`phone` : | a phone object
Returns : | a new attribute

### mimedir_vcard_phone_get_as_string ()

    gchar*              mimedir_vcard_phone_get_as_string   (MIMEDirVCardPhone *phone);

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

`phone` : | the phone object
Returns : | the phone number as human-readable string

### mimedir_vcard_phone_get_type_string ()

    gchar*              mimedir_vcard_phone_get_type_string (MIMEDirVCardPhone *phone);

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

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