## GDataGContactCalendar GDataGContactCalendar — gContact calendar element |

## Stability Level

Stable, unless otherwise indicated

## Functions

GDataGContactCalendar * | gdata_gcontact_calendar_new ()
const gchar * | gdata_gcontact_calendar_get_uri ()
void | gdata_gcontact_calendar_set_uri ()
const gchar * | gdata_gcontact_calendar_get_relation_type ()
void | gdata_gcontact_calendar_set_relation_type ()
const gchar * | gdata_gcontact_calendar_get_label ()
void | gdata_gcontact_calendar_set_label ()
gboolean | gdata_gcontact_calendar_is_primary ()
void | gdata_gcontact_calendar_set_is_primary ()

## Properties

gboolean | is-primary | Read / Write
gchar * | label | Read / Write
gchar * | relation-type | Read / Write
gchar * | uri | Read / Write

## Types and Values

#define | GDATA_GCONTACT_CALENDAR_HOME
#define | GDATA_GCONTACT_CALENDAR_WORK
#define | GDATA_GCONTACT_CALENDAR_FREE_BUSY
| GDataGContactCalendar
| GDataGContactCalendarClass

## Object Hierarchy

        GObject
        ╰── GDataParsable
            ╰── GDataGContactCalendar

## Implemented Interfaces

GDataGContactCalendar implements GDataComparable.

## Includes

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

## Description

GDataGContactCalendar represents a "calendarLink" element from the

gContact specification.

## Functions

### gdata_gcontact_calendar_new ()

    GDataGContactCalendar *
    gdata_gcontact_calendar_new (const gchar *uri,
                                 const gchar *relation_type,
                                 const gchar *label,
                                 gboolean is_primary);

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

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

#### Parameters

uri | the URI of the calendar |
relation_type | the type of calendar, or `NULL`. | [allow-none]
label | a free-form label for the calendar, or `NULL`. | [allow-none]
is_primary | `TRUE` if this calendar is its owner's primary calendar, `FALSE` otherwise |

#### Returns

a new GDataGContactCalendar; unref with `g_object_unref()`

Since 0.7.0

### gdata_gcontact_calendar_get_uri ()

    const gchar *
    gdata_gcontact_calendar_get_uri (GDataGContactCalendar *self);

Gets the “uri” property.

#### Parameters

self | a GDataGContactCalendar |

#### Returns

the calendar's URI

Since 0.7.0

### gdata_gcontact_calendar_set_uri ()

    void
    gdata_gcontact_calendar_set_uri (GDataGContactCalendar *self,
                                     const gchar *uri);

Sets the “uri” property to `uri` .

#### Parameters

self | a GDataGContactCalendar |
uri | the new URI for the calendar |

Since 0.7.0

### gdata_gcontact_calendar_get_relation_type ()

    const gchar *
    gdata_gcontact_calendar_get_relation_type
                                   (GDataGContactCalendar *self);

Gets the “relation-type” property.

#### Parameters

self | a GDataGContactCalendar |

#### Returns

the type of the relation, or `NULL`

Since 0.7.0

### gdata_gcontact_calendar_set_relation_type ()

    void
    gdata_gcontact_calendar_set_relation_type
                                   (GDataGContactCalendar *self,
                                    const gchar *relation_type);

Sets the “relation-type” property to `relation_type` , such as `GDATA_GCONTACT_CALENDAR_HOME` or `GDATA_GCONTACT_CALENDAR_FREE_BUSY`.

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

#### Parameters

self | a GDataGContactCalendar |
relation_type | the new type for the calendar, or `NULL`. | [allow-none]

Since 0.7.0

### gdata_gcontact_calendar_get_label ()

    const gchar *
    gdata_gcontact_calendar_get_label (GDataGContactCalendar *self);

Gets the “label” property.

#### Parameters

self | a GDataGContactCalendar |

#### Returns

a free-form label for the calendar, or `NULL`

Since 0.7.0

### gdata_gcontact_calendar_set_label ()

    void
    gdata_gcontact_calendar_set_label (GDataGContactCalendar *self,
                                       const gchar *label);

Sets the “label” property to `label` .

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

#### Parameters

self | a GDataGContactCalendar |
label | the new free-form label for the calendar, or `NULL`. | [allow-none]

Since 0.7.0

### gdata_gcontact_calendar_is_primary ()

    gboolean
    gdata_gcontact_calendar_is_primary (GDataGContactCalendar *self);

Gets the “is-primary” property.

#### Parameters

self | a GDataGContactCalendar |

#### Returns

`TRUE` if this is the contact's primary calendar, `FALSE` otherwise

Since 0.7.0

### gdata_gcontact_calendar_set_is_primary ()

    void
    gdata_gcontact_calendar_set_is_primary
                                   (GDataGContactCalendar *self,
                                    gboolean is_primary);

Sets the “is-primary” property to `is_primary` .

#### Parameters

self | a GDataGContactCalendar |
is_primary | `TRUE` if this is the contact's primary calendar, `FALSE` otherwise |

Since 0.7.0

## Types and Values

### GDATA_GCONTACT_CALENDAR_HOME

    #define GDATA_GCONTACT_CALENDAR_HOME "home"

The relation type URI for a contact's home calendar.

For more information, see the gContact specification.

Since 0.7.0

### GDATA_GCONTACT_CALENDAR_WORK

    #define GDATA_GCONTACT_CALENDAR_WORK "work"

The relation type URI for a contact's work calendar.

For more information, see the gContact specification.

Since 0.7.0

### GDATA_GCONTACT_CALENDAR_FREE_BUSY

    #define GDATA_GCONTACT_CALENDAR_FREE_BUSY "free-busy"

The relation type URI for a contact's free/busy calendar.

For more information, see the gContact specification.

Since 0.7.0

### GDataGContactCalendar

    typedef struct _GDataGContactCalendar GDataGContactCalendar;

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

Since 0.7.0

### GDataGContactCalendarClass

    typedef struct {
    } GDataGContactCalendarClass;

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

Since 0.7.0

## Property Details

### The `“is-primary”` property

      “is-primary”               gboolean

Indicates which calendar out of a group is primary.

For more information, see the

gContact specification.

Flags: Read / Write

Default value: FALSE

Since 0.7.0

### The `“label”` property

      “label”                    gchar *

A free-form string that identifies the type of calendar. It is mutually exclusive with “relation-type”.

For more information, see the

gContact specification.

Flags: Read / Write

Default value: NULL

Since 0.7.0

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

      “relation-type”            gchar *

A programmatic value that identifies the type of calendar. It is mutually exclusive with “label”. Examples are `GDATA_GCONTACT_CALENDAR_HOME` or `GDATA_GCONTACT_CALENDAR_FREE_BUSY`.

For more information, see the

gContact specification.

Flags: Read / Write

Default value: NULL

Since 0.7.0

### The `“uri”` property

      “uri”                      gchar *

The URI of the calendar.

For more information, see the

gContact specification.

Flags: Read / Write

Default value: NULL

Since 0.7.0