## GDataContactsContact GDataContactsContact — GData Contacts contact object |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <gdata/services/contacts/gdata-contacts-contact.h>

    #define             GDATA_CONTACTS_GENDER_MALE
    #define             GDATA_CONTACTS_GENDER_FEMALE
    #define             GDATA_CONTACTS_PRIORITY_LOW
    #define             GDATA_CONTACTS_PRIORITY_NORMAL
    #define             GDATA_CONTACTS_PRIORITY_HIGH
    #define             GDATA_CONTACTS_SENSITIVITY_CONFIDENTIAL
    #define             GDATA_CONTACTS_SENSITIVITY_NORMAL
    #define             GDATA_CONTACTS_SENSITIVITY_PERSONAL
    #define             GDATA_CONTACTS_SENSITIVITY_PRIVATE
                        GDataContactsContact;
                        GDataContactsContactClass;
    GDataContactsContact * gdata_contacts_contact_new       (const gchar *id);
    GDataGDName *       gdata_contacts_contact_get_name     (GDataContactsContact *self);
    void                gdata_contacts_contact_set_name     (GDataContactsContact *self,
                                                             GDataGDName *name);
    const gchar *       gdata_contacts_contact_get_short_name
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_set_short_name
                                                            (GDataContactsContact *self,
                                                             const gchar *short_name);
    const gchar *       gdata_contacts_contact_get_initials (GDataContactsContact *self);
    void                gdata_contacts_contact_set_initials (GDataContactsContact *self,
                                                             const gchar *initials);
    const gchar *       gdata_contacts_contact_get_maiden_name
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_set_maiden_name
                                                            (GDataContactsContact *self,
                                                             const gchar *maiden_name);
    const gchar *       gdata_contacts_contact_get_nickname (GDataContactsContact *self);
    void                gdata_contacts_contact_set_nickname (GDataContactsContact *self,
                                                             const gchar *nickname);
    const gchar *       gdata_contacts_contact_get_file_as  (GDataContactsContact *self);
    void                gdata_contacts_contact_set_file_as  (GDataContactsContact *self,
                                                             const gchar *file_as);
    gboolean            gdata_contacts_contact_get_birthday (GDataContactsContact *self,
                                                             GDate *birthday);
    void                gdata_contacts_contact_set_birthday (GDataContactsContact *self,
                                                             GDate *birthday,
                                                             gboolean birthday_has_year);
    const gchar *       gdata_contacts_contact_get_gender   (GDataContactsContact *self);
    void                gdata_contacts_contact_set_gender   (GDataContactsContact *self,
                                                             const gchar *gender);
    const gchar *       gdata_contacts_contact_get_mileage  (GDataContactsContact *self);
    void                gdata_contacts_contact_set_mileage  (GDataContactsContact *self,
                                                             const gchar *mileage);
    const gchar *       gdata_contacts_contact_get_occupation
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_set_occupation
                                                            (GDataContactsContact *self,
                                                             const gchar *occupation);
    const gchar *       gdata_contacts_contact_get_subject  (GDataContactsContact *self);
    void                gdata_contacts_contact_set_subject  (GDataContactsContact *self,
                                                             const gchar *subject);
    const gchar *       gdata_contacts_contact_get_priority (GDataContactsContact *self);
    void                gdata_contacts_contact_set_priority (GDataContactsContact *self,
                                                             const gchar *priority);
    const gchar *       gdata_contacts_contact_get_sensitivity
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_set_sensitivity
                                                            (GDataContactsContact *self,
                                                             const gchar *sensitivity);
    const gchar *       gdata_contacts_contact_get_directory_server
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_set_directory_server
                                                            (GDataContactsContact *self,
                                                             const gchar *directory_server);
    const gchar *       gdata_contacts_contact_get_billing_information
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_set_billing_information
                                                            (GDataContactsContact *self,
                                                             const gchar *billing_information);
    GList *             gdata_contacts_contact_get_email_addresses
                                                            (GDataContactsContact *self);
    GDataGDEmailAddress * gdata_contacts_contact_get_primary_email_address
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_email_address
                                                            (GDataContactsContact *self,
                                                             GDataGDEmailAddress *email_address);
    void                gdata_contacts_contact_remove_all_email_addresses
                                                            (GDataContactsContact *self);
    GList *             gdata_contacts_contact_get_im_addresses
                                                            (GDataContactsContact *self);
    GDataGDIMAddress *  gdata_contacts_contact_get_primary_im_address
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_im_address
                                                            (GDataContactsContact *self,
                                                             GDataGDIMAddress *im_address);
    void                gdata_contacts_contact_remove_all_im_addresses
                                                            (GDataContactsContact *self);
    GList *             gdata_contacts_contact_get_postal_addresses
                                                            (GDataContactsContact *self);
    GDataGDPostalAddress * gdata_contacts_contact_get_primary_postal_address
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_postal_address
                                                            (GDataContactsContact *self,
                                                             GDataGDPostalAddress *postal_address);
    void                gdata_contacts_contact_remove_all_postal_addresses
                                                            (GDataContactsContact *self);
    GList *             gdata_contacts_contact_get_phone_numbers
                                                            (GDataContactsContact *self);
    GDataGDPhoneNumber * gdata_contacts_contact_get_primary_phone_number
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_phone_number
                                                            (GDataContactsContact *self,
                                                             GDataGDPhoneNumber *phone_number);
    void                gdata_contacts_contact_remove_all_phone_numbers
                                                            (GDataContactsContact *self);
    GList *             gdata_contacts_contact_get_organizations
                                                            (GDataContactsContact *self);
    GDataGDOrganization * gdata_contacts_contact_get_primary_organization
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_organization
                                                            (GDataContactsContact *self,
                                                             GDataGDOrganization *organization);
    void                gdata_contacts_contact_remove_all_organizations
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_jot      (GDataContactsContact *self,
                                                             GDataGContactJot *jot);
    GList *             gdata_contacts_contact_get_jots     (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_jots
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_relation (GDataContactsContact *self,
                                                             GDataGContactRelation *relation);
    GList *             gdata_contacts_contact_get_relations
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_relations
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_website  (GDataContactsContact *self,
                                                             GDataGContactWebsite *website);
    GList *             gdata_contacts_contact_get_websites (GDataContactsContact *self);
    GDataGContactWebsite * gdata_contacts_contact_get_primary_website
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_websites
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_event    (GDataContactsContact *self,
                                                             GDataGContactEvent *event);
    GList *             gdata_contacts_contact_get_events   (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_events
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_calendar (GDataContactsContact *self,
                                                             GDataGContactCalendar *calendar);
    GList *             gdata_contacts_contact_get_calendars
                                                            (GDataContactsContact *self);
    GDataGContactCalendar * gdata_contacts_contact_get_primary_calendar
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_calendars
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_external_id
                                                            (GDataContactsContact *self,
                                                             GDataGContactExternalID *external_id);
    GList *             gdata_contacts_contact_get_external_ids
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_external_ids
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_hobby    (GDataContactsContact *self,
                                                             const gchar *hobby);
    GList *             gdata_contacts_contact_get_hobbies  (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_hobbies
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_add_language (GDataContactsContact *self,
                                                             GDataGContactLanguage *language);
    GList *             gdata_contacts_contact_get_languages
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_remove_all_languages
                                                            (GDataContactsContact *self);
    GList *             gdata_contacts_contact_get_groups   (GDataContactsContact *self);
    void                gdata_contacts_contact_add_group    (GDataContactsContact *self,
                                                             const gchar *href);
    void                gdata_contacts_contact_remove_group (GDataContactsContact *self,
                                                             const gchar *href);
    gboolean            gdata_contacts_contact_is_group_deleted
                                                            (GDataContactsContact *self,
                                                             const gchar *href);
    const gchar *       gdata_contacts_contact_get_extended_property
                                                            (GDataContactsContact *self,
                                                             const gchar *name);
    GHashTable *        gdata_contacts_contact_get_extended_properties
                                                            (GDataContactsContact *self);
    gboolean            gdata_contacts_contact_set_extended_property
                                                            (GDataContactsContact *self,
                                                             const gchar *name,
                                                             const gchar *value);
    const gchar *       gdata_contacts_contact_get_user_defined_field
                                                            (GDataContactsContact *self,
                                                             const gchar *name);
    GHashTable *        gdata_contacts_contact_get_user_defined_fields
                                                            (GDataContactsContact *self);
    void                gdata_contacts_contact_set_user_defined_field
                                                            (GDataContactsContact *self,
                                                             const gchar *name,
                                                             const gchar *value);
    gint64              gdata_contacts_contact_get_edited   (GDataContactsContact *self);
    gboolean            gdata_contacts_contact_is_deleted   (GDataContactsContact *self);
    const gchar *       gdata_contacts_contact_get_photo_etag
                                                            (GDataContactsContact *self);
    guint8 *            gdata_contacts_contact_get_photo    (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             gsize *length,
                                                             gchar **content_type,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                gdata_contacts_contact_get_photo_async
                                                            (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    guint8 *            gdata_contacts_contact_get_photo_finish
                                                            (GDataContactsContact *self,
                                                             GAsyncResult *async_result,
                                                             gsize *length,
                                                             gchar **content_type,
                                                             GError **error);
    gboolean            gdata_contacts_contact_set_photo    (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             const guint8 *data,
                                                             gsize length,
                                                             const gchar *content_type,
                                                             GCancellable *cancellable,
                                                             GError **error);
    void                gdata_contacts_contact_set_photo_async
                                                            (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             const guint8 *data,
                                                             gsize length,
                                                             const gchar *content_type,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    gboolean            gdata_contacts_contact_set_photo_finish
                                                            (GDataContactsContact *self,
                                                             GAsyncResult *async_result,
                                                             GError **error);

## Object Hierarchy

      GObject
       +----GDataParsable
             +----GDataEntry
                   +----GDataContactsContact

## Properties

      "billing-information"      gchar*                : Read / Write
      "birthday"                 GDate*                : Read / Write
      "birthday-has-year"        gboolean              : Read / Write
      "deleted"                  gboolean              : Read
      "directory-server"         gchar*                : Read / Write
      "edited"                   gint64                : Read
      "file-as"                  gchar*                : Read / Write
      "gender"                   gchar*                : Read / Write
      "initials"                 gchar*                : Read / Write
      "maiden-name"              gchar*                : Read / Write
      "mileage"                  gchar*                : Read / Write
      "name"                     GDataGDName*          : Read / Write
      "nickname"                 gchar*                : Read / Write
      "occupation"               gchar*                : Read / Write
      "photo-etag"               gchar*                : Read
      "priority"                 gchar*                : Read / Write
      "sensitivity"              gchar*                : Read / Write
      "short-name"               gchar*                : Read / Write
      "subject"                  gchar*                : Read / Write

## Description

GDataContactsContact is a subclass of GDataEntry to represent a contact from a Google address book.

For more details of Google Contacts' GData API, see the online documentation.

In addition to all the standard properties available for a contact, GDataContactsContact supports two kinds of additional property: extended properties and user-defined fields. Extended properties, set with `gdata_contacts_contact_set_extended_property()` and retrieved with `gdata_contacts_contact_get_extended_property()`, are provided as a method of storing client-specific data which shouldn't be seen or be editable by the user, such as IDs and cache times. User-defined fields, set with `gdata_contacts_contact_set_user_defined_field()` and retrieved with `gdata_contacts_contact_get_user_defined_field()`, store fields defined by the user, and editable by them in the interface (both the interface of the appliation using libgdata, and the Google Contacts web interface).

Example 20. Getting a Contact's Photo

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    GDataContactsService *service;
    GDataContactsContact *contact;
    guint8 *data;
    gchar *content_type = NULL;
    gsize length = 0;
    GError *error = NULL;

    /* Create a service and return the contact whose photo we're getting. */
    service = create_contacts_service ();
    contact = query_user_for_contact (service);

    /* Get the photo. This should almost always be done asynchronously. */
    data = gdata_contacts_contact_get_photo (contact, service, &length, &content_type, NULL, &error);

    g_object_unref (contact);
    g_object_unref (service);

    if (error != NULL) {
        g_error ("Error getting a contact's photo: %s", error->message);
        g_error_free (error);
        return;
    }

    /* Do something with the photo, stored in data, length and content_type. */

    g_free (content_type);
    g_free (data);

Example 21. Setting a Contact's Photo

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    GDataContactsService *service;
    GDataContactsContact *contact;
    guint8 *data;
    gchar *content_type = NULL;
    gsize length = 0;
    GError *error = NULL;

    /* Create a service and return the contact whose photo we're getting, as well as the details of the new photo. */
    service = create_contacts_service ();
    contact = query_user_for_contact (service);
    data = query_user_for_new_photo (contact, &content_type, &length);

    /* Set the photo. This should almost always be done asynchronously. To delete the photo, just pass NULL as the photo data. */
    gdata_contacts_contact_set_photo (contact, service, data, length, content_type, NULL, &error);

    g_free (data);
    g_free (content_type);
    g_object_unref (contact);
    g_object_unref (service);

    if (error != NULL) {
        g_error ("Error setting a contact's photo: %s", error->message);
        g_error_free (error);
        return;
    }

Example 22. Updating a Contact's Details

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    GDataContactsService *service;
    GDataContactsContact *contact, *updated_contact;
    GDataGDEmailAddress *email_address;
    GDataGDIMAddress *im_address;
    GError *error = NULL;

    /* Create a service and return the contact whose details we're updating. */
    service = create_contacts_service ();
    contact = query_user_for_contact (service);

    /* Update the contact's details. We set their nickname to "Fat Tony", add a new e-mail address, and replace all their existing IM
     * addresses with a single new one. */
    gdata_contacts_contact_set_nickname (contact, "Fat Tony");

    email_address = gdata_gd_email_address_new ("tony@gmail.com", GDATA_GD_EMAIL_ADDRESS_HOME, NULL, FALSE);
    gdata_contacts_contact_add_email_address (contact, email_address);
    g_object_unref (email_address);

    gdata_contacts_contact_remove_all_im_addresses (contact);
    im_address = gdata_gd_im_address_new ("tony.work@gmail.com", GDATA_GD_IM_PROTOCOL_GOOGLE_TALK, GDATA_GD_IM_ADDRESS_WORK, NULL, TRUE);
    gdata_contacts_contact_add_im_address (contact, im_address);
    g_object_unref (im_address);

    /* Send the updated contact to the server */
    updated_contact = GDATA_CONTACTS_CONTACT (gdata_service_update_entry (GDATA_SERVICE (service), GDATA_ENTRY (contact), NULL, &error));

    g_object_unref (contact);
    g_object_unref (service);

    if (error != NULL) {
        g_error ("Error updating a contact's details: %s", error->message);
        g_error_free (error);
        return;
    }

    /* Do something with the updated contact, such as update them in the UI, or store their ID for future use. */

    g_object_unref (updated_contact);

## Details

### GDATA_CONTACTS_GENDER_MALE

    #define GDATA_CONTACTS_GENDER_MALE "male"

The contact is male.

Since 0.7.0

### GDATA_CONTACTS_GENDER_FEMALE

    #define GDATA_CONTACTS_GENDER_FEMALE "female"

The contact is female.

Since 0.7.0

### GDATA_CONTACTS_PRIORITY_LOW

    #define GDATA_CONTACTS_PRIORITY_LOW "low"

The contact is of low importance.

Since 0.7.0

### GDATA_CONTACTS_PRIORITY_NORMAL

    #define GDATA_CONTACTS_PRIORITY_NORMAL "normal"

The contact is of normal importance.

Since 0.7.0

### GDATA_CONTACTS_PRIORITY_HIGH

    #define GDATA_CONTACTS_PRIORITY_HIGH "high"

The contact is of high importance.

Since 0.7.0

### GDATA_CONTACTS_SENSITIVITY_CONFIDENTIAL

    #define GDATA_CONTACTS_SENSITIVITY_CONFIDENTIAL "confidential"

The contact's data is confidential.

Since 0.7.0

### GDATA_CONTACTS_SENSITIVITY_NORMAL

    #define GDATA_CONTACTS_SENSITIVITY_NORMAL "normal"

The contact's data is of normal sensitivity.

Since 0.7.0

### GDATA_CONTACTS_SENSITIVITY_PERSONAL

    #define GDATA_CONTACTS_SENSITIVITY_PERSONAL "personal"

The contact's data is personal.

Since 0.7.0

### GDATA_CONTACTS_SENSITIVITY_PRIVATE

    #define GDATA_CONTACTS_SENSITIVITY_PRIVATE "private"

The contact's data is private.

Since 0.7.0

### GDataContactsContact

    typedef struct _GDataContactsContact GDataContactsContact;

All the fields in the GDataContactsContact structure are private and should never be accessed directly.

Since 0.2.0

### GDataContactsContactClass

    typedef struct {
    } GDataContactsContactClass;

All the fields in the GDataContactsContactClass structure are private and should never be accessed directly.

Since 0.2.0

### gdata_contacts_contact_new ()

    GDataContactsContact * gdata_contacts_contact_new       (const gchar *id);

Creates a new GDataContactsContact with the given ID and default properties.

`id` : | the contact's ID, or `NULL`. [allow-none]
Returns : | a new GDataContactsContact; unref with `g_object_unref()`

Since 0.2.0

### gdata_contacts_contact_get_name ()

    GDataGDName *       gdata_contacts_contact_get_name     (GDataContactsContact *self);

Gets the "name" property.

`self` : | a GDataContactsContact
Returns : | the contact's name, or `NULL`. [transfer none]

Since 0.5.0

### gdata_contacts_contact_set_name ()

    void                gdata_contacts_contact_set_name     (GDataContactsContact *self,
                                                             GDataGDName *name);

Sets the "name" property to `name`, and increments its reference count.

`name` must not be `NULL`, though all its properties may be `NULL`.

`self` : | a GDataContactsContact
`name` : | the new GDataGDName

Since 0.7.0

### gdata_contacts_contact_get_short_name ()

    const gchar *       gdata_contacts_contact_get_short_name
                                                            (GDataContactsContact *self);

Gets the "short-name" property.

`self` : | a GDataContactsContact
Returns : | the contact's short name, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_short_name ()

    void                gdata_contacts_contact_set_short_name
                                                            (GDataContactsContact *self,
                                                             const gchar *short_name);

Sets the "short-name" property to `short_name`.

If `short_name` is `NULL`, the contact's short name will be removed.

`self` : | a GDataContactsContact
`short_name` : | the contact's new short name, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_initials ()

    const gchar *       gdata_contacts_contact_get_initials (GDataContactsContact *self);

Gets the "initials" property.

`self` : | a GDataContactsContact
Returns : | the initials of the contact, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_initials ()

    void                gdata_contacts_contact_set_initials (GDataContactsContact *self,
                                                             const gchar *initials);

Sets the "initials" property to `initials`.

If `initials` is `NULL`, the contact's initials will be removed.

`self` : | a GDataContactsContact
`initials` : | the new initials of the contact, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_maiden_name ()

    const gchar *       gdata_contacts_contact_get_maiden_name
                                                            (GDataContactsContact *self);

Gets the "maiden-name" property.

`self` : | a GDataContactsContact
Returns : | the maiden name of the contact, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_maiden_name ()

    void                gdata_contacts_contact_set_maiden_name
                                                            (GDataContactsContact *self,
                                                             const gchar *maiden_name);

Sets the "maiden-name" property to `maiden_name`.

If `maiden_name` is `NULL`, the contact's maiden name will be removed.

`self` : | a GDataContactsContact
`maiden_name` : | the new maiden name of the contact, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_nickname ()

    const gchar *       gdata_contacts_contact_get_nickname (GDataContactsContact *self);

Gets the "nickname" property.

`self` : | a GDataContactsContact
Returns : | the contact's nickname, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_nickname ()

    void                gdata_contacts_contact_set_nickname (GDataContactsContact *self,
                                                             const gchar *nickname);

Sets the "nickname" property to `nickname`.

If `nickname` is `NULL`, the contact's nickname will be removed.

`self` : | a GDataContactsContact
`nickname` : | the new nickname, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_file_as ()

    const gchar *       gdata_contacts_contact_get_file_as  (GDataContactsContact *self);

Gets the "file-as" property.

`self` : | a GDataContactsContact
Returns : | the name the contact's filed under, or `NULL`

Since 0.11.0

### gdata_contacts_contact_set_file_as ()

    void                gdata_contacts_contact_set_file_as  (GDataContactsContact *self,
                                                             const gchar *file_as);

Sets the "file-as" property to `file_as`.

If `file_as` is `NULL`, the contact will be filed under their full name.

`self` : | a GDataContactsContact
`file_as` : | the new name to file the contact under, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_birthday ()

    gboolean            gdata_contacts_contact_get_birthday (GDataContactsContact *self,
                                                             GDate *birthday);

Gets the "birthday" and "birthday-has-year" properties. If `birthday` is non-`NULL`, "birthday" is returned in it. The function returns the value of "birthday-has-year", which specifies whether the year in `birthday` is meaningful. Contacts may not have the year of their birth set, in which case, the function would return `FALSE`, and the year in `birthday` should be ignored.

`self` : | a GDataContactsContact
`birthday` : | return location for the birthday, or `NULL`. [allow-none][out caller-allocates]
Returns : | whether the contact's birthday has the year set

Since 0.7.0

### gdata_contacts_contact_set_birthday ()

    void                gdata_contacts_contact_set_birthday (GDataContactsContact *self,
                                                             GDate *birthday,
                                                             gboolean birthday_has_year);

Sets the "birthday" property to `birthday` and the "birthday-has-year" property to `birthday_has_year`. See `gdata_contacts_contact_get_birthday()` for an explanation of the interation between these two properties.

If `birthday` is `NULL`, the contact's birthday will be removed.

`self` : | a GDataContactsContact
`birthday` : | the new birthday, or `NULL`. [allow-none]
`birthday_has_year` : | `TRUE` if `birthday`'s year is relevant, `FALSE` otherwise

Since 0.7.0

### gdata_contacts_contact_get_gender ()

    const gchar *       gdata_contacts_contact_get_gender   (GDataContactsContact *self);

Gets the "gender" property.

`self` : | a GDataContactsContact
Returns : | the gender of the contact, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_gender ()

    void                gdata_contacts_contact_set_gender   (GDataContactsContact *self,
                                                             const gchar *gender);

Sets the "gender" property to `gender`.

If `gender` is `NULL`, the contact's gender will be removed.

`self` : | a GDataContactsContact
`gender` : | the new gender of the contact, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_mileage ()

    const gchar *       gdata_contacts_contact_get_mileage  (GDataContactsContact *self);

Gets the "mileage" property.

`self` : | a GDataContactsContact
Returns : | a mileage associated with the contact, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_mileage ()

    void                gdata_contacts_contact_set_mileage  (GDataContactsContact *self,
                                                             const gchar *mileage);

Sets the "mileage" property to `mileage`.

If `mileage` is `NULL`, the contact's mileage will be removed.

`self` : | a GDataContactsContact
`mileage` : | the new mileage associated with the contact, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_occupation ()

    const gchar *       gdata_contacts_contact_get_occupation
                                                            (GDataContactsContact *self);

Gets the "occupation" property.

`self` : | a GDataContactsContact
Returns : | the contact's occupation, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_occupation ()

    void                gdata_contacts_contact_set_occupation
                                                            (GDataContactsContact *self,
                                                             const gchar *occupation);

Sets the "occupation" property to `occupation`.

If `occupation` is `NULL`, the contact's occupation will be removed.

`self` : | a GDataContactsContact
`occupation` : | the contact's new occupation, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_subject ()

    const gchar *       gdata_contacts_contact_get_subject  (GDataContactsContact *self);

Gets the "subject" property.

`self` : | a GDataContactsContact
Returns : | the contact's subject, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_subject ()

    void                gdata_contacts_contact_set_subject  (GDataContactsContact *self,
                                                             const gchar *subject);

Sets the "subject" property to `subject`.

If `subject` is `NULL`, the contact's subject will be removed.

`self` : | a GDataContactsContact
`subject` : | the contact's new subject, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_priority ()

    const gchar *       gdata_contacts_contact_get_priority (GDataContactsContact *self);

Gets the "priority" property.

`self` : | a GDataContactsContact
Returns : | the contact's priority, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_priority ()

    void                gdata_contacts_contact_set_priority (GDataContactsContact *self,
                                                             const gchar *priority);

Sets the "priority" property to `priority`.

If `priority` is `NULL`, the contact's priority will be removed.

`self` : | a GDataContactsContact
`priority` : | the contact's new priority, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_sensitivity ()

    const gchar *       gdata_contacts_contact_get_sensitivity
                                                            (GDataContactsContact *self);

Gets the "sensitivity" property.

`self` : | a GDataContactsContact
Returns : | the contact's sensitivity, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_sensitivity ()

    void                gdata_contacts_contact_set_sensitivity
                                                            (GDataContactsContact *self,
                                                             const gchar *sensitivity);

Sets the "sensitivity" property to `sensitivity`.

If `sensitivity` is `NULL`, the contact's sensitivity will be removed.

`self` : | a GDataContactsContact
`sensitivity` : | the contact's new sensitivity, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_directory_server ()

    const gchar *       gdata_contacts_contact_get_directory_server
                                                            (GDataContactsContact *self);

Gets the "directory-server" property.

`self` : | a GDataContactsContact
Returns : | the name or address of a directory server associated with the contact, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_directory_server ()

    void                gdata_contacts_contact_set_directory_server
                                                            (GDataContactsContact *self,
                                                             const gchar *directory_server);

Sets the "directory-server" property to `directory_server`.

If `directory_server` is `NULL`, the contact's directory server will be removed.

`self` : | a GDataContactsContact
`directory_server` : | the new name or address of a directory server associated with the contact, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_billing_information ()

    const gchar *       gdata_contacts_contact_get_billing_information
                                                            (GDataContactsContact *self);

Gets the "billing-information" property.

`self` : | a GDataContactsContact
Returns : | the contact's billing information, or `NULL`

Since 0.7.0

### gdata_contacts_contact_set_billing_information ()

    void                gdata_contacts_contact_set_billing_information
                                                            (GDataContactsContact *self,
                                                             const gchar *billing_information);

Sets the "billing-information" property to `billing_information`.

If `billing_information` is `NULL`, the contact's billing information will be removed.

`self` : | a GDataContactsContact
`billing_information` : | the new billing information for the contact, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_email_addresses ()

    GList *             gdata_contacts_contact_get_email_addresses
                                                            (GDataContactsContact *self);

Gets a list of the e-mail addresses owned by the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGDEmailAddresses, or `NULL`. [element-type GData.GDEmailAddress][transfer none]

Since 0.2.0

### gdata_contacts_contact_get_primary_email_address ()

    GDataGDEmailAddress * gdata_contacts_contact_get_primary_email_address
                                                            (GDataContactsContact *self);

Gets the contact's primary e-mail address, if one exists.

`self` : | a GDataContactsContact
Returns : | a GDataGDEmailAddress, or `NULL`. [transfer none]

Since 0.2.0

### gdata_contacts_contact_add_email_address ()

    void                gdata_contacts_contact_add_email_address
                                                            (GDataContactsContact *self,
                                                             GDataGDEmailAddress *email_address);

Adds an e-mail address to the contact's list of e-mail addresses and increments its reference count.

Note that only one e-mail address per contact may be marked as "primary". Insertion and update operations (with `gdata_contacts_service_insert_contact()`) will return an error if more than one e-mail address is marked as primary.

Duplicate e-mail addresses will not be added to the list.

`self` : | a GDataContactsContact
`email_address` : | a GDataGDEmailAddress to add

Since 0.2.0

### gdata_contacts_contact_remove_all_email_addresses ()

    void                gdata_contacts_contact_remove_all_email_addresses
                                                            (GDataContactsContact *self);

Removes all e-mail addresses from the contact.

`self` : | a GDataContactsContact

Since 0.4.0

### gdata_contacts_contact_get_im_addresses ()

    GList *             gdata_contacts_contact_get_im_addresses
                                                            (GDataContactsContact *self);

Gets a list of the IM addresses owned by the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGDIMAddresses, or `NULL`. [element-type GData.GDIMAddress][transfer none]

Since 0.2.0

### gdata_contacts_contact_get_primary_im_address ()

    GDataGDIMAddress *  gdata_contacts_contact_get_primary_im_address
                                                            (GDataContactsContact *self);

Gets the contact's primary IM address, if one exists.

`self` : | a GDataContactsContact
Returns : | a GDataGDIMAddress, or `NULL`. [transfer none]

Since 0.2.0

### gdata_contacts_contact_add_im_address ()

    void                gdata_contacts_contact_add_im_address
                                                            (GDataContactsContact *self,
                                                             GDataGDIMAddress *im_address);

Adds an IM (instant messaging) address to the contact's list of IM addresses and increments its reference count.

Note that only one IM address per contact may be marked as "primary". Insertion and update operations (with `gdata_contacts_service_insert_contact()`) will return an error if more than one IM address is marked as primary.

Duplicate IM addresses will not be added to the list.

`self` : | a GDataContactsContact
`im_address` : | a GDataGDIMAddress to add

Since 0.2.0

### gdata_contacts_contact_remove_all_im_addresses ()

    void                gdata_contacts_contact_remove_all_im_addresses
                                                            (GDataContactsContact *self);

Removes all IM addresses from the contact.

`self` : | a GDataContactsContact

Since 0.4.0

### gdata_contacts_contact_get_postal_addresses ()

    GList *             gdata_contacts_contact_get_postal_addresses
                                                            (GDataContactsContact *self);

Gets a list of the postal addresses owned by the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGDPostalAddresses, or `NULL`. [element-type GData.GDPostalAddress][transfer none]

Since 0.2.0

### gdata_contacts_contact_get_primary_postal_address ()

    GDataGDPostalAddress * gdata_contacts_contact_get_primary_postal_address
                                                            (GDataContactsContact *self);

Gets the contact's primary postal address, if one exists.

`self` : | a GDataContactsContact
Returns : | a GDataGDPostalAddress, or `NULL`. [transfer none]

Since 0.2.0

### gdata_contacts_contact_add_postal_address ()

    void                gdata_contacts_contact_add_postal_address
                                                            (GDataContactsContact *self,
                                                             GDataGDPostalAddress *postal_address);

Adds a postal address to the contact's list of postal addresses and increments its reference count.

Note that only one postal address per contact may be marked as "primary". Insertion and update operations (with `gdata_contacts_service_insert_contact()`) will return an error if more than one postal address is marked as primary.

Duplicate postal addresses will not be added to the list.

`self` : | a GDataContactsContact
`postal_address` : | a GDataGDPostalAddress to add

Since 0.2.0

### gdata_contacts_contact_remove_all_postal_addresses ()

    void                gdata_contacts_contact_remove_all_postal_addresses
                                                            (GDataContactsContact *self);

Removes all postal addresses from the contact.

`self` : | a GDataContactsContact

Since 0.4.0

### gdata_contacts_contact_get_phone_numbers ()

    GList *             gdata_contacts_contact_get_phone_numbers
                                                            (GDataContactsContact *self);

Gets a list of the phone numbers owned by the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGDPhoneNumbers, or `NULL`. [element-type GData.GDPhoneNumber][transfer none]

Since 0.2.0

### gdata_contacts_contact_get_primary_phone_number ()

    GDataGDPhoneNumber * gdata_contacts_contact_get_primary_phone_number
                                                            (GDataContactsContact *self);

Gets the contact's primary phone number, if one exists.

`self` : | a GDataContactsContact
Returns : | a GDataGDPhoneNumber, or `NULL`. [transfer none]

Since 0.2.0

### gdata_contacts_contact_add_phone_number ()

    void                gdata_contacts_contact_add_phone_number
                                                            (GDataContactsContact *self,
                                                             GDataGDPhoneNumber *phone_number);

Adds a phone number to the contact's list of phone numbers and increments its reference count

Note that only one phone number per contact may be marked as "primary". Insertion and update operations (with `gdata_contacts_service_insert_contact()`) will return an error if more than one phone number is marked as primary.

Duplicate phone numbers will not be added to the list.

`self` : | a GDataContactsContact
`phone_number` : | a GDataGDPhoneNumber to add

Since 0.2.0

### gdata_contacts_contact_remove_all_phone_numbers ()

    void                gdata_contacts_contact_remove_all_phone_numbers
                                                            (GDataContactsContact *self);

Removes all phone numbers from the contact.

`self` : | a GDataContactsContact

Since 0.4.0

### gdata_contacts_contact_get_organizations ()

    GList *             gdata_contacts_contact_get_organizations
                                                            (GDataContactsContact *self);

Gets a list of the organizations to which the contact belongs.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGDOrganizations, or `NULL`. [element-type GData.GDOrganization][transfer none]

Since 0.2.0

### gdata_contacts_contact_get_primary_organization ()

    GDataGDOrganization * gdata_contacts_contact_get_primary_organization
                                                            (GDataContactsContact *self);

Gets the contact's primary organization, if one exists.

`self` : | a GDataContactsContact
Returns : | a GDataGDOrganization, or `NULL`. [transfer none]

Since 0.2.0

### gdata_contacts_contact_add_organization ()

    void                gdata_contacts_contact_add_organization
                                                            (GDataContactsContact *self,
                                                             GDataGDOrganization *organization);

Adds an organization to the contact's list of organizations (e.g. employers) and increments its reference count.

Note that only one organization per contact may be marked as "primary". Insertion and update operations (with `gdata_contacts_service_insert_contact()`) will return an error if more than one organization is marked as primary.

Duplicate organizations will not be added to the list.

`self` : | a GDataContactsContact
`organization` : | a GDataGDOrganization to add

Since 0.2.0

### gdata_contacts_contact_remove_all_organizations ()

    void                gdata_contacts_contact_remove_all_organizations
                                                            (GDataContactsContact *self);

Removes all organizations from the contact.

`self` : | a GDataContactsContact

Since 0.4.0

### gdata_contacts_contact_add_jot ()

    void                gdata_contacts_contact_add_jot      (GDataContactsContact *self,
                                                             GDataGContactJot *jot);

Adds a jot to the contact's list of jots and increments its reference count.

Duplicate jots will be added to the list, and multiple jots with the same relation type can be added to a single contact.

`self` : | a GDataContactsContact
`jot` : | a GDataGContactJot to add

Since 0.7.0

### gdata_contacts_contact_get_jots ()

    GList *             gdata_contacts_contact_get_jots     (GDataContactsContact *self);

Gets a list of the jots attached to the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGContactJots, or `NULL`. [element-type GData.GContactJot][transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_jots ()

    void                gdata_contacts_contact_remove_all_jots
                                                            (GDataContactsContact *self);

Removes all jots from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_add_relation ()

    void                gdata_contacts_contact_add_relation (GDataContactsContact *self,
                                                             GDataGContactRelation *relation);

Adds a relation to the contact's list of relations and increments its reference count.

Duplicate relations will be added to the list, and multiple relations with the same relation type can be added to a single contact. Though it may not make sense for some relation types to be repeated, adding them is allowed.

`self` : | a GDataContactsContact
`relation` : | a GDataGContactRelation to add

Since 0.7.0

### gdata_contacts_contact_get_relations ()

    GList *             gdata_contacts_contact_get_relations
                                                            (GDataContactsContact *self);

Gets a list of the relations of the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGContactRelations, or `NULL`. [element-type GData.GContactRelation][transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_relations ()

    void                gdata_contacts_contact_remove_all_relations
                                                            (GDataContactsContact *self);

Removes all relations from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_add_website ()

    void                gdata_contacts_contact_add_website  (GDataContactsContact *self,
                                                             GDataGContactWebsite *website);

Adds a website to the contact's list of websites and increments its reference count.

Duplicate websites will not be added to the list, though the same URI may appear in several GDataGContactWebsites with different relation types or labels.

`self` : | a GDataContactsContact
`website` : | a GDataGContactWebsite to add

Since 0.7.0

### gdata_contacts_contact_get_websites ()

    GList *             gdata_contacts_contact_get_websites (GDataContactsContact *self);

Gets a list of the websites of the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGContactWebsites, or `NULL`. [element-type GData.GContactWebsite][transfer none]

Since 0.7.0

### gdata_contacts_contact_get_primary_website ()

    GDataGContactWebsite * gdata_contacts_contact_get_primary_website
                                                            (GDataContactsContact *self);

Gets the contact's primary website, if one exists.

`self` : | a GDataContactsContact
Returns : | a GDataGContactWebsite, or `NULL`. [transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_websites ()

    void                gdata_contacts_contact_remove_all_websites
                                                            (GDataContactsContact *self);

Removes all websites from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_add_event ()

    void                gdata_contacts_contact_add_event    (GDataContactsContact *self,
                                                             GDataGContactEvent *event);

Adds an event to the contact's list of events and increments its reference count.

Duplicate events will be added to the list, and multiple events with the same event type can be added to a single contact. Though it may not make sense for some event types to be repeated, adding them is allowed.

`self` : | a GDataContactsContact
`event` : | a GDataGContactEvent to add

Since 0.7.0

### gdata_contacts_contact_get_events ()

    GList *             gdata_contacts_contact_get_events   (GDataContactsContact *self);

Gets a list of the events of the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGContactEvents, or `NULL`. [element-type GData.GContactEvent][transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_events ()

    void                gdata_contacts_contact_remove_all_events
                                                            (GDataContactsContact *self);

Removes all events from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_add_calendar ()

    void                gdata_contacts_contact_add_calendar (GDataContactsContact *self,
                                                             GDataGContactCalendar *calendar);

Adds a calendar to the contact's list of calendars and increments its reference count.

Duplicate calendars will not be added to the list, though the same URI may appear in several GDataGContactCalendars with different relation types or labels.

`self` : | a GDataContactsContact
`calendar` : | a GDataGContactCalendar to add

Since 0.7.0

### gdata_contacts_contact_get_calendars ()

    GList *             gdata_contacts_contact_get_calendars
                                                            (GDataContactsContact *self);

Gets a list of the calendars of the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGContactCalendars, or `NULL`. [element-type GData.GContactCalendar][transfer none]

Since 0.7.0

### gdata_contacts_contact_get_primary_calendar ()

    GDataGContactCalendar * gdata_contacts_contact_get_primary_calendar
                                                            (GDataContactsContact *self);

Gets the contact's primary calendar, if one exists.

`self` : | a GDataContactsContact
Returns : | a GDataGContactCalendar, or `NULL`. [transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_calendars ()

    void                gdata_contacts_contact_remove_all_calendars
                                                            (GDataContactsContact *self);

Removes all calendars from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_add_external_id ()

    void                gdata_contacts_contact_add_external_id
                                                            (GDataContactsContact *self,
                                                             GDataGContactExternalID *external_id);

Adds an external ID to the contact's list of external IDs and increments its reference count.

Duplicate IDs will not be added to the list.

`self` : | a GDataContactsContact
`external_id` : | a GDataGContactExternalID to add

Since 0.7.0

### gdata_contacts_contact_get_external_ids ()

    GList *             gdata_contacts_contact_get_external_ids
                                                            (GDataContactsContact *self);

Gets a list of the external IDs of the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGContactExternalIDs, or `NULL`. [element-type GData.GContactExternalID][transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_external_ids ()

    void                gdata_contacts_contact_remove_all_external_ids
                                                            (GDataContactsContact *self);

Removes all external IDs from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_add_hobby ()

    void                gdata_contacts_contact_add_hobby    (GDataContactsContact *self,
                                                             const gchar *hobby);

Adds a hobby to the contact's list of hobbies, copying it in the process.

Duplicate hobbies will not be added to the list.

`self` : | a GDataContactsContact
`hobby` : | a hobby to add

Since 0.7.0

### gdata_contacts_contact_get_hobbies ()

    GList *             gdata_contacts_contact_get_hobbies  (GDataContactsContact *self);

Gets a list of the hobbies of the contact.

`self` : | a GDataContactsContact
Returns : | a GList of hobby strings, or `NULL`. [element-type utf8][transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_hobbies ()

    void                gdata_contacts_contact_remove_all_hobbies
                                                            (GDataContactsContact *self);

Removes all hobbies from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_add_language ()

    void                gdata_contacts_contact_add_language (GDataContactsContact *self,
                                                             GDataGContactLanguage *language);

Adds a language to the contact's list of languages and increments its reference count.

Duplicate languages will not be added to the list.

`self` : | a GDataContactsContact
`language` : | a GDataGContactLanguage to add

Since 0.7.0

### gdata_contacts_contact_get_languages ()

    GList *             gdata_contacts_contact_get_languages
                                                            (GDataContactsContact *self);

Gets a list of the languages of the contact.

`self` : | a GDataContactsContact
Returns : | a GList of GDataGContactLanguages, or `NULL`. [element-type GData.GContactLanguage][transfer none]

Since 0.7.0

### gdata_contacts_contact_remove_all_languages ()

    void                gdata_contacts_contact_remove_all_languages
                                                            (GDataContactsContact *self);

Removes all languages from the contact.

`self` : | a GDataContactsContact

Since 0.7.0

### gdata_contacts_contact_get_groups ()

    GList *             gdata_contacts_contact_get_groups   (GDataContactsContact *self);

Gets a list of the groups to which the contact belongs.

`self` : | a GDataContactsContact
Returns : | a GList of constant group ID URIs, or `NULL`; free with `g_list_free()`. [element-type utf8][transfer container]

Since 0.2.0

### gdata_contacts_contact_add_group ()

    void                gdata_contacts_contact_add_group    (GDataContactsContact *self,
                                                             const gchar *href);

Adds the contact to the given group. `href` should be a URI.

`self` : | a GDataContactsContact
`href` : | the group's ID URI

Since 0.2.0

### gdata_contacts_contact_remove_group ()

    void                gdata_contacts_contact_remove_group (GDataContactsContact *self,
                                                             const gchar *href);

Removes the contact from the given group. `href` should be a URI.

`self` : | a GDataContactsContact
`href` : | the group's ID URI

Since 0.2.0

### gdata_contacts_contact_is_group_deleted ()

    gboolean            gdata_contacts_contact_is_group_deleted
                                                            (GDataContactsContact *self,
                                                             const gchar *href);

Returns whether the contact has recently been removed from the given group on the server. This will always return `FALSE` unless "show-deleted" has been set to `TRUE` for the query which returned the contact.

If you've just removed a contact from a group locally using `gdata_contacts_contact_remove_group()`, `FALSE` will still be returned by this function, as the change hasn't been sent to the server.

`self` : | a GDataContactsContact
`href` : | the group's ID URI
Returns : | `TRUE` if the contact has recently been removed from the group, `FALSE` otherwise

Since 0.2.0

### gdata_contacts_contact_get_extended_property ()

    const gchar *       gdata_contacts_contact_get_extended_property
                                                            (GDataContactsContact *self,
                                                             const gchar *name);

Gets the value of an extended property of the contact. Each contact can have up to 10 client-set extended properties to store data of the client's choosing.

`self` : | a GDataContactsContact
`name` : | the property name; an arbitrary, unique string
Returns : | the property's value, or `NULL`

Since 0.2.0

### gdata_contacts_contact_get_extended_properties ()

    GHashTable *        gdata_contacts_contact_get_extended_properties
                                                            (GDataContactsContact *self);

Gets the full list of extended properties of the contact; a hash table mapping property name to value.

`self` : | a GDataContactsContact
Returns : | a GHashTable of extended properties. [transfer none]

Since 0.4.0

### gdata_contacts_contact_set_extended_property ()

    gboolean            gdata_contacts_contact_set_extended_property
                                                            (GDataContactsContact *self,
                                                             const gchar *name,
                                                             const gchar *value);

Sets the value of a contact's extended property. Extended property names are unique (but of the client's choosing), and reusing the same property name will result in the old value of that property being overwritten.

To unset a property, set `value` to `NULL` or an empty string.

A contact may have up to 10 extended properties, and each should be reasonably small (i.e. not a photo or ringtone). For more information, see the online documentation. `FALSE` will be returned if you attempt to add more than 10 extended properties.

`self` : | a GDataContactsContact
`name` : | the property name; an arbitrary, unique string
`value` : | the property value, or `NULL`. [allow-none]
Returns : | `TRUE` if the property was updated or deleted successfully, `FALSE` otherwise

Since 0.2.0

### gdata_contacts_contact_get_user_defined_field ()

    const gchar *       gdata_contacts_contact_get_user_defined_field
                                                            (GDataContactsContact *self,
                                                             const gchar *name);

Gets the value of a user-defined field of the contact. User-defined fields are settable by the user through the Google Contacts web interface, in contrast to extended properties, which are visible and settable only through the GData interface.

The `name` of the field may not be `NULL`, but may be an empty string.

`self` : | a GDataContactsContact
`name` : | the field name; an arbitrary, case-sensitive, unique string
Returns : | the field's value, or `NULL`

Since 0.7.0

### gdata_contacts_contact_get_user_defined_fields ()

    GHashTable *        gdata_contacts_contact_get_user_defined_fields
                                                            (GDataContactsContact *self);

Gets the full list of user-defined fields of the contact; a hash table mapping field name to value.

`self` : | a GDataContactsContact
Returns : | a GHashTable of user-defined fields. [transfer none]

Since 0.7.0

### gdata_contacts_contact_set_user_defined_field ()

    void                gdata_contacts_contact_set_user_defined_field
                                                            (GDataContactsContact *self,
                                                             const gchar *name,
                                                             const gchar *value);

Sets the value of a contact's user-defined field. User-defined field names are unique (but of the client's choosing), and reusing the same field name will result in the old value of that field being overwritten.

The `name` of the field may not be `NULL`, but may be an empty string.

To unset a field, set `value` to `NULL`.

`self` : | a GDataContactsContact
`name` : | the field name; an arbitrary, case-sensitive, unique string
`value` : | the field value, or `NULL`. [allow-none]

Since 0.7.0

### gdata_contacts_contact_get_edited ()

    gint64              gdata_contacts_contact_get_edited   (GDataContactsContact *self);

Gets the "edited" property. If the property is unset, `-1` will be returned.

`self` : | a GDataContactsContact
Returns : | the UNIX timestamp for the time the contact was last edited, or `-1`

Since 0.2.0

### gdata_contacts_contact_is_deleted ()

    gboolean            gdata_contacts_contact_is_deleted   (GDataContactsContact *self);

Returns whether the contact has recently been deleted. This will always return `FALSE` unless "show-deleted" has been set to `TRUE` for the query which returned the contact; then this function will return `TRUE` only if the contact has been deleted.

If a contact has been deleted, no other information is available about it. This is designed to allow contacts to be deleted from local address books using incremental updates from the server (e.g. with "updated-min" and "show-deleted").

`self` : | a GDataContactsContact
Returns : | `TRUE` if the contact has been deleted, `FALSE` otherwise

Since 0.2.0

### gdata_contacts_contact_get_photo_etag ()

    const gchar *       gdata_contacts_contact_get_photo_etag
                                                            (GDataContactsContact *self);

Returns the ETag for the contact's attached photo, if it exists. If it does exist, the contact's photo can be retrieved using `gdata_contacts_contact_get_photo()`. If it doesn't exist, `NULL` will be returned, and the contact doesn't have a photo (so calling `gdata_contacts_contact_get_photo()` will also return `NULL`)

`self` : | a GDataContactsContact
Returns : | the contact's photo's ETag if it exists, `NULL` otherwise

Since 0.9.0

### gdata_contacts_contact_get_photo ()

    guint8 *            gdata_contacts_contact_get_photo    (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             gsize *length,
                                                             gchar **content_type,
                                                             GCancellable *cancellable,
                                                             GError **error);

Downloads and returns the contact's photo, if they have one. If the contact doesn't have a photo (i.e. `gdata_contacts_contact_get_photo_etag()` returns `NULL`), `NULL` is returned, but no error is set in `error`.

If `cancellable` is not `NULL`, then the operation can be cancelled by triggering the `cancellable` object from another thread. If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be returned.

If there is an error getting the photo, a `GDATA_SERVICE_ERROR_PROTOCOL_ERROR` error will be returned.

`self` : | a GDataContactsContact
`service` : | a GDataContactsService
`length` : | return location for the image length, in bytes. [out caller-allocates]
`content_type` : | return location for the image's content type, or `NULL`; free with `g_free()`. [out callee-allocates][transfer full][allow-none]
`cancellable` : | optional GCancellable object, or `NULL`. [allow-none]
`error` : | a GError, or `NULL`
Returns : | the image data, or `NULL`; free with `g_free()`

Since 0.8.0

### gdata_contacts_contact_get_photo_async ()

    void                gdata_contacts_contact_get_photo_async
                                                            (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Downloads and returns the contact's photo, if they have one, asynchronously. `self` and `service` are both reffed when this function is called, so can safely be unreffed after this function returns.

When the operation is finished, `callback` will be called. You can then call `gdata_contacts_contact_get_photo_finish()` to get the results of the operation.

For more details, see `gdata_contacts_contact_get_photo()`, which is the synchronous version of this function.

If `cancellable` is not `NULL`, then the operation can be cancelled by triggering the `cancellable` object from another thread. If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be returned by `gdata_contacts_contact_get_photo_finish()`.

If there is an error getting the photo, a `GDATA_SERVICE_ERROR_PROTOCOL_ERROR` error will be returned by `gdata_contacts_contact_get_photo_finish()`.

`self` : | a GDataContactsContact
`service` : | a GDataContactsService
`cancellable` : | optional GCancellable object, or `NULL`. [allow-none]
`callback` : | a GAsyncReadyCallback to call when the photo has been retrieved, or `NULL`
`user_data` : | data to pass to the `callback` function. [closure]

Since 0.8.0

### gdata_contacts_contact_get_photo_finish ()

    guint8 *            gdata_contacts_contact_get_photo_finish
                                                            (GDataContactsContact *self,
                                                             GAsyncResult *async_result,
                                                             gsize *length,
                                                             gchar **content_type,
                                                             GError **error);

Finishes an asynchronous contact photo retrieval operation started with `gdata_contacts_contact_get_photo_async()`. If the contact doesn't have a photo (i.e. `gdata_contacts_contact_get_photo_etag()` returns `NULL`), `NULL` is returned, but no error is set in `error`.

If there is an error getting the photo, a `GDATA_SERVICE_ERROR_PROTOCOL_ERROR` error will be returned. `length` will be set to `0` and `content_type` will be set to `NULL`.

`self` : | a GDataContactsContact
`async_result` : | a GAsyncResult
`length` : | return location for the image length, in bytes. [out caller-allocates]
`content_type` : | return location for the image's content type, or `NULL`; free with `g_free()`. [out callee-allocates][transfer full][allow-none]
`error` : | a GError, or `NULL`
Returns : | the image data, or `NULL`; free with `g_free()`

Since 0.8.0

### gdata_contacts_contact_set_photo ()

    gboolean            gdata_contacts_contact_set_photo    (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             const guint8 *data,
                                                             gsize length,
                                                             const gchar *content_type,
                                                             GCancellable *cancellable,
                                                             GError **error);

Sets the contact's photo to `data` or, if `data` is `NULL`, deletes the contact's photo. `content_type` must be specified if `data` is non-`NULL`.

If `cancellable` is not `NULL`, then the operation can be cancelled by triggering the `cancellable` object from another thread. If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be returned.

If there is an error setting the photo, a `GDATA_SERVICE_ERROR_PROTOCOL_ERROR` error will be returned.

`self` : | a GDataContactsContact
`service` : | a GDataContactsService
`data` : | the image data, or `NULL`. [allow-none]
`length` : | the image length, in bytes
`content_type` : | the content type of the image, or `NULL`. [allow-none]
`cancellable` : | optional GCancellable object, or `NULL`. [allow-none]
`error` : | a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` otherwise

Since 0.8.0

### gdata_contacts_contact_set_photo_async ()

    void                gdata_contacts_contact_set_photo_async
                                                            (GDataContactsContact *self,
                                                             GDataContactsService *service,
                                                             const guint8 *data,
                                                             gsize length,
                                                             const gchar *content_type,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Sets the contact's photo to `data` or, if `data` is `NULL`, deletes the contact's photo. `content_type` must be specified if `data` is non-`NULL`. `self`, `service`, `data` and `content_type` are all reffed and copied when this function is called, so can safely be unreffed after this function returns.

When the operation is finished, `callback` will be called. You can then call `gdata_contacts_contact_set_photo_finish()` to get the results of the operation.

For more details, see `gdata_contacts_contact_set_photo()`, which is the synchronous version of this function.

If `cancellable` is not `NULL`, then the operation can be cancelled by triggering the `cancellable` object from another thread. If the operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be returned by `gdata_contacts_contact_set_photo_finish()`.

If there is an error setting the photo, a `GDATA_SERVICE_ERROR_PROTOCOL_ERROR` error will be returned by `gdata_contacts_contact_set_photo_finish()`.

`self` : | a GDataContactsContact
`service` : | a GDataContactsService
`data` : | the image data, or `NULL`. [allow-none]
`length` : | the image length, in bytes
`content_type` : | the content type of the image, or `NULL`. [allow-none]
`cancellable` : | optional GCancellable object, or `NULL`. [allow-none]
`callback` : | a GAsyncReadyCallback to call when the photo has been set, or `NULL`
`user_data` : | data to pass to the `callback` function. [closure]

Since 0.8.0

### gdata_contacts_contact_set_photo_finish ()

    gboolean            gdata_contacts_contact_set_photo_finish
                                                            (GDataContactsContact *self,
                                                             GAsyncResult *async_result,
                                                             GError **error);

Finishes an asynchronous contact photo setting operation started with `gdata_contacts_contact_set_photo_async()`.

If there is an error setting the photo, a `GDATA_SERVICE_ERROR_PROTOCOL_ERROR` error will be returned.

`self` : | a GDataContactsContact
`async_result` : | a GAsyncResult
`error` : | a GError, or `NULL`
Returns : | `TRUE` on success, `FALSE` otherwise

Since 0.8.0

## Property Details

### The `"billing-information"` property

      "billing-information"      gchar*                : Read / Write

Billing information for the contact, such as their billing name and address.

Default value: NULL

Since 0.7.0

### The `"birthday"` property

      "birthday"                 GDate*                : Read / Write

The contact's birthday.

Since 0.7.0

### The `"birthday-has-year"` property

      "birthday-has-year"        gboolean              : Read / Write

Whether the contact's birthday includes their year of birth.

Default value: FALSE

Since 0.7.0

### The `"deleted"` property

      "deleted"                  gboolean              : Read

Whether the entry has been deleted.

Default value: FALSE

Since 0.2.0

### The `"directory-server"` property

      "directory-server"         gchar*                : Read / Write

The name or address of a directory server associated with the contact.

Default value: NULL

Since 0.7.0

### The `"edited"` property

      "edited"                   gint64                : Read

The last time the contact was edited. If the contact has not been edited yet, the content indicates the time it was created.

For more information, see the Atom Publishing Protocol specification.

Allowed values: >= -1

Default value: -1

Since 0.2.0

### The `"file-as"` property

      "file-as"                  gchar*                : Read / Write

The name to file the contact under for sorting purposes.

Default value: NULL

Since 0.11.0

### The `"gender"` property

      "gender"                   gchar*                : Read / Write

The gender of the contact. For example: `GDATA_CONTACTS_GENDER_MALE` or `GDATA_CONTACTS_GENDER_FEMALE`.

Default value: NULL

Since 0.7.0

### The `"initials"` property

      "initials"                 gchar*                : Read / Write

The initials of the contact.

Default value: NULL

Since 0.7.0

### The `"maiden-name"` property

      "maiden-name"              gchar*                : Read / Write

The maiden name of the contact.

Default value: NULL

Since 0.7.0

### The `"mileage"` property

      "mileage"                  gchar*                : Read / Write

A mileage associated with the contact, such as one for reimbursement purposes. It can be in any format.

Default value: NULL

Since 0.7.0

### The `"name"` property

      "name"                     GDataGDName*          : Read / Write

The contact's name in a structured representation.

Since 0.5.0

### The `"nickname"` property

      "nickname"                 gchar*                : Read / Write

The contact's chosen nickname.

Default value: NULL

Since 0.7.0

### The `"occupation"` property

      "occupation"               gchar*                : Read / Write

The contact's occupation.

Default value: NULL

Since 0.7.0

### The `"photo-etag"` property

      "photo-etag"               gchar*                : Read

The ETag of the contact's photo, if the contact has a photo; `NULL` otherwise.

Default value: NULL

Since 0.9.0

### The `"priority"` property

      "priority"                 gchar*                : Read / Write

The contact's importance. For example: `GDATA_CONTACTS_PRIORITY_NORMAL` or `GDATA_CONTACTS_PRIORITY_HIGH`.

Default value: NULL

Since 0.7.0

### The `"sensitivity"` property

      "sensitivity"              gchar*                : Read / Write

The sensitivity of the contact's data. For example: `GDATA_CONTACTS_SENSITIVITY_NORMAL` or `GDATA_CONTACTS_SENSITIVITY_PRIVATE`.

Default value: NULL

Since 0.7.0

### The `"short-name"` property

      "short-name"               gchar*                : Read / Write

A short name for the contact. This should be used for contracted versions of the contact's actual name, whereas "nickname" should be used for nicknames.

Default value: NULL

Since 0.7.0

### The `"subject"` property

      "subject"                  gchar*                : Read / Write

The subject of the contact. (i.e. The contact's relevance to the address book.)

Default value: NULL

Since 0.7.0