## GDataGDWhen

GDataGDWhen — GData when element

## Stability Level

Stable, unless otherwise indicated

## Functions

GDataGDWhen * | gdata_gd_when_new ()
gint64 | gdata_gd_when_get_start_time ()
void | gdata_gd_when_set_start_time ()
gint64 | gdata_gd_when_get_end_time ()
void | gdata_gd_when_set_end_time ()
gboolean | gdata_gd_when_is_date ()
void | gdata_gd_when_set_is_date ()
const gchar * | gdata_gd_when_get_value_string ()
void | gdata_gd_when_set_value_string ()
GList * | gdata_gd_when_get_reminders ()
void | gdata_gd_when_add_reminder ()

## Properties

gint64 | end-time | Read / Write
gboolean | is-date | Read / Write
gint64 | start-time | Read / Write
char * | value-string | Read / Write

## Types and Values

#define | GDATA_GD_EVENT_STATUS_CANCELED
#define | GDATA_GD_EVENT_STATUS_CONFIRMED
#define | GDATA_GD_EVENT_STATUS_TENTATIVE
#define | GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL
#define | GDATA_GD_EVENT_VISIBILITY_DEFAULT
#define | GDATA_GD_EVENT_VISIBILITY_PRIVATE
#define | GDATA_GD_EVENT_VISIBILITY_PUBLIC
#define | GDATA_GD_EVENT_TRANSPARENCY_OPAQUE
#define | GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT
| GDataGDWhen
| GDataGDWhenClass

## Object Hierarchy

        GObject
        ╰── GDataParsable
            ╰── GDataGDWhen

## Implemented Interfaces

GDataGDWhen implements GDataComparable.

## Includes

    #include <gdata/gd/gdata-gd-when.h>

## Description

GDataGDWhen represents a "when" element from the

GData specification.

## Functions

### gdata_gd_when_new ()

    GDataGDWhen *
    gdata_gd_when_new (gint64 start_time,
                       gint64 end_time,
                       gboolean is_date);

Creates a new GDataGDWhen. More information is available in the GData specification.

#### Parameters

start_time | when the event starts or (for zero-duration events) when it occurs |
end_time | when the event ends, or `-1` |
is_date | `TRUE` if `start_time` and `end_time` specify dates rather than times, `FALSE` otherwise |

#### Returns

a new GDataGDWhen, or `NULL`; unref with `g_object_unref()`

Since: 0.2.0

### gdata_gd_when_get_start_time ()

    gint64
    gdata_gd_when_get_start_time (GDataGDWhen *self);

Gets the “start-time” property.

#### Parameters

self | a GDataGDWhen |

#### Returns

the UNIX timestamp for the start time of the event

Since: 0.4.0

### gdata_gd_when_set_start_time ()

    void
    gdata_gd_when_set_start_time (GDataGDWhen *self,
                                  gint64 start_time);

Sets the “start-time” property to `start_time` .

#### Parameters

self | a GDataGDWhen |
start_time | the new start time |

Since: 0.4.0

### gdata_gd_when_get_end_time ()

    gint64
    gdata_gd_when_get_end_time (GDataGDWhen *self);

Gets the “end-time” property.

If the end time is unset, `-1` will be returned.

#### Parameters

self | a GDataGDWhen |

#### Returns

the UNIX timestamp for the end time of the event, or

`-1`

Since: 0.4.0

### gdata_gd_when_set_end_time ()

    void
    gdata_gd_when_set_end_time (GDataGDWhen *self,
                                gint64 end_time);

Sets the “end-time” property to `end_time` .

Set `end_time` to `-1` to unset the property.

#### Parameters

self | a GDataGDWhen |
end_time | the new end time, or `-1` |

Since: 0.4.0

### gdata_gd_when_is_date ()

    gboolean
    gdata_gd_when_is_date (GDataGDWhen *self);

Gets the “is-date” property.

#### Parameters

self | a GDataGDWhen |

#### Returns

`TRUE` if “start-time” and “end-time” are dates rather than times, `FALSE` otherwise

Since: 0.4.0

### gdata_gd_when_set_is_date ()

    void
    gdata_gd_when_set_is_date (GDataGDWhen *self,
                               gboolean is_date);

Sets the “is-date” property to `is_date` .

#### Parameters

self | a GDataGDWhen |
is_date | `TRUE` if “start-time” and “end-time” should be dates rather than times, `FALSE` otherwise |

Since: 0.4.0

### gdata_gd_when_get_value_string ()

    const gchar *
    gdata_gd_when_get_value_string (GDataGDWhen *self);

Gets the “value-string” property.

#### Parameters

self | a GDataGDWhen |

#### Returns

the value string, or `NULL`

Since: 0.4.0

