Top | ![]() |
![]() |
![]() |
![]() |
|
e_cal_client_check_timezones () |
|
e_cal_client_tzlookup () |
|
e_cal_client_tzlookup_icomp () |
const |
e_cal_match_tzid () |
|
e_cal_check_timezones () |
|
e_cal_tzlookup_ecal () |
|
e_cal_tzlookup_icomp () |
gboolean e_cal_client_check_timezones (,
icalcomponent *comp,
GList *comps,
icaltimezone * (*tzlookup) (const gchar *tzid, gconstpointer ecalclient, GCancellable *cancellable, GError **error),
gconstpointer ecalclient,
GCancellable *cancellable);
GError **error
This function cleans up VEVENT, VJOURNAL, VTODO and VTIMEZONE items which are to be imported into Evolution.
Using VTIMEZONE definitions is problematic because they cannot be updated properly when timezone definitions change. They are also incomplete (for compatibility reason only one set of rules for summer saving changes can be included, even if different rules apply in different years). This function looks for matches of the used TZIDs against system timezones and replaces such TZIDs with the corresponding system timezone. This works for TZIDs containing a location (found via a fuzzy string search) and for Outlook TZIDs (via a hard-coded lookup table).
Some programs generate broken meeting invitations with TZID, but
without including the corresponding VTIMEZONE. Importing such
invitations unchanged causes problems later on (meeting displayed
incorrectly, e_cal_get_component_as_string()
fails). The situation
where this occurred in the past (found by a SyncEvolution user) is
now handled via the location based mapping.
If this mapping fails, this function also deals with VTIMEZONE conflicts: such conflicts occur when the calendar already contains an old VTIMEZONE definition with the same TZID, but different summer saving rules. Replacing the VTIMEZONE potentially breaks displaying of old events, whereas not replacing it breaks the new events (the behavior in Evolution <= 2.22.1).
The way this problem is resolved is by renaming the new VTIMEZONE definition until the TZID is unique. A running count is appended to the TZID. All items referencing the renamed TZID are adapted accordingly.
comp |
a VCALENDAR containing a list of VTIMEZONE and arbitrary other components, in arbitrary order: these other components are modified by this call |
|
comps |
a list of |
[element-type icalcomponent][allow-none] |
tzlookup |
a callback function which is called to retrieve
a calendar's VTIMEZONE definition; the returned
definition is *not* freed by |
|
ecalclient |
an arbitrary pointer which is passed through to
the |
|
cancellable |
a |
|
error |
an error description in case of a failure |
Since: 3.2
icaltimezone * e_cal_client_tzlookup (const
,gchar *tzid,
gconstpointer ecalclient,
GCancellable *cancellable);
GError **error
An implementation of the tzlookup callback which clients
can use. Calls e_cal_client_get_timezone_sync()
.
tzid |
ID of the timezone to lookup |
|
ecalclient |
must be a valid ECalClient pointer |
|
cancellable |
an optional |
|
error |
an error description in case of a failure |
A timezone object, or NULL
ecalclient
, thus do not free it.
Since: 3.2
icaltimezone * e_cal_client_tzlookup_icomp (const
,gchar *tzid,
gconstpointer custom,
GCancellable *cancellable);
GError **error
An implementation of the tzlookup callback which backends like the file backend can use. Searches for the timezone in the component list.
tzid |
ID of the timezone to lookup |
|
custom |
must be a icalcomponent pointer which contains either a VCALENDAR with VTIMEZONEs or VTIMEZONES directly |
|
cancellable |
an optional |
|
error |
an error description in case of a failure |
A timezone object, or NULL
custom
. This object is owned
by the custom
, thus do not free it.
Since: 3.2
constgchar * e_cal_match_tzid (const
);gchar *tzid
Matches tzid
against the system timezone definitions
and returns the matching TZID, or NULL
Since: 2.24
gboolean e_cal_check_timezones (,
icalcomponent *comp,
GList *comps,
icaltimezone * (*tzlookup) (const gchar *tzid, gconstpointer custom, GError **error),
gconstpointer custom);
GError **error
e_cal_check_timezones
has been deprecated since version 3.2 and should not be used in newly-written code.
Use e_cal_client_check_timezones()
instead.
This function cleans up VEVENT, VJOURNAL, VTODO and VTIMEZONE items which are to be imported into Evolution.
Using VTIMEZONE definitions is problematic because they cannot be updated properly when timezone definitions change. They are also incomplete (for compatibility reason only one set of rules for summer saving changes can be included, even if different rules apply in different years). This function looks for matches of the used TZIDs against system timezones and replaces such TZIDs with the corresponding system timezone. This works for TZIDs containing a location (found via a fuzzy string search) and for Outlook TZIDs (via a hard-coded lookup table).
Some programs generate broken meeting invitations with TZID, but
without including the corresponding VTIMEZONE. Importing such
invitations unchanged causes problems later on (meeting displayed
incorrectly, e_cal_get_component_as_string()
fails). The situation
where this occurred in the past (found by a SyncEvolution user) is
now handled via the location based mapping.
If this mapping fails, this function also deals with VTIMEZONE conflicts: such conflicts occur when the calendar already contains an old VTIMEZONE definition with the same TZID, but different summer saving rules. Replacing the VTIMEZONE potentially breaks displaying of old events, whereas not replacing it breaks the new events (the behavior in Evolution <= 2.22.1).
The way this problem is resolved is by renaming the new VTIMEZONE definition until the TZID is unique. A running count is appended to the TZID. All items referencing the renamed TZID are adapted accordingly.
comp |
a VCALENDAR containing a list of VTIMEZONE and arbitrary other components, in arbitrary order: these other components are modified by this call |
|
comps |
a list of |
[element-type icalcomponent][allow-none] |
tzlookup |
a callback function which is called to retrieve
a calendar's VTIMEZONE definition; the returned
definition is *not* freed by |
[allow-none] |
custom |
an arbitrary pointer which is passed through to the tzlookup function |
|
error |
an error description in case of a failure |
Since: 2.24
icaltimezone * e_cal_tzlookup_ecal (const
,gchar *tzid,
gconstpointer custom);
GError **error
e_cal_tzlookup_ecal
has been deprecated since version 3.2 and should not be used in newly-written code.
Use e_cal_client_tzlookup()
instead.
An implementation of the tzlookup callback which clients
can use. Calls e_cal_get_timezone()
.
tzid |
ID of the timezone to lookup |
|
custom |
must be a valid ECal pointer |
|
error |
an error description in case of a failure |
A timezone object, or NULL
custom
, thus do not free it.
Since: 2.24
icaltimezone * e_cal_tzlookup_icomp (const
,gchar *tzid,
gconstpointer custom);
GError **error
e_cal_tzlookup_icomp
has been deprecated since version 3.2 and should not be used in newly-written code.
Use e_cal_client_tzlookup_icomp()
instead.
An implementation of the tzlookup callback which backends like the file backend can use. Searches for the timezone in the component list.
tzid |
ID of the timezone to lookup |
|
custom |
must be a icalcomponent pointer which contains either a VCALENDAR with VTIMEZONEs or VTIMEZONES directly |
|
error |
an error description in case of a failure |
A timezone object, or NULL
custom
. This object is owned
by the custom
, thus do not free it.
Since: 2.24