GDataGContactCalendar

## GDataGContactCalendar GDataGContactCalendar — gContact calendar element |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

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

    #define             GDATA_GCONTACT_CALENDAR_HOME
    #define             GDATA_GCONTACT_CALENDAR_WORK
    #define             GDATA_GCONTACT_CALENDAR_FREE_BUSY
                        GDataGContactCalendar;
                        GDataGContactCalendarClass;
    GDataGContactCalendar * gdata_gcontact_calendar_new     (const gchar *uri,
                                                             const gchar *relation_type,
                                                             const gchar *label,
                                                             gboolean is_primary);
    const gchar *       gdata_gcontact_calendar_get_uri     (GDataGContactCalendar *self);
    void                gdata_gcontact_calendar_set_uri     (GDataGContactCalendar *self,
                                                             const gchar *uri);
    const gchar *       gdata_gcontact_calendar_get_relation_type
                                                            (GDataGContactCalendar *self);
    void                gdata_gcontact_calendar_set_relation_type
                                                            (GDataGContactCalendar *self,
                                                             const gchar *relation_type);
    const gchar *       gdata_gcontact_calendar_get_label   (GDataGContactCalendar *self);
    void                gdata_gcontact_calendar_set_label   (GDataGContactCalendar *self,
                                                             const gchar *label);
    gboolean            gdata_gcontact_calendar_is_primary  (GDataGContactCalendar *self);
    void                gdata_gcontact_calendar_set_is_primary
                                                            (GDataGContactCalendar *self,
                                                             gboolean is_primary);

## Object Hierarchy

      GObject
       +----GDataParsable
             +----GDataGContactCalendar

## Implemented Interfaces

GDataGContactCalendar implements GDataComparable.

## Properties

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

## Description

GDataGContactCalendar represents a "calendarLink" element from the gContact specification.

## Details

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

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

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

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

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

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

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

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

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

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

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

Since 0.7.0

## Property Details

### The `"is-primary"` property

      "is-primary"               gboolean              : Read / Write

Indicates which calendar out of a group is primary.

For more information, see the gContact specification.

Default value: FALSE

Since 0.7.0

### The `"label"` property

      "label"                    gchar*                : Read / Write

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

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

Default value: NULL

Since 0.7.0

### The `"uri"` property

      "uri"                      gchar*                : Read / Write

The URI of the calendar.

For more information, see the gContact specification.

Default value: NULL

Since 0.7.0