ECal.TimezoneCache

g ECal.TimezoneCache ECal.TimezoneCache GObject.GInterface GObject.GInterface GObject.GInterface->ECal.TimezoneCache

Implementations:

ECal.Client

Methods

add_timezone (zone)

get_timezone (tzid)

list_timezones ()

Virtual Methods

do_timezone_added (zone)

do_tzcache_add_timezone (zone)

Properties

None

Signals

Name

Short Description

timezone-added

Emitted when a new #icaltimezone is added to cache.

Fields

None

Class Details

class ECal.TimezoneCache
Bases:

GObject.GInterface

Structure:

ECal.TimezoneCacheInterface

New in version 3.8.

add_timezone(zone)
Parameters:

zone (ICalGLib.Timezone) – an ICalGLib.Timezone

Adds a copy of zone to self and emits an ECal.TimezoneCache ::timezone-added signal. The self will use the TZID string returned by ICalGLib.Timezone.get_tzid() as the lookup key, which can be passed to ECal.TimezoneCache.get_timezone() to obtain zone again.

If the self already has an ICalGLib.Timezone with the same TZID string as zone, the self will remain unchanged to avoid invalidating any ICalGLib.Timezone pointers which may have already been returned through ECal.TimezoneCache.get_timezone().

New in version 3.8.

get_timezone(tzid)
Parameters:

tzid (str) – the TZID of a timezone

Returns:

an ICalGLib.Timezone, or None

Return type:

ICalGLib.Timezone or None

Obtains an ICalGLib.Timezone by its TZID string. If no match is found, the function returns None. The returned ICalGLib.Timezone is owned by the self and should not be modified or freed.

New in version 3.8.

list_timezones()
Returns:

a GLib.List of ICalGLib.Timezone instances

Return type:

[ICalGLib.Timezone]

Returns a list of ICalGLib.Timezone instances that were explicitly added to the self through ECal.TimezoneCache.add_timezone(). In particular, any built-in time zone data that ECal.TimezoneCache.get_timezone() may use to match a TZID string is excluded from the returned list.

Free the returned list with g_list_free(). The list elements are owned by the self and should not be modified or freed.

New in version 3.8.

do_timezone_added(zone) virtual
Parameters:

zone (ICalGLib.Timezone) –

do_tzcache_add_timezone(zone) virtual
Parameters:

zone (ICalGLib.Timezone) –

Signal Details

ECal.TimezoneCache.signals.timezone_added(timezone_cache, zone)
Signal Name:

timezone-added

Flags:

RUN_FIRST

Parameters:

Emitted when a new #icaltimezone is added to cache.