## GDataGContactEvent GDataGContactEvent — gContact event element |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <gdata/gcontact/gdata-gcontact-event.h>

    #define             GDATA_GCONTACT_EVENT_ANNIVERSARY
    #define             GDATA_GCONTACT_EVENT_OTHER
                        GDataGContactEvent;
                        GDataGContactEventClass;
    GDataGContactEvent * gdata_gcontact_event_new           (const GDate *date,
                                                             const gchar *relation_type,
                                                             const gchar *label);
    void                gdata_gcontact_event_get_date       (GDataGContactEvent *self,
                                                             GDate *date);
    void                gdata_gcontact_event_set_date       (GDataGContactEvent *self,
                                                             const GDate *date);
    const gchar *       gdata_gcontact_event_get_relation_type
                                                            (GDataGContactEvent *self);
    void                gdata_gcontact_event_set_relation_type
                                                            (GDataGContactEvent *self,
                                                             const gchar *relation_type);
    const gchar *       gdata_gcontact_event_get_label      (GDataGContactEvent *self);
    void                gdata_gcontact_event_set_label      (GDataGContactEvent *self,
                                                             const gchar *label);

## Object Hierarchy

      GObject
       +----GDataParsable
             +----GDataGContactEvent

## Properties

      "date"                     GDate*                : Read / Write
      "label"                    gchar*                : Read / Write
      "relation-type"            gchar*                : Read / Write

## Description

GDataGContactEvent represents a "event" element from the gContact specification.

## Details

### GDATA_GCONTACT_EVENT_ANNIVERSARY

    #define GDATA_GCONTACT_EVENT_ANNIVERSARY "anniversary"

The relation type URI for an anniversary event.

For more information, see the gContact specification.

Since 0.7.0

### GDATA_GCONTACT_EVENT_OTHER

    #define GDATA_GCONTACT_EVENT_OTHER "other"

The relation type URI for a miscellaneous event.

For more information, see the gContact specification.

Since 0.7.0

### GDataGContactEvent

    typedef struct _GDataGContactEvent GDataGContactEvent;

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

Since 0.7.0

### GDataGContactEventClass

    typedef struct {
    } GDataGContactEventClass;

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

Since 0.7.0

### gdata_gcontact_event_new ()

    GDataGContactEvent * gdata_gcontact_event_new           (const GDate *date,
                                                             const gchar *relation_type,
                                                             const gchar *label);

Creates a new GDataGContactEvent. More information is available in the gContact specification.

Exactly one of `relation_type` and `label` should be provided; the other must be `NULL`.

`date` : | the date of the event
`relation_type` : | the relationship between the event and its owner, or `NULL`. [allow-none]
`label` : | a human-readable label for the event, or `NULL`. [allow-none]
Returns : | a new GDataGContactEvent; unref with `g_object_unref()`

Since 0.7.0

### gdata_gcontact_event_get_date ()

    void                gdata_gcontact_event_get_date       (GDataGContactEvent *self,
                                                             GDate *date);

Gets the "date" property.

`self` : | a GDataGContactEvent
`date` : | return location for the date of the event. [out caller-allocates]

Since 0.7.0

### gdata_gcontact_event_set_date ()

    void                gdata_gcontact_event_set_date       (GDataGContactEvent *self,
                                                             const GDate *date);

Sets the "date" property to `date`.

`self` : | a GDataGContactEvent
`date` : | the new date for the event

Since 0.7.0

### gdata_gcontact_event_get_relation_type ()

    const gchar *       gdata_gcontact_event_get_relation_type
                                                            (GDataGContactEvent *self);

Gets the "relation-type" property.

`self` : | a GDataGContactEvent
Returns : | the event's relation type, or `NULL`

Since 0.7.0

### gdata_gcontact_event_set_relation_type ()

    void                gdata_gcontact_event_set_relation_type
                                                            (GDataGContactEvent *self,
                                                             const gchar *relation_type);

Sets the "relation-type" property to `relation_type` such as `GDATA_GCONTACT_EVENT_ANNIVERSARY` or `GDATA_GCONTACT_EVENT_OTHER`.

If `relation_type` is `NULL`, the relation type will be unset. When the GDataGContactEvent is used in a query, however, exactly one of "relation-type" and "label" must be `NULL`.

`self` : | a GDataGContactEvent
`relation_type` : | the new relation type for the event, or `NULL`. [allow-none]

Since 0.7.0

### gdata_gcontact_event_get_label ()

    const gchar *       gdata_gcontact_event_get_label      (GDataGContactEvent *self);

Gets the "label" property.

`self` : | a GDataGContactEvent
Returns : | the event's label, or `NULL`

Since 0.7.0

### gdata_gcontact_event_set_label ()

    void                gdata_gcontact_event_set_label      (GDataGContactEvent *self,
                                                             const gchar *label);

Sets the "label" property to `label`.

If `label` is `NULL`, the label will be unset. When the GDataGContactEvent is used in a query, however, exactly one of "relation-type" and "label" must be `NULL`.

`self` : | a GDataGContactEvent
`label` : | the new label for the event, or `NULL`. [allow-none]

Since 0.7.0

## Property Details

### The `"date"` property

      "date"                     GDate*                : Read / Write

The date of the event.

For more information, see the GContact specification.

Since 0.7.0

### The `"label"` property

      "label"                    gchar*                : Read / Write

A simple string value used to name this event. It is mutually exclusive with "relation-type". It allows UIs to display a label such as "Wedding anniversary".

For more information, see the gContact specification.

Default value: NULL

Since 0.7.0

### The `"relation-type"` property

      "relation-type"            gchar*                : Read / Write

A programmatic value that identifies the type of event. It is mutually exclusive with "label". Examples are `GDATA_GCONTACT_EVENT_ANNIVERSARY` or `GDATA_GCONTACT_EVENT_OTHER`.

For more information, see the gContact specification.

Default value: NULL

Since 0.7.0