### gdata_gd_when_set_value_string ()

    void
    gdata_gd_when_set_value_string (GDataGDWhen *self,
                                    const gchar *value_string);

Sets the “value-string” property to `value_string` .

Set `value_string` to `NULL` to unset the property.

#### Parameters

self | a GDataGDWhen |
value_string | the new value string, or `NULL`. | [allow-none]

Since: 0.4.0

### gdata_gd_when_get_reminders ()

    GList *
    gdata_gd_when_get_reminders (GDataGDWhen *self);

Returns a list of the GDataGDReminders which are associated with this GDataGDWhen.

#### Parameters

self | a GDataGDWhen |

#### Returns

a GList of GDataGDReminders, or `NULL`.

[element-type GData.GDReminder][transfer none]

Since: 0.4.0

### gdata_gd_when_add_reminder ()

    void
    gdata_gd_when_add_reminder (GDataGDWhen *self,
                                GDataGDReminder *reminder);

Adds a reminder to the GDataGDWhen's list of reminders and increments its reference count.

Duplicate reminders will not be added to the list.

#### Parameters

self | a GDataGDWhen |
reminder | a GDataGDReminder to add |

Since: 0.7.0

## Types and Values

### GDATA_GD_EVENT_STATUS_CANCELED

    #define GDATA_GD_EVENT_STATUS_CANCELED "http://schemas.google.com/g/2005#event.canceled"

The event has been canceled.

Since: 0.7.0

### GDATA_GD_EVENT_STATUS_CONFIRMED

    #define GDATA_GD_EVENT_STATUS_CONFIRMED "http://schemas.google.com/g/2005#event.confirmed"

The event has been planned and confirmed.

Since: 0.7.0

### GDATA_GD_EVENT_STATUS_TENTATIVE

    #define GDATA_GD_EVENT_STATUS_TENTATIVE "http://schemas.google.com/g/2005#event.tentative"

The event has been planned, but only tentatively scheduled.

Since: 0.7.0

### GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL

    #define GDATA_GD_EVENT_VISIBILITY_CONFIDENTIAL "http://schemas.google.com/g/2005#event.confidential"

The event is visible to only certain people.

Since: 0.7.0

### GDATA_GD_EVENT_VISIBILITY_DEFAULT

    #define GDATA_GD_EVENT_VISIBILITY_DEFAULT "http://schemas.google.com/g/2005#event.default"

The event's visibility is inherited from the preferences of its owner.

Since: 0.7.0

### GDATA_GD_EVENT_VISIBILITY_PRIVATE

    #define GDATA_GD_EVENT_VISIBILITY_PRIVATE "http://schemas.google.com/g/2005#event.private"

The event is visible to very few people.

Since: 0.7.0

### GDATA_GD_EVENT_VISIBILITY_PUBLIC

    #define GDATA_GD_EVENT_VISIBILITY_PUBLIC "http://schemas.google.com/g/2005#event.public"

The event is visible to most people.

Since: 0.7.0

### GDATA_GD_EVENT_TRANSPARENCY_OPAQUE

    #define GDATA_GD_EVENT_TRANSPARENCY_OPAQUE "http://schemas.google.com/g/2005#event.opaque"

The event consumes time in calendars; its time will be marked as busy in a free/busy search.

Since: 0.7.0

### GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT

    #define GDATA_GD_EVENT_TRANSPARENCY_TRANSPARENT "http://schemas.google.com/g/2005#event.transparent"

The event does not consume time in calendars; its time will be not marked as busy in a free/busy search.

Since: 0.7.0

### GDataGDWhen

    typedef struct _GDataGDWhen GDataGDWhen;

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

Since: 0.2.0

### GDataGDWhenClass

    typedef struct {
    } GDataGDWhenClass;

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

Since: 0.4.0

## Property Details

### The `“end-time”` property

      “end-time”                 gint64

The title of a person within the when.

For more information, see the

GData specification.

Owner: GDataGDWhen

Flags: Read / Write

Allowed values: >= -1

Default value: -1

Since: 0.4.0

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

      “is-date”                  gboolean

A programmatic value that identifies the type of when.

For more information, see the

GData specification.

Owner: GDataGDWhen

Flags: Read / Write

Default value: FALSE

Since: 0.4.0

### The `“start-time”` property

      “start-time”               gint64

The name of the when.

For more information, see the

GData specification.

Owner: GDataGDWhen

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 0.4.0

### The `“value-string”` property

      “value-string”             char *

A simple string value used to name this when. It allows UIs to display a label such as "Work", "Volunteer", "Professional Society", etc.

For more information, see the

GData specification.

Owner: GDataGDWhen

Flags: Read / Write

Default value: NULL

Since: 0.4.0