GData.GDWhen

g GData.Comparable GData.Comparable GData.GDWhen GData.GDWhen GData.Comparable->GData.GDWhen GData.Parsable GData.Parsable GData.Parsable->GData.GDWhen GObject.GInterface GObject.GInterface GObject.GInterface->GData.Comparable GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods

Inherited:

GData.Parsable (5), GObject.Object (37), GData.Comparable (1)

Structs:

GObject.ObjectClass (5)

class

new (start_time, end_time, is_date)

add_reminder (reminder)

get_end_time ()

get_reminders ()

get_start_time ()

get_value_string ()

is_date ()

set_end_time (end_time)

set_is_date (is_date)

set_start_time (start_time)

set_value_string (value_string)

Virtual Methods

Inherited:

GData.Parsable (9), GObject.Object (7), GData.Comparable (1)

Properties

Inherited:

GData.Parsable (1)

Name

Type

Flags

Short Description

end-time

int

r/w

The title of a person within the when.

is-date

bool

r/w

A programmatic value that identifies the type of when.

start-time

int

r/w

The name of the when.

value-string

str

r/w

A simple string value used to name this when.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Parsable

r

Class Details

class GData.GDWhen(**kwargs)
Bases:

GData.Parsable, GData.Comparable

Abstract:

No

Structure:

GData.GDWhenClass

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

New in version 0.2.0.

classmethod new(start_time, end_time, is_date)
Parameters:
  • start_time (int) – when the event starts or (for zero-duration events) when it occurs

  • end_time (int) – when the event ends, or -1

  • is_date (bool) – True if start_time and end_time specify dates rather than times, False otherwise

Returns:

a new GData.GDWhen, or None; unref with GObject.Object.unref()

Return type:

GData.GDWhen

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

New in version 0.2.0.

add_reminder(reminder)
Parameters:

reminder (GData.GDReminder) – a GData.GDReminder to add

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

Duplicate reminders will not be added to the list.

New in version 0.7.0.

get_end_time()
Returns:

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

-1

Return type:

int

Gets the GData.GDWhen :end-time property.

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

New in version 0.4.0.

get_reminders()
Returns:

a GLib.List of GData.GDReminders, or None

Return type:

[GData.GDReminder]

Returns a list of the GData.GDReminders which are associated with this GData.GDWhen.

New in version 0.4.0.

get_start_time()
Returns:

the UNIX timestamp for the start time of the event

Return type:

int

Gets the GData.GDWhen :start-time property.

New in version 0.4.0.

get_value_string()
Returns:

the value string, or None

Return type:

str

Gets the GData.GDWhen :value-string property.

New in version 0.4.0.

is_date()
Returns:

True if GData.GDWhen :start-time and GData.GDWhen :end-time are dates rather than times, False otherwise

Return type:

bool

Gets the GData.GDWhen :is-date property.

New in version 0.4.0.

set_end_time(end_time)
Parameters:

end_time (int) – the new end time, or -1

Sets the GData.GDWhen :end-time property to end_time.

Set end_time to -1 to unset the property.

New in version 0.4.0.

set_is_date(is_date)
Parameters:

is_date (bool) – True if GData.GDWhen :start-time and GData.GDWhen :end-time should be dates rather than times, False otherwise

Sets the GData.GDWhen :is-date property to is_date.

New in version 0.4.0.

set_start_time(start_time)
Parameters:

start_time (int) – the new start time

Sets the GData.GDWhen :start-time property to start_time.

New in version 0.4.0.

set_value_string(value_string)
Parameters:

value_string (str or None) – the new value string, or None

Sets the GData.GDWhen :value-string property to value_string.

Set value_string to None to unset the property.

New in version 0.4.0.

Property Details

GData.GDWhen.props.end_time
Name:

end-time

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

The title of a person within the when.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDWhen.props.is_date
Name:

is-date

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

A programmatic value that identifies the type of when.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDWhen.props.start_time
Name:

start-time

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The name of the when.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDWhen.props.value_string
Name:

value-string

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

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.

New in version 0.4.0.