## GDataGContactEvent GDataGContactEvent — gContact event element |

## Stability Level

Stable, unless otherwise indicated

## Functions

GDataGContactEvent * | gdata_gcontact_event_new ()
void | gdata_gcontact_event_get_date ()
void | gdata_gcontact_event_set_date ()
const gchar * | gdata_gcontact_event_get_relation_type ()
void | gdata_gcontact_event_set_relation_type ()
const gchar * | gdata_gcontact_event_get_label ()
void | gdata_gcontact_event_set_label ()

## Properties

GDate * | date | Read / Write
char * | label | Read / Write
char * | relation-type | Read / Write

## Types and Values

#define | GDATA_GCONTACT_EVENT_ANNIVERSARY
#define | GDATA_GCONTACT_EVENT_OTHER
| GDataGContactEvent
| GDataGContactEventClass

## Object Hierarchy

        GObject
        ╰── GDataParsable
            ╰── GDataGContactEvent

## Includes

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

## Description

GDataGContactEvent represents a "event" element from the

gContact specification.

## Functions

### 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`.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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`.

#### Parameters

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.

#### Parameters

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`.

#### Parameters

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

Since: 0.7.0

## Types and Values

### 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

## Property Details

### The `“date”` property

      “date”                     GDate *

The date of the event.

For more information, see the

GContact specification.

Owner: GDataGContactEvent

Flags: Read / Write

Since: 0.7.0

### The `“label”` property

      “label”                    char *

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.

Owner: GDataGContactEvent

Flags: Read / Write

Default value: NULL

Since: 0.7.0

### The `“relation-type”` property

      “relation-type”            char *

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.

Owner: GDataGContactEvent

Flags: Read / Write

Default value: NULL

Since: 0.7.0