[evolution-data-server/wip/mcrha/libical-glib] Adapt to the recent libical-glib API changes
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/mcrha/libical-glib] Adapt to the recent libical-glib API changes
- Date: Fri, 22 Mar 2019 11:33:18 +0000 (UTC)
commit 7a4ce0800287c97ce31248d3f93e48ca944a0361
Author: Milan Crha <mcrha redhat com>
Date: Fri Mar 22 12:33:45 2019 +0100
Adapt to the recent libical-glib API changes
This is for bare structure wrappers rename and addition of some _inplace()
helper functions.
.../backends/contacts/e-cal-backend-contacts.c | 55 +++--
src/calendar/backends/file/e-cal-backend-file.c | 81 +++----
.../backends/gtasks/e-cal-backend-gtasks.c | 14 +-
.../backends/weather/e-cal-backend-weather.c | 12 +-
src/calendar/libecal/e-cal-client.c | 24 +--
.../libecal/e-cal-component-alarm-repeat.c | 28 +--
.../libecal/e-cal-component-alarm-repeat.h | 7 +-
.../libecal/e-cal-component-alarm-trigger.c | 92 ++++----
.../libecal/e-cal-component-alarm-trigger.h | 17 +-
src/calendar/libecal/e-cal-component-alarm.c | 4 +-
src/calendar/libecal/e-cal-component-datetime.c | 38 ++--
src/calendar/libecal/e-cal-component-datetime.h | 14 +-
src/calendar/libecal/e-cal-component-period.c | 90 ++++----
src/calendar/libecal/e-cal-component-period.h | 29 ++-
src/calendar/libecal/e-cal-component.c | 234 ++++++++++----------
src/calendar/libecal/e-cal-component.h | 28 +--
src/calendar/libecal/e-cal-recur.c | 70 +++---
src/calendar/libecal/e-cal-recur.h | 10 +-
src/calendar/libecal/e-cal-time-util.c | 171 +++++++--------
src/calendar/libecal/e-cal-time-util.h | 14 +-
src/calendar/libecal/e-cal-util.c | 238 ++++++++++-----------
src/calendar/libecal/e-cal-util.h | 10 +-
src/calendar/libecal/e-reminder-watcher.c | 16 +-
src/calendar/libecal/e-reminder-watcher.h | 2 +-
src/calendar/libedata-cal/e-cal-backend-sexp.c | 16 +-
src/calendar/libedata-cal/e-cal-cache.c | 50 ++---
src/calendar/libedata-cal/e-cal-meta-backend.c | 56 ++---
.../evolution-alarm-notify/e-alarm-notify.c | 2 +-
tests/libecal/test-cal-client-bulk-methods.c | 6 +-
tests/libecal/test-cal-client-create-object.c | 10 +-
.../libecal/test-cal-client-get-attachment-uris.c | 4 +-
tests/libecal/test-cal-client-get-object-list.c | 4 +-
tests/libecal/test-cal-client-get-revision.c | 4 +-
tests/libecal/test-cal-client-get-view.c | 4 +-
tests/libecal/test-cal-client-modify-object.c | 4 +-
tests/libecal/test-cal-client-receive-objects.c | 4 +-
tests/libecal/test-cal-client-refresh.c | 4 +-
tests/libecal/test-cal-client-remove-object.c | 4 +-
tests/libecal/test-cal-client-revision-view.c | 14 +-
tests/libecal/test-cal-client-send-objects.c | 4 +-
tests/libecal/test-cal-component.c | 140 ++++++------
tests/libedata-cal/test-cal-cache-intervals.c | 12 +-
tests/libedata-cal/test-cal-meta-backend.c | 6 +-
tests/libedata-cal/test-intervaltree.c | 2 +-
44 files changed, 806 insertions(+), 842 deletions(-)
---
diff --git a/src/calendar/backends/contacts/e-cal-backend-contacts.c
b/src/calendar/backends/contacts/e-cal-backend-contacts.c
index 813da7150..03d69c8ea 100644
--- a/src/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/src/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -699,20 +699,20 @@ contacts_removed_cb (EBookClientView *book_view,
}
/************************************************************************************/
-static ICalTimetype *
+static ICalTime *
cdate_to_icaltime (EContactDate *cdate)
{
- ICalTimetype *ret = i_cal_time_null_time ();
-
- i_cal_timetype_set_year (ret, cdate->year);
- i_cal_timetype_set_month (ret, cdate->month);
- i_cal_timetype_set_day (ret, cdate->day);
- i_cal_timetype_set_hour (ret, 0);
- i_cal_timetype_set_minute (ret, 0);
- i_cal_timetype_set_second (ret, 0);
- i_cal_timetype_set_zone (ret, NULL);
- i_cal_timetype_set_is_daylight (ret, FALSE);
- i_cal_timetype_set_is_date (ret, TRUE);
+ ICalTime *ret = i_cal_time_null_time ();
+
+ i_cal_time_set_year (ret, cdate->year);
+ i_cal_time_set_month (ret, cdate->month);
+ i_cal_time_set_day (ret, cdate->day);
+ i_cal_time_set_hour (ret, 0);
+ i_cal_time_set_minute (ret, 0);
+ i_cal_time_set_second (ret, 0);
+ i_cal_time_set_timezone (ret, NULL);
+ i_cal_time_set_is_daylight (ret, FALSE);
+ i_cal_time_set_is_date (ret, TRUE);
return ret;
}
@@ -808,7 +808,7 @@ setup_alarm (ECalBackendContacts *cbc,
ECalComponentAlarm *alarm;
ECalComponentAlarmTrigger *trigger;
ECalComponentText *summary;
- ICalDurationType *duration;
+ ICalDuration *duration;
g_return_if_fail (cbc != NULL);
@@ -853,20 +853,20 @@ setup_alarm (ECalBackendContacts *cbc,
e_cal_component_alarm_take_description (alarm, summary);
e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY);
- duration = i_cal_duration_type_null_duration ();
- i_cal_duration_type_set_is_neg (duration, TRUE);
+ duration = i_cal_duration_null_duration ();
+ i_cal_duration_set_is_neg (duration, TRUE);
switch (cbc->priv->alarm_units) {
case CAL_MINUTES:
- i_cal_duration_type_set_minutes (duration, cbc->priv->alarm_interval);
+ i_cal_duration_set_minutes (duration, cbc->priv->alarm_interval);
break;
case CAL_HOURS:
- i_cal_duration_type_set_hours (duration, cbc->priv->alarm_interval);
+ i_cal_duration_set_hours (duration, cbc->priv->alarm_interval);
break;
case CAL_DAYS:
- i_cal_duration_type_set_days (duration, cbc->priv->alarm_interval);
+ i_cal_duration_set_days (duration, cbc->priv->alarm_interval);
break;
default:
@@ -899,8 +899,8 @@ create_component (ECalBackendContacts *cbc,
ECalComponentText *comp_summary;
ECalComponentDateTime *dt;
ICalComponent *icomp;
- ICalTimetype *itt, *itt_norm;
- ICalRecurrenceType *rt;
+ ICalTime *itt;
+ ICalRecurrence *rt;
gchar *since_year;
GSList *recur_list;
gboolean is_leap_day;
@@ -926,9 +926,8 @@ create_component (ECalBackendContacts *cbc,
/* Set all-day event's date from contact data */
itt = cdate_to_icaltime (cdate);
- itt_norm = i_cal_time_normalize (itt);
- is_leap_day = i_cal_timetype_get_day (itt_norm) == 29 && i_cal_timetype_get_month (itt_norm) == 2;
- g_clear_object (&itt_norm);
+ i_cal_time_normalize_inplace (itt);
+ is_leap_day = i_cal_time_get_day (itt) == 29 && i_cal_time_get_month (itt) == 2;
dt = e_cal_component_datetime_new_take (itt, NULL);
e_cal_component_set_dtstart (cal_comp, dt);
@@ -942,11 +941,11 @@ create_component (ECalBackendContacts *cbc,
e_cal_component_datetime_free (dt);
/* Create yearly recurrence */
- rt = i_cal_recurrence_type_new ();
- i_cal_recurrence_type_set_freq (rt, I_CAL_YEARLY_RECURRENCE);
- i_cal_recurrence_type_set_interval (rt, 1);
+ rt = i_cal_recurrence_new ();
+ i_cal_recurrence_set_freq (rt, I_CAL_YEARLY_RECURRENCE);
+ i_cal_recurrence_set_interval (rt, 1);
if (is_leap_day)
- i_cal_recurrence_type_set_by_month_day (rt, 0, -1);
+ i_cal_recurrence_set_by_month_day (rt, 0, -1);
recur_list = g_slist_prepend (NULL, rt);
e_cal_component_set_rrules (cal_comp, recur_list);
g_slist_free_full (recur_list, g_object_unref);
@@ -1141,7 +1140,7 @@ e_cal_backend_contacts_get_free_busy (ECalBackendSync *backend,
ICalComponent *vfb = i_cal_component_new_vfreebusy ();
ICalTimezone *utc_zone = i_cal_timezone_get_utc_timezone ();
- ICalTimetype *itt;
+ ICalTime *itt;
gchar *calobj;
itt = i_cal_time_from_timet_with_zone (start, FALSE, utc_zone);
diff --git a/src/calendar/backends/file/e-cal-backend-file.c b/src/calendar/backends/file/e-cal-backend-file.c
index 1a5f7a045..466988773 100644
--- a/src/calendar/backends/file/e-cal-backend-file.c
+++ b/src/calendar/backends/file/e-cal-backend-file.c
@@ -1566,7 +1566,7 @@ e_cal_backend_file_get_object (ECalBackendSync *backend,
*object = e_cal_component_get_as_string (comp);
} else {
ICalComponent *icomp;
- ICalTimetype *itt;
+ ICalTime *itt;
if (!obj_data->full_object) {
g_rec_mutex_unlock (&priv->idle_save_rmutex);
@@ -1876,7 +1876,7 @@ e_cal_backend_file_get_attachment_uris (ECalBackendSync *backend,
add_attach_uris (attachment_uris, e_cal_component_get_icalcomponent (comp));
} else {
ICalComponent *icomp;
- ICalTimetype *itt;
+ ICalTime *itt;
if (!obj_data->full_object) {
g_rec_mutex_unlock (&priv->idle_save_rmutex);
@@ -2007,8 +2007,8 @@ e_cal_backend_file_start_view (ECalBackend *backend,
static gboolean
free_busy_instance (ICalComponent *icomp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -2016,12 +2016,12 @@ free_busy_instance (ICalComponent *icomp,
ICalComponent *vfb = user_data;
ICalProperty *prop;
ICalParameter *param;
- ICalPeriodType *ipt;
+ ICalPeriod *ipt;
const gchar *summary, *location;
- ipt = i_cal_period_type_null_period ();
- i_cal_period_type_set_start (ipt, instance_start);
- i_cal_period_type_set_end (ipt, instance_end);
+ ipt = i_cal_period_null_period ();
+ i_cal_period_set_start (ipt, instance_start);
+ i_cal_period_set_end (ipt, instance_end);
/* add busy information to the vfb component */
prop = i_cal_property_new (I_CAL_FREEBUSY_PROPERTY);
@@ -2055,7 +2055,7 @@ create_user_free_busy (ECalBackendFile *cbfile,
GList *l;
ICalComponent *vfb;
ICalTimezone *utc_zone;
- ICalTimetype *starttt, *endtt;
+ ICalTime *starttt, *endtt;
ECalBackendSExp *obj_sexp;
gchar *query, *iso_start, *iso_end;
@@ -2344,7 +2344,7 @@ e_cal_backend_file_create_objects (ECalBackendSync *backend,
/* Second step, add the objects */
for (l = icomps; l; l = l->next) {
ECalComponent *comp;
- ICalTimetype *current;
+ ICalTime *current;
ICalComponent *icomp = l->data;
/* Create the cal component */
@@ -2405,7 +2405,7 @@ remove_object_instance_cb (gpointer key,
gpointer user_data)
{
time_t fromtt, instancett;
- ICalTimetype *itt;
+ ICalTime *itt;
ECalComponent *instance = value;
RemoveRecurrenceData *rrdata = user_data;
@@ -2522,7 +2522,7 @@ e_cal_backend_file_modify_objects (ECalBackendSync *backend,
/* Second step, update the objects */
for (l = icomps; l; l = l->next) {
- ICalTimetype *current;
+ ICalTime *current;
RemoveRecurrenceData rrdata;
GList *detached = NULL;
gchar *rid = NULL;
@@ -2621,7 +2621,7 @@ e_cal_backend_file_modify_objects (ECalBackendSync *backend,
/* remove the component from our data, temporarily */
if (obj_data->full_object) {
if (mod == E_CAL_OBJ_MOD_THIS_AND_FUTURE) {
- ICalTimetype *itt = i_cal_component_get_recurrenceid (icomp);
+ ICalTime *itt = i_cal_component_get_recurrenceid (icomp);
if (e_cal_util_is_first_instance (obj_data->full_object, itt,
resolve_tzid_cb, &rtd)) {
ICalProperty *prop = i_cal_component_get_first_property
(icomp, I_CAL_RECURRENCEID_PROPERTY);
@@ -2674,7 +2674,7 @@ e_cal_backend_file_modify_objects (ECalBackendSync *backend,
* so that it's always before any detached instance we
* might have */
if (obj_data->full_object) {
- ICalTimetype *rid_struct = i_cal_component_get_recurrenceid (icomp),
*master_dtstart;
+ ICalTime *rid_struct = i_cal_component_get_recurrenceid (icomp),
*master_dtstart;
ICalComponent *master_icomp = e_cal_component_get_icalcomponent
(obj_data->full_object);
ICalProperty *prop = i_cal_component_get_first_property (icomp,
I_CAL_RECURRENCEID_PROPERTY);
@@ -2684,25 +2684,18 @@ e_cal_backend_file_modify_objects (ECalBackendSync *backend,
}
master_dtstart = i_cal_component_get_dtstart (master_icomp);
- if (master_dtstart && i_cal_timetype_get_zone (master_dtstart) &&
- i_cal_timetype_get_zone (master_dtstart) != i_cal_timetype_get_zone
(rid_struct)) {
- ICalTimetype *itt;
-
- itt = i_cal_time_convert_to_zone (rid_struct, i_cal_timetype_get_zone
(master_dtstart));
- g_clear_object (&rid_struct);
- rid_struct = itt;
+ if (master_dtstart && i_cal_time_get_timezone (master_dtstart) &&
+ i_cal_time_get_timezone (master_dtstart) != i_cal_time_get_timezone
(rid_struct)) {
+ i_cal_time_convert_to_zone_inplace (rid_struct,
i_cal_time_get_timezone (master_dtstart));
}
split_icomp = e_cal_util_split_at_instance (icomp, rid_struct,
master_dtstart);
if (split_icomp) {
ECalComponent *prev_comp;
- ICalTimetype *itt;
prev_comp = e_cal_component_clone (obj_data->full_object);
- itt = i_cal_time_convert_to_zone (rid_struct,
i_cal_timezone_get_utc_timezone ());
- g_clear_object (&rid_struct);
- rid_struct = itt;
+ i_cal_time_convert_to_zone_inplace (rid_struct,
i_cal_timezone_get_utc_timezone ());
e_cal_util_remove_instances (e_cal_component_get_icalcomponent
(obj_data->full_object), rid_struct, mod);
e_cal_recur_ensure_end_dates (obj_data->full_object, TRUE,
resolve_tzid_cb, &rtd, cancellable, NULL);
@@ -2720,7 +2713,7 @@ e_cal_backend_file_modify_objects (ECalBackendSync *backend,
g_clear_object (&rid_struct);
g_clear_object (&master_dtstart);
} else {
- ICalTimetype *rid_struct = i_cal_component_get_recurrenceid (icomp);
+ ICalTime *rid_struct = i_cal_component_get_recurrenceid (icomp);
split_icomp = e_cal_util_split_at_instance (icomp, rid_struct, NULL);
@@ -2841,14 +2834,14 @@ remove_instance (ECalBackendFile *cbfile,
GError **error)
{
ECalComponent *comp;
- ICalTimetype *current;
+ ICalTime *current;
/* only check for non-NULL below, empty string is detected here */
if (rid && !*rid)
rid = NULL;
if (rid) {
- ICalTimetype *rid_struct;
+ ICalTime *rid_struct;
gpointer value;
/* remove recurrence */
@@ -2917,18 +2910,14 @@ remove_instance (ECalBackendFile *cbfile,
}
rid_struct = i_cal_time_from_string (rid);
- if (!i_cal_timetype_get_zone (rid_struct)) {
- ICalTimetype *master_dtstart = i_cal_component_get_dtstart
(e_cal_component_get_icalcomponent (obj_data->full_object)), *itt;
+ if (!i_cal_time_get_timezone (rid_struct)) {
+ ICalTime *master_dtstart = i_cal_component_get_dtstart
(e_cal_component_get_icalcomponent (obj_data->full_object));
- if (master_dtstart && i_cal_timetype_get_zone (master_dtstart)) {
- itt = i_cal_time_convert_to_zone (rid_struct, i_cal_timetype_get_zone
(master_dtstart));
- g_object_unref (rid_struct);
- rid_struct = itt;
+ if (master_dtstart && i_cal_time_get_timezone (master_dtstart)) {
+ i_cal_time_convert_to_zone_inplace (rid_struct, i_cal_time_get_timezone
(master_dtstart));
}
- itt = i_cal_time_convert_to_zone (rid_struct, i_cal_timezone_get_utc_timezone ());
- g_object_unref (rid_struct);
- rid_struct = itt;
+ i_cal_time_convert_to_zone_inplace (rid_struct, i_cal_timezone_get_utc_timezone ());
}
e_cal_util_remove_instances (
@@ -3144,7 +3133,7 @@ e_cal_backend_file_remove_objects (ECalBackendSync *backend,
comp = obj_data->full_object;
if (comp) {
- ICalTimetype *rid_struct;
+ ICalTime *rid_struct;
*old_components = g_slist_prepend (*old_components, e_cal_component_clone
(comp));
@@ -3155,18 +3144,14 @@ e_cal_backend_file_remove_objects (ECalBackendSync *backend,
priv->comp = g_list_remove (priv->comp, comp);
rid_struct = i_cal_time_from_string (recur_id);
- if (!i_cal_timetype_get_zone (rid_struct)) {
- ICalTimetype *master_dtstart = i_cal_component_get_dtstart
(e_cal_component_get_icalcomponent (comp)), *itt;
+ if (!i_cal_time_get_timezone (rid_struct)) {
+ ICalTime *master_dtstart = i_cal_component_get_dtstart
(e_cal_component_get_icalcomponent (comp));
- if (master_dtstart && i_cal_timetype_get_zone (master_dtstart)) {
- itt = i_cal_time_convert_to_zone (rid_struct,
i_cal_timetype_get_zone (master_dtstart));
- g_object_unref (rid_struct);
- rid_struct = itt;
+ if (master_dtstart && i_cal_time_get_timezone (master_dtstart)) {
+ i_cal_time_convert_to_zone_inplace (rid_struct,
i_cal_time_get_timezone (master_dtstart));
}
- itt = i_cal_time_convert_to_zone (rid_struct,
i_cal_timezone_get_utc_timezone ());
- g_object_unref (rid_struct);
- rid_struct = itt;
+ i_cal_time_convert_to_zone_inplace (rid_struct,
i_cal_timezone_get_utc_timezone ());
}
e_cal_util_remove_instances (
e_cal_component_get_icalcomponent (comp),
@@ -3519,7 +3504,7 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend,
for (link = comps; link; link = g_slist_next (link)) {
ECalComponent *old_component = NULL;
ECalComponent *new_component = NULL;
- ICalTimetype *current;
+ ICalTime *current;
const gchar *uid;
gchar *rid;
ECalBackendFileObject *obj_data;
diff --git a/src/calendar/backends/gtasks/e-cal-backend-gtasks.c
b/src/calendar/backends/gtasks/e-cal-backend-gtasks.c
index cfa5abdbc..6b92f257f 100644
--- a/src/calendar/backends/gtasks/e-cal-backend-gtasks.c
+++ b/src/calendar/backends/gtasks/e-cal-backend-gtasks.c
@@ -79,9 +79,9 @@ ecb_gtasks_store_data_version (ECalCache *cal_cache)
static void
ecb_gtasks_update_ical_time_property (ICalComponent *icomp,
ICalPropertyKind kind,
- ICalProperty * (* prop_new_func) (ICalTimetype *v),
- void (* prop_set_func) (ICalProperty *prop, ICalTimetype *v),
- ICalTimetype *tt)
+ ICalProperty * (* prop_new_func) (ICalTime *v),
+ void (* prop_set_func) (ICalProperty *prop, ICalTime *v),
+ ICalTime *tt)
{
ICalProperty *prop;
@@ -102,7 +102,7 @@ ecb_gtasks_gdata_to_comp (GDataTasksTask *task)
GDataLink *data_link;
ECalComponent *comp;
ICalComponent *icomp;
- ICalTimetype *tt;
+ ICalTime *tt;
ICalTimezone *utc_zone;
const gchar *position;
const gchar *parent;
@@ -208,7 +208,7 @@ ecb_gtasks_comp_to_gdata (ECalComponent *comp,
GDataTasksTask *task;
ICalComponent *icomp;
ICalProperty *prop;
- ICalTimetype *tt;
+ ICalTime *tt;
ICalTimezone *utc_zone;
const gchar *text;
gchar *tmp;
@@ -748,7 +748,7 @@ ecb_gtasks_get_changes_sync (ECalMetaBackend *meta_backend,
object = e_cal_component_get_as_string (new_comp);
if (cached_comp) {
- ICalTimetype *cached_tt, *new_tt;
+ ICalTime *cached_tt, *new_tt;
cached_tt = e_cal_component_get_last_modified (cached_comp);
new_tt = e_cal_component_get_last_modified (new_comp);
@@ -1059,7 +1059,7 @@ ecb_gtasks_dup_component_revision (ECalCache *cal_cache,
prop = i_cal_component_get_first_property (icomp, I_CAL_LASTMODIFIED_PROPERTY);
if (prop) {
- ICalTimetype *itt;
+ ICalTime *itt;
itt = i_cal_property_get_lastmodified (prop);
revision = i_cal_time_as_ical_string_r (itt);
diff --git a/src/calendar/backends/weather/e-cal-backend-weather.c
b/src/calendar/backends/weather/e-cal-backend-weather.c
index f24029813..5ccff4cac 100644
--- a/src/calendar/backends/weather/e-cal-backend-weather.c
+++ b/src/calendar/backends/weather/e-cal-backend-weather.c
@@ -449,7 +449,7 @@ create_weather (ECalBackendWeather *cbw,
ECalComponent *cal_comp;
ECalComponentText *comp_summary;
ICalComponent *icomp;
- ICalTimetype *itt;
+ ICalTime *itt;
ECalComponentDateTime *dt;
gchar *uid;
GSList *text_list, *link;
@@ -486,10 +486,10 @@ create_weather (ECalBackendWeather *cbw,
/* Set all-day event's date from forecast data - cannot set is_date,
* because in that case no timezone conversion is done */
itt = i_cal_time_from_timet_with_zone (update_time, 0, update_zone);
- i_cal_timetype_set_hour (itt, 0);
- i_cal_timetype_set_minute (itt, 0);
- i_cal_timetype_set_second (itt, 0);
- i_cal_timetype_set_is_date (itt, TRUE);
+ i_cal_time_set_hour (itt, 0);
+ i_cal_time_set_minute (itt, 0);
+ i_cal_time_set_second (itt, 0);
+ i_cal_time_set_is_date (itt, TRUE);
dt = e_cal_component_datetime_new (itt, update_zone ? i_cal_timezone_get_tzid (update_zone) : NULL);
e_cal_component_set_dtstart (cal_comp, dt);
@@ -857,7 +857,7 @@ e_cal_backend_weather_get_free_busy (ECalBackendSync *backend,
/* Weather doesn't count as busy time */
ICalComponent *vfb = i_cal_component_new_vfreebusy ();
ICalTimezone *utc_zone = i_cal_timezone_get_utc_timezone ();
- ICalTimetype *itt;
+ ICalTime *itt;
gchar *calobj;
itt = i_cal_time_from_timet_with_zone (start, FALSE, utc_zone);
diff --git a/src/calendar/libecal/e-cal-client.c b/src/calendar/libecal/e-cal-client.c
index 289985c7d..14b0d2b8c 100644
--- a/src/calendar/libecal/e-cal-client.c
+++ b/src/calendar/libecal/e-cal-client.c
@@ -2112,8 +2112,8 @@ struct instances_info {
/* Called from cal_recur_generate_instances(); adds an instance to the list */
static gboolean
add_instance_cb (ICalComponent *icomp,
- ICalTimetype *start,
- ICalTimetype *end,
+ ICalTime *start,
+ ICalTime *end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -2138,7 +2138,7 @@ add_instance_cb (ICalComponent *icomp,
if (e_cal_component_has_recurrences (ci->comp) &&
!e_cal_component_is_instance (ci->comp)) {
ECalComponentRange *range;
- ICalTimetype *itt;
+ ICalTime *itt;
ECalComponentDateTime *dtstart, *dtend;
dtstart = e_cal_component_get_dtstart (ci->comp);
@@ -2244,7 +2244,7 @@ convert_to_tt_with_zone (const ECalComponentDateTime *dt,
ICalTimezone *default_timezone)
{
ICalTimezone *zone = NULL;
- ICalTimetype *value;
+ ICalTime *value;
time_t tt;
value = dt ? e_cal_component_datetime_get_value (dt) : NULL;
@@ -2424,7 +2424,7 @@ generate_instances (ECalClient *client,
* TZID (i.e. floating times) we use the default
* timezone. */
if (dtstart && e_cal_component_datetime_get_tzid (dtstart) &&
e_cal_component_datetime_get_value (dtstart) &&
- !i_cal_timetype_get_is_date (e_cal_component_datetime_get_value (dtstart))) {
+ !i_cal_time_is_date (e_cal_component_datetime_get_value (dtstart))) {
start_zone = e_cal_client_tzlookup_cb (e_cal_component_datetime_get_tzid
(dtstart), client, cancellable, NULL);
if (!start_zone)
start_zone = default_zone;
@@ -2433,7 +2433,7 @@ generate_instances (ECalClient *client,
}
if (dtend && e_cal_component_datetime_get_tzid (dtend) &&
e_cal_component_datetime_get_value (dtend) &&
- !i_cal_timetype_get_is_date (e_cal_component_datetime_get_value (dtend))) {
+ !i_cal_time_is_date (e_cal_component_datetime_get_value (dtend))) {
end_zone = e_cal_client_tzlookup_cb (e_cal_component_datetime_get_tzid
(dtend), client, cancellable, NULL);
if (!end_zone)
end_zone = default_zone;
@@ -2474,7 +2474,7 @@ generate_instances (ECalClient *client,
} else {
ECalComponentDateTime *datetime;
ICalTimezone *start_zone = NULL, *end_zone = NULL;
- ICalTimetype *starttt, *endtt;
+ ICalTime *starttt, *endtt;
struct instances_info *instances_hold;
/* Get the start timezone */
@@ -2525,7 +2525,7 @@ generate_instances (ECalClient *client,
for (l = instances; l && !g_cancellable_is_cancelled (cancellable); l = l->next) {
struct comp_instance *ci;
- ICalTimetype *starttt, *endtt;
+ ICalTime *starttt, *endtt;
gboolean result;
ci = l->data;
@@ -2914,7 +2914,7 @@ process_instances (ECalClient *client,
ci = instances->data;
if (result) {
- ICalTimetype *starttt = NULL, *endtt = NULL;
+ ICalTime *starttt = NULL, *endtt = NULL;
instance_rid = e_cal_component_get_recurid_as_string (ci->comp);
@@ -3027,7 +3027,7 @@ e_cal_client_generate_instances_for_object (ECalClient *client,
/* If the backend stores it as individual instances and does not
* have a master object - do not expand */
if (!e_cal_util_component_has_recurrences (icalcomp) || e_client_check_capability (E_CLIENT (client),
E_CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) {
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
dtstart = i_cal_component_get_dtstart (icalcomp);
dtend = i_cal_component_get_dtend (icalcomp);
@@ -3132,7 +3132,7 @@ e_cal_client_generate_instances_for_object_sync (ECalClient *client,
/* If the backend stores it as individual instances and does not
* have a master object - do not expand */
if (!e_cal_util_component_has_recurrences (icalcomp) || e_client_check_capability (E_CLIENT (client),
E_CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) {
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
dtstart = i_cal_component_get_dtstart (icalcomp);
dtend = i_cal_component_get_dtend (icalcomp);
@@ -3730,7 +3730,7 @@ e_cal_client_get_object_sync (ECalClient *client,
for (subcomponent = i_cal_component_get_first_component (icalcomp, kind);
subcomponent != NULL;
g_object_unref (subcomponent), subcomponent = i_cal_component_get_next_component
(icalcomp, kind)) {
- ICalTimetype *recurrenceid;
+ ICalTime *recurrenceid;
if (i_cal_component_get_uid (subcomponent) == NULL)
continue;
diff --git a/src/calendar/libecal/e-cal-component-alarm-repeat.c
b/src/calendar/libecal/e-cal-component-alarm-repeat.c
index c62a4a3a0..6c04c5e05 100644
--- a/src/calendar/libecal/e-cal-component-alarm-repeat.c
+++ b/src/calendar/libecal/e-cal-component-alarm-repeat.c
@@ -32,7 +32,7 @@ G_DEFINE_BOXED_TYPE (ECalComponentAlarmRepeat, e_cal_component_alarm_repeat, e_c
struct _ECalComponentAlarmRepeat {
gint repetitions;
- ICalDurationType *interval;
+ ICalDuration *interval;
};
/**
@@ -50,12 +50,12 @@ struct _ECalComponentAlarmRepeat {
**/
ECalComponentAlarmRepeat *
e_cal_component_alarm_repeat_new (gint repetitions,
- const ICalDurationType *interval)
+ const ICalDuration *interval)
{
- g_return_val_if_fail (I_CAL_IS_DURATION_TYPE (interval), NULL);
+ g_return_val_if_fail (I_CAL_IS_DURATION (interval), NULL);
return e_cal_component_alarm_repeat_new_seconds (repetitions,
- i_cal_duration_type_as_int ((ICalDurationType *) interval));
+ i_cal_duration_as_int ((ICalDuration *) interval));
}
/**
@@ -79,7 +79,7 @@ e_cal_component_alarm_repeat_new_seconds (gint repetitions,
repeat = g_new0 (ECalComponentAlarmRepeat, 1);
repeat->repetitions = repetitions;
- repeat->interval = i_cal_duration_type_from_int (interval_seconds);
+ repeat->interval = i_cal_duration_from_int (interval_seconds);
return repeat;
}
@@ -100,7 +100,7 @@ e_cal_component_alarm_repeat_copy (const ECalComponentAlarmRepeat *repeat)
g_return_val_if_fail (repeat != NULL, NULL);
return e_cal_component_alarm_repeat_new_seconds (repeat->repetitions,
- i_cal_duration_type_as_int (repeat->interval));
+ i_cal_duration_as_int (repeat->interval));
}
/**
@@ -163,7 +163,7 @@ e_cal_component_alarm_repeat_set_repetitions (ECalComponentAlarmRepeat *repeat,
* e_cal_component_alarm_repeat_get_interval:
* @repeat: an #ECalComponentAlarmRepeat
*
- * Returns the interval between repetitions of the @repeat, as an #ICalDurationType
+ * Returns the interval between repetitions of the @repeat, as an #ICalDuration
* object. This object is owned by @repeat and should not be freed. It's valid until
* the @repeat is not freed or its interval changed with either e_cal_component_alarm_repeat_set_interval()
* or e_cal_component_alarm_repeat_set_interval_seconds().
@@ -172,7 +172,7 @@ e_cal_component_alarm_repeat_set_repetitions (ECalComponentAlarmRepeat *repeat,
*
* Since: 3.36
**/
-ICalDurationType *
+ICalDuration *
e_cal_component_alarm_repeat_get_interval (const ECalComponentAlarmRepeat *repeat)
{
g_return_val_if_fail (repeat != NULL, NULL);
@@ -183,7 +183,7 @@ e_cal_component_alarm_repeat_get_interval (const ECalComponentAlarmRepeat *repea
/**
* e_cal_component_alarm_repeat_set_interval:
* @repeat: an #ECalComponentAlarmRepeat
- * @interval: (not nullable): interval between repetitions, as an #ICalDurationType
+ * @interval: (not nullable): interval between repetitions, as an #ICalDuration
*
* Set the @interval between repetitions of the @repeat.
*
@@ -191,14 +191,14 @@ e_cal_component_alarm_repeat_get_interval (const ECalComponentAlarmRepeat *repea
**/
void
e_cal_component_alarm_repeat_set_interval (ECalComponentAlarmRepeat *repeat,
- const ICalDurationType *interval)
+ const ICalDuration *interval)
{
g_return_if_fail (repeat != NULL);
g_return_if_fail (interval != NULL);
if (repeat->interval != interval) {
e_cal_component_alarm_repeat_set_interval_seconds (repeat,
- i_cal_duration_type_as_int ((ICalDurationType *) interval));
+ i_cal_duration_as_int ((ICalDuration *) interval));
}
}
@@ -217,7 +217,7 @@ e_cal_component_alarm_repeat_get_interval_seconds (const ECalComponentAlarmRepea
{
g_return_val_if_fail (repeat != NULL, 0);
- return i_cal_duration_type_as_int (repeat->interval);
+ return i_cal_duration_as_int (repeat->interval);
}
/**
@@ -235,8 +235,8 @@ e_cal_component_alarm_repeat_set_interval_seconds (ECalComponentAlarmRepeat *rep
{
g_return_if_fail (repeat != NULL);
- if (i_cal_duration_type_as_int (repeat->interval) != interval_seconds) {
+ if (i_cal_duration_as_int (repeat->interval) != interval_seconds) {
g_clear_object (&repeat->interval);
- repeat->interval = i_cal_duration_type_from_int (interval_seconds);
+ repeat->interval = i_cal_duration_from_int (interval_seconds);
}
}
diff --git a/src/calendar/libecal/e-cal-component-alarm-repeat.h
b/src/calendar/libecal/e-cal-component-alarm-repeat.h
index ada494526..8ce892795 100644
--- a/src/calendar/libecal/e-cal-component-alarm-repeat.h
+++ b/src/calendar/libecal/e-cal-component-alarm-repeat.h
@@ -40,7 +40,7 @@ GType e_cal_component_alarm_repeat_get_type
(void);
ECalComponentAlarmRepeat *
e_cal_component_alarm_repeat_new(gint repetitions,
- const ICalDurationType *interval);
+ const ICalDuration *interval);
ECalComponentAlarmRepeat *
e_cal_component_alarm_repeat_new_seconds
(gint repetitions,
@@ -55,12 +55,11 @@ gint e_cal_component_alarm_repeat_get_repetitions
void e_cal_component_alarm_repeat_set_repetitions
(ECalComponentAlarmRepeat *repeat,
gint repetitions);
-ICalDurationType *
- e_cal_component_alarm_repeat_get_interval
+ICalDuration * e_cal_component_alarm_repeat_get_interval
(const ECalComponentAlarmRepeat *repeat);
void e_cal_component_alarm_repeat_set_interval
(ECalComponentAlarmRepeat *repeat,
- const ICalDurationType *interval);
+ const ICalDuration *interval);
gint e_cal_component_alarm_repeat_get_interval_seconds
(const ECalComponentAlarmRepeat *repeat);
void e_cal_component_alarm_repeat_set_interval_seconds
diff --git a/src/calendar/libecal/e-cal-component-alarm-trigger.c
b/src/calendar/libecal/e-cal-component-alarm-trigger.c
index 823e0f97e..372bca94f 100644
--- a/src/calendar/libecal/e-cal-component-alarm-trigger.c
+++ b/src/calendar/libecal/e-cal-component-alarm-trigger.c
@@ -36,8 +36,8 @@ struct _ECalComponentAlarmTrigger {
ECalComponentAlarmTriggerKind kind;
/* Only one of the below can be set, depending on the 'kind' */
- ICalDurationType *rel_duration;
- ICalTimetype *abs_time;
+ ICalDuration *rel_duration;
+ ICalTime *abs_time;
ECalComponentParameterBag *parameter_bag;
};
@@ -45,7 +45,7 @@ struct _ECalComponentAlarmTrigger {
/**
* e_cal_component_alarm_trigger_new_relative:
* @kind: an #ECalComponentAlarmTriggerKind, any but the %E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE
- * @duration: (not nullable): the duration relative to @kind, as an #ICalDurationType
+ * @duration: (not nullable): the duration relative to @kind, as an #ICalDuration
*
* Creates a new #ECalComponentAlarmTrigger structure, set with the given @kind
* and @duration. The @kind can be any but the %E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE.
@@ -58,12 +58,12 @@ struct _ECalComponentAlarmTrigger {
**/
ECalComponentAlarmTrigger *
e_cal_component_alarm_trigger_new_relative (ECalComponentAlarmTriggerKind kind,
- const ICalDurationType *duration)
+ const ICalDuration *duration)
{
ECalComponentAlarmTrigger *trigger;
g_return_val_if_fail (kind != E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE, NULL);
- g_return_val_if_fail (I_CAL_IS_DURATION_TYPE (duration), NULL);
+ g_return_val_if_fail (I_CAL_IS_DURATION (duration), NULL);
trigger = g_new0 (ECalComponentAlarmTrigger, 1);
trigger->parameter_bag = e_cal_component_parameter_bag_new ();
@@ -75,7 +75,7 @@ e_cal_component_alarm_trigger_new_relative (ECalComponentAlarmTriggerKind kind,
/**
* e_cal_component_alarm_trigger_new_absolute:
- * @absolute_time: (not nullable): the absolute time when to trigger the alarm, as an #ICalTimetype
+ * @absolute_time: (not nullable): the absolute time when to trigger the alarm, as an #ICalTime
*
* Creates a new #ECalComponentAlarmTrigger structure, set with
* the %E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE kind and the @absolute_time as
@@ -89,11 +89,11 @@ e_cal_component_alarm_trigger_new_relative (ECalComponentAlarmTriggerKind kind,
* Since: 3.36
**/
ECalComponentAlarmTrigger *
-e_cal_component_alarm_trigger_new_absolute (const ICalTimetype *absolute_time)
+e_cal_component_alarm_trigger_new_absolute (const ICalTime *absolute_time)
{
ECalComponentAlarmTrigger *trigger;
- g_return_val_if_fail (I_CAL_IS_TIMETYPE (absolute_time), NULL);
+ g_return_val_if_fail (I_CAL_IS_TIME (absolute_time), NULL);
trigger = g_new0 (ECalComponentAlarmTrigger, 1);
trigger->parameter_bag = e_cal_component_parameter_bag_new ();
@@ -214,7 +214,7 @@ e_cal_component_alarm_trigger_set_from_property (ECalComponentAlarmTrigger *trig
{
ICalProperty *prop = (ICalProperty *) property;
ICalParameter *param;
- ICalTriggerType *trgtype;
+ ICalTrigger *trg;
gboolean relative;
g_return_if_fail (trigger != NULL);
@@ -245,11 +245,11 @@ e_cal_component_alarm_trigger_set_from_property (ECalComponentAlarmTrigger *trig
relative = TRUE;
}
- trgtype = i_cal_property_get_trigger (prop);
+ trg = i_cal_property_get_trigger (prop);
if (relative) {
ECalComponentAlarmTriggerKind kind;
- ICalDurationType *duration;
+ ICalDuration *duration;
ICalParameter *param;
param = i_cal_property_get_first_parameter (prop, I_CAL_RELATED_PARAMETER);
@@ -271,21 +271,21 @@ e_cal_component_alarm_trigger_set_from_property (ECalComponentAlarmTrigger *trig
kind = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
}
- duration = i_cal_trigger_type_get_duration (trgtype);
+ duration = i_cal_trigger_get_duration (trg);
e_cal_component_alarm_trigger_set_relative (trigger, kind, duration);
g_clear_object (&duration);
g_clear_object (¶m);
} else {
- ICalTimetype *abs_time;
+ ICalTime *abs_time;
- abs_time = i_cal_trigger_type_get_time (trgtype);
+ abs_time = i_cal_trigger_get_time (trg);
e_cal_component_alarm_trigger_set_absolute (trigger, abs_time);
g_clear_object (&abs_time);
}
- g_clear_object (&trgtype);
+ g_clear_object (&trg);
e_cal_component_parameter_bag_set_from_property (trigger->parameter_bag, prop,
e_cal_component_alarm_trigger_bag_filter_params_cb, NULL);
}
@@ -335,41 +335,41 @@ e_cal_component_alarm_trigger_fill_property (const ECalComponentAlarmTrigger *tr
ICalParameter *param;
ICalParameterValue value_type = I_CAL_VALUE_DATETIME;
ICalParameterRelated related;
- ICalTriggerType *trgtype;
+ ICalTrigger *trg;
g_return_if_fail (trigger != NULL);
g_return_if_fail (I_CAL_IS_PROPERTY (property));
g_return_if_fail (i_cal_property_isa (property) == I_CAL_TRIGGER_PROPERTY);
related = I_CAL_RELATED_START;
- trgtype = i_cal_trigger_type_from_int (0);
+ trg = i_cal_trigger_from_int (0);
switch (trigger->kind) {
case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START:
- i_cal_trigger_type_set_duration (trgtype, trigger->rel_duration);
+ i_cal_trigger_set_duration (trg, trigger->rel_duration);
value_type = I_CAL_VALUE_DURATION;
related = I_CAL_RELATED_START;
break;
case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END:
- i_cal_trigger_type_set_duration (trgtype, trigger->rel_duration);
+ i_cal_trigger_set_duration (trg, trigger->rel_duration);
value_type = I_CAL_VALUE_DURATION;
related = I_CAL_RELATED_END;
break;
case E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE:
- i_cal_trigger_type_set_time (trgtype, trigger->abs_time);
+ i_cal_trigger_set_time (trg, trigger->abs_time);
value_type = I_CAL_VALUE_DATETIME;
break;
case E_CAL_COMPONENT_ALARM_TRIGGER_NONE:
- g_object_unref (trgtype);
+ g_object_unref (trg);
return;
}
- i_cal_property_set_trigger (property, trgtype);
+ i_cal_property_set_trigger (property, trg);
- g_object_unref (trgtype);
+ g_object_unref (trg);
param = i_cal_property_get_first_parameter (property, I_CAL_VALUE_PARAMETER);
if (param) {
@@ -400,7 +400,7 @@ e_cal_component_alarm_trigger_fill_property (const ECalComponentAlarmTrigger *tr
* e_cal_component_alarm_trigger_set_relative:
* @trigger: an #ECalComponentAlarmTrigger
* @kind: an #ECalComponentAlarmTriggerKind, any but the %E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE
- * @duration: (not nullable): the duration relative to @kind, as an #ICalDurationType
+ * @duration: (not nullable): the duration relative to @kind, as an #ICalDuration
*
* Set the @trigegr with the given @kind and @duration. The @kind can be any but
* the %E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE.
@@ -411,24 +411,24 @@ e_cal_component_alarm_trigger_fill_property (const ECalComponentAlarmTrigger *tr
void
e_cal_component_alarm_trigger_set_relative (ECalComponentAlarmTrigger *trigger,
ECalComponentAlarmTriggerKind kind,
- const ICalDurationType *duration)
+ const ICalDuration *duration)
{
g_return_if_fail (trigger != NULL);
g_return_if_fail (kind != E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE);
- g_return_if_fail (I_CAL_IS_DURATION_TYPE (duration));
+ g_return_if_fail (I_CAL_IS_DURATION (duration));
g_clear_object (&trigger->rel_duration);
g_clear_object (&trigger->abs_time);
trigger->kind = kind;
- trigger->rel_duration = i_cal_duration_type_from_int (
- i_cal_duration_type_as_int ((ICalDurationType *) duration));
+ trigger->rel_duration = i_cal_duration_from_int (
+ i_cal_duration_as_int ((ICalDuration *) duration));
}
/**
* e_cal_component_alarm_trigger_set_absolute:
* @trigger: an #ECalComponentAlarmTrigger
- * @absolute_time: (not nullable): the absolute time when to trigger the alarm, as an #ICalTimetype
+ * @absolute_time: (not nullable): the absolute time when to trigger the alarm, as an #ICalTime
*
* Set the @trigegr with the %E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE kind and
* the @absolute_time as the time of the trigger. The @absolute_time
@@ -440,16 +440,16 @@ e_cal_component_alarm_trigger_set_relative (ECalComponentAlarmTrigger *trigger,
**/
void
e_cal_component_alarm_trigger_set_absolute (ECalComponentAlarmTrigger *trigger,
- const ICalTimetype *absolute_time)
+ const ICalTime *absolute_time)
{
g_return_if_fail (trigger != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (absolute_time));
+ g_return_if_fail (I_CAL_IS_TIME (absolute_time));
g_clear_object (&trigger->rel_duration);
g_clear_object (&trigger->abs_time);
trigger->kind = E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE;
- trigger->abs_time = i_cal_timetype_new_clone (absolute_time);
+ trigger->abs_time = i_cal_time_new_clone (absolute_time);
}
/**
@@ -501,11 +501,11 @@ e_cal_component_alarm_trigger_set_kind (ECalComponentAlarmTrigger *trigger,
* Returns the @trigger duration for a relative @trigger, or %NULL, when
* the @trigger is an absolute trigger.
*
- * Returns: (transfer none) (nullable): the @trigger duration, as an #ICalDurationType, or %NULL
+ * Returns: (transfer none) (nullable): the @trigger duration, as an #ICalDuration, or %NULL
*
* Since: 3.36
**/
-ICalDurationType *
+ICalDuration *
e_cal_component_alarm_trigger_get_duration (const ECalComponentAlarmTrigger *trigger)
{
g_return_val_if_fail (trigger != NULL, NULL);
@@ -519,7 +519,7 @@ e_cal_component_alarm_trigger_get_duration (const ECalComponentAlarmTrigger *tri
/**
* e_cal_component_alarm_trigger_set_duration:
* @trigger: an #ECalComponentAlarmTrigger
- * @duration: duration for a relative trigger, as an #ICalDurationType
+ * @duration: duration for a relative trigger, as an #ICalDuration
*
* Sets the @trigger duration for a relative trigger. The function does nothing, when
* the @trigger is an absolute trigger. The object is owned by @trigger and it's
@@ -529,19 +529,19 @@ e_cal_component_alarm_trigger_get_duration (const ECalComponentAlarmTrigger *tri
**/
void
e_cal_component_alarm_trigger_set_duration (ECalComponentAlarmTrigger *trigger,
- const ICalDurationType *duration)
+ const ICalDuration *duration)
{
g_return_if_fail (trigger != NULL);
- g_return_if_fail (I_CAL_IS_DURATION_TYPE (duration));
+ g_return_if_fail (I_CAL_IS_DURATION (duration));
if (trigger->kind == E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE)
return;
if (trigger->rel_duration != duration &&
- i_cal_duration_type_as_int (trigger->rel_duration) != i_cal_duration_type_as_int
((ICalDurationType *) duration)) {
+ i_cal_duration_as_int (trigger->rel_duration) != i_cal_duration_as_int ((ICalDuration *)
duration)) {
g_clear_object (&trigger->rel_duration);
- trigger->rel_duration = i_cal_duration_type_from_int (
- i_cal_duration_type_as_int ((ICalDurationType *) duration));
+ trigger->rel_duration = i_cal_duration_from_int (
+ i_cal_duration_as_int ((ICalDuration *) duration));
}
}
@@ -553,11 +553,11 @@ e_cal_component_alarm_trigger_set_duration (ECalComponentAlarmTrigger *trigger,
* the @trigger is a relative trigger. The object is owned by @trigger and it's
* valid until the @trigger is freed or its absolute time changed.
*
- * Returns: (transfer none) (nullable): the @trigger absolute time, as an #ICalTimetype, or %NULL
+ * Returns: (transfer none) (nullable): the @trigger absolute time, as an #ICalTime, or %NULL
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_alarm_trigger_get_absolute_time (const ECalComponentAlarmTrigger *trigger)
{
g_return_val_if_fail (trigger != NULL, NULL);
@@ -571,7 +571,7 @@ e_cal_component_alarm_trigger_get_absolute_time (const ECalComponentAlarmTrigger
/**
* e_cal_component_alarm_trigger_set_absolute_time:
* @trigger: an #ECalComponentAlarmTrigger
- * @absolute_time: absolute time for an absolute trigger, as an #ICalTimetype
+ * @absolute_time: absolute time for an absolute trigger, as an #ICalTime
*
* Sets the @trigger absolute time for an absolute trigger. The @absolute_time
* should be date/time (not date) in UTC.
@@ -582,17 +582,17 @@ e_cal_component_alarm_trigger_get_absolute_time (const ECalComponentAlarmTrigger
**/
void
e_cal_component_alarm_trigger_set_absolute_time (ECalComponentAlarmTrigger *trigger,
- const ICalTimetype *absolute_time)
+ const ICalTime *absolute_time)
{
g_return_if_fail (trigger != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (absolute_time));
+ g_return_if_fail (I_CAL_IS_TIME (absolute_time));
if (trigger->kind != E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE)
return;
if (trigger->abs_time != absolute_time) {
g_clear_object (&trigger->abs_time);
- trigger->abs_time = i_cal_timetype_new_clone ((ICalTimetype *) absolute_time);
+ trigger->abs_time = i_cal_time_new_clone ((ICalTime *) absolute_time);
}
}
diff --git a/src/calendar/libecal/e-cal-component-alarm-trigger.h
b/src/calendar/libecal/e-cal-component-alarm-trigger.h
index bdd953304..552611fb4 100644
--- a/src/calendar/libecal/e-cal-component-alarm-trigger.h
+++ b/src/calendar/libecal/e-cal-component-alarm-trigger.h
@@ -44,10 +44,10 @@ GType e_cal_component_alarm_trigger_get_type
ECalComponentAlarmTrigger *
e_cal_component_alarm_trigger_new_relative
(ECalComponentAlarmTriggerKind kind,
- const ICalDurationType *duration);
+ const ICalDuration *duration);
ECalComponentAlarmTrigger *
e_cal_component_alarm_trigger_new_absolute
- (const ICalTimetype *absolute_time);
+ (const ICalTime *absolute_time);
ECalComponentAlarmTrigger *
e_cal_component_alarm_trigger_new_from_property
(const ICalProperty *property);
@@ -67,27 +67,26 @@ void e_cal_component_alarm_trigger_fill_property
void e_cal_component_alarm_trigger_set_relative
(ECalComponentAlarmTrigger *trigger,
ECalComponentAlarmTriggerKind kind,
- const ICalDurationType *duration);
+ const ICalDuration *duration);
void e_cal_component_alarm_trigger_set_absolute
(ECalComponentAlarmTrigger *trigger,
- const ICalTimetype *absolute_time);
+ const ICalTime *absolute_time);
ECalComponentAlarmTriggerKind
e_cal_component_alarm_trigger_get_kind
(const ECalComponentAlarmTrigger *trigger);
void e_cal_component_alarm_trigger_set_kind
(ECalComponentAlarmTrigger *trigger,
ECalComponentAlarmTriggerKind kind);
-ICalDurationType *
- e_cal_component_alarm_trigger_get_duration
+ICalDuration * e_cal_component_alarm_trigger_get_duration
(const ECalComponentAlarmTrigger *trigger);
void e_cal_component_alarm_trigger_set_duration
(ECalComponentAlarmTrigger *trigger,
- const ICalDurationType *duration);
-ICalTimetype * e_cal_component_alarm_trigger_get_absolute_time
+ const ICalDuration *duration);
+ICalTime * e_cal_component_alarm_trigger_get_absolute_time
(const ECalComponentAlarmTrigger *trigger);
void e_cal_component_alarm_trigger_set_absolute_time
(ECalComponentAlarmTrigger *trigger,
- const ICalTimetype *absolute_time);
+ const ICalTime *absolute_time);
ECalComponentParameterBag *
e_cal_component_alarm_trigger_get_parameter_bag
(const ECalComponentAlarmTrigger *trigger);
diff --git a/src/calendar/libecal/e-cal-component-alarm.c b/src/calendar/libecal/e-cal-component-alarm.c
index ee086fbb1..3cd875535 100644
--- a/src/calendar/libecal/e-cal-component-alarm.c
+++ b/src/calendar/libecal/e-cal-component-alarm.c
@@ -234,7 +234,7 @@ e_cal_component_alarm_set_from_component (ECalComponentAlarm *alarm,
const ICalComponent *component)
{
ICalComponent *comp = (ICalComponent *) component;
- ICalDurationType *duration = NULL;
+ ICalDuration *duration = NULL;
ICalProperty *prop, *repeat = NULL;
g_return_if_fail (alarm != NULL);
@@ -552,7 +552,7 @@ e_cal_component_alarm_fill_component (ECalComponentAlarm *alarm,
}
if (alarm->repeat) {
- ICalDurationType *interval;
+ ICalDuration *interval;
interval = e_cal_component_alarm_repeat_get_interval (alarm->repeat);
if (interval) {
diff --git a/src/calendar/libecal/e-cal-component-datetime.c b/src/calendar/libecal/e-cal-component-datetime.c
index 9b49e3a56..ee26ab8b8 100644
--- a/src/calendar/libecal/e-cal-component-datetime.c
+++ b/src/calendar/libecal/e-cal-component-datetime.c
@@ -32,7 +32,7 @@ G_DEFINE_BOXED_TYPE (ECalComponentDateTime, e_cal_component_datetime, e_cal_comp
struct _ECalComponentDateTime {
/* Actual date/time value */
- ICalTimetype *value;
+ ICalTime *value;
/* Timezone ID */
gchar *tzid;
@@ -40,7 +40,7 @@ struct _ECalComponentDateTime {
/**
* e_cal_component_datetime_new:
- * @value: (not nullable): an #ICalTimetype as a value
+ * @value: (not nullable): an #ICalTime as a value
* @tzid: (nullable): timezone ID for the @value, or %NULL
*
* Creates a new #ECalComponentDateTime instance, which holds
@@ -52,12 +52,12 @@ struct _ECalComponentDateTime {
* Since: 3.36
**/
ECalComponentDateTime *
-e_cal_component_datetime_new (const ICalTimetype *value,
+e_cal_component_datetime_new (const ICalTime *value,
const gchar *tzid)
{
ECalComponentDateTime *dt;
- g_return_val_if_fail (I_CAL_IS_TIMETYPE (value), NULL);
+ g_return_val_if_fail (I_CAL_IS_TIME (value), NULL);
dt = g_new0 (ECalComponentDateTime, 1);
e_cal_component_datetime_set (dt, value, tzid);
@@ -67,7 +67,7 @@ e_cal_component_datetime_new (const ICalTimetype *value,
/**
* e_cal_component_datetime_new_take:
- * @value: (transfer full) (not nullable): an #ICalTimetype as a value
+ * @value: (transfer full) (not nullable): an #ICalTime as a value
* @tzid: (transfer full) (nullable): timezone ID for the @value, or %NULL
*
* Creates a new #ECalComponentDateTime instance, which holds
@@ -81,12 +81,12 @@ e_cal_component_datetime_new (const ICalTimetype *value,
* Since: 3.36
**/
ECalComponentDateTime *
-e_cal_component_datetime_new_take (ICalTimetype *value,
+e_cal_component_datetime_new_take (ICalTime *value,
gchar *tzid)
{
ECalComponentDateTime *dt;
- g_return_val_if_fail (I_CAL_IS_TIMETYPE (value), NULL);
+ g_return_val_if_fail (I_CAL_IS_TIME (value), NULL);
dt = g_new0 (ECalComponentDateTime, 1);
dt->value = value;
@@ -141,7 +141,7 @@ e_cal_component_datetime_free (gpointer dt)
/**
* e_cal_component_datetime_set:
* @dt: an #ECalComponentDateTime
- * @value: (not nullable): an #ICalTimetype as a value
+ * @value: (not nullable): an #ICalTime as a value
* @tzid: (nullable): timezone ID for the @value, or %NULL
*
* Sets both @value and @tzid in one call. Use e_cal_component_datetime_set_value()
@@ -151,11 +151,11 @@ e_cal_component_datetime_free (gpointer dt)
**/
void
e_cal_component_datetime_set (ECalComponentDateTime *dt,
- const ICalTimetype *value,
+ const ICalTime *value,
const gchar *tzid)
{
g_return_if_fail (dt != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (value));
+ g_return_if_fail (I_CAL_IS_TIME (value));
e_cal_component_datetime_set_value (dt, value);
e_cal_component_datetime_set_tzid (dt, tzid);
@@ -168,11 +168,11 @@ e_cal_component_datetime_set (ECalComponentDateTime *dt,
* Returns the value stored with the @dt. The object is owned by @dt and
* it's valid until the @dt is freed or its value overwritten.
*
- * Returns: (transfer none): a value of @dt, as an #ICalTimetype
+ * Returns: (transfer none): a value of @dt, as an #ICalTime
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_datetime_get_value (const ECalComponentDateTime *dt)
{
g_return_val_if_fail (dt != NULL, NULL);
@@ -183,7 +183,7 @@ e_cal_component_datetime_get_value (const ECalComponentDateTime *dt)
/**
* e_cal_component_datetime_set_value:
* @dt: an #ECalComponentDateTime
- * @value: (not nullable): the value to set, as an #ICalTimetype
+ * @value: (not nullable): the value to set, as an #ICalTime
*
* Sets the @value of the @dt. Any previously set value is freed.
*
@@ -191,21 +191,21 @@ e_cal_component_datetime_get_value (const ECalComponentDateTime *dt)
**/
void
e_cal_component_datetime_set_value (ECalComponentDateTime *dt,
- const ICalTimetype *value)
+ const ICalTime *value)
{
g_return_if_fail (dt != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (value));
+ g_return_if_fail (I_CAL_IS_TIME (value));
if (dt->value != value) {
g_clear_object (&dt->value);
- dt->value = i_cal_timetype_new_clone (value);
+ dt->value = i_cal_time_new_clone (value);
}
}
/**
* e_cal_component_datetime_take_value:
* @dt: an #ECalComponentDateTime
- * @value: (not nullable) (transfer full): the value to take, as an #ICalTimetype
+ * @value: (not nullable) (transfer full): the value to take, as an #ICalTime
*
* Sets the @value of the @dt and assumes ownership of the @value.
* Any previously set value is freed.
@@ -214,10 +214,10 @@ e_cal_component_datetime_set_value (ECalComponentDateTime *dt,
**/
void
e_cal_component_datetime_take_value (ECalComponentDateTime *dt,
- ICalTimetype *value)
+ ICalTime *value)
{
g_return_if_fail (dt != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (value));
+ g_return_if_fail (I_CAL_IS_TIME (value));
if (dt->value != value) {
g_clear_object (&dt->value);
diff --git a/src/calendar/libecal/e-cal-component-datetime.h b/src/calendar/libecal/e-cal-component-datetime.h
index 93b287ea1..ff7eb968c 100644
--- a/src/calendar/libecal/e-cal-component-datetime.h
+++ b/src/calendar/libecal/e-cal-component-datetime.h
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
/**
* ECalComponentDateTime:
*
- * An opaque structure containing an #ICalTimetype describing
+ * An opaque structure containing an #ICalTime describing
* the date/time value and also its TZID parameter. Use the functions
* below to work with it.
**/
@@ -40,26 +40,26 @@ typedef struct _ECalComponentDateTime ECalComponentDateTime;
GType e_cal_component_datetime_get_type
(void);
ECalComponentDateTime *
- e_cal_component_datetime_new (const ICalTimetype *value,
+ e_cal_component_datetime_new (const ICalTime *value,
const gchar *tzid);
ECalComponentDateTime *
e_cal_component_datetime_new_take
- (ICalTimetype *value,
+ (ICalTime *value,
gchar *tzid);
ECalComponentDateTime *
e_cal_component_datetime_copy (const ECalComponentDateTime *dt);
void e_cal_component_datetime_free (gpointer dt); /* ECalComponentDateTime * */
void e_cal_component_datetime_set (ECalComponentDateTime *dt,
- const ICalTimetype *value,
+ const ICalTime *value,
const gchar *tzid);
-ICalTimetype * e_cal_component_datetime_get_value
+ICalTime * e_cal_component_datetime_get_value
(const ECalComponentDateTime *dt);
void e_cal_component_datetime_set_value
(ECalComponentDateTime *dt,
- const ICalTimetype *value);
+ const ICalTime *value);
void e_cal_component_datetime_take_value
(ECalComponentDateTime *dt,
- ICalTimetype *value);
+ ICalTime *value);
const gchar * e_cal_component_datetime_get_tzid
(const ECalComponentDateTime *dt);
void e_cal_component_datetime_set_tzid
diff --git a/src/calendar/libecal/e-cal-component-period.c b/src/calendar/libecal/e-cal-component-period.c
index 0330153cb..dca2e3068 100644
--- a/src/calendar/libecal/e-cal-component-period.c
+++ b/src/calendar/libecal/e-cal-component-period.c
@@ -33,17 +33,17 @@ G_DEFINE_BOXED_TYPE (ECalComponentPeriod, e_cal_component_period, e_cal_componen
struct _ECalComponentPeriod {
ECalComponentPeriodKind kind;
- ICalTimetype *start;
+ ICalTime *start;
/* Only one of 'end' and 'duration' can be set, depending on the kind */
- ICalTimetype *end;
- ICalDurationType *duration;
+ ICalTime *end;
+ ICalDuration *duration;
};
/**
* e_cal_component_period_new_datetime:
- * @start: (not nullable): an #ICalTimetype, the start of the period
- * @end: (nullable): an #ICalTimetype, the end of the period
+ * @start: (not nullable): an #ICalTime, the start of the period
+ * @end: (nullable): an #ICalTime, the end of the period
*
* Creates a new #ECalComponentPeriod of kind %E_CAL_COMPONENT_PERIOD_DATETIME.
* The returned structure should be freed with e_cal_component_period_free(),
@@ -54,12 +54,12 @@ struct _ECalComponentPeriod {
* Since: 3.36
**/
ECalComponentPeriod *
-e_cal_component_period_new_datetime (const ICalTimetype *start,
- const ICalTimetype *end)
+e_cal_component_period_new_datetime (const ICalTime *start,
+ const ICalTime *end)
{
ECalComponentPeriod *period;
- g_return_val_if_fail (I_CAL_IS_TIMETYPE (start), NULL);
+ g_return_val_if_fail (I_CAL_IS_TIME (start), NULL);
period = g_new0 (ECalComponentPeriod, 1);
period->kind = E_CAL_COMPONENT_PERIOD_DATETIME;
@@ -71,8 +71,8 @@ e_cal_component_period_new_datetime (const ICalTimetype *start,
/**
* e_cal_component_period_new_duration:
- * @start: (not nullable): an #ICalTimetype, the start of the period
- * @duration: (not nullable): an #ICalDurationType, the duration of the period
+ * @start: (not nullable): an #ICalTime, the start of the period
+ * @duration: (not nullable): an #ICalDuration, the duration of the period
*
* Creates a new #ECalComponentPeriod of kind %E_CAL_COMPONENT_PERIOD_DURATION.
* The returned structure should be freed with e_cal_component_period_free(),
@@ -83,13 +83,13 @@ e_cal_component_period_new_datetime (const ICalTimetype *start,
* Since: 3.36
**/
ECalComponentPeriod *
-e_cal_component_period_new_duration (const ICalTimetype *start,
- const ICalDurationType *duration)
+e_cal_component_period_new_duration (const ICalTime *start,
+ const ICalDuration *duration)
{
ECalComponentPeriod *period;
- g_return_val_if_fail (I_CAL_IS_TIMETYPE (start), NULL);
- g_return_val_if_fail (I_CAL_IS_DURATION_TYPE (duration), NULL);
+ g_return_val_if_fail (I_CAL_IS_TIME (start), NULL);
+ g_return_val_if_fail (I_CAL_IS_DURATION (duration), NULL);
period = g_new0 (ECalComponentPeriod, 1);
period->kind = E_CAL_COMPONENT_PERIOD_DURATION;
@@ -179,8 +179,8 @@ e_cal_component_period_get_kind (const ECalComponentPeriod *period)
/**
* e_cal_component_period_set_datetime_full:
* @period: an #ECalComponentPeriod
- * @start: (not nullable): an #ICalTimetype, the start of the @period
- * @end: (nullable): an #ICalTimetype, the end of the @period
+ * @start: (not nullable): an #ICalTime, the start of the @period
+ * @end: (nullable): an #ICalTime, the end of the @period
*
* Set the kind of @period to be %E_CAL_COMPONENT_PERIOD_DATETIME
* and fills the content with @start and @end.
@@ -189,11 +189,11 @@ e_cal_component_period_get_kind (const ECalComponentPeriod *period)
**/
void
e_cal_component_period_set_datetime_full (ECalComponentPeriod *period,
- const ICalTimetype *start,
- const ICalTimetype *end)
+ const ICalTime *start,
+ const ICalTime *end)
{
g_return_if_fail (period != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (start));
+ g_return_if_fail (I_CAL_IS_TIME (start));
g_clear_object (&period->duration);
@@ -206,8 +206,8 @@ e_cal_component_period_set_datetime_full (ECalComponentPeriod *period,
/**
* e_cal_component_period_set_duration_full:
* @period: an #ECalComponentPeriod
- * @start: (not nullable): an #ICalTimetype, the start of the @period
- * @duration: (not nullable): an #ICalDurationType, the duration of the @period
+ * @start: (not nullable): an #ICalTime, the start of the @period
+ * @duration: (not nullable): an #ICalDuration, the duration of the @period
*
* Set the kind of @period to be %E_CAL_COMPONENT_PERIOD_DURATION
* and fills the content with @start and @duration.
@@ -216,12 +216,12 @@ e_cal_component_period_set_datetime_full (ECalComponentPeriod *period,
**/
void
e_cal_component_period_set_duration_full (ECalComponentPeriod *period,
- const ICalTimetype *start,
- const ICalDurationType *duration)
+ const ICalTime *start,
+ const ICalDuration *duration)
{
g_return_if_fail (period != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (start));
- g_return_if_fail (I_CAL_IS_DURATION_TYPE (duration));
+ g_return_if_fail (I_CAL_IS_TIME (start));
+ g_return_if_fail (I_CAL_IS_DURATION (duration));
g_clear_object (&period->end);
@@ -235,15 +235,15 @@ e_cal_component_period_set_duration_full (ECalComponentPeriod *period,
* e_cal_component_period_get_start:
* @period: an #ECalComponentPeriod
*
- * Returns the start of the @period. The returned #ICalTimetype object
+ * Returns the start of the @period. The returned #ICalTime object
* is owned by @period and should not be freed. It's valid until the @period
* is freed or its start time changed.
*
- * Returns: (transfer none): the start of the @period, as an #ICalTimetype
+ * Returns: (transfer none): the start of the @period, as an #ICalTime
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_period_get_start (const ECalComponentPeriod *period)
{
g_return_val_if_fail (period != NULL, NULL);
@@ -254,7 +254,7 @@ e_cal_component_period_get_start (const ECalComponentPeriod *period)
/**
* e_cal_component_period_set_start:
* @period: an #ECalComponentPeriod
- * @start: (not nullable): an #ICalTimetype, the start of the @period
+ * @start: (not nullable): an #ICalTime, the start of the @period
*
* Set the @start of the @period. This can be called on any kind of the @period.
*
@@ -262,14 +262,14 @@ e_cal_component_period_get_start (const ECalComponentPeriod *period)
**/
void
e_cal_component_period_set_start (ECalComponentPeriod *period,
- const ICalTimetype *start)
+ const ICalTime *start)
{
g_return_if_fail (period != NULL);
- g_return_if_fail (I_CAL_IS_TIMETYPE (start));
+ g_return_if_fail (I_CAL_IS_TIME (start));
if (period->start != start) {
g_clear_object (&period->start);
- period->start = i_cal_timetype_new_clone (start);
+ period->start = i_cal_time_new_clone (start);
}
}
@@ -282,14 +282,14 @@ e_cal_component_period_set_start (ECalComponentPeriod *period,
* be a null-time, in which case the @period corresponds to a single
* date/date-time value, not to a period.
*
- * The returned #ICalTimetype object is owned by @period and should not
+ * The returned #ICalTime object is owned by @period and should not
* be freed. It's valid until the @period is freed or its end time changed.
*
- * Returns: (transfer none) (nullable): the end of the period, as an #ICalTimetype
+ * Returns: (transfer none) (nullable): the end of the period, as an #ICalTime
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_period_get_end (const ECalComponentPeriod *period)
{
g_return_val_if_fail (period != NULL, NULL);
@@ -301,7 +301,7 @@ e_cal_component_period_get_end (const ECalComponentPeriod *period)
/**
* e_cal_component_period_set_end:
* @period: an #ECalComponentPeriod
- * @end: (nullable): an #ICalTimetype, the end of the @period
+ * @end: (nullable): an #ICalTime, the end of the @period
*
* Set the end of the @period. This can be called only on @period
* objects of kind %E_CAL_COMPONENT_PERIOD_DATETIME.
@@ -310,7 +310,7 @@ e_cal_component_period_get_end (const ECalComponentPeriod *period)
**/
void
e_cal_component_period_set_end (ECalComponentPeriod *period,
- const ICalTimetype *end)
+ const ICalTime *end)
{
g_return_if_fail (period != NULL);
g_return_if_fail (period->kind == E_CAL_COMPONENT_PERIOD_DATETIME);
@@ -318,7 +318,7 @@ e_cal_component_period_set_end (ECalComponentPeriod *period,
if (period->end != end) {
g_clear_object (&period->end);
if (end)
- period->end = i_cal_timetype_new_clone (end);
+ period->end = i_cal_time_new_clone (end);
}
}
@@ -328,14 +328,14 @@ e_cal_component_period_set_end (ECalComponentPeriod *period,
*
* Returns the duration of the @period. This can be called only on @period
* objects of kind %E_CAL_COMPONENT_PERIOD_DURATION.
- * The returned #ICalDurationType object is owned by @period and should not
+ * The returned #ICalDuration object is owned by @period and should not
* be freed. It's valid until the @period is freed or its duration changed.
*
- * Returns: (transfer none): the duration of the period, as an #ICalDurationType
+ * Returns: (transfer none): the duration of the period, as an #ICalDuration
*
* Since: 3.36
**/
-ICalDurationType *
+ICalDuration *
e_cal_component_period_get_duration (const ECalComponentPeriod *period)
{
g_return_val_if_fail (period != NULL, NULL);
@@ -347,7 +347,7 @@ e_cal_component_period_get_duration (const ECalComponentPeriod *period)
/**
* e_cal_component_period_set_duration:
* @period: an #ECalComponentPeriod
- * @duration: (not nullable): an #ICalDurationType, the duration of the @period
+ * @duration: (not nullable): an #ICalDuration, the duration of the @period
*
* Set the duration of the @period. This can be called only on @period
* objects of kind %E_CAL_COMPONENT_PERIOD_DURATION.
@@ -356,14 +356,14 @@ e_cal_component_period_get_duration (const ECalComponentPeriod *period)
**/
void
e_cal_component_period_set_duration (ECalComponentPeriod *period,
- const ICalDurationType *duration)
+ const ICalDuration *duration)
{
g_return_if_fail (period != NULL);
g_return_if_fail (period->kind == E_CAL_COMPONENT_PERIOD_DURATION);
- g_return_if_fail (I_CAL_IS_DURATION_TYPE (duration));
+ g_return_if_fail (I_CAL_IS_DURATION (duration));
if (period->duration != duration) {
g_clear_object (&period->duration);
- period->duration = i_cal_duration_type_from_int (i_cal_duration_type_as_int
((ICalDurationType *) duration));
+ period->duration = i_cal_duration_from_int (i_cal_duration_as_int ((ICalDuration *)
duration));
}
}
diff --git a/src/calendar/libecal/e-cal-component-period.h b/src/calendar/libecal/e-cal-component-period.h
index 6ba8683e9..3ee42e47c 100644
--- a/src/calendar/libecal/e-cal-component-period.h
+++ b/src/calendar/libecal/e-cal-component-period.h
@@ -40,12 +40,12 @@ typedef struct _ECalComponentPeriod ECalComponentPeriod;
GType e_cal_component_period_get_type (void);
ECalComponentPeriod *
e_cal_component_period_new_datetime
- (const ICalTimetype *start,
- const ICalTimetype *end);
+ (const ICalTime *start,
+ const ICalTime *end);
ECalComponentPeriod *
e_cal_component_period_new_duration
- (const ICalTimetype *start,
- const ICalDurationType *duration);
+ (const ICalTime *start,
+ const ICalDuration *duration);
ECalComponentPeriod *
e_cal_component_period_copy (const ECalComponentPeriod *period);
void e_cal_component_period_free (gpointer period); /* ECalComponentPeriod * */
@@ -53,24 +53,23 @@ ECalComponentPeriodKind
e_cal_component_period_get_kind (const ECalComponentPeriod *period);
void e_cal_component_period_set_datetime_full
(ECalComponentPeriod *period,
- const ICalTimetype *start,
- const ICalTimetype *end);
+ const ICalTime *start,
+ const ICalTime *end);
void e_cal_component_period_set_duration_full
(ECalComponentPeriod *period,
- const ICalTimetype *start,
- const ICalDurationType *duration);
-ICalTimetype * e_cal_component_period_get_start(const ECalComponentPeriod *period);
+ const ICalTime *start,
+ const ICalDuration *duration);
+ICalTime * e_cal_component_period_get_start(const ECalComponentPeriod *period);
void e_cal_component_period_set_start(ECalComponentPeriod *period,
- const ICalTimetype *start);
-ICalTimetype * e_cal_component_period_get_end (const ECalComponentPeriod *period);
+ const ICalTime *start);
+ICalTime * e_cal_component_period_get_end (const ECalComponentPeriod *period);
void e_cal_component_period_set_end (ECalComponentPeriod *period,
- const ICalTimetype *end);
-ICalDurationType *
- e_cal_component_period_get_duration
+ const ICalTime *end);
+ICalDuration * e_cal_component_period_get_duration
(const ECalComponentPeriod *period);
void e_cal_component_period_set_duration
(ECalComponentPeriod *period,
- const ICalDurationType *duration);
+ const ICalDuration *duration);
G_END_DECLS
diff --git a/src/calendar/libecal/e-cal-component.c b/src/calendar/libecal/e-cal-component.c
index aaca507ba..cb315c163 100644
--- a/src/calendar/libecal/e-cal-component.c
+++ b/src/calendar/libecal/e-cal-component.c
@@ -417,7 +417,7 @@ ensure_mandatory_properties (ECalComponent *comp)
if (prop) {
g_object_unref (prop);
} else {
- ICalTimetype *tt;
+ ICalTime *tt;
tt = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
@@ -1386,13 +1386,13 @@ e_cal_component_set_contacts (ECalComponent *comp,
}
/* Gets a struct icaltimetype value */
-static ICalTimetype *
+static ICalTime *
get_icaltimetype (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalTimetype * (* get_prop_func) (ICalProperty *prop))
+ ICalTime * (* get_prop_func) (ICalProperty *prop))
{
ICalProperty *prop;
- ICalTimetype *tt;
+ ICalTime *tt;
prop = i_cal_component_get_first_property (icalcomp, prop_kind);
if (!prop)
@@ -1409,10 +1409,10 @@ get_icaltimetype (ICalComponent *icalcomp,
static void
set_icaltimetype (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalProperty *(* prop_new_func) (ICalTimetype *tt),
+ ICalProperty *(* prop_new_func) (ICalTime *tt),
void (* prop_set_func) (ICalProperty *prop,
- ICalTimetype *tt),
- const ICalTimetype *tt)
+ ICalTime *tt),
+ const ICalTime *tt)
{
ICalProperty *prop;
@@ -1428,10 +1428,10 @@ set_icaltimetype (ICalComponent *icalcomp,
}
if (prop) {
- prop_set_func (prop, (ICalTimetype *) tt);
+ prop_set_func (prop, (ICalTime *) tt);
g_object_unref (prop);
} else {
- prop = prop_new_func ((ICalTimetype *) tt);
+ prop = prop_new_func ((ICalTime *) tt);
i_cal_component_take_property (icalcomp, prop);
}
}
@@ -1444,11 +1444,11 @@ set_icaltimetype (ICalComponent *icalcomp,
* Free the returned non-NULL pointer with g_object_unref(), when
* no longer needed.
*
- * Returns: (transfer full): the completion date, as an #ICalTimetype, or %NULL, when none is set
+ * Returns: (transfer full): the completion date, as an #ICalTime, or %NULL, when none is set
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_get_completed (ECalComponent *comp)
{
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL);
@@ -1468,22 +1468,22 @@ e_cal_component_get_completed (ECalComponent *comp)
**/
void
e_cal_component_set_completed (ECalComponent *comp,
- const ICalTimetype *tt)
+ const ICalTime *tt)
{
- ICalTimetype *tmp_tt = NULL;
+ ICalTime *tmp_tt = NULL;
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
g_return_if_fail (comp->priv->icalcomp != NULL);
- if (tt && i_cal_timetype_get_is_date ((ICalTimetype *) tt)) {
- tmp_tt = i_cal_timetype_new_clone (tt);
+ if (tt && i_cal_time_is_date ((ICalTime *) tt)) {
+ tmp_tt = i_cal_time_new_clone (tt);
tt = tmp_tt;
- i_cal_timetype_set_is_date (tmp_tt, FALSE);
- i_cal_timetype_set_hour (tmp_tt, 0);
- i_cal_timetype_set_minute (tmp_tt, 0);
- i_cal_timetype_set_second (tmp_tt, 0);
- i_cal_timetype_set_zone (tmp_tt, i_cal_timezone_get_utc_timezone ());
+ i_cal_time_set_is_date (tmp_tt, FALSE);
+ i_cal_time_set_hour (tmp_tt, 0);
+ i_cal_time_set_minute (tmp_tt, 0);
+ i_cal_time_set_second (tmp_tt, 0);
+ i_cal_time_set_timezone (tmp_tt, i_cal_timezone_get_utc_timezone ());
}
set_icaltimetype (comp->priv->icalcomp, I_CAL_COMPLETED_PROPERTY,
@@ -1502,11 +1502,11 @@ e_cal_component_set_completed (ECalComponent *comp,
* calendar store. Free the returned non-NULL pointer with g_object_unref(), when
* no longer needed.
*
- * Returns: (transfer full): the creation date, as an #ICalTimetype, or %NULL, when none is set
+ * Returns: (transfer full): the creation date, as an #ICalTime, or %NULL, when none is set
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_get_created (ECalComponent *comp)
{
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL);
@@ -1528,7 +1528,7 @@ e_cal_component_get_created (ECalComponent *comp)
**/
void
e_cal_component_set_created (ECalComponent *comp,
- const ICalTimetype *tt)
+ const ICalTime *tt)
{
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
g_return_if_fail (comp->priv->icalcomp != NULL);
@@ -1589,11 +1589,11 @@ e_cal_component_set_descriptions (ECalComponent *comp,
static ECalComponentDateTime *
get_datetime (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalTimetype * (* get_prop_func) (ICalProperty *prop))
+ ICalTime * (* get_prop_func) (ICalProperty *prop))
{
ICalProperty *prop;
ICalParameter *param;
- ICalTimetype *value = NULL;
+ ICalTime *value = NULL;
gchar *tzid;
prop = i_cal_component_get_first_property (icalcomp, prop_kind);
@@ -1606,11 +1606,11 @@ get_datetime (ICalComponent *icalcomp,
}
param = i_cal_property_get_first_parameter (prop, I_CAL_TZID_PARAMETER);
- /* If the ICalTimetype has is_utc set, we set "UTC" as the TZID.
+ /* If the ICalTime has is_utc set, we set "UTC" as the TZID.
* This makes the timezone code simpler. */
if (param)
tzid = g_strdup (i_cal_parameter_get_tzid (param));
- else if (i_cal_timetype_is_utc (value))
+ else if (i_cal_time_is_utc (value))
tzid = g_strdup ("UTC");
else
tzid = NULL;
@@ -1625,14 +1625,14 @@ get_datetime (ICalComponent *icalcomp,
static void
set_datetime (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalProperty *(* prop_new_func) (ICalTimetype *tt),
+ ICalProperty *(* prop_new_func) (ICalTime *tt),
void (* prop_set_func) (ICalProperty *prop,
- ICalTimetype *tt),
+ ICalTime *tt),
const ECalComponentDateTime *dt)
{
ICalProperty *prop;
ICalParameter *param;
- ICalTimetype *tt;
+ ICalTime *tt;
const gchar *tzid;
prop = i_cal_component_get_first_property (icalcomp, prop_kind);
@@ -1656,9 +1656,9 @@ set_datetime (ICalComponent *icalcomp,
/* If the TZID is set to "UTC", we set the is_utc flag. */
if (!g_strcmp0 (tzid, "UTC"))
- i_cal_timetype_set_zone (tt, i_cal_timezone_get_utc_timezone ());
- else if (i_cal_timetype_is_utc (tt))
- i_cal_timetype_set_zone (tt, NULL);
+ i_cal_time_set_timezone (tt, i_cal_timezone_get_utc_timezone ());
+ else if (i_cal_time_is_utc (tt))
+ i_cal_time_set_timezone (tt, NULL);
if (prop) {
/* make sure no VALUE property is left if not needed */
@@ -1694,8 +1694,8 @@ set_datetime (ICalComponent *icalcomp,
static ECalComponentDateTime *
e_cal_component_get_start_plus_duration (ECalComponent *comp)
{
- ICalDurationType *duration;
- ICalTimetype *tt;
+ ICalDuration *duration;
+ ICalTime *tt;
ECalComponentDateTime *dt;
guint dur_days, dur_hours, dur_minutes, dur_seconds;
@@ -1712,7 +1712,7 @@ e_cal_component_get_start_plus_duration (ECalComponent *comp)
/* The DURATION shouldn't be negative, but just return DTSTART if it
* is, i.e. assume it is 0. */
- if (i_cal_duration_type_is_neg (duration)) {
+ if (i_cal_duration_is_neg (duration)) {
g_object_unref (duration);
return dt;
}
@@ -1720,15 +1720,15 @@ e_cal_component_get_start_plus_duration (ECalComponent *comp)
/* If DTSTART is a DATE value, then we need to check if the DURATION
* includes any hours, minutes or seconds. If it does, we need to
* make the DTEND/DUE a DATE-TIME value. */
- dur_days = i_cal_duration_type_get_days (duration) + (7 * i_cal_duration_type_get_weeks (duration));
- dur_hours = i_cal_duration_type_get_hours (duration);
- dur_minutes = i_cal_duration_type_get_minutes (duration);
- dur_seconds = i_cal_duration_type_get_seconds (duration);
+ dur_days = i_cal_duration_get_days (duration) + (7 * i_cal_duration_get_weeks (duration));
+ dur_hours = i_cal_duration_get_hours (duration);
+ dur_minutes = i_cal_duration_get_minutes (duration);
+ dur_seconds = i_cal_duration_get_seconds (duration);
tt = e_cal_component_datetime_get_value (dt);
- if (i_cal_timetype_get_is_date (tt) && (
+ if (i_cal_time_is_date (tt) && (
dur_hours != 0 || dur_minutes != 0 || dur_seconds != 0)) {
- i_cal_timetype_set_is_date (tt, FALSE);
+ i_cal_time_set_is_date (tt, FALSE);
}
/* Add on the DURATION. */
@@ -1813,11 +1813,11 @@ e_cal_component_set_dtend (ECalComponent *comp,
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_get_dtstamp (ECalComponent *comp)
{
ICalProperty *prop;
- ICalTimetype *tt;
+ ICalTime *tt;
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL);
g_return_val_if_fail (comp->priv->icalcomp != NULL, NULL);
@@ -1847,12 +1847,12 @@ e_cal_component_get_dtstamp (ECalComponent *comp)
**/
void
e_cal_component_set_dtstamp (ECalComponent *comp,
- const ICalTimetype *tt)
+ const ICalTime *tt)
{
ICalProperty *prop;
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
- g_return_if_fail (I_CAL_IS_TIMETYPE (tt));
+ g_return_if_fail (I_CAL_IS_TIME (tt));
g_return_if_fail (comp->priv->icalcomp != NULL);
prop = i_cal_component_get_first_property (comp->priv->icalcomp, I_CAL_DTSTAMP_PROPERTY);
@@ -1860,7 +1860,7 @@ e_cal_component_set_dtstamp (ECalComponent *comp,
/* This MUST exist, since we ensured that it did */
g_return_if_fail (prop != NULL);
- i_cal_property_set_dtstamp (prop, (ICalTimetype *) tt);
+ i_cal_property_set_dtstamp (prop, (ICalTime *) tt);
g_clear_object (&prop);
}
@@ -1980,7 +1980,7 @@ e_cal_component_set_due (ECalComponent *comp,
static GSList * /* ECalComponentPeriod * */
get_period_list (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalDatetimeperiodType * (* get_prop_func) (ICalProperty *prop))
+ ICalDatetimeperiod * (* get_prop_func) (ICalProperty *prop))
{
GSList *props, *link, *periods = NULL;
@@ -1989,10 +1989,10 @@ get_period_list (ICalComponent *icalcomp,
for (link = props; link; link = g_slist_next (link)) {
ICalProperty *prop = link->data;
ICalParameter *param;
- ICalPeriodType *icalperiod;
- ICalDatetimeperiodType *pt;
- ICalDurationType *duration = NULL;
- ICalTimetype *start = NULL, *end = NULL;
+ ICalPeriod *icalperiod;
+ ICalDatetimeperiod *pt;
+ ICalDuration *duration = NULL;
+ ICalTime *start = NULL, *end = NULL;
ECalComponentPeriod *period;
ECalComponentPeriodKind period_kind;
@@ -2004,7 +2004,7 @@ get_period_list (ICalComponent *icalcomp,
if (!pt)
continue;
- icalperiod = i_cal_datetimeperiod_type_get_period (pt);
+ icalperiod = i_cal_datetimeperiod_get_period (pt);
/* Get value parameter */
param = i_cal_property_get_first_parameter (prop, I_CAL_VALUE_PARAMETER);
@@ -2018,11 +2018,11 @@ get_period_list (ICalComponent *icalcomp,
period_kind = E_CAL_COMPONENT_PERIOD_DATETIME;
} else if (value_type == I_CAL_VALUE_PERIOD) {
period_kind = E_CAL_COMPONENT_PERIOD_DURATION;
- duration = i_cal_period_type_get_duration (icalperiod);
+ duration = i_cal_period_get_duration (icalperiod);
if (!duration ||
- i_cal_duration_type_is_null_duration (duration) ||
- i_cal_duration_type_is_bad_duration (duration))
+ i_cal_duration_is_null_duration (duration) ||
+ i_cal_duration_is_bad_duration (duration))
period_kind = E_CAL_COMPONENT_PERIOD_DATETIME;
else
period_kind = E_CAL_COMPONENT_PERIOD_DURATION;
@@ -2036,17 +2036,17 @@ get_period_list (ICalComponent *icalcomp,
period_kind = E_CAL_COMPONENT_PERIOD_DATETIME;
}
- start = i_cal_period_type_get_start (icalperiod);
+ start = i_cal_period_get_start (icalperiod);
if (period_kind == E_CAL_COMPONENT_PERIOD_DATETIME) {
if (!start || i_cal_time_is_null_time (start)) {
g_clear_object (&start);
- start = i_cal_datetimeperiod_type_get_time (pt);
+ start = i_cal_datetimeperiod_get_time (pt);
} else {
- end = i_cal_period_type_get_end (icalperiod);
+ end = i_cal_period_get_end (icalperiod);
}
} else /* if (period_kind == E_CAL_COMPONENT_PERIOD_DURATION) */ {
- duration = i_cal_period_type_get_duration (icalperiod);
+ duration = i_cal_period_get_duration (icalperiod);
}
period = period_kind == E_CAL_COMPONENT_PERIOD_DATETIME ?
@@ -2076,7 +2076,7 @@ get_period_list (ICalComponent *icalcomp,
static void
set_period_list (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalProperty *(* new_prop_func) (ICalDatetimeperiodType *period),
+ ICalProperty *(* new_prop_func) (ICalDatetimeperiod *period),
const GSList *periods_list)
{
GSList *link;
@@ -2089,41 +2089,41 @@ set_period_list (ICalComponent *icalcomp,
for (link = (GSList *) periods_list; link; link = g_slist_next (link)) {
const ECalComponentPeriod *period = link->data;
- ICalDatetimeperiodType *ic_datetimeperiod;
- ICalPeriodType *ic_period;
+ ICalDatetimeperiod *ic_datetimeperiod;
+ ICalPeriod *ic_period;
ICalProperty *prop;
ICalParameter *param;
ICalParameterValue value_type = I_CAL_VALUE_PERIOD;
- ICalTimetype *end;
+ ICalTime *end;
if (!period)
continue;
- ic_period = i_cal_period_type_null_period ();
- ic_datetimeperiod = i_cal_datetimeperiod_type_new ();
+ ic_period = i_cal_period_null_period ();
+ ic_datetimeperiod = i_cal_datetimeperiod_new ();
- i_cal_period_type_set_start (ic_period, e_cal_component_period_get_start (period));
+ i_cal_period_set_start (ic_period, e_cal_component_period_get_start (period));
switch (e_cal_component_period_get_kind (period)) {
case E_CAL_COMPONENT_PERIOD_DATETIME:
end = e_cal_component_period_get_end (period);
if (!end || i_cal_time_is_null_time (end)) {
- i_cal_datetimeperiod_type_set_time (ic_datetimeperiod,
e_cal_component_period_get_start (period));
- if (i_cal_timetype_get_is_date (e_cal_component_period_get_start (period))) {
+ i_cal_datetimeperiod_set_time (ic_datetimeperiod,
e_cal_component_period_get_start (period));
+ if (i_cal_time_is_date (e_cal_component_period_get_start (period))) {
value_type = I_CAL_VALUE_DATE;
} else {
value_type = I_CAL_VALUE_DATETIME;
}
} else {
- i_cal_period_type_set_end (ic_period, e_cal_component_period_get_end
(period));
+ i_cal_period_set_end (ic_period, e_cal_component_period_get_end (period));
}
break;
case E_CAL_COMPONENT_PERIOD_DURATION:
- i_cal_period_type_set_duration (ic_period, e_cal_component_period_get_duration
(period));
+ i_cal_period_set_duration (ic_period, e_cal_component_period_get_duration (period));
break;
}
- i_cal_datetimeperiod_type_set_period (ic_datetimeperiod, ic_period);
+ i_cal_datetimeperiod_set_period (ic_datetimeperiod, ic_period);
prop = new_prop_func (ic_datetimeperiod);
@@ -2143,7 +2143,7 @@ extract_exdate_properties_cb (ICalComponent *icalcomp,
gpointer user_data)
{
GSList **pexdates = user_data;
- ICalTimetype *tt;
+ ICalTime *tt;
g_return_val_if_fail (pexdates != NULL, FALSE);
@@ -2224,7 +2224,7 @@ e_cal_component_set_exdates (ECalComponent *comp,
for (link = (GSList *) exdate_list; link; link = g_slist_next (link)) {
const ECalComponentDateTime *dt = link->data;
ICalProperty *prop;
- ICalTimetype *tt;
+ ICalTime *tt;
const gchar *tzid;
if (!dt)
@@ -2275,7 +2275,7 @@ e_cal_component_has_exdates (ECalComponent *comp)
static GSList *
get_recur_list (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalRecurrenceType * (* get_prop_func) (ICalProperty *prop))
+ ICalRecurrence * (* get_prop_func) (ICalProperty *prop))
{
GSList *props, *link, *recurs = NULL;
@@ -2283,7 +2283,7 @@ get_recur_list (ICalComponent *icalcomp,
for (link = props; link; link = g_slist_next (link)) {
ICalProperty *prop = link->data;
- ICalRecurrenceType *rt;
+ ICalRecurrence *rt;
rt = get_prop_func (prop);
if (rt)
@@ -2302,8 +2302,8 @@ get_recur_list (ICalComponent *icalcomp,
static void
set_recur_list (ICalComponent *icalcomp,
ICalPropertyKind prop_kind,
- ICalProperty * (* new_prop_func) (ICalRecurrenceType *recur),
- const GSList *rl) /* ICalRecurrenceType * */
+ ICalProperty * (* new_prop_func) (ICalRecurrence *recur),
+ const GSList *rl) /* ICalRecurrence * */
{
GSList *link;
@@ -2314,7 +2314,7 @@ set_recur_list (ICalComponent *icalcomp,
for (link = (GSList *) rl; link; link = g_slist_next (link)) {
ICalProperty *prop;
- ICalRecurrenceType *recur = link->data;
+ ICalRecurrence *recur = link->data;
if (recur) {
prop = (* new_prop_func) (recur);
@@ -2331,8 +2331,8 @@ set_recur_list (ICalComponent *icalcomp,
* object. Free the returned list with g_slist_free_full (slist, g_object_unref);,
* when no longer needed.
*
- * Returns: (transfer full) (nullable) (element-type ICalRecurrenceType): a #GSList
- * of exception rules as #ICalRecurrenceType structures, or %NULL, when none exist.
+ * Returns: (transfer full) (nullable) (element-type ICalRecurrence): a #GSList
+ * of exception rules as #ICalRecurrence structures, or %NULL, when none exist.
*
* Since: 3.36
**/
@@ -2370,8 +2370,8 @@ e_cal_component_get_exrule_properties (ECalComponent *comp)
/**
* e_cal_component_set_exrules:
* @comp: A calendar component object.
- * @recur_list: (nullable) (element-type ICalRecurrenceType): a #GSList
- * of #ICalRecurrenceType structures, or %NULL.
+ * @recur_list: (nullable) (element-type ICalRecurrence): a #GSList
+ * of #ICalRecurrence structures, or %NULL.
*
* Sets the list of exception rules in a calendar component object.
*
@@ -2434,16 +2434,16 @@ e_cal_component_has_exceptions (ECalComponent *comp)
* Free the returned non-NULL object with g_object_unref(), when
* no longer needed.
*
- * Returns: (transfer full) (nullable): the geographic position as #ICalGeoType,
+ * Returns: (transfer full) (nullable): the geographic position as #ICalGeo,
* or %NULL, when none set.
*
* Since: 3.36
**/
-ICalGeoType *
+ICalGeo *
e_cal_component_get_geo (ECalComponent *comp)
{
ICalProperty *prop;
- ICalGeoType *geo;
+ ICalGeo *geo;
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL);
g_return_val_if_fail (comp->priv->icalcomp != NULL, NULL);
@@ -2470,7 +2470,7 @@ e_cal_component_get_geo (ECalComponent *comp)
**/
void
e_cal_component_set_geo (ECalComponent *comp,
- const ICalGeoType *geo)
+ const ICalGeo *geo)
{
ICalProperty *prop;
@@ -2489,9 +2489,9 @@ e_cal_component_set_geo (ECalComponent *comp,
}
if (prop) {
- i_cal_property_set_geo (prop, (ICalGeoType *) geo);
+ i_cal_property_set_geo (prop, (ICalGeo *) geo);
} else {
- prop = i_cal_property_new_geo ((ICalGeoType *) geo);
+ prop = i_cal_property_new_geo ((ICalGeo *) geo);
i_cal_component_add_property (comp->priv->icalcomp, prop);
}
@@ -2506,11 +2506,11 @@ e_cal_component_set_geo (ECalComponent *comp,
* the calendar store. Free the returned non-NULL pointer with g_object_unref(),
* when no longer needed.
*
- * Returns: (transfer full): the last modified time, as an #ICalTimetype, or %NULL, when none is set
+ * Returns: (transfer full): the last modified time, as an #ICalTime, or %NULL, when none is set
*
* Since: 3.36
**/
-ICalTimetype *
+ICalTime *
e_cal_component_get_last_modified (ECalComponent *comp)
{
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), NULL);
@@ -2531,7 +2531,7 @@ e_cal_component_get_last_modified (ECalComponent *comp)
**/
void
e_cal_component_set_last_modified (ECalComponent *comp,
- const ICalTimetype *tt)
+ const ICalTime *tt)
{
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
g_return_if_fail (comp->priv->icalcomp != NULL);
@@ -2915,8 +2915,8 @@ e_cal_component_has_rdates (ECalComponent *comp)
* object. Free the returned list with g_slist_free_full (slist, g_object_unref);,
* when no longer needed.
*
- * Returns: (transfer full) (nullable) (element-type ICalRecurrenceType): a #GSList
- * of recurrence rules as #ICalRecurrenceType structures, or %NULL, when none exist.
+ * Returns: (transfer full) (nullable) (element-type ICalRecurrence): a #GSList
+ * of recurrence rules as #ICalRecurrence structures, or %NULL, when none exist.
*
* Since: 3.36
**/
@@ -2954,7 +2954,7 @@ e_cal_component_get_rrule_properties (ECalComponent *comp)
/**
* e_cal_component_set_rrules:
* @comp: A calendar component object.
- * @recur_list: (nullable) (element-type ICalRecurrenceType): List of #ICalRecurrenceType structures, or
%NULL.
+ * @recur_list: (nullable) (element-type ICalRecurrence): List of #ICalRecurrence structures, or %NULL.
*
* Sets the list of recurrence rules in a calendar component object.
*
@@ -3009,7 +3009,7 @@ e_cal_component_has_recurrences (ECalComponent *comp)
return e_cal_component_has_rdates (comp) || e_cal_component_has_rrules (comp);
}
-/* Counts the elements in the by_xxx fields of an ICalRecurrenceType;
+/* Counts the elements in the by_xxx fields of an ICalRecurrence;
it also frees the 'field' array*/
static gint
count_by_xxx_and_free (GArray *field) /* gshort */
@@ -3044,7 +3044,7 @@ gboolean
e_cal_component_has_simple_recurrence (ECalComponent *comp)
{
GSList *rrule_list;
- ICalRecurrenceType *rt;
+ ICalRecurrence *rt;
gint n_by_second, n_by_minute, n_by_hour;
gint n_by_day, n_by_month_day, n_by_year_day;
gint n_by_week_no, n_by_month, n_by_set_pos;
@@ -3065,30 +3065,30 @@ e_cal_component_has_simple_recurrence (ECalComponent *comp)
rt = rrule_list->data;
/* Any funky frequency? */
- if (i_cal_recurrence_type_get_freq (rt) == I_CAL_SECONDLY_RECURRENCE ||
- i_cal_recurrence_type_get_freq (rt) == I_CAL_MINUTELY_RECURRENCE ||
- i_cal_recurrence_type_get_freq (rt) == I_CAL_HOURLY_RECURRENCE)
+ if (i_cal_recurrence_get_freq (rt) == I_CAL_SECONDLY_RECURRENCE ||
+ i_cal_recurrence_get_freq (rt) == I_CAL_MINUTELY_RECURRENCE ||
+ i_cal_recurrence_get_freq (rt) == I_CAL_HOURLY_RECURRENCE)
goto cleanup;
/* Any funky BY_* */
#define N_HAS_BY(field) (count_by_xxx_and_free (field))
- n_by_second = N_HAS_BY (i_cal_recurrence_type_get_by_second_array (rt));
- n_by_minute = N_HAS_BY (i_cal_recurrence_type_get_by_minute_array (rt));
- n_by_hour = N_HAS_BY (i_cal_recurrence_type_get_by_hour_array (rt));
- n_by_day = N_HAS_BY (i_cal_recurrence_type_get_by_day_array (rt));
- n_by_month_day = N_HAS_BY (i_cal_recurrence_type_get_by_month_day_array (rt));
- n_by_year_day = N_HAS_BY (i_cal_recurrence_type_get_by_year_day_array (rt));
- n_by_week_no = N_HAS_BY (i_cal_recurrence_type_get_by_week_no_array (rt));
- n_by_month = N_HAS_BY (i_cal_recurrence_type_get_by_month_array (rt));
- n_by_set_pos = N_HAS_BY (i_cal_recurrence_type_get_by_set_pos_array (rt));
+ n_by_second = N_HAS_BY (i_cal_recurrence_get_by_second_array (rt));
+ n_by_minute = N_HAS_BY (i_cal_recurrence_get_by_minute_array (rt));
+ n_by_hour = N_HAS_BY (i_cal_recurrence_get_by_hour_array (rt));
+ n_by_day = N_HAS_BY (i_cal_recurrence_get_by_day_array (rt));
+ n_by_month_day = N_HAS_BY (i_cal_recurrence_get_by_month_day_array (rt));
+ n_by_year_day = N_HAS_BY (i_cal_recurrence_get_by_year_day_array (rt));
+ n_by_week_no = N_HAS_BY (i_cal_recurrence_get_by_week_no_array (rt));
+ n_by_month = N_HAS_BY (i_cal_recurrence_get_by_month_array (rt));
+ n_by_set_pos = N_HAS_BY (i_cal_recurrence_get_by_set_pos_array (rt));
if (n_by_second != 0
|| n_by_minute != 0
|| n_by_hour != 0)
goto cleanup;
- switch (i_cal_recurrence_type_get_freq (rt)) {
+ switch (i_cal_recurrence_get_freq (rt)) {
case I_CAL_DAILY_RECURRENCE:
if (n_by_day != 0
|| n_by_month_day != 0
@@ -3111,12 +3111,12 @@ e_cal_component_has_simple_recurrence (ECalComponent *comp)
for (i = 0; i < 8; i++) {
gint pos;
- gshort byday = i_cal_recurrence_type_get_by_day (rt, i);
+ gshort byday = i_cal_recurrence_get_by_day (rt, i);
if (byday == I_CAL_RECURRENCE_ARRAY_MAX)
break;
- pos = i_cal_recurrence_type_day_position (byday);
+ pos = i_cal_recurrence_day_position (byday);
if (pos != 0)
goto cleanup;
@@ -3138,25 +3138,25 @@ e_cal_component_has_simple_recurrence (ECalComponent *comp)
if (n_by_set_pos != 0)
goto cleanup;
- nth = i_cal_recurrence_type_get_by_month_day (rt, 0);
+ nth = i_cal_recurrence_get_by_month_day (rt, 0);
if (nth < 1 && nth != -1)
goto cleanup;
} else if (n_by_day == 1) {
- ICalRecurrenceTypeWeekday weekday;
+ ICalRecurrenceWeekday weekday;
gint pos;
/* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not
* accept BYDAY=2TU. So we now use the same as Outlook
* by default. */
- weekday = i_cal_recurrence_type_day_day_of_week (i_cal_recurrence_type_get_by_day
(rt, 0));
- pos = i_cal_recurrence_type_day_position (i_cal_recurrence_type_get_by_day (rt, 0));
+ weekday = i_cal_recurrence_day_day_of_week (i_cal_recurrence_get_by_day (rt, 0));
+ pos = i_cal_recurrence_day_position (i_cal_recurrence_get_by_day (rt, 0));
if (pos == 0) {
if (n_by_set_pos != 1)
goto cleanup;
- pos = i_cal_recurrence_type_get_by_set_pos (rt, 0);
+ pos = i_cal_recurrence_get_by_set_pos (rt, 0);
} else if (pos < 0) {
goto cleanup;
}
diff --git a/src/calendar/libecal/e-cal-component.h b/src/calendar/libecal/e-cal-component.h
index b06022ad1..2ef22ecea 100644
--- a/src/calendar/libecal/e-cal-component.h
+++ b/src/calendar/libecal/e-cal-component.h
@@ -132,17 +132,17 @@ GSList * e_cal_component_get_comments (ECalComponent *comp); /* ECalComponentTex
void e_cal_component_set_comments (ECalComponent *comp,
const GSList *text_list); /* ECalComponentText * */
-ICalTimetype * e_cal_component_get_completed (ECalComponent *comp);
+ICalTime * e_cal_component_get_completed (ECalComponent *comp);
void e_cal_component_set_completed (ECalComponent *comp,
- const ICalTimetype *tt);
+ const ICalTime *tt);
GSList * e_cal_component_get_contacts (ECalComponent *comp); /* ECalComponentText * */
void e_cal_component_set_contacts (ECalComponent *comp,
const GSList *text_list); /* ECalComponentText * */
-ICalTimetype * e_cal_component_get_created (ECalComponent *comp);
+ICalTime * e_cal_component_get_created (ECalComponent *comp);
void e_cal_component_set_created (ECalComponent *comp,
- const ICalTimetype *tt);
+ const ICalTime *tt);
GSList * e_cal_component_get_descriptions(ECalComponent *comp); /* ECalComponentText * */
void e_cal_component_set_descriptions(ECalComponent *comp,
@@ -153,9 +153,9 @@ ECalComponentDateTime *
void e_cal_component_set_dtend (ECalComponent *comp,
const ECalComponentDateTime *dt);
-ICalTimetype * e_cal_component_get_dtstamp (ECalComponent *comp);
+ICalTime * e_cal_component_get_dtstamp (ECalComponent *comp);
void e_cal_component_set_dtstamp (ECalComponent *comp,
- const ICalTimetype *tt);
+ const ICalTime *tt);
ECalComponentDateTime *
e_cal_component_get_dtstart (ECalComponent *comp);
@@ -172,24 +172,24 @@ void e_cal_component_set_exdates (ECalComponent *comp,
const GSList *exdate_list); /* ECalComponentDateTime * */
gboolean e_cal_component_has_exdates (ECalComponent *comp);
-GSList * e_cal_component_get_exrules (ECalComponent *comp); /* ICalRecurrenceType * */
+GSList * e_cal_component_get_exrules (ECalComponent *comp); /* ICalRecurrence * */
GSList * e_cal_component_get_exrule_properties /* ICalProperty * */
(ECalComponent *comp);
void e_cal_component_set_exrules (ECalComponent *comp,
- const GSList *recur_list); /* ICalRecurrenceType * */
+ const GSList *recur_list); /* ICalRecurrence * */
gboolean e_cal_component_has_exrules (ECalComponent *comp);
gboolean e_cal_component_has_exceptions (ECalComponent *comp);
-ICalGeoType * e_cal_component_get_geo (ECalComponent *comp);
+ICalGeo * e_cal_component_get_geo (ECalComponent *comp);
void e_cal_component_set_geo (ECalComponent *comp,
- const ICalGeoType *geo);
+ const ICalGeo *geo);
-ICalTimetype * e_cal_component_get_last_modified
+ICalTime * e_cal_component_get_last_modified
(ECalComponent *comp);
void e_cal_component_set_last_modified
(ECalComponent *comp,
- const ICalTimetype *tt);
+ const ICalTime *tt);
ECalComponentOrganizer *
e_cal_component_get_organizer (ECalComponent *comp);
@@ -219,11 +219,11 @@ void e_cal_component_set_rdates (ECalComponent *comp,
const GSList *rdate_list); /* ECalComponentPeriod * */
gboolean e_cal_component_has_rdates (ECalComponent *comp);
-GSList * e_cal_component_get_rrules (ECalComponent *comp); /* ICalRecurrenceType * */
+GSList * e_cal_component_get_rrules (ECalComponent *comp); /* ICalRecurrence * */
GSList * e_cal_component_get_rrule_properties /* ICalProperty * */
(ECalComponent *comp);
void e_cal_component_set_rrules (ECalComponent *comp,
- const GSList *recur_list); /* ICalRecurrenceType * */
+ const GSList *recur_list); /* ICalRecurrence * */
gboolean e_cal_component_has_rrules (ECalComponent *comp);
gboolean e_cal_component_has_recurrences (ECalComponent *comp);
diff --git a/src/calendar/libecal/e-cal-recur.c b/src/calendar/libecal/e-cal-recur.c
index f544375ec..50acc2b75 100644
--- a/src/calendar/libecal/e-cal-recur.c
+++ b/src/calendar/libecal/e-cal-recur.c
@@ -345,8 +345,8 @@ intersects_interval (const struct icaltimetype *tt,
**/
gboolean
e_cal_recur_generate_instances_sync (ICalComponent *icalcomp,
- ICalTimetype *interval_start,
- ICalTimetype *interval_end,
+ ICalTime *interval_start,
+ ICalTime *interval_end,
ECalRecurInstanceCb callback,
gpointer callback_user_data,
ECalRecurResolveTimezoneCb get_tz_callback,
@@ -659,7 +659,7 @@ e_cal_recur_generate_instances_sync (ICalComponent *icalcomp,
for (ii = 0; ii < times_array->len; ii++) {
EInstanceTime *it = g_ptr_array_index (times_array, ii);
struct icaltimetype ttend;
- ICalTimetype *gttstart, *gttend;
+ ICalTime *gttstart, *gttend;
gint dur_days = duration_days, dur_seconds = duration_seconds;
if (!it)
@@ -682,8 +682,8 @@ e_cal_recur_generate_instances_sync (ICalComponent *icalcomp,
break;
}
- gttstart = i_cal_object_construct (I_CAL_TYPE_TIMETYPE, &(it->tt), NULL, FALSE, NULL);
- gttend = i_cal_object_construct (I_CAL_TYPE_TIMETYPE, &ttend, NULL, FALSE, NULL);
+ gttstart = i_cal_object_construct (I_CAL_TYPE_TIME, &(it->tt), NULL, FALSE, NULL);
+ gttend = i_cal_object_construct (I_CAL_TYPE_TIME, &ttend, NULL, FALSE, NULL);
success = callback (icalcomp, gttstart, gttend, callback_user_data, cancellable,
error);
@@ -1158,8 +1158,8 @@ static gboolean e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
GCancellable *cancellable,
GError **error);
static gboolean e_cal_recur_ensure_rule_end_date_cb (ICalComponent *comp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error);
@@ -1277,7 +1277,7 @@ call_instance_callback (ECalRecurInstanceCb cb,
time_t dtend_time,
gpointer cb_data)
{
- ICalTimetype *start, *end;
+ ICalTime *start, *end;
ICalTimezone *utc_zone;
gboolean res;
@@ -1592,7 +1592,7 @@ array_to_list (gshort *array,
* Since: 2.32
*/
time_t
-e_cal_recur_obtain_enddate (ICalRecurrenceType *ir,
+e_cal_recur_obtain_enddate (ICalRecurrence *ir,
ICalProperty *prop,
ICalTimezone *zone,
gboolean convert_end_date)
@@ -1602,28 +1602,26 @@ e_cal_recur_obtain_enddate (ICalRecurrenceType *ir,
g_return_val_if_fail (prop != NULL, 0);
g_return_val_if_fail (ir != NULL, 0);
- if (i_cal_recurrence_type_get_count (ir) != 0) {
+ if (i_cal_recurrence_get_count (ir) != 0) {
/* If COUNT is set, we use the pre-calculated enddate.
Note that this can be 0 if the RULE doesn't actually
generate COUNT instances. */
enddate = e_cal_recur_get_rule_end_date (prop, convert_end_date ? zone : NULL);
} else {
- ICalTimetype *until;
+ ICalTime *until;
- until = i_cal_recurrence_type_get_until (ir);
+ until = i_cal_recurrence_get_until (ir);
if (!until || i_cal_time_is_null_time (until)) {
/* If neither COUNT or UNTIL is set, the event
recurs forever. */
- } else if (i_cal_timetype_get_is_date (until)) {
+ } else if (i_cal_time_is_date (until)) {
/* If UNTIL is a DATE, we stop at the end of
the day, in local time (with the DTSTART timezone).
Note that UNTIL is inclusive so we stop before
midnight. */
- i_cal_timetype_set_hour (until, 23);
- i_cal_timetype_set_minute (until, 59);
- i_cal_timetype_set_second (until, 59);
- i_cal_timetype_set_is_date (until, FALSE);
+ i_cal_time_set_time (until, 23, 59, 59);
+ i_cal_time_set_is_date (until, FALSE);
enddate = i_cal_time_as_timet_with_zone (until, zone);
} else {
@@ -1659,7 +1657,7 @@ e_cal_recur_from_icalproperty (ICalProperty *gprop,
gboolean convert_end_date)
{
struct icalrecurrencetype ir;
- ICalRecurrenceType *gir;
+ ICalRecurrence *gir;
ICalTimezone *gzone;
icalproperty *prop;
ECalRecurrence *r;
@@ -1912,7 +1910,7 @@ generate_instances_for_chunk (ECalComponent *comp,
for (elem = rdates; elem; elem = elem->next) {
ECalComponentPeriod *period = elem->data;
CalObjRecurrenceDate rdate;
- ICalTimetype *gtt;
+ ICalTime *gtt;
struct icaltimetype tt, *pstart;
gtt = e_cal_component_period_get_start (period);
@@ -1945,7 +1943,7 @@ generate_instances_for_chunk (ECalComponent *comp,
* FIXME. */
if (e_cal_component_period_get_kind (period) != E_CAL_COMPONENT_PERIOD_DATETIME ||
!e_cal_component_period_get_end (period) ||
- i_cal_timetype_get_second (e_cal_component_period_get_end (period)) != -1) {
+ i_cal_time_get_second (e_cal_component_period_get_end (period)) != -1) {
cotime.flags = TRUE;
rdate.start = cotime;
@@ -2163,7 +2161,7 @@ cal_object_get_rdate_end (CalObjTime *occ,
period = rdate->period;
if (e_cal_component_period_get_kind (period) == E_CAL_COMPONENT_PERIOD_DATETIME) {
- ICalTimetype *end;
+ ICalTime *end;
struct icaltimetype *endtt, tt;
end = e_cal_component_period_get_end (period);
@@ -2180,17 +2178,17 @@ cal_object_get_rdate_end (CalObjTime *occ,
occ->flags = FALSE;
}
} else {
- ICalDurationType *duration;
+ ICalDuration *duration;
duration = e_cal_component_period_get_duration (period);
cal_obj_time_add_days (
occ,
- i_cal_duration_type_get_weeks (duration) * 7 +
- i_cal_duration_type_get_days (duration));
- cal_obj_time_add_hours (occ, i_cal_duration_type_get_hours (duration));
- cal_obj_time_add_minutes (occ, i_cal_duration_type_get_minutes (duration));
- cal_obj_time_add_seconds (occ, i_cal_duration_type_get_seconds (duration));
+ i_cal_duration_get_weeks (duration) * 7 +
+ i_cal_duration_get_days (duration));
+ cal_obj_time_add_hours (occ, i_cal_duration_get_hours (duration));
+ cal_obj_time_add_minutes (occ, i_cal_duration_get_minutes (duration));
+ cal_obj_time_add_seconds (occ, i_cal_duration_get_seconds (duration));
}
return TRUE;
@@ -4608,7 +4606,7 @@ e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
GCancellable *cancellable,
GError **error)
{
- ICalRecurrenceType *rule;
+ ICalRecurrence *rule;
ECalRecurEnsureEndDateData cb_data;
if (!prop)
@@ -4620,7 +4618,7 @@ e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
rule = i_cal_property_get_rrule (prop);
/* If the rule doesn't use COUNT just return. */
- if (!rule || !i_cal_recurrence_type_get_count (rule)) {
+ if (!rule || !i_cal_recurrence_get_count (rule)) {
g_clear_object (&rule);
return FALSE;
}
@@ -4642,7 +4640,7 @@ e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
* Also note that we use the UTC timezone as the default timezone.
* In get_end_date () if the DTSTART is a DATE or floating time, we will
* convert the ENDDATE to the current timezone. */
- cb_data.count = i_cal_recurrence_type_get_count (rule);
+ cb_data.count = i_cal_recurrence_get_count (rule);
cb_data.instances = 0;
cb_data.end_date = 0;
e_cal_recur_generate_instances_of_rule (
@@ -4661,8 +4659,8 @@ e_cal_recur_ensure_rule_end_date (ECalComponent *comp,
static gboolean
e_cal_recur_ensure_rule_end_date_cb (ICalComponent *comp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -4727,7 +4725,7 @@ e_cal_recur_set_rule_end_date (ICalProperty *prop,
ICalParameter *param;
ICalValue *value;
ICalTimezone *utc_zone;
- ICalTimetype *icaltime;
+ ICalTime *icaltime;
const gchar *xname;
gchar *end_date_string;
@@ -5654,7 +5652,7 @@ e_cal_recur_describe_recurrence (ICalComponent *icalcomp,
rrule.count), rrule.count);
} else if (rrule.until.year) {
struct tm tm;
- ICalTimetype *tt;
+ ICalTime *tt;
gchar dt_str[256];
dt_str[0] = 0;
@@ -5677,8 +5675,8 @@ e_cal_recur_describe_recurrence (ICalComponent *icalcomp,
rrule.until.is_date = TRUE;
}
- tt = i_cal_object_construct (I_CAL_TYPE_TIMETYPE, &rrule.until, NULL, FALSE, NULL);
- tm = icaltimetype_to_tm (tt);
+ tt = i_cal_object_construct (I_CAL_TYPE_TIME, &rrule.until, NULL, FALSE, NULL);
+ tm = e_cal_util_i_cal_time_to_tm (tt);
g_clear_object (&tt);
e_time_format_date_and_time (&tm, FALSE, FALSE, FALSE, dt_str, 255);
diff --git a/src/calendar/libecal/e-cal-recur.h b/src/calendar/libecal/e-cal-recur.h
index 286aeb0c8..969872ff1 100644
--- a/src/calendar/libecal/e-cal-recur.h
+++ b/src/calendar/libecal/e-cal-recur.h
@@ -82,15 +82,15 @@ typedef ICalTimezone * (* ECalRecurResolveTimezoneCb) (const gchar *tzid,
* Since: 3.36
**/
typedef gboolean (* ECalRecurInstanceCb) (ICalComponent *comp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error);
gboolean e_cal_recur_generate_instances_sync (ICalComponent *icalcomp,
- ICalTimetype *interval_start,
- ICalTimetype *interval_end,
+ ICalTime *interval_start,
+ ICalTime *interval_end,
ECalRecurInstanceCb callback,
gpointer callback_user_data,
ECalRecurResolveTimezoneCb get_tz_callback,
@@ -99,7 +99,7 @@ gboolean e_cal_recur_generate_instances_sync (ICalComponent *icalcomp,
GCancellable *cancellable,
GError **error);
-time_t e_cal_recur_obtain_enddate (ICalRecurrenceType *ir,
+time_t e_cal_recur_obtain_enddate (ICalRecurrence *ir,
ICalProperty *prop,
ICalTimezone *zone,
gboolean convert_end_date);
diff --git a/src/calendar/libecal/e-cal-time-util.c b/src/calendar/libecal/e-cal-time-util.c
index 7aae2d1a5..c71c304f5 100644
--- a/src/calendar/libecal/e-cal-time-util.c
+++ b/src/calendar/libecal/e-cal-time-util.c
@@ -49,7 +49,7 @@ static const gint days_in_month[12] = {
*
* NOTE: these use the Unix timezone functions like mktime() and localtime()
* and so should not be used in Evolution. New Evolution code should use
- * ICalTimetype values rather than time_t values wherever possible.
+ * ICalTime values rather than time_t values wherever possible.
**************************************************************************/
/**
@@ -141,7 +141,7 @@ time_day_end (time_t t)
* time_t manipulation functions, using timezones in libical.
*
* NOTE: these are only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values rather than
+ * functions easier. New code should use ICalTime values rather than
* time_t values wherever possible.
**************************************************************************/
@@ -154,7 +154,7 @@ time_day_end (time_t t)
* Adds or subtracts a number of days to/from the given time_t value, using
* the given timezone.
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: a time_t value containing @time plus the days added.
@@ -164,7 +164,7 @@ time_add_day_with_zone (time_t time,
gint days,
const ICalTimezone *zone)
{
- ICalTimetype *tt;
+ ICalTime *tt;
time_t res;
/* Convert to an icaltimetype. */
@@ -190,7 +190,7 @@ time_add_day_with_zone (time_t time,
* Adds or subtracts a number of weeks to/from the given time_t value, using
* the given timezone.
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: a time_t value containing @time plus the weeks added.
@@ -217,7 +217,7 @@ time_add_week_with_zone (time_t time,
* down to the last day in the month, e.g. 28th Feb (or 29th in a leap year.)
*
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: a time_t value containing @time plus the months added.
@@ -227,7 +227,7 @@ time_add_month_with_zone (time_t time,
gint months,
const ICalTimezone *zone)
{
- ICalTimetype *tt, *normtt;
+ ICalTime *tt;
gint day, days_in_month;
time_t res;
@@ -235,24 +235,22 @@ time_add_month_with_zone (time_t time,
tt = i_cal_time_from_timet_with_zone (time, FALSE, (ICalTimezone *) zone);
/* Add on the number of months. */
- i_cal_timetype_set_month (tt, i_cal_timetype_get_month (tt) + months);
+ i_cal_time_set_month (tt, i_cal_time_get_month (tt) + months);
/* Save the day, and set it to 1, so we don't overflow into the next
* month. */
- day = i_cal_timetype_get_day (tt);
- i_cal_timetype_set_day (tt, 1);
+ day = i_cal_time_get_day (tt);
+ i_cal_time_set_day (tt, 1);
/* Normalize it, fixing any month overflow. */
- normtt = i_cal_time_normalize (tt);
- g_object_unref (tt);
- tt = normtt;
+ i_cal_time_normalize_inplace (tt);
/* If we go past the end of a month, set it to the last day. */
- days_in_month = time_days_in_month (i_cal_timetype_get_year (tt), i_cal_timetype_get_month (tt) - 1);
+ days_in_month = time_days_in_month (i_cal_time_get_year (tt), i_cal_time_get_month (tt) - 1);
if (day > days_in_month)
day = days_in_month;
- i_cal_timetype_set_day (tt, day);
+ i_cal_time_set_day (tt, day);
/* Convert back to a time_t. */
res = i_cal_time_as_timet_with_zone (tt, (ICalTimezone *) zone);
@@ -270,7 +268,7 @@ time_add_month_with_zone (time_t time,
* Returns the start of the year containing the given time_t, using the given
* timezone.
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: the beginning of the year.
@@ -279,18 +277,18 @@ time_t
time_year_begin_with_zone (time_t time,
const ICalTimezone *zone)
{
- ICalTimetype *tt;
+ ICalTime *tt;
time_t res;
/* Convert to an icaltimetype. */
tt = i_cal_time_from_timet_with_zone (time, FALSE, (ICalTimezone *) zone);
/* Set it to the start of the year. */
- i_cal_timetype_set_month (tt, 1);
- i_cal_timetype_set_day (tt, 1);
- i_cal_timetype_set_hour (tt, 0);
- i_cal_timetype_set_minute (tt, 0);
- i_cal_timetype_set_second (tt, 0);
+ i_cal_time_set_month (tt, 1);
+ i_cal_time_set_day (tt, 1);
+ i_cal_time_set_hour (tt, 0);
+ i_cal_time_set_minute (tt, 0);
+ i_cal_time_set_second (tt, 0);
/* Convert back to a time_t. */
res = i_cal_time_as_timet_with_zone (tt, (ICalTimezone *) zone);
@@ -308,7 +306,7 @@ time_year_begin_with_zone (time_t time,
* Returns the start of the month containing the given time_t, using the given
* timezone.
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: the beginning of the month.
@@ -317,17 +315,17 @@ time_t
time_month_begin_with_zone (time_t time,
const ICalTimezone *zone)
{
- ICalTimetype *tt;
+ ICalTime *tt;
time_t res;
/* Convert to an icaltimetype. */
tt = i_cal_time_from_timet_with_zone (time, FALSE, (ICalTimezone *) zone);
/* Set it to the start of the month. */
- i_cal_timetype_set_day (tt, 1);
- i_cal_timetype_set_hour (tt, 0);
- i_cal_timetype_set_minute (tt, 0);
- i_cal_timetype_set_second (tt, 0);
+ i_cal_time_set_day (tt, 1);
+ i_cal_time_set_hour (tt, 0);
+ i_cal_time_set_minute (tt, 0);
+ i_cal_time_set_second (tt, 0);
/* Convert back to a time_t. */
res = i_cal_time_as_timet_with_zone (tt, (ICalTimezone *) zone);
@@ -347,7 +345,7 @@ time_month_begin_with_zone (time_t time,
* timezone. week_start_day should use the same values as mktime(),
* i.e. 0 (Sun) to 6 (Sat).
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: the beginning of the week.
@@ -357,7 +355,7 @@ time_week_begin_with_zone (time_t time,
gint week_start_day,
const ICalTimezone *zone)
{
- ICalTimetype *tt, *normtt;
+ ICalTime *tt;
gint weekday, offset;
time_t res;
@@ -365,22 +363,19 @@ time_week_begin_with_zone (time_t time,
tt = i_cal_time_from_timet_with_zone (time, FALSE, (ICalTimezone *) zone);
/* Get the weekday. */
- weekday = time_day_of_week (i_cal_timetype_get_day (tt), i_cal_timetype_get_month (tt) - 1,
i_cal_timetype_get_year (tt));
+ weekday = time_day_of_week (i_cal_time_get_day (tt), i_cal_time_get_month (tt) - 1,
i_cal_time_get_year (tt));
/* Calculate the current offset from the week start day. */
offset = (weekday + 7 - week_start_day) % 7;
/* Set it to the start of the month. */
- i_cal_timetype_set_day (tt, i_cal_timetype_get_day (tt) - offset);
- i_cal_timetype_set_hour (tt, 0);
- i_cal_timetype_set_minute (tt, 0);
- i_cal_timetype_set_second (tt, 0);
+ i_cal_time_set_day (tt, i_cal_time_get_day (tt) - offset);
+ i_cal_time_set_hour (tt, 0);
+ i_cal_time_set_minute (tt, 0);
+ i_cal_time_set_second (tt, 0);
/* Normalize it, to fix any overflow. */
- normtt = i_cal_time_normalize (tt);
-
- g_object_unref (tt);
- tt = normtt;
+ i_cal_time_normalize_inplace (tt);
/* Convert back to a time_t. */
res = i_cal_time_as_timet_with_zone (tt, (ICalTimezone *) zone);
@@ -398,7 +393,7 @@ time_week_begin_with_zone (time_t time,
* Returns the start of the day containing the given time_t, using the given
* timezone.
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: the beginning of the day.
@@ -407,16 +402,16 @@ time_t
time_day_begin_with_zone (time_t time,
const ICalTimezone *zone)
{
- ICalTimetype *tt;
+ ICalTime *tt;
time_t new_time;
/* Convert to an icaltimetype. */
tt = i_cal_time_from_timet_with_zone (time, FALSE, (ICalTimezone *) zone);
/* Set it to the start of the day. */
- i_cal_timetype_set_hour (tt, 0);
- i_cal_timetype_set_minute (tt, 0);
- i_cal_timetype_set_second (tt, 0);
+ i_cal_time_set_hour (tt, 0);
+ i_cal_time_set_minute (tt, 0);
+ i_cal_time_set_second (tt, 0);
/* Convert back to a time_t and make sure the time is in the past. */
while (new_time = i_cal_time_as_timet_with_zone (tt, (ICalTimezone *) zone), new_time > time) {
@@ -436,7 +431,7 @@ time_day_begin_with_zone (time_t time,
* Returns the end of the day containing the given time_t, using the given
* timezone. (The end of the day is the start of the next day.)
* NOTE: this function is only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values and
+ * functions easier. New code should use ICalTime values and
* i_cal_time_adjust() to add or subtract days, hours, minutes & seconds.
*
* Returns: the end of the day.
@@ -445,16 +440,16 @@ time_t
time_day_end_with_zone (time_t time,
const ICalTimezone *zone)
{
- ICalTimetype *tt;
+ ICalTime *tt;
time_t new_time;
/* Convert to an icaltimetype. */
tt = i_cal_time_from_timet_with_zone (time, FALSE, (ICalTimezone *) zone);
/* Set it to the start of the next day. */
- i_cal_timetype_set_hour (tt, 0);
- i_cal_timetype_set_minute (tt, 0);
- i_cal_timetype_set_second (tt, 0);
+ i_cal_time_set_hour (tt, 0);
+ i_cal_time_set_minute (tt, 0);
+ i_cal_time_set_second (tt, 0);
i_cal_time_adjust (tt, 1, 0, 0, 0);
@@ -483,7 +478,7 @@ time_to_gdate_with_zone (GDate *date,
time_t time,
const ICalTimezone *zone)
{
- ICalTimetype *tt;
+ ICalTime *tt;
g_return_if_fail (date != NULL);
g_return_if_fail (time != -1);
@@ -492,7 +487,7 @@ time_to_gdate_with_zone (GDate *date,
time, FALSE,
zone ? (ICalTimezone *) zone : i_cal_timezone_get_utc_timezone ());
- g_date_set_dmy (date, i_cal_timetype_get_day (tt), i_cal_timetype_get_month (tt),
i_cal_timetype_get_year (tt));
+ g_date_set_dmy (date, i_cal_time_get_day (tt), i_cal_time_get_month (tt), i_cal_time_get_year (tt));
g_object_unref (tt);
}
@@ -665,7 +660,7 @@ isodate_from_time_t (time_t t)
time_t
time_from_isodate (const gchar *str)
{
- ICalTimetype *tt;
+ ICalTime *tt;
ICalTimezone *utc_zone;
gint len, i;
time_t res;
@@ -689,23 +684,23 @@ time_from_isodate (const gchar *str)
tt = i_cal_time_null_time ();
- i_cal_timetype_set_year (tt, digit_at (str, 0) * 1000 +
+ i_cal_time_set_year (tt, digit_at (str, 0) * 1000 +
digit_at (str, 1) * 100 +
digit_at (str, 2) * 10 +
digit_at (str, 3));
- i_cal_timetype_set_month (tt, digit_at (str, 4) * 10 +
+ i_cal_time_set_month (tt, digit_at (str, 4) * 10 +
digit_at (str, 5));
- i_cal_timetype_set_day (tt, digit_at (str, 6) * 10 +
+ i_cal_time_set_day (tt, digit_at (str, 6) * 10 +
digit_at (str, 7));
if (len > 8) {
- i_cal_timetype_set_hour (tt, digit_at (str, 9) * 10 +
+ i_cal_time_set_hour (tt, digit_at (str, 9) * 10 +
digit_at (str, 10));
- i_cal_timetype_set_minute (tt, digit_at (str, 11) * 10 +
+ i_cal_time_set_minute (tt, digit_at (str, 11) * 10 +
digit_at (str, 12));
- i_cal_timetype_set_second (tt, digit_at (str, 13) * 10 +
+ i_cal_time_set_second (tt, digit_at (str, 13) * 10 +
digit_at (str, 14));
}
@@ -719,10 +714,10 @@ time_from_isodate (const gchar *str)
}
/**
- * icaltimetype_to_tm:
- * @itt: An #ICalTimetype
+ * e_cal_util_i_cal_time_to_tm:
+ * @itt: An #ICalTime
*
- * Converts an #ICalTimetype into a GLibc's struct tm.
+ * Converts an #ICalTime into a GLibc's struct tm.
*
* Returns: The converted time as a struct tm. All fields will be
* set properly except for tm.tm_yday.
@@ -730,32 +725,32 @@ time_from_isodate (const gchar *str)
* Since: 2.22
*/
struct tm
-icaltimetype_to_tm (const ICalTimetype *itt)
+e_cal_util_i_cal_time_to_tm (const ICalTime *itt)
{
struct tm tm;
- ICalTimetype *tt = (ICalTimetype *) itt;
+ ICalTime *tt = (ICalTime *) itt;
memset (&tm, 0, sizeof (struct tm));
g_return_val_if_fail (itt != NULL, tm);
- if (!i_cal_timetype_get_is_date (tt)) {
- tm.tm_sec = i_cal_timetype_get_second (tt);
- tm.tm_min = i_cal_timetype_get_minute (tt);
- tm.tm_hour = i_cal_timetype_get_hour (tt);
+ if (!i_cal_time_is_date (tt)) {
+ tm.tm_sec = i_cal_time_get_second (tt);
+ tm.tm_min = i_cal_time_get_minute (tt);
+ tm.tm_hour = i_cal_time_get_hour (tt);
}
- tm.tm_mday = i_cal_timetype_get_day (tt);
- tm.tm_mon = i_cal_timetype_get_month (tt) - 1;
- tm.tm_year = i_cal_timetype_get_year (tt) - 1900;
- tm.tm_wday = time_day_of_week (i_cal_timetype_get_day (tt), i_cal_timetype_get_month (tt) - 1,
i_cal_timetype_get_year (tt));
+ tm.tm_mday = i_cal_time_get_day (tt);
+ tm.tm_mon = i_cal_time_get_month (tt) - 1;
+ tm.tm_year = i_cal_time_get_year (tt) - 1900;
+ tm.tm_wday = time_day_of_week (i_cal_time_get_day (tt), i_cal_time_get_month (tt) - 1,
i_cal_time_get_year (tt));
tm.tm_isdst = -1;
return tm;
}
/**
- * icaltimetype_to_tm_with_zone:
+ * e_cal_util_i_cal_time_to_tm_with_zone:
* @itt: A time value.
* @from_zone: Source timezone.
* @to_zone: Destination timezone.
@@ -769,54 +764,54 @@ icaltimetype_to_tm (const ICalTimetype *itt)
* Since: 2.22
**/
struct tm
-icaltimetype_to_tm_with_zone (const ICalTimetype *itt,
- const ICalTimezone *from_zone,
- const ICalTimezone *to_zone)
+e_cal_util_i_cal_time_to_tm_with_zone (const ICalTime *itt,
+ const ICalTimezone *from_zone,
+ const ICalTimezone *to_zone)
{
struct tm tm;
- ICalTimetype *itt_copy;
+ ICalTime *itt_copy;
memset (&tm, 0, sizeof (tm));
tm.tm_isdst = -1;
g_return_val_if_fail (itt != NULL, tm);
- itt_copy = i_cal_timetype_new_clone (itt);
+ itt_copy = i_cal_time_new_clone (itt);
i_cal_timezone_convert_time (itt_copy, (ICalTimezone *) from_zone, (ICalTimezone *) to_zone);
- tm = icaltimetype_to_tm (itt_copy);
+ tm = e_cal_util_i_cal_time_to_tm (itt_copy);
g_object_unref (itt_copy);
return tm;
}
/**
- * tm_to_icaltimetype:
+ * e_cal_util_tm_to_i_cal_time:
* @tm: A struct tm.
* @is_date: Whether the given time is a date only or not.
*
- * Converts a struct tm into an #ICalTimetype. Free the returned object
+ * Converts a struct tm into an #ICalTime. Free the returned object
* with g_object_unref(), when no longe needed.
*
- * Returns: (transfer full): The converted time as an #ICalTimetype.
+ * Returns: (transfer full): The converted time as an #ICalTime.
*
* Since: 2.22
*/
-ICalTimetype *
-tm_to_icaltimetype (struct tm *tm,
- gboolean is_date)
+ICalTime *
+e_cal_util_tm_to_i_cal_time (struct tm *tm,
+ gboolean is_date)
{
- ICalTimetype *itt;
+ ICalTime *itt;
g_return_val_if_fail (tm != NULL, NULL);
itt = i_cal_time_null_time ();
if (!is_date)
- i_cal_timetype_set_time (itt, tm->tm_hour, tm->tm_min, tm->tm_sec);
+ i_cal_time_set_time (itt, tm->tm_hour, tm->tm_min, tm->tm_sec);
- i_cal_timetype_set_date (itt, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
- i_cal_timetype_set_is_date (itt, is_date);
+ i_cal_time_set_date (itt, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
+ i_cal_time_set_is_date (itt, is_date);
return itt;
}
diff --git a/src/calendar/libecal/e-cal-time-util.h b/src/calendar/libecal/e-cal-time-util.h
index 37f93180d..cd75cd2ac 100644
--- a/src/calendar/libecal/e-cal-time-util.h
+++ b/src/calendar/libecal/e-cal-time-util.h
@@ -73,7 +73,7 @@ time_t time_from_isodate (const gchar *str);
*
* NOTE: these use the Unix timezone functions like mktime() and localtime()
* and so should not be used in Evolution. New Evolution code should use
- * ICalTimetype values rather than time_t values wherever possible.
+ * ICalTime values rather than time_t values wherever possible.
**************************************************************************/
/* Add or subtract a number of days, weeks or months. */
@@ -90,7 +90,7 @@ time_t time_day_end (time_t t);
* time_t manipulation functions, using timezones in libical.
*
* NOTE: these are only here to make the transition to the timezone
- * functions easier. New code should use ICalTimetype values rather than
+ * functions easier. New code should use ICalTime values rather than
* time_t values wherever possible.
**************************************************************************/
@@ -150,12 +150,14 @@ void time_to_gdate_with_zone (GDate *date,
* struct tm manipulation
**************************************************************************/
-struct tm icaltimetype_to_tm (const ICalTimetype *itt);
-struct tm icaltimetype_to_tm_with_zone
- (const ICalTimetype *itt,
+struct tm e_cal_util_i_cal_time_to_tm
+ (const ICalTime *itt);
+struct tm e_cal_util_i_cal_time_to_tm_with_zone
+ (const ICalTime *itt,
const ICalTimezone *from_zone,
const ICalTimezone *to_zone);
-ICalTimetype * tm_to_icaltimetype (struct tm *tm,
+ICalTime * e_cal_util_tm_to_i_cal_time
+ (struct tm *tm,
gboolean is_date);
G_END_DECLS
diff --git a/src/calendar/libecal/e-cal-util.c b/src/calendar/libecal/e-cal-util.c
index 5a95f37f2..1e00a50c0 100644
--- a/src/calendar/libecal/e-cal-util.c
+++ b/src/calendar/libecal/e-cal-util.c
@@ -82,7 +82,7 @@ ICalComponent *
e_cal_util_new_component (ICalComponentKind kind)
{
ICalComponent *icalcomp;
- ICalTimetype *dtstamp;
+ ICalTime *dtstamp;
gchar *uid;
icalcomp = i_cal_component_new (kind);
@@ -318,7 +318,7 @@ compute_alarm_range (ECalComponent *comp,
const gchar *auid;
ECalComponentAlarm *alarm;
ECalComponentAlarmTrigger *trigger;
- ICalDurationType *dur;
+ ICalDuration *dur;
time_t dur_time;
ECalComponentAlarmRepeat *repeat;
@@ -342,7 +342,7 @@ compute_alarm_range (ECalComponent *comp,
case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START:
case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END:
dur = e_cal_component_alarm_trigger_get_duration (trigger);
- dur_time = i_cal_duration_type_as_int (dur);
+ dur_time = i_cal_duration_as_int (dur);
if (repeat && e_cal_component_alarm_repeat_get_repetitions (repeat) != 0) {
gint rdur;
@@ -352,7 +352,7 @@ compute_alarm_range (ECalComponent *comp,
repeat_time = MAX (repeat_time, rdur);
}
- if (i_cal_duration_type_is_neg (dur))
+ if (i_cal_duration_is_neg (dur))
/* If the duration is negative then dur_time
* will be negative as well; that is why we
* subtract to expand the range.
@@ -406,8 +406,8 @@ add_trigger (struct alarm_occurrence_data *aod,
*/
static gboolean
add_alarm_occurrences_cb (ICalComponent *icalcomp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -426,7 +426,7 @@ add_alarm_occurrences_cb (ICalComponent *icalcomp,
ECalComponentAlarmAction action;
ECalComponentAlarmTrigger *trigger;
ECalComponentAlarmRepeat *repeat;
- ICalDurationType *dur;
+ ICalDuration *dur;
time_t dur_time;
time_t occur_time, trigger_time;
gint i;
@@ -461,7 +461,7 @@ add_alarm_occurrences_cb (ICalComponent *icalcomp,
}
dur = e_cal_component_alarm_trigger_get_duration (trigger);
- dur_time = i_cal_duration_type_as_int (dur);
+ dur_time = i_cal_duration_as_int (dur);
if (e_cal_component_alarm_trigger_get_kind (trigger) ==
E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START)
occur_time = start;
@@ -678,7 +678,7 @@ e_cal_util_generate_alarms_for_comp (ECalComponent *comp,
GSList *alarm_uids;
time_t alarm_start, alarm_end;
struct alarm_occurrence_data aod;
- ICalTimetype *alarm_start_tt, *alarm_end_tt;
+ ICalTime *alarm_start_tt, *alarm_end_tt;
ECalComponentAlarms *alarms;
if (!e_cal_component_has_alarms (comp))
@@ -1117,7 +1117,7 @@ gchar *
e_cal_util_component_get_recurid_as_string (ICalComponent *icalcomp)
{
ICalProperty *prop;
- ICalTimetype *recurid;
+ ICalTime *recurid;
gchar *rid;
g_return_val_if_fail (icalcomp != NULL, NULL);
@@ -1223,10 +1223,10 @@ check_instance (ICalComponent *comp,
**/
ICalComponent *
e_cal_util_construct_instance (ICalComponent *icalcomp,
- const ICalTimetype *rid)
+ const ICalTime *rid)
{
struct instance_data instance;
- ICalTimetype *start, *end;
+ ICalTime *start, *end;
g_return_val_if_fail (icalcomp != NULL, NULL);
@@ -1235,8 +1235,8 @@ e_cal_util_construct_instance (ICalComponent *icalcomp,
return NULL;
/* Make sure the specified instance really exists */
- start = i_cal_time_convert_to_zone ((ICalTimetype *) rid, i_cal_timezone_get_utc_timezone ());
- end = i_cal_timetype_new_clone (start);
+ start = i_cal_time_convert_to_zone ((ICalTime *) rid, i_cal_timezone_get_utc_timezone ());
+ end = i_cal_time_new_clone (start);
i_cal_time_adjust (end, 0, 0, 0, 1);
instance.start = i_cal_time_as_timet (start);
@@ -1251,19 +1251,19 @@ e_cal_util_construct_instance (ICalComponent *icalcomp,
/* Make the instance */
icalcomp = i_cal_component_new_clone (icalcomp);
- i_cal_component_set_recurrenceid (icalcomp, (ICalTimetype *) rid);
+ i_cal_component_set_recurrenceid (icalcomp, (ICalTime *) rid);
return icalcomp;
}
static inline gboolean
-time_matches_rid (const ICalTimetype *itt,
- const ICalTimetype *rid,
+time_matches_rid (const ICalTime *itt,
+ const ICalTime *rid,
ECalObjModType mod)
{
gint compare;
- compare = i_cal_time_compare ((ICalTimetype *) itt, (ICalTimetype *) rid);
+ compare = i_cal_time_compare ((ICalTime *) itt, (ICalTime *) rid);
if (compare == 0)
return TRUE;
else if (compare < 0 && (mod & E_CAL_OBJ_MOD_THIS_AND_PRIOR))
@@ -1276,14 +1276,14 @@ time_matches_rid (const ICalTimetype *itt,
static void
e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
- const ICalTimetype *rid,
+ const ICalTime *rid,
ECalObjModType mod,
gboolean keep_rid,
gboolean can_add_exrule)
{
ICalProperty *prop;
- ICalTimetype *itt, *recur;
- ICalRecurrenceType *rule;
+ ICalTime *itt, *recur;
+ ICalRecurrence *rule;
ICalRecurIterator *iter;
GSList *remove_props = NULL, *rrules = NULL, *link;
@@ -1294,17 +1294,17 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
for (prop = i_cal_component_get_first_property (icalcomp, I_CAL_RDATE_PROPERTY);
prop;
g_object_unref (prop), prop = i_cal_component_get_next_property (icalcomp,
I_CAL_RDATE_PROPERTY)) {
- ICalDatetimeperiodType *period;
- ICalTimetype *period_time;
+ ICalDatetimeperiod *period;
+ ICalTime *period_time;
period = i_cal_property_get_rdate (prop);
if (!period)
continue;
- period_time = i_cal_datetimeperiod_type_get_time (period);
+ period_time = i_cal_datetimeperiod_get_time (period);
if (time_matches_rid (period_time, rid, mod) && (!keep_rid ||
- i_cal_time_compare (period_time, (ICalTimetype *) rid) != 0))
+ i_cal_time_compare (period_time, (ICalTime *) rid) != 0))
remove_props = g_slist_prepend (remove_props, g_object_ref (prop));
g_clear_object (&period_time);
@@ -1318,7 +1318,7 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
if (!itt)
continue;
- if (time_matches_rid (itt, rid, mod) && (!keep_rid || i_cal_time_compare (itt, (ICalTimetype
*) rid) != 0))
+ if (time_matches_rid (itt, rid, mod) && (!keep_rid || i_cal_time_compare (itt, (ICalTime *)
rid) != 0))
remove_props = g_slist_prepend (remove_props, g_object_ref (prop));
g_object_unref (itt);
@@ -1335,7 +1335,7 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
/* If we're only removing one instance, just add an EXDATE. */
if (mod == E_CAL_OBJ_MOD_THIS) {
- prop = i_cal_property_new_exdate ((ICalTimetype *) rid);
+ prop = i_cal_property_new_exdate ((ICalTime *) rid);
i_cal_component_take_property (icalcomp, prop);
return;
}
@@ -1355,7 +1355,7 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
if (!rule)
continue;
- iter = i_cal_recur_iterator_new (rule, (ICalTimetype *) rid);
+ iter = i_cal_recur_iterator_new (rule, (ICalTime *) rid);
recur = i_cal_recur_iterator_next (iter);
if (!recur) {
@@ -1367,50 +1367,50 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
if (mod & E_CAL_OBJ_MOD_THIS_AND_FUTURE) {
/* Truncate the rule at rid. */
if (!i_cal_time_is_null_time (recur)) {
- gint rule_count = i_cal_recurrence_type_get_count (rule);
+ gint rule_count = i_cal_recurrence_get_count (rule);
/* Use count if it was used */
if (rule_count > 0) {
gint occurrences_count = 0;
ICalRecurIterator *count_iter;
- ICalTimetype *count_recur, *dtstart;
+ ICalTime *count_recur, *dtstart;
dtstart = i_cal_component_get_dtstart (icalcomp);
count_iter = i_cal_recur_iterator_new (rule, dtstart);
while (count_recur = i_cal_recur_iterator_next (count_iter),
count_recur && !i_cal_time_is_null_time (count_recur) &&
occurrences_count < rule_count) {
- if (i_cal_time_compare (count_recur, (ICalTimetype *) rid) >=
0)
+ if (i_cal_time_compare (count_recur, (ICalTime *) rid) >= 0)
break;
occurrences_count++;
g_object_unref (count_recur);
}
- if (keep_rid && count_recur && i_cal_time_compare (count_recur,
(ICalTimetype *) rid) == 0)
+ if (keep_rid && count_recur && i_cal_time_compare (count_recur,
(ICalTime *) rid) == 0)
occurrences_count++;
/* The caller should make sure that the remove will keep at least one
instance */
g_warn_if_fail (occurrences_count > 0);
- i_cal_recurrence_type_set_count (rule, occurrences_count);
+ i_cal_recurrence_set_count (rule, occurrences_count);
g_clear_object (&count_recur);
g_clear_object (&count_iter);
g_clear_object (&dtstart);
} else {
- ICalTimetype *ttuntil;
+ ICalTime *ttuntil;
- if (keep_rid && i_cal_time_compare (recur, (ICalTimetype *) rid) ==
0) {
- ICalDurationType *dur;
+ if (keep_rid && i_cal_time_compare (recur, (ICalTime *) rid) == 0) {
+ ICalDuration *dur;
dur = i_cal_component_get_duration (icalcomp);
- ttuntil = i_cal_time_add ((ICalTimetype *) rid, dur);
+ ttuntil = i_cal_time_add ((ICalTime *) rid, dur);
g_clear_object (&dur);
} else {
- ttuntil = i_cal_timetype_new_clone (rid);
+ ttuntil = i_cal_time_new_clone (rid);
}
i_cal_time_adjust (ttuntil, 0, 0, 0, -1);
- i_cal_recurrence_type_set_until (rule, ttuntil);
+ i_cal_recurrence_set_until (rule, ttuntil);
g_object_unref (ttuntil);
}
@@ -1419,7 +1419,7 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
}
} else {
/* (If recur == rid, skip to the next occurrence) */
- if (!keep_rid && i_cal_time_compare (recur, (ICalTimetype *) rid) == 0) {
+ if (!keep_rid && i_cal_time_compare (recur, (ICalTime *) rid) == 0) {
g_object_unref (recur);
recur = i_cal_recur_iterator_next (iter);
}
@@ -1430,23 +1430,23 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
*/
if (!i_cal_time_is_null_time (recur)) {
if (can_add_exrule) {
- ICalTimetype *ttuntil;
- ICalDurationType *dur = i_cal_component_get_duration (icalcomp);
+ ICalTime *ttuntil;
+ ICalDuration *dur = i_cal_component_get_duration (icalcomp);
- i_cal_recurrence_type_set_count (rule, 0);
+ i_cal_recurrence_set_count (rule, 0);
/* iCalendar says we should just use rid
* here, but Outlook/Exchange handle
* UNTIL incorrectly.
*/
- if (keep_rid && i_cal_time_compare (recur, (ICalTimetype *) rid) ==
0) {
- i_cal_duration_type_set_is_neg (dur,
!i_cal_duration_type_is_neg (dur));
- ttuntil = i_cal_time_add ((ICalTimetype *) rid, dur);
+ if (keep_rid && i_cal_time_compare (recur, (ICalTime *) rid) == 0) {
+ i_cal_duration_set_is_neg (dur, !i_cal_duration_is_neg (dur));
+ ttuntil = i_cal_time_add ((ICalTime *) rid, dur);
} else {
- ttuntil = i_cal_time_add ((ICalTimetype *) rid, dur);
+ ttuntil = i_cal_time_add ((ICalTime *) rid, dur);
}
- i_cal_recurrence_type_set_until (rule, ttuntil);
+ i_cal_recurrence_set_until (rule, ttuntil);
g_clear_object (&ttuntil);
g_clear_object (&dur);
@@ -1484,7 +1484,7 @@ e_cal_util_remove_instances_ex (ICalComponent *icalcomp,
**/
void
e_cal_util_remove_instances (ICalComponent *icalcomp,
- const ICalTimetype *rid,
+ const ICalTime *rid,
ECalObjModType mod)
{
g_return_if_fail (icalcomp != NULL);
@@ -1517,26 +1517,26 @@ e_cal_util_remove_instances (ICalComponent *icalcomp,
**/
ICalComponent *
e_cal_util_split_at_instance (ICalComponent *icalcomp,
- const ICalTimetype *rid,
- const ICalTimetype *master_dtstart)
+ const ICalTime *rid,
+ const ICalTime *master_dtstart)
{
ICalProperty *prop;
struct instance_data instance;
- ICalTimetype *start, *end, *dtstart = NULL;
- ICalDurationType *duration;
+ ICalTime *start, *end, *dtstart = NULL;
+ ICalDuration *duration;
GSList *remove_props = NULL, *link;
g_return_val_if_fail (icalcomp != NULL, NULL);
g_return_val_if_fail (rid != NULL, NULL);
- g_return_val_if_fail (!i_cal_time_is_null_time ((ICalTimetype *) rid), NULL);
+ g_return_val_if_fail (!i_cal_time_is_null_time ((ICalTime *) rid), NULL);
/* Make sure this is really recurring */
if (!e_cal_util_component_has_recurrences (icalcomp))
return NULL;
/* Make sure the specified instance really exists */
- start = i_cal_time_convert_to_zone ((ICalTimetype *) rid, i_cal_timezone_get_utc_timezone ());
- end = i_cal_timetype_new_clone (start);
+ start = i_cal_time_convert_to_zone ((ICalTime *) rid, i_cal_timezone_get_utc_timezone ());
+ end = i_cal_time_new_clone (start);
i_cal_time_adjust (end, 0, 0, 0, 1);
instance.start = i_cal_time_as_timet (start);
@@ -1550,9 +1550,9 @@ e_cal_util_split_at_instance (ICalComponent *icalcomp,
e_cal_util_remove_instances_ex (icalcomp, rid, E_CAL_OBJ_MOD_THIS_AND_PRIOR, TRUE, FALSE);
- start = i_cal_timetype_new_clone ((ICalTimetype *) rid);
+ start = i_cal_time_new_clone ((ICalTime *) rid);
- if (!master_dtstart || i_cal_time_is_null_time ((ICalTimetype *) master_dtstart)) {
+ if (!master_dtstart || i_cal_time_is_null_time ((ICalTime *) master_dtstart)) {
dtstart = i_cal_component_get_dtstart (icalcomp);
master_dtstart = dtstart;
}
@@ -1561,7 +1561,7 @@ e_cal_util_split_at_instance (ICalComponent *icalcomp,
/* Expect that DTSTART and DTEND are already set when the instance could not be found */
if (instance.found) {
- ICalTimetype *dtend;
+ ICalTime *dtend;
dtend = i_cal_component_get_dtend (icalcomp);
@@ -1571,19 +1571,19 @@ e_cal_util_split_at_instance (ICalComponent *icalcomp,
if (i_cal_time_is_null_time (dtend)) {
i_cal_component_set_duration (icalcomp, duration);
} else {
- end = i_cal_timetype_new_clone (start);
- if (i_cal_duration_type_is_neg (duration))
- i_cal_time_adjust (end, -i_cal_duration_type_get_days (duration)
- - 7 * i_cal_duration_type_get_weeks (duration),
- -i_cal_duration_type_get_hours (duration),
- -i_cal_duration_type_get_minutes (duration),
- -i_cal_duration_type_get_seconds (duration));
+ end = i_cal_time_new_clone (start);
+ if (i_cal_duration_is_neg (duration))
+ i_cal_time_adjust (end, -i_cal_duration_get_days (duration)
+ - 7 * i_cal_duration_get_weeks (duration),
+ -i_cal_duration_get_hours (duration),
+ -i_cal_duration_get_minutes (duration),
+ -i_cal_duration_get_seconds (duration));
else
- i_cal_time_adjust (end, i_cal_duration_type_get_days (duration)
- + 7 * i_cal_duration_type_get_weeks (duration),
- i_cal_duration_type_get_hours (duration),
- i_cal_duration_type_get_minutes (duration),
- i_cal_duration_type_get_seconds (duration));
+ i_cal_time_adjust (end, i_cal_duration_get_days (duration)
+ + 7 * i_cal_duration_get_weeks (duration),
+ i_cal_duration_get_hours (duration),
+ i_cal_duration_get_minutes (duration),
+ i_cal_duration_get_seconds (duration));
i_cal_component_set_dtend (icalcomp, end);
}
@@ -1599,24 +1599,24 @@ e_cal_util_split_at_instance (ICalComponent *icalcomp,
for (prop = i_cal_component_get_first_property (icalcomp, ICAL_RRULE_PROPERTY);
prop;
g_object_unref (prop), prop = i_cal_component_get_next_property (icalcomp, ICAL_RRULE_PROPERTY))
{
- ICalTimetype *recur;
- ICalRecurrenceType *rule;
+ ICalTime *recur;
+ ICalRecurrence *rule;
gint rule_count;
rule = i_cal_property_get_rrule (prop);
if (!rule)
continue;
- rule_count = i_cal_recurrence_type_get_count (rule);
+ rule_count = i_cal_recurrence_get_count (rule);
if (rule_count != 0) {
gint occurrences_count = 0;
ICalRecurIterator *iter;
- iter = i_cal_recur_iterator_new (rule, (ICalTimetype *) master_dtstart);
+ iter = i_cal_recur_iterator_new (rule, (ICalTime *) master_dtstart);
while (recur = i_cal_recur_iterator_next (iter),
recur && !i_cal_time_is_null_time (recur) && occurrences_count < rule_count) {
- if (i_cal_time_compare (recur, (ICalTimetype *) rid) >= 0)
+ if (i_cal_time_compare (recur, (ICalTime *) rid) >= 0)
break;
occurrences_count++;
@@ -1626,7 +1626,7 @@ e_cal_util_split_at_instance (ICalComponent *icalcomp,
if (!recur || i_cal_time_is_null_time (recur)) {
remove_props = g_slist_prepend (remove_props, g_object_ref (prop));
} else {
- i_cal_recurrence_type_set_count (rule, rule_count - occurrences_count);
+ i_cal_recurrence_set_count (rule, rule_count - occurrences_count);
i_cal_property_set_rrule (prop, rule);
i_cal_property_remove_parameter_by_name (prop,
E_CAL_EVOLUTION_ENDDATE_PARAMETER);
}
@@ -1651,21 +1651,21 @@ e_cal_util_split_at_instance (ICalComponent *icalcomp,
}
typedef struct {
- const ICalTimetype *rid;
+ const ICalTime *rid;
gboolean matches;
} CheckFirstInstanceData;
static gboolean
check_first_instance_cb (ICalComponent *icalcomp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
{
CheckFirstInstanceData *ifs = user_data;
ICalProperty *prop;
- ICalTimetype *rid;
+ ICalTime *rid;
g_return_val_if_fail (ifs != NULL, FALSE);
@@ -1674,11 +1674,11 @@ check_first_instance_cb (ICalComponent *icalcomp,
rid = i_cal_property_get_recurrenceid (prop);
g_object_unref (prop);
} else {
- ICalTimetype *dtstart;
+ ICalTime *dtstart;
ICalTimezone *zone;
dtstart = i_cal_component_get_dtstart (icalcomp);
- zone = i_cal_timetype_get_zone (dtstart);
+ zone = i_cal_time_get_timezone (dtstart);
rid = i_cal_time_from_timet_with_zone (i_cal_time_as_timet (instance_start),
i_cal_time_is_date (dtstart), zone);
@@ -1686,7 +1686,7 @@ check_first_instance_cb (ICalComponent *icalcomp,
g_clear_object (&dtstart);
}
- ifs->matches = i_cal_time_compare ((ICalTimetype *) ifs->rid, rid) == 0;
+ ifs->matches = i_cal_time_compare ((ICalTime *) ifs->rid, rid) == 0;
g_clear_object (&rid);
@@ -1709,16 +1709,16 @@ check_first_instance_cb (ICalComponent *icalcomp,
**/
gboolean
e_cal_util_is_first_instance (ECalComponent *comp,
- const ICalTimetype *rid,
+ const ICalTime *rid,
ECalRecurResolveTimezoneCb tz_cb,
gpointer tz_cb_data)
{
CheckFirstInstanceData ifs;
ICalComponent *icalcomp;
- ICalTimetype *start, *end;
+ ICalTime *start, *end;
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
- g_return_val_if_fail (rid && !i_cal_time_is_null_time ((ICalTimetype *) rid), FALSE);
+ g_return_val_if_fail (rid && !i_cal_time_is_null_time ((ICalTime *) rid), FALSE);
ifs.rid = rid;
ifs.matches = FALSE;
@@ -1794,7 +1794,7 @@ componenttime_to_utc_timet (const ECalComponentDateTime *dt_time,
gpointer tz_cb_data,
const ICalTimezone *default_zone)
{
- ICalTimetype *value = NULL;
+ ICalTime *value = NULL;
time_t timet = -1;
if (dt_time)
@@ -1869,7 +1869,7 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
if (kind == I_CAL_VTODO_COMPONENT) {
/* max from COMPLETED and DUE properties */
- ICalTimetype *tt;
+ ICalTime *tt;
time_t completed_time = -1, due_time = -1, max_time;
ECalComponentDateTime *dtdue;
@@ -1909,7 +1909,7 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
for (elem = rrules; elem; elem = g_slist_next (elem)) {
ICalProperty *prop = elem->data;
- ICalRecurrenceType *ir;
+ ICalRecurrence *ir;
time_t rule_end;
ir = i_cal_property_get_rrule (prop);
@@ -1926,7 +1926,7 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
/* Do the EXRULEs. */
for (elem = exrules; elem; elem = g_slist_next (elem)) {
ICalProperty *prop = elem->data;
- ICalRecurrenceType *ir;
+ ICalRecurrence *ir;
time_t rule_end;
ir = i_cal_property_get_exrule (prop);
@@ -1951,7 +1951,7 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
* to the DTSTART timezone first. */
if (e_cal_component_period_get_kind (period) !=
E_CAL_COMPONENT_PERIOD_DATETIME) {
- ICalTimetype *tt;
+ ICalTime *tt;
tt = i_cal_time_add (e_cal_component_period_get_start (period),
e_cal_component_period_get_duration (period));
rdate_end = i_cal_time_as_timet (tt);
g_object_unref (tt);
@@ -2200,16 +2200,16 @@ e_cal_util_component_remove_property_by_kind (ICalComponent *icalcomp,
}
typedef struct _NextOccurrenceData {
- ICalTimetype *interval_start;
- ICalTimetype *next;
+ ICalTime *interval_start;
+ ICalTime *next;
gboolean found_next;
gboolean any_hit;
} NextOccurrenceData;
static gboolean
ecu_find_next_occurrence_cb (ICalComponent *comp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -2233,14 +2233,14 @@ ecu_find_next_occurrence_cb (ICalComponent *comp,
/* the returned FALSE means failure in timezone resolution, not in @out_time */
static gboolean
e_cal_util_find_next_occurrence (ICalComponent *vtodo,
- ICalTimetype *for_time,
- ICalTimetype **out_time, /* set to NULL on failure */
+ ICalTime *for_time,
+ ICalTime **out_time, /* set to NULL on failure */
ECalClient *cal_client,
GCancellable *cancellable,
GError **error)
{
NextOccurrenceData nod;
- ICalTimetype *interval_start, *interval_end = NULL, *orig_dtstart, *orig_due;
+ ICalTime *interval_start, *interval_end = NULL, *orig_dtstart, *orig_due;
gint advance_days = 8;
ICalProperty *prop;
gboolean success;
@@ -2267,17 +2267,17 @@ e_cal_util_find_next_occurrence (ICalComponent *vtodo,
prop = i_cal_component_get_first_property (vtodo, I_CAL_RRULE_PROPERTY);
if (prop) {
- ICalRecurrenceType *rrule;
+ ICalRecurrence *rrule;
rrule = i_cal_property_get_rrule (prop);
if (rrule) {
- if (i_cal_recurrence_type_get_freq (rrule) == I_CAL_WEEKLY_RECURRENCE &&
i_cal_recurrence_type_get_interval (rrule) > 1)
- advance_days = (i_cal_recurrence_type_get_interval (rrule) * 7) + 1;
- else if (i_cal_recurrence_type_get_freq (rrule) == I_CAL_MONTHLY_RECURRENCE)
- advance_days = (i_cal_recurrence_type_get_interval (rrule) >= 1 ?
i_cal_recurrence_type_get_interval (rrule) * 31 : 31) + 1;
- else if (i_cal_recurrence_type_get_freq (rrule) == I_CAL_YEARLY_RECURRENCE)
- advance_days = (i_cal_recurrence_type_get_interval (rrule) >= 1 ?
i_cal_recurrence_type_get_interval (rrule) * 365 : 365) + 2;
+ if (i_cal_recurrence_get_freq (rrule) == I_CAL_WEEKLY_RECURRENCE &&
i_cal_recurrence_get_interval (rrule) > 1)
+ advance_days = (i_cal_recurrence_get_interval (rrule) * 7) + 1;
+ else if (i_cal_recurrence_get_freq (rrule) == I_CAL_MONTHLY_RECURRENCE)
+ advance_days = (i_cal_recurrence_get_interval (rrule) >= 1 ?
i_cal_recurrence_get_interval (rrule) * 31 : 31) + 1;
+ else if (i_cal_recurrence_get_freq (rrule) == I_CAL_YEARLY_RECURRENCE)
+ advance_days = (i_cal_recurrence_get_interval (rrule) >= 1 ?
i_cal_recurrence_get_interval (rrule) * 365 : 365) + 2;
}
g_clear_object (&rrule);
@@ -2287,7 +2287,7 @@ e_cal_util_find_next_occurrence (ICalComponent *vtodo,
nod.next = NULL;
do {
- interval_end = i_cal_timetype_new_clone (interval_start);
+ interval_end = i_cal_time_new_clone (interval_start);
i_cal_time_adjust (interval_end, advance_days, 0, 0, 0);
g_clear_object (&(nod.next));
@@ -2365,7 +2365,7 @@ e_cal_util_init_recur_task_sync (ICalComponent *vtodo,
GCancellable *cancellable,
GError **error)
{
- ICalTimetype *dtstart, *due;
+ ICalTime *dtstart, *due;
gboolean success = TRUE;
g_return_val_if_fail (vtodo != NULL, FALSE);
@@ -2445,17 +2445,17 @@ e_cal_util_mark_task_complete_sync (ICalComponent *vtodo,
if (e_cal_util_component_has_recurrences (vtodo) &&
!e_client_check_capability (E_CLIENT (cal_client), E_CAL_STATIC_CAPABILITY_TASK_HANDLE_RECUR)) {
gboolean is_last = FALSE, change_count = FALSE;
- ICalTimetype *new_dtstart = NULL, *new_due = NULL;
+ ICalTime *new_dtstart = NULL, *new_due = NULL;
for (prop = i_cal_component_get_first_property (vtodo, I_CAL_RRULE_PROPERTY);
prop && !is_last;
g_object_unref (prop), prop = i_cal_component_get_next_property (vtodo,
I_CAL_RRULE_PROPERTY)) {
- ICalRecurrenceType *rrule;
+ ICalRecurrence *rrule;
rrule = i_cal_property_get_rrule (prop);
- if (rrule && i_cal_recurrence_type_get_interval (rrule) > 0) {
- gint count = i_cal_recurrence_type_get_count (rrule);
+ if (rrule && i_cal_recurrence_get_interval (rrule) > 0) {
+ gint count = i_cal_recurrence_get_count (rrule);
if (count > 0) {
is_last = count == 1;
@@ -2475,7 +2475,7 @@ e_cal_util_mark_task_complete_sync (ICalComponent *vtodo,
}
if (new_dtstart && !i_cal_time_is_null_time (new_dtstart) && i_cal_time_is_valid_time
(new_dtstart)) {
- ICalTimetype *old_due;
+ ICalTime *old_due;
old_due = i_cal_component_get_due (vtodo);
@@ -2506,7 +2506,7 @@ e_cal_util_mark_task_complete_sync (ICalComponent *vtodo,
/* ... eventually fallback to the new DTSTART for the new DUE */
if (!new_due || i_cal_time_is_null_time (new_due) ||
!i_cal_time_is_valid_time (new_due)) {
g_clear_object (&new_due);
- new_due = i_cal_timetype_new_clone (new_dtstart);
+ new_due = i_cal_time_new_clone (new_dtstart);
}
g_clear_object (&old_due);
@@ -2521,15 +2521,15 @@ e_cal_util_mark_task_complete_sync (ICalComponent *vtodo,
for (prop = i_cal_component_get_first_property (vtodo, I_CAL_RRULE_PROPERTY);
prop;
g_object_unref (prop), prop = i_cal_component_get_next_property (vtodo,
I_CAL_RRULE_PROPERTY)) {
- ICalRecurrenceType *rrule;
+ ICalRecurrence *rrule;
rrule = i_cal_property_get_rrule (prop);
- if (rrule && i_cal_recurrence_type_get_interval (rrule) > 0) {
- gint count = i_cal_recurrence_type_get_count (rrule);
+ if (rrule && i_cal_recurrence_get_interval (rrule) > 0) {
+ gint count = i_cal_recurrence_get_count (rrule);
if (count > 0) {
- i_cal_recurrence_type_set_count (rrule, count - 1);
+ i_cal_recurrence_set_count (rrule, count - 1);
i_cal_property_set_rrule (prop, rrule);
}
}
@@ -2566,7 +2566,7 @@ e_cal_util_mark_task_complete_sync (ICalComponent *vtodo,
if (prop) {
g_object_unref (prop);
} else {
- ICalTimetype *tt;
+ ICalTime *tt;
tt = completed_time != (time_t) -1 ?
i_cal_time_from_timet_with_zone (completed_time, FALSE,
i_cal_timezone_get_utc_timezone ()) :
diff --git a/src/calendar/libecal/e-cal-util.h b/src/calendar/libecal/e-cal-util.h
index 67be4b8ef..e9f66f1d2 100644
--- a/src/calendar/libecal/e-cal-util.h
+++ b/src/calendar/libecal/e-cal-util.h
@@ -256,15 +256,15 @@ gboolean e_cal_util_component_has_attendee
gchar * e_cal_util_component_get_recurid_as_string
(ICalComponent *icalcomp);
ICalComponent * e_cal_util_construct_instance (ICalComponent *icalcomp,
- const ICalTimetype *rid);
+ const ICalTime *rid);
void e_cal_util_remove_instances (ICalComponent *icalcomp,
- const ICalTimetype *rid,
+ const ICalTime *rid,
ECalObjModType mod);
ICalComponent * e_cal_util_split_at_instance (ICalComponent *icalcomp,
- const ICalTimetype *rid,
- const ICalTimetype *master_dtstart);
+ const ICalTime *rid,
+ const ICalTime *master_dtstart);
gboolean e_cal_util_is_first_instance (ECalComponent *comp,
- const ICalTimetype *rid,
+ const ICalTime *rid,
ECalRecurResolveTimezoneCb tz_cb,
gpointer tz_cb_data);
diff --git a/src/calendar/libecal/e-reminder-watcher.c b/src/calendar/libecal/e-reminder-watcher.c
index 06d367883..90d58e502 100644
--- a/src/calendar/libecal/e-reminder-watcher.c
+++ b/src/calendar/libecal/e-reminder-watcher.c
@@ -153,7 +153,7 @@ e_reminder_watcher_timet_as_string (gint64 tt)
static gchar buffers[10][32 + 1];
static volatile gint curr_index = 0;
gint counter = 0, index;
- ICalTimetype *itt;
+ ICalTime *itt;
while (index = (curr_index + 1) % 10, !g_atomic_int_compare_and_exchange (&curr_index, curr_index,
index)) {
counter++;
@@ -164,8 +164,8 @@ e_reminder_watcher_timet_as_string (gint64 tt)
itt = i_cal_time_from_timet_with_zone ((time_t) tt, 0, i_cal_timezone_get_utc_timezone ());
g_snprintf (buffers[index], 32, "%04d%02d%02dT%02d%02d%02d",
- i_cal_timetype_get_year (itt), i_cal_timetype_get_month (itt), i_cal_timetype_get_day (itt),
- i_cal_timetype_get_hour (itt), i_cal_timetype_get_minute (itt), i_cal_timetype_get_second
(itt));
+ i_cal_time_get_year (itt), i_cal_time_get_month (itt), i_cal_time_get_day (itt),
+ i_cal_time_get_hour (itt), i_cal_time_get_minute (itt), i_cal_time_get_second (itt));
g_clear_object (&itt);
@@ -953,7 +953,7 @@ e_reminder_watcher_objects_changed (EReminderWatcher *watcher,
continue;
if (e_cal_util_component_is_instance (icalcomp)) {
- ICalTimetype *itt;
+ ICalTime *itt;
itt = i_cal_component_get_recurrenceid (icalcomp);
if (i_cal_time_is_valid_time (itt) && !i_cal_time_is_null_time (itt))
@@ -1193,7 +1193,7 @@ e_reminder_watcher_schedule_timer_impl (EReminderWatcher *watcher,
static void
e_reminder_watcher_format_time_impl (EReminderWatcher *watcher,
const EReminderData *rd,
- ICalTimetype *itt,
+ ICalTime *itt,
gchar **inout_buffer,
gint buffer_size)
{
@@ -1206,7 +1206,7 @@ e_reminder_watcher_format_time_impl (EReminderWatcher *watcher,
g_return_if_fail (*inout_buffer != NULL);
g_return_if_fail (buffer_size > 0);
- tm = icaltimetype_to_tm (itt);
+ tm = e_cal_util_i_cal_time_to_tm (itt);
e_time_format_date_and_time (&tm, FALSE, FALSE, FALSE, *inout_buffer, buffer_size);
}
@@ -2225,7 +2225,7 @@ e_reminder_watcher_class_init (EReminderWatcherClass *klass)
* EReminderWatcher::format-time:
* @watcher: an #EReminderWatcher
* @rd: an #EReminderData
- * @itt: an #ICalTimetype
+ * @itt: an #ICalTime
* @inout_buffer: (inout): a pointer to a buffer to fill with formatted @itt
* @buffer_size: size of inout_buffer
*
@@ -2623,7 +2623,7 @@ e_reminder_watcher_describe_data (EReminderWatcher *watcher,
if (e_cal_component_alarm_instance_get_occur_start (rd->instance) > 0) {
gchar *timestrptr = timestr;
ICalTimezone *zone;
- ICalTimetype *itt;
+ ICalTime *itt;
gboolean is_date = FALSE;
if (e_cal_component_alarm_instance_get_occur_end (rd->instance) >
e_cal_component_alarm_instance_get_occur_start (rd->instance)) {
diff --git a/src/calendar/libecal/e-reminder-watcher.h b/src/calendar/libecal/e-reminder-watcher.h
index 7da0c9df5..ddc16b727 100644
--- a/src/calendar/libecal/e-reminder-watcher.h
+++ b/src/calendar/libecal/e-reminder-watcher.h
@@ -119,7 +119,7 @@ struct _EReminderWatcherClass {
gint64 at_time);
void (* format_time) (EReminderWatcher *watcher,
const EReminderData *rd,
- ICalTimetype *itt,
+ ICalTime *itt,
gchar **inout_buffer,
gint buffer_size);
void (* triggered) (EReminderWatcher *watcher,
diff --git a/src/calendar/libedata-cal/e-cal-backend-sexp.c b/src/calendar/libedata-cal/e-cal-backend-sexp.c
index 1e87dae32..feafc0b3c 100644
--- a/src/calendar/libedata-cal/e-cal-backend-sexp.c
+++ b/src/calendar/libedata-cal/e-cal-backend-sexp.c
@@ -113,8 +113,8 @@ func_uid (ESExp *esexp,
static gboolean
check_instance_time_range_cb (ICalComponent *comp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -161,7 +161,7 @@ func_occur_in_time_range (ESExp *esexp,
time_t start, end;
ESExpResult *result;
ICalTimezone *default_zone = NULL, *utc_zone;
- ICalTimetype *starttt, *endtt;
+ ICalTime *starttt, *endtt;
/* Check argument types */
@@ -230,8 +230,8 @@ func_occur_in_time_range (ESExp *esexp,
static gboolean
count_instances_time_range_cb (ICalComponent *comp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -261,7 +261,7 @@ func_occurrences_count (ESExp *esexp,
time_t start, end;
ESExpResult *result;
ICalTimezone *default_zone;
- ICalTimetype *starttt, *endtt;
+ ICalTime *starttt, *endtt;
/* Check argument types */
@@ -1050,7 +1050,7 @@ func_is_completed (ESExp *esexp,
{
SearchContext *ctx = data;
ESExpResult *result;
- ICalTimetype *itt;
+ ICalTime *itt;
gboolean complete = FALSE;
/* Check argument types */
@@ -1096,7 +1096,7 @@ func_completed_before (ESExp *esexp,
{
SearchContext *ctx = data;
ESExpResult *result;
- ICalTimetype *itt;
+ ICalTime *itt;
ICalTimezone *zone;
gboolean retval = FALSE;
time_t before_time, completed_time;
diff --git a/src/calendar/libedata-cal/e-cal-cache.c b/src/calendar/libedata-cal/e-cal-cache.c
index 2ec1ca5c1..e79b65081 100644
--- a/src/calendar/libedata-cal/e-cal-cache.c
+++ b/src/calendar/libedata-cal/e-cal-cache.c
@@ -558,21 +558,21 @@ ecc_resolve_tzid_cb (const gchar *tzid,
}
static gchar *
-ecc_encode_itt_to_sql (ICalTimetype *itt)
+ecc_encode_itt_to_sql (ICalTime *itt)
{
if (!itt)
return g_strdup ("00000000000000");
return g_strdup_printf ("%04d%02d%02d%02d%02d%02d",
- i_cal_timetype_get_year (itt), i_cal_timetype_get_month (itt), i_cal_timetype_get_day (itt),
- i_cal_timetype_get_hour (itt), i_cal_timetype_get_minute (itt), i_cal_timetype_get_second
(itt));
+ i_cal_time_get_year (itt), i_cal_time_get_month (itt), i_cal_time_get_day (itt),
+ i_cal_time_get_hour (itt), i_cal_time_get_minute (itt), i_cal_time_get_second (itt));
}
static gchar *
ecc_encode_time_to_sql (ECalCache *cal_cache,
const ECalComponentDateTime *dt)
{
- ICalTimetype *itt;
+ ICalTime *itt;
ICalTimezone *zone = NULL;
if (!dt || !e_cal_component_datetime_get_value (dt))
@@ -593,7 +593,7 @@ static gchar *
ecc_encode_timet_to_sql (ECalCache *cal_cache,
time_t tt)
{
- ICalTimetype *itt;
+ ICalTime *itt;
gchar *res;
if (tt <= 0)
@@ -872,7 +872,7 @@ ecc_fill_other_columns (ECalCache *cal_cache,
ECalComponentClassification classification = E_CAL_COMPONENT_CLASS_PUBLIC;
ICalComponent *icomp;
ICalPropertyStatus status = I_CAL_STATUS_NONE;
- ICalTimetype *itt;
+ ICalTime *itt;
time_t occur_start = -1, occur_end = -1;
gchar *str = NULL;
gint nint;
@@ -1145,7 +1145,7 @@ ecc_sexp_func_occur_in_time_range (ESExp *esexp,
result = e_sexp_result_new (esexp, ESEXP_RES_STRING);
if (!ctx->not_level) {
- ICalTimetype *itt_start, *itt_end;
+ ICalTime *itt_start, *itt_end;
gchar *start_str, *end_str;
/* The default zone argument, if any, is ignored here */
@@ -3237,7 +3237,7 @@ e_cal_cache_get_components_in_range_as_strings (ECalCache *cal_cache,
GError **error)
{
gchar *sexp;
- ICalTimetype *itt_start, *itt_end;
+ ICalTime *itt_start, *itt_end;
gboolean success;
g_return_val_if_fail (E_IS_CAL_CACHE (cal_cache), FALSE);
@@ -3249,18 +3249,18 @@ e_cal_cache_get_components_in_range_as_strings (ECalCache *cal_cache,
itt_end = i_cal_time_from_timet_with_zone (range_end, FALSE, NULL);
sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%04d%02d%02dT%02d%02d%02dZ\") (make-time
\"%04d%02d%02dT%02d%02d%02dZ\"))",
- i_cal_timetype_get_year (itt_start),
- i_cal_timetype_get_month (itt_start),
- i_cal_timetype_get_day (itt_start),
- i_cal_timetype_get_hour (itt_start),
- i_cal_timetype_get_minute (itt_start),
- i_cal_timetype_get_second (itt_start),
- i_cal_timetype_get_year (itt_end),
- i_cal_timetype_get_month (itt_end),
- i_cal_timetype_get_day (itt_end),
- i_cal_timetype_get_hour (itt_end),
- i_cal_timetype_get_minute (itt_end),
- i_cal_timetype_get_second (itt_end));
+ i_cal_time_get_year (itt_start),
+ i_cal_time_get_month (itt_start),
+ i_cal_time_get_day (itt_start),
+ i_cal_time_get_hour (itt_start),
+ i_cal_time_get_minute (itt_start),
+ i_cal_time_get_second (itt_start),
+ i_cal_time_get_year (itt_end),
+ i_cal_time_get_month (itt_end),
+ i_cal_time_get_day (itt_end),
+ i_cal_time_get_hour (itt_end),
+ i_cal_time_get_minute (itt_end),
+ i_cal_time_get_second (itt_end));
g_clear_object (&itt_start);
g_clear_object (&itt_end);
@@ -4173,7 +4173,7 @@ static gchar *
ecc_dup_component_revision (ECalCache *cal_cache,
ICalComponent *icomp)
{
- ICalTimetype *itt;
+ ICalTime *itt;
ICalProperty *prop;
GString *revision;
@@ -4186,8 +4186,8 @@ ecc_dup_component_revision (ECalCache *cal_cache,
g_string_append_c (revision, 'x');
} else {
g_string_append_printf (revision, "%04d%02d%02d%02d%02d%02d",
- i_cal_timetype_get_year (itt), i_cal_timetype_get_month (itt), i_cal_timetype_get_day
(itt),
- i_cal_timetype_get_hour (itt), i_cal_timetype_get_minute (itt),
i_cal_timetype_get_second (itt));
+ i_cal_time_get_year (itt), i_cal_time_get_month (itt), i_cal_time_get_day (itt),
+ i_cal_time_get_hour (itt), i_cal_time_get_minute (itt), i_cal_time_get_second (itt));
}
g_clear_object (&itt);
@@ -4202,8 +4202,8 @@ ecc_dup_component_revision (ECalCache *cal_cache,
g_string_append_c (revision, 'x');
} else {
g_string_append_printf (revision, "%04d%02d%02d%02d%02d%02d",
- i_cal_timetype_get_year (itt), i_cal_timetype_get_month (itt), i_cal_timetype_get_day
(itt),
- i_cal_timetype_get_hour (itt), i_cal_timetype_get_minute (itt),
i_cal_timetype_get_second (itt));
+ i_cal_time_get_year (itt), i_cal_time_get_month (itt), i_cal_time_get_day (itt),
+ i_cal_time_get_hour (itt), i_cal_time_get_minute (itt), i_cal_time_get_second (itt));
}
g_clear_object (&prop);
diff --git a/src/calendar/libedata-cal/e-cal-meta-backend.c b/src/calendar/libedata-cal/e-cal-meta-backend.c
index 26a83f712..fc7db4d10 100644
--- a/src/calendar/libedata-cal/e-cal-meta-backend.c
+++ b/src/calendar/libedata-cal/e-cal-meta-backend.c
@@ -1398,8 +1398,8 @@ ecmb_get_object_list_sync (ECalBackendSync *sync_backend,
static gboolean
ecmb_add_free_busy_instance_cb (ICalComponent *icomp,
- ICalTimetype *instance_start,
- ICalTimetype *instance_end,
+ ICalTime *instance_start,
+ ICalTime *instance_end,
gpointer user_data,
GCancellable *cancellable,
GError **error)
@@ -1407,11 +1407,11 @@ ecmb_add_free_busy_instance_cb (ICalComponent *icomp,
ICalComponent *vfreebusy = user_data;
ICalProperty *prop, *classification;
ICalParameter *param;
- ICalPeriodType *ipt;
+ ICalPeriod *ipt;
- ipt = i_cal_period_type_null_period ();
- i_cal_period_type_set_start (ipt, instance_start);
- i_cal_period_type_set_end (ipt, instance_end);
+ ipt = i_cal_period_null_period ();
+ i_cal_period_set_start (ipt, instance_start);
+ i_cal_period_set_end (ipt, instance_end);
/* Add busy information to the VFREEBUSY component */
prop = i_cal_property_new (I_CAL_FREEBUSY_PROPERTY);
@@ -1464,7 +1464,7 @@ ecmb_get_free_busy_sync (ECalBackendSync *sync_backend,
ICalComponent *vfreebusy, *icomp;
ICalProperty *prop;
ICalTimezone *utc_zone;
- ICalTimetype *itt;
+ ICalTime *itt;
g_return_if_fail (E_IS_CAL_META_BACKEND (sync_backend));
g_return_if_fail (out_freebusy != NULL);
@@ -1526,7 +1526,7 @@ ecmb_get_free_busy_sync (ECalBackendSync *sync_backend,
for (link = components; link; link = g_slist_next (link)) {
ECalComponent *comp = link->data;
- ICalTimetype *starttt, *endtt;
+ ICalTime *starttt, *endtt;
gboolean success;
if (!E_IS_CAL_COMPONENT (comp)) {
@@ -1586,7 +1586,7 @@ ecmb_create_object_sync (ECalMetaBackend *meta_backend,
GError **error)
{
ICalComponent *icomp;
- ICalTimetype *itt;
+ ICalTime *itt;
const gchar *uid;
gchar *new_uid = NULL, *new_extra = NULL;
gboolean success, requires_put = TRUE;
@@ -1766,7 +1766,7 @@ ecmb_modify_object_sync (ECalMetaBackend *meta_backend,
GCancellable *cancellable,
GError **error)
{
- ICalTimetype *itt;
+ ICalTime *itt;
ECalComponentId *id;
ECalComponent *old_comp = NULL, *new_comp = NULL, *master_comp, *existing_comp = NULL;
GSList *instances = NULL;
@@ -1859,7 +1859,7 @@ ecmb_modify_object_sync (ECalMetaBackend *meta_backend,
case E_CAL_OBJ_MOD_THIS_AND_PRIOR:
case E_CAL_OBJ_MOD_THIS_AND_FUTURE:
if (e_cal_component_is_instance (comp) && master_comp) {
- ICalTimetype *rid, *master_dtstart;
+ ICalTime *rid, *master_dtstart;
ICalComponent *icomp = e_cal_component_get_icalcomponent (comp);
ICalComponent *split_icomp;
ICalProperty *prop;
@@ -1903,7 +1903,7 @@ ecmb_modify_object_sync (ECalMetaBackend *meta_backend,
master_dtstart = i_cal_component_get_dtstart (e_cal_component_get_icalcomponent
(master_comp));
split_icomp = e_cal_util_split_at_instance (icomp, rid, master_dtstart);
if (split_icomp) {
- ICalTimetype *rid_utc;
+ ICalTime *rid_utc;
rid_utc = i_cal_time_convert_to_zone (rid, i_cal_timezone_get_utc_timezone
());
e_cal_util_remove_instances (e_cal_component_get_icalcomponent (master_comp),
rid_utc, mod);
@@ -2069,7 +2069,7 @@ ecmb_remove_object_sync (ECalMetaBackend *meta_backend,
GCancellable *cancellable,
GError **error)
{
- ICalTimetype *itt;
+ ICalTime *itt;
ECalComponent *old_comp = NULL, *new_comp = NULL, *master_comp, *existing_comp = NULL;
GSList *instances = NULL;
gboolean success = TRUE;
@@ -2147,25 +2147,19 @@ ecmb_remove_object_sync (ECalMetaBackend *meta_backend,
g_propagate_error (error, e_data_cal_create_error (ObjectNotFound, NULL));
} else {
itt = i_cal_time_from_string (rid);
- if (itt && !i_cal_timetype_get_zone (itt)) {
+ if (itt && !i_cal_time_get_timezone (itt)) {
ECalComponentDateTime *dt;
- ICalTimetype *tmp_itt;
dt = e_cal_component_get_dtstart (master_comp);
if (dt && e_cal_component_datetime_get_value (dt) &&
e_cal_component_datetime_get_tzid (dt)) {
ICalTimezone *zone = e_cal_cache_resolve_timezone_cb
(e_cal_component_datetime_get_tzid (dt), cal_cache, NULL, NULL);
- if (zone) {
- tmp_itt = i_cal_time_convert_to_zone (itt, zone);
- g_object_unref (itt);
- itt = tmp_itt;
- }
+ if (zone)
+ i_cal_time_convert_to_zone_inplace (itt, zone);
}
e_cal_component_datetime_free (dt);
- tmp_itt = i_cal_time_convert_to_zone (itt,
i_cal_timezone_get_utc_timezone ());
- g_object_unref (itt);
- itt = tmp_itt;
+ i_cal_time_convert_to_zone_inplace (itt,
i_cal_timezone_get_utc_timezone ());
}
if (master_comp)
@@ -2187,25 +2181,19 @@ ecmb_remove_object_sync (ECalMetaBackend *meta_backend,
GSList *link, *previous = instances;
itt = i_cal_time_from_string (rid);
- if (itt && !i_cal_timetype_get_zone (itt)) {
+ if (itt && !i_cal_time_get_timezone (itt)) {
ECalComponentDateTime *dt;
- ICalTimetype *tmp_itt;
dt = e_cal_component_get_dtstart (master_comp);
if (dt && e_cal_component_datetime_get_value (dt) &&
e_cal_component_datetime_get_tzid (dt)) {
ICalTimezone *zone = e_cal_cache_resolve_timezone_cb
(e_cal_component_datetime_get_tzid (dt), cal_cache, NULL, NULL);
- if (zone) {
- tmp_itt = i_cal_time_convert_to_zone (itt, zone);
- g_object_unref (itt);
- itt = tmp_itt;
- }
+ if (zone)
+ i_cal_time_convert_to_zone_inplace (itt, zone);
}
e_cal_component_datetime_free (dt);
- tmp_itt = i_cal_time_convert_to_zone (itt, i_cal_timezone_get_utc_timezone
());
- g_object_unref (itt);
- itt = tmp_itt;
+ i_cal_time_convert_to_zone_inplace (itt, i_cal_timezone_get_utc_timezone ());
}
e_cal_util_remove_instances (e_cal_component_get_icalcomponent (master_comp), itt,
mod);
@@ -3808,7 +3796,7 @@ sort_master_first_cb (gconstpointer a,
gconstpointer b)
{
ICalComponent *ca, *cb;
- ICalTimetype *rida, *ridb;
+ ICalTime *rida, *ridb;
gint res;
ca = e_cal_component_get_icalcomponent ((ECalComponent *) a);
diff --git a/src/services/evolution-alarm-notify/e-alarm-notify.c
b/src/services/evolution-alarm-notify/e-alarm-notify.c
index f2db5ca0b..57ea7b66c 100644
--- a/src/services/evolution-alarm-notify/e-alarm-notify.c
+++ b/src/services/evolution-alarm-notify/e-alarm-notify.c
@@ -509,7 +509,7 @@ e_alarm_notify_process (EAlarmNotify *an,
case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START:
case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END:
- offset = i_cal_duration_type_as_int (e_cal_component_alarm_trigger_get_duration
(trigger));
+ offset = i_cal_duration_as_int (e_cal_component_alarm_trigger_get_duration (trigger));
break;
default:
diff --git a/tests/libecal/test-cal-client-bulk-methods.c b/tests/libecal/test-cal-client-bulk-methods.c
index 77d9f64bb..da9f7b0dd 100644
--- a/tests/libecal/test-cal-client-bulk-methods.c
+++ b/tests/libecal/test-cal-client-bulk-methods.c
@@ -28,7 +28,7 @@ static void
test_icomps (ICalComponent *icomp1,
ICalComponent *icomp2)
{
- ICalTimetype *t1, *t2;
+ ICalTime *t1, *t2;
if (!icomp2)
g_error ("Failure: get object returned NULL");
@@ -334,13 +334,13 @@ run_test_bulk_methods_wrapper (ETestServerFixture *fixture,
{
ECalClient *cal_client;
GSList *icomps = NULL;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
gint ii;
cal_client = E_TEST_SERVER_UTILS_SERVICE (fixture, ECalClient);
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
/* Build up new components */
diff --git a/tests/libecal/test-cal-client-create-object.c b/tests/libecal/test-cal-client-create-object.c
index b69150a14..f76432feb 100644
--- a/tests/libecal/test-cal-client-create-object.c
+++ b/tests/libecal/test-cal-client-create-object.c
@@ -28,7 +28,7 @@ static void
test_icomps (ICalComponent *icomp1,
ICalComponent *icomp2)
{
- ICalTimetype *t1, *t2;
+ ICalTime *t1, *t2;
if (!icomp2)
g_error ("Failure: get object returned NULL");
@@ -80,7 +80,7 @@ test_create_object_sync (ETestServerFixture *fixture,
ECalClient *cal_client;
ICalComponent *icomp;
ICalComponent *icomp2 = NULL, *clone;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
GError *error = NULL;
GSList *ecalcomps = NULL;
gchar *uid = NULL;
@@ -89,7 +89,7 @@ test_create_object_sync (ETestServerFixture *fixture,
/* Build up new component */
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
@@ -223,14 +223,14 @@ test_create_object_async (ETestServerFixture *fixture,
{
ECalClient *cal_client;
ICalComponent *icomp;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
AsyncData data = { 0, };
cal_client = E_TEST_SERVER_UTILS_SERVICE (fixture, ECalClient);
/* Build up new component */
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-get-attachment-uris.c
b/tests/libecal/test-cal-client-get-attachment-uris.c
index fecba60f1..19e1765e4 100644
--- a/tests/libecal/test-cal-client-get-attachment-uris.c
+++ b/tests/libecal/test-cal-client-get-attachment-uris.c
@@ -52,12 +52,12 @@ static const gchar *
setup_cal (ECalClient *cal_client)
{
ICalComponent *icomp;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
gchar *uid = NULL;
GError *error = NULL;
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-get-object-list.c b/tests/libecal/test-cal-client-get-object-list.c
index 9bf623195..6bd62efea 100644
--- a/tests/libecal/test-cal-client-get-object-list.c
+++ b/tests/libecal/test-cal-client-get-object-list.c
@@ -30,13 +30,13 @@ static ETestServerClosure cal_closure_async =
static void
setup_cal (ECalClient *cal_client)
{
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
ICalComponent *icomp;
gchar *uid = NULL;
GError *error = NULL;
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-get-revision.c b/tests/libecal/test-cal-client-get-revision.c
index a8b7ec137..8f3279957 100644
--- a/tests/libecal/test-cal-client-get-revision.c
+++ b/tests/libecal/test-cal-client-get-revision.c
@@ -29,13 +29,13 @@ static void
get_revision_compare_cycle (ECalClient *client)
{
ICalComponent *icomp;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
gchar *revision_before = NULL, *revision_after = NULL, *uid = NULL;
GError *error = NULL;
/* Build up new component */
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-get-view.c b/tests/libecal/test-cal-client-get-view.c
index 99d198538..52e13019b 100644
--- a/tests/libecal/test-cal-client-get-view.c
+++ b/tests/libecal/test-cal-client-get-view.c
@@ -113,13 +113,13 @@ alter_cal_client (gpointer user_data)
ECalClient *cal_client = user_data;
GError *error = NULL;
ICalComponent *icomp;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
gchar *uid = NULL;
g_return_val_if_fail (cal_client != NULL, NULL);
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-modify-object.c b/tests/libecal/test-cal-client-modify-object.c
index 281e12b11..c28c5f119 100644
--- a/tests/libecal/test-cal-client-modify-object.c
+++ b/tests/libecal/test-cal-client-modify-object.c
@@ -29,13 +29,13 @@ static ETestServerClosure cal_closure_async =
static void
setup_cal (ECalClient *cal_client)
{
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
ICalComponent *icomp;
gchar *uid = NULL;
GError *error = NULL;
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-receive-objects.c b/tests/libecal/test-cal-client-receive-objects.c
index d41b74104..44b4192d8 100644
--- a/tests/libecal/test-cal-client-receive-objects.c
+++ b/tests/libecal/test-cal-client-receive-objects.c
@@ -27,11 +27,11 @@ static ETestServerClosure cal_closure_async =
static ICalComponent *
create_object (void)
{
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
ICalComponent *icomp;
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-refresh.c b/tests/libecal/test-cal-client-refresh.c
index c506ac080..fd53ec590 100644
--- a/tests/libecal/test-cal-client-refresh.c
+++ b/tests/libecal/test-cal-client-refresh.c
@@ -30,11 +30,11 @@ setup_cal (ECalClient *cal_client)
{
GError *error = NULL;
ICalComponent *icomp;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
gchar *uid = NULL;
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-remove-object.c b/tests/libecal/test-cal-client-remove-object.c
index ee29eec9d..a9cd44ca9 100644
--- a/tests/libecal/test-cal-client-remove-object.c
+++ b/tests/libecal/test-cal-client-remove-object.c
@@ -28,14 +28,14 @@ static gchar *
create_object (ECalClient *cal_client)
{
ICalComponent *icomp;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
gchar *uid = NULL;
GError *error = NULL;
g_return_val_if_fail (cal_client != NULL, NULL);
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-client-revision-view.c b/tests/libecal/test-cal-client-revision-view.c
index d82f91cc9..9eb063124 100644
--- a/tests/libecal/test-cal-client-revision-view.c
+++ b/tests/libecal/test-cal-client-revision-view.c
@@ -50,12 +50,12 @@ subtest_passed (SubTestId id,
g_main_loop_quit (loop);
}
-static ICalTimetype *
+static ICalTime *
get_last_modified (ICalComponent *component)
{
ICalComponent *inner = i_cal_component_get_inner (component);
ICalProperty *prop;
- ICalTimetype *res;
+ ICalTime *res;
if (!inner)
return i_cal_time_null_time ();
@@ -84,8 +84,8 @@ objects_added_cb (GObject *object,
for (l = objects; l; l = l->next) {
ICalComponent *component = l->data;
- ICalTimetype *recurrence = i_cal_component_get_recurrenceid (component);
- ICalTimetype *last_modified = get_last_modified (component);
+ ICalTime *recurrence = i_cal_component_get_recurrenceid (component);
+ ICalTime *last_modified = get_last_modified (component);
gchar *str_recurrence, *str_last_modified;
str_recurrence = i_cal_time_as_ical_string_r (recurrence);
@@ -118,8 +118,8 @@ objects_modified_cb (GObject *object,
for (l = objects; l; l = l->next) {
ICalComponent *component = l->data;
- ICalTimetype *recurrence = i_cal_component_get_recurrenceid (component);
- ICalTimetype *last_modified = get_last_modified (component);
+ ICalTime *recurrence = i_cal_component_get_recurrenceid (component);
+ ICalTime *last_modified = get_last_modified (component);
gchar *str_recurrence, *str_last_modified;
str_recurrence = i_cal_time_as_ical_string_r (recurrence);
@@ -177,7 +177,7 @@ alter_cal_client (gpointer user_data)
ECalClient *cal_client = user_data;
GError *error = NULL;
ICalComponent *icomp;
- ICalTimetype *now, *itt;
+ ICalTime *now, *itt;
gchar *uid = NULL;
g_return_val_if_fail (cal_client != NULL, NULL);
diff --git a/tests/libecal/test-cal-client-send-objects.c b/tests/libecal/test-cal-client-send-objects.c
index 9f560c3ff..34232e29f 100644
--- a/tests/libecal/test-cal-client-send-objects.c
+++ b/tests/libecal/test-cal-client-send-objects.c
@@ -61,10 +61,10 @@ static ICalComponent *
create_object (void)
{
ICalComponent *icomp;
- ICalTimetype *dtstart, *dtend;
+ ICalTime *dtstart, *dtend;
dtstart = i_cal_time_current_time_with_zone (i_cal_timezone_get_utc_timezone ());
- dtend = i_cal_timetype_new_clone (dtstart);
+ dtend = i_cal_time_new_clone (dtstart);
i_cal_time_adjust (dtend, 0, 1, 0, 0);
icomp = i_cal_component_new (I_CAL_VEVENT_COMPONENT);
diff --git a/tests/libecal/test-cal-component.c b/tests/libecal/test-cal-component.c
index 8b1b15e31..509ccac31 100644
--- a/tests/libecal/test-cal-component.c
+++ b/tests/libecal/test-cal-component.c
@@ -69,8 +69,8 @@ verify_ical_attach_list_equal (GSList *expected, /* ICalAttach * */
}
static void
-verify_ical_durationtype_equal (ICalDurationType *expected,
- ICalDurationType *received)
+verify_ical_durationtype_equal (ICalDuration *expected,
+ ICalDuration *received)
{
if (!expected) {
g_assert_null (received);
@@ -79,12 +79,12 @@ verify_ical_durationtype_equal (ICalDurationType *expected,
g_assert_nonnull (received);
- g_assert_cmpint (i_cal_duration_type_as_int (expected), ==, i_cal_duration_type_as_int (received));
+ g_assert_cmpint (i_cal_duration_as_int (expected), ==, i_cal_duration_as_int (received));
}
static void
-verify_ical_timetype_equal (ICalTimetype *expected,
- ICalTimetype *received)
+verify_ical_timetype_equal (ICalTime *expected,
+ ICalTime *received)
{
ICalTimezone *zone_expected, *zone_received;
@@ -95,17 +95,17 @@ verify_ical_timetype_equal (ICalTimetype *expected,
g_assert_nonnull (received);
- g_assert_cmpint (i_cal_timetype_get_year (expected), ==, i_cal_timetype_get_year (received));
- g_assert_cmpint (i_cal_timetype_get_month (expected), ==, i_cal_timetype_get_month (received));
- g_assert_cmpint (i_cal_timetype_get_day (expected), ==, i_cal_timetype_get_day (received));
- g_assert_cmpint (i_cal_timetype_get_hour (expected), ==, i_cal_timetype_get_hour (received));
- g_assert_cmpint (i_cal_timetype_get_minute (expected), ==, i_cal_timetype_get_minute (received));
- g_assert_cmpint (i_cal_timetype_get_second (expected), ==, i_cal_timetype_get_second (received));
- g_assert_cmpint (i_cal_timetype_get_is_date (expected) ? 1 : 0, ==, i_cal_timetype_get_is_date
(received) ? 1 : 0);
- g_assert_cmpint (i_cal_timetype_get_is_daylight (expected) ? 1 : 0, ==,
i_cal_timetype_get_is_daylight (received) ? 1 : 0);
+ g_assert_cmpint (i_cal_time_get_year (expected), ==, i_cal_time_get_year (received));
+ g_assert_cmpint (i_cal_time_get_month (expected), ==, i_cal_time_get_month (received));
+ g_assert_cmpint (i_cal_time_get_day (expected), ==, i_cal_time_get_day (received));
+ g_assert_cmpint (i_cal_time_get_hour (expected), ==, i_cal_time_get_hour (received));
+ g_assert_cmpint (i_cal_time_get_minute (expected), ==, i_cal_time_get_minute (received));
+ g_assert_cmpint (i_cal_time_get_second (expected), ==, i_cal_time_get_second (received));
+ g_assert_cmpint (i_cal_time_is_date (expected) ? 1 : 0, ==, i_cal_time_is_date (received) ? 1 : 0);
+ g_assert_cmpint (i_cal_time_is_daylight (expected) ? 1 : 0, ==, i_cal_time_is_daylight (received) ? 1
: 0);
- zone_expected = i_cal_timetype_get_zone (expected);
- zone_received = i_cal_timetype_get_zone (received);
+ zone_expected = i_cal_time_get_timezone (expected);
+ zone_received = i_cal_time_get_timezone (received);
if (!zone_expected) {
g_assert_null (zone_received);
@@ -366,11 +366,11 @@ verify_struct_alarm_repeat_equal (const ECalComponentAlarmRepeat *expected,
e_cal_component_alarm_repeat_get_interval (received));
g_assert_cmpint (e_cal_component_alarm_repeat_get_interval_seconds (expected), ==,
e_cal_component_alarm_repeat_get_interval_seconds (received));
g_assert_cmpint (e_cal_component_alarm_repeat_get_interval_seconds (expected), ==,
- i_cal_duration_type_as_int (e_cal_component_alarm_repeat_get_interval (expected)));
+ i_cal_duration_as_int (e_cal_component_alarm_repeat_get_interval (expected)));
g_assert_cmpint (e_cal_component_alarm_repeat_get_interval_seconds (received), ==,
- i_cal_duration_type_as_int (e_cal_component_alarm_repeat_get_interval (received)));
+ i_cal_duration_as_int (e_cal_component_alarm_repeat_get_interval (received)));
g_assert_cmpint (e_cal_component_alarm_repeat_get_interval_seconds (expected), ==,
- i_cal_duration_type_as_int (e_cal_component_alarm_repeat_get_interval (received)));
+ i_cal_duration_as_int (e_cal_component_alarm_repeat_get_interval (received)));
}
static void
@@ -578,7 +578,7 @@ test_component_struct_alarm (void)
if ((nth_trigger & 1) != 0) {
ECalComponentAlarmTrigger *trg;
- ICalTimetype *tt;
+ ICalTime *tt;
tt = i_cal_time_from_string ("20201030T102030");
g_assert_nonnull (tt);
@@ -588,7 +588,7 @@ test_component_struct_alarm (void)
e_cal_component_alarm_trigger_free (trg);
g_object_unref (tt);
} else {
- ICalTimetype *tt;
+ ICalTime *tt;
tt = i_cal_time_from_string ("21211129T122233");
g_assert_nonnull (tt);
@@ -905,10 +905,10 @@ test_component_struct_alarm_repeat (void)
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
ECalComponentAlarmRepeat *expected, *received;
- ICalDurationType *dur;
+ ICalDuration *dur;
if ((ii % 4) == 0) {
- dur = i_cal_duration_type_from_int (values[ii].interval);
+ dur = i_cal_duration_from_int (values[ii].interval);
expected = e_cal_component_alarm_repeat_new (values[ii].repetitions, dur);
g_object_unref (dur);
} else if ((ii % 4) == 1) {
@@ -918,7 +918,7 @@ test_component_struct_alarm_repeat (void)
e_cal_component_alarm_repeat_set_repetitions (expected, values[ii].repetitions);
e_cal_component_alarm_repeat_set_interval_seconds (expected, values[ii].interval);
} else {
- dur = i_cal_duration_type_from_int (values[ii].interval);
+ dur = i_cal_duration_from_int (values[ii].interval);
expected = e_cal_component_alarm_repeat_new_seconds (1000, 2000);
e_cal_component_alarm_repeat_set_repetitions (expected, values[ii].repetitions);
@@ -929,7 +929,7 @@ test_component_struct_alarm_repeat (void)
g_assert_nonnull (expected);
- dur = i_cal_duration_type_from_int (values[ii].interval);
+ dur = i_cal_duration_from_int (values[ii].interval);
g_assert_nonnull (dur);
g_assert_cmpint (e_cal_component_alarm_repeat_get_repetitions (expected), ==,
values[ii].repetitions);
g_assert_cmpint (e_cal_component_alarm_repeat_get_interval_seconds (expected), ==,
values[ii].interval);
@@ -964,14 +964,14 @@ test_component_struct_alarm_trigger (void)
for (set_kind = 0; set_kind < 3; set_kind++) {
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
ECalComponentAlarmTrigger *expected = NULL, *received;
- ICalDurationType *dur;
- ICalTimetype *tt;
+ ICalDuration *dur;
+ ICalTime *tt;
ICalProperty *prop;
if (set_kind == 0) {
/* nothing, create it as it should be */
} else if (set_kind == 1) {
- dur = i_cal_duration_type_from_int (33);
+ dur = i_cal_duration_from_int (33);
expected = e_cal_component_alarm_trigger_new_relative
(E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END, dur);
g_object_unref (dur);
@@ -993,7 +993,7 @@ test_component_struct_alarm_trigger (void)
e_cal_component_alarm_trigger_set_absolute_time (expected,
tt);
g_object_unref (tt);
} else {
- dur = i_cal_duration_type_from_int (values[ii].duration);
+ dur = i_cal_duration_from_int (values[ii].duration);
e_cal_component_alarm_trigger_set_kind (expected,
values[ii].kind);
e_cal_component_alarm_trigger_set_duration (expected, dur);
g_object_unref (dur);
@@ -1003,7 +1003,7 @@ test_component_struct_alarm_trigger (void)
e_cal_component_alarm_trigger_set_absolute (expected, tt);
g_object_unref (tt);
} else {
- dur = i_cal_duration_type_from_int (values[ii].duration);
+ dur = i_cal_duration_from_int (values[ii].duration);
e_cal_component_alarm_trigger_set_relative (expected,
values[ii].kind, dur);
g_object_unref (dur);
}
@@ -1016,7 +1016,7 @@ test_component_struct_alarm_trigger (void)
verify_ical_timetype_equal (tt,
e_cal_component_alarm_trigger_get_absolute_time (expected));
g_object_unref (tt);
} else {
- dur = i_cal_duration_type_from_int (values[ii].duration);
+ dur = i_cal_duration_from_int (values[ii].duration);
expected = e_cal_component_alarm_trigger_new_relative
(values[ii].kind, dur);
g_assert_nonnull (expected);
g_object_unref (dur);
@@ -1035,7 +1035,7 @@ test_component_struct_alarm_trigger (void)
verify_ical_timetype_equal (tt,
e_cal_component_alarm_trigger_get_absolute_time (expected));
g_object_unref (tt);
} else {
- dur = i_cal_duration_type_from_int (values[ii].duration);
+ dur = i_cal_duration_from_int (values[ii].duration);
g_assert_nonnull (dur);
verify_ical_durationtype_equal (dur,
e_cal_component_alarm_trigger_get_duration (expected));
g_object_unref (dur);
@@ -1052,7 +1052,7 @@ test_component_struct_alarm_trigger (void)
verify_struct_alarm_trigger_equal (expected, received);
e_cal_component_alarm_trigger_free (received);
- dur = i_cal_duration_type_from_int (33);
+ dur = i_cal_duration_from_int (33);
received = e_cal_component_alarm_trigger_new_relative
(E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END, dur);
g_object_unref (dur);
e_cal_component_alarm_trigger_set_from_property (received, prop);
@@ -1247,7 +1247,7 @@ test_component_struct_datetime (void)
for (set_kind = 0; set_kind < 4; set_kind++) {
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
ECalComponentDateTime *expected = NULL, *received;
- ICalTimetype *tt;
+ ICalTime *tt;
if (set_kind == 2) {
tt = i_cal_time_from_string ("19981019");
@@ -1265,9 +1265,9 @@ test_component_struct_datetime (void)
if (((set_kind + ii) % 3) == 0) {
e_cal_component_datetime_set (expected, tt, values[ii].tzid);
} else if (((set_kind + ii) % 3) == 1) {
- ICalTimetype *ttcopy;
+ ICalTime *ttcopy;
- ttcopy = i_cal_timetype_new_clone (tt);
+ ttcopy = i_cal_time_new_clone (tt);
g_assert_nonnull (ttcopy);
e_cal_component_datetime_take_value (expected, ttcopy);
@@ -1280,9 +1280,9 @@ test_component_struct_datetime (void)
if (set_kind == 0) {
expected = e_cal_component_datetime_new (tt, values[ii].tzid);
} else {
- ICalTimetype *ttcopy;
+ ICalTime *ttcopy;
- ttcopy = i_cal_timetype_new_clone (tt);
+ ttcopy = i_cal_time_new_clone (tt);
g_assert_nonnull (ttcopy);
expected = e_cal_component_datetime_new_take (ttcopy, g_strdup
(values[ii].tzid));
@@ -1640,8 +1640,8 @@ test_component_struct_period (void)
for (set_kind = 0; set_kind < 6; set_kind++) {
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
ECalComponentPeriod *expected = NULL, *received;
- ICalTimetype *start, *end = NULL;
- ICalDurationType *duration = NULL;
+ ICalTime *start, *end = NULL;
+ ICalDuration *duration = NULL;
start = i_cal_time_from_string (values[ii].start);
g_assert_nonnull (start);
@@ -1651,12 +1651,12 @@ test_component_struct_period (void)
g_assert_nonnull (end);
}
} else {
- duration = i_cal_duration_type_from_int (values[ii].duration);
+ duration = i_cal_duration_from_int (values[ii].duration);
g_assert_nonnull (duration);
}
if ((set_kind % 3) == 1) {
- ICalTimetype *ttstart, *ttend;
+ ICalTime *ttstart, *ttend;
ttstart = i_cal_time_from_string ("19981019");
ttend = i_cal_time_from_string ("19981019");
@@ -1668,11 +1668,11 @@ test_component_struct_period (void)
g_clear_object (&ttstart);
g_clear_object (&ttend);
} else if ((set_kind % 3) == 2) {
- ICalTimetype *ttstart;
- ICalDurationType *ttduration;
+ ICalTime *ttstart;
+ ICalDuration *ttduration;
ttstart = i_cal_time_from_string ("19981019");
- ttduration = i_cal_duration_type_from_int (123456);
+ ttduration = i_cal_duration_from_int (123456);
g_assert_nonnull (ttstart);
g_assert_nonnull (ttduration);
@@ -2373,11 +2373,11 @@ test_component_text_list (void (* set_func) (ECalComponent *comp,
}
static void
-verify_component_icaltime (ICalTimetype * (* get_func) (ECalComponent *comp),
+verify_component_icaltime (ICalTime * (* get_func) (ECalComponent *comp),
ECalComponent *comp,
gpointer user_data)
{
- ICalTimetype *expected, *received;
+ ICalTime *expected, *received;
g_assert (get_func != NULL);
@@ -2391,7 +2391,7 @@ verify_component_icaltime (ICalTimetype * (* get_func) (ECalComponent *comp),
static void
test_component_icaltime (void (* set_func) (ECalComponent *comp,
- const ICalTimetype *tt),
+ const ICalTime *tt),
void (* verify_func) (ECalComponent *comp,
gpointer user_data),
gboolean can_null_value)
@@ -2412,7 +2412,7 @@ test_component_icaltime (void (* set_func) (ECalComponent *comp,
g_assert_nonnull (comp);
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
- ICalTimetype *tt;
+ ICalTime *tt;
if (values[ii]) {
tt = i_cal_time_from_string (values[ii]);
@@ -2484,13 +2484,13 @@ test_component_datetime (void (* set_func) (ECalComponent *comp,
g_assert_nonnull (dt);
if (values[ii].tzid) {
- ICalTimetype *tt;
+ ICalTime *tt;
ICalTimezone *zone;
zone = i_cal_timezone_get_builtin_timezone (values[ii].tzid);
if (zone) {
tt = e_cal_component_datetime_get_value (dt);
- i_cal_timetype_set_zone (tt, zone);
+ i_cal_time_set_timezone (tt, zone);
}
}
} else {
@@ -2555,7 +2555,7 @@ verify_component_rules (GSList * (* get_func) (ECalComponent *comp),
for (link1 = expected, link2 = received, link3 = received_props;
link1 && link2 && link3;
link1 = g_slist_next (link1), link2 = g_slist_next (link2), link3 = g_slist_next
(link3)) {
- ICalRecurrenceType *rt_expected, *rt_received, *rt_received_prop;
+ ICalRecurrence *rt_expected, *rt_received, *rt_received_prop;
ICalProperty *prop_received;
gchar *str_expected, *str_received, *str_received_prop;
@@ -2569,9 +2569,9 @@ verify_component_rules (GSList * (* get_func) (ECalComponent *comp),
rt_received_prop = i_cal_property_get_rrule (prop_received);
}
- str_expected = i_cal_recurrence_type_as_string_r (rt_expected);
- str_received = i_cal_recurrence_type_as_string_r (rt_received);
- str_received_prop = i_cal_recurrence_type_as_string_r (rt_received_prop);
+ str_expected = i_cal_recurrence_as_string_r (rt_expected);
+ str_received = i_cal_recurrence_as_string_r (rt_received);
+ str_received_prop = i_cal_recurrence_as_string_r (rt_received_prop);
g_assert_cmpstr (str_expected, ==, str_received);
g_assert_cmpstr (str_expected, ==, str_received_prop);
@@ -2616,9 +2616,9 @@ test_component_rules (void (* set_func) (ECalComponent *comp,
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
if (values[ii]) {
- ICalRecurrenceType *rt;
+ ICalRecurrence *rt;
- rt = i_cal_recurrence_type_from_string (values[ii]);
+ rt = i_cal_recurrence_from_string (values[ii]);
g_assert_nonnull (rt);
rules = g_slist_prepend (rules, rt);
@@ -2819,13 +2819,13 @@ test_component_exdates (void)
g_assert_nonnull (dt);
if (values[ii].tzid) {
- ICalTimetype *tt;
+ ICalTime *tt;
ICalTimezone *zone;
zone = i_cal_timezone_get_builtin_timezone (values[ii].tzid);
if (zone) {
tt = e_cal_component_datetime_get_value (dt);
- i_cal_timetype_set_zone (tt, zone);
+ i_cal_time_set_timezone (tt, zone);
}
}
@@ -2863,7 +2863,7 @@ static void
verify_component_geo (ECalComponent *comp,
gpointer user_data)
{
- ICalGeoType *expected, *received;
+ ICalGeo *expected, *received;
expected = user_data;
received = e_cal_component_get_geo (comp);
@@ -2872,8 +2872,8 @@ verify_component_geo (ECalComponent *comp,
g_assert_null (received);
} else {
g_assert_nonnull (received);
- g_assert_cmpfloat (i_cal_geo_type_get_lat (expected), ==, i_cal_geo_type_get_lat (received));
- g_assert_cmpfloat (i_cal_geo_type_get_lon (expected), ==, i_cal_geo_type_get_lon (received));
+ g_assert_cmpfloat (i_cal_geo_get_lat (expected), ==, i_cal_geo_get_lat (received));
+ g_assert_cmpfloat (i_cal_geo_get_lon (expected), ==, i_cal_geo_get_lon (received));
}
g_clear_object (&received);
@@ -2897,10 +2897,10 @@ test_component_geo (void)
g_assert_nonnull (comp);
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
- ICalGeoType *geo = NULL;
+ ICalGeo *geo = NULL;
if (values[ii].lat > 0.0)
- geo = i_cal_geo_type_new (values[ii].lat, values[ii].lon);
+ geo = i_cal_geo_new (values[ii].lat, values[ii].lon);
e_cal_component_set_geo (comp, geo);
verify_changes (comp, verify_component_geo, geo);
@@ -3108,13 +3108,13 @@ test_component_recurid (void)
g_assert_nonnull (dt);
if (values[ii].tzid) {
- ICalTimetype *tt;
+ ICalTime *tt;
ICalTimezone *zone;
zone = i_cal_timezone_get_builtin_timezone (values[ii].tzid);
if (zone) {
tt = e_cal_component_datetime_get_value (dt);
- i_cal_timetype_set_zone (tt, zone);
+ i_cal_time_set_timezone (tt, zone);
}
}
@@ -3192,8 +3192,8 @@ test_component_rdates (void)
for (ii = 0; ii < G_N_ELEMENTS (values); ii++) {
if (values[ii].start) {
- ICalTimetype *start, *end = NULL;
- ICalDurationType *duration = NULL;
+ ICalTime *start, *end = NULL;
+ ICalDuration *duration = NULL;
ECalComponentPeriod *period;
start = i_cal_time_from_string (values[ii].start);
@@ -3205,7 +3205,7 @@ test_component_rdates (void)
}
period = e_cal_component_period_new_datetime (start, end);
} else {
- duration = i_cal_duration_type_from_int (values[ii].duration);
+ duration = i_cal_duration_from_int (values[ii].duration);
g_assert_nonnull (duration);
period = e_cal_component_period_new_duration (start, duration);
}
@@ -3826,9 +3826,9 @@ test_component_alarms (void)
if (values[ii].uid) {
ECalComponentAlarm *alarm;
ECalComponentAlarmTriggerKind kind;
- ICalDurationType *duration;
+ ICalDuration *duration;
- duration = i_cal_duration_type_from_int (values[ii].trigger * 60);
+ duration = i_cal_duration_from_int (values[ii].trigger * 60);
if (values[ii].trigger < 0)
kind = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
else
diff --git a/tests/libedata-cal/test-cal-cache-intervals.c b/tests/libedata-cal/test-cal-cache-intervals.c
index 9e560a588..28a05e7e3 100644
--- a/tests/libedata-cal/test-cal-cache-intervals.c
+++ b/tests/libedata-cal/test-cal-cache-intervals.c
@@ -73,7 +73,7 @@ search_in_intervals (ETimezoneCache *zone_cache,
time_t end)
{
ECalBackendSExp *sexp;
- ICalTimetype *itt_start, *itt_end;
+ ICalTime *itt_start, *itt_end;
gchar *expr;
GSList *link;
GHashTable *res;
@@ -82,10 +82,10 @@ search_in_intervals (ETimezoneCache *zone_cache,
itt_end = i_cal_time_from_timet_with_zone (end, FALSE, NULL);
expr = g_strdup_printf ("(occur-in-time-range? (make-time \"%04d%02d%02dT%02d%02d%02dZ\") (make-time
\"%04d%02d%02dT%02d%02d%02dZ\"))",
- i_cal_timetype_get_year (itt_start), i_cal_timetype_get_month (itt_start),
i_cal_timetype_get_day (itt_start),
- i_cal_timetype_get_hour (itt_start), i_cal_timetype_get_minute (itt_start),
i_cal_timetype_get_second (itt_start),
- i_cal_timetype_get_year (itt_end), i_cal_timetype_get_month (itt_end), i_cal_timetype_get_day
(itt_end),
- i_cal_timetype_get_hour (itt_end), i_cal_timetype_get_minute (itt_end),
i_cal_timetype_get_second (itt_end));
+ i_cal_time_get_year (itt_start), i_cal_time_get_month (itt_start), i_cal_time_get_day
(itt_start),
+ i_cal_time_get_hour (itt_start), i_cal_time_get_minute (itt_start), i_cal_time_get_second
(itt_start),
+ i_cal_time_get_year (itt_end), i_cal_time_get_month (itt_end), i_cal_time_get_day (itt_end),
+ i_cal_time_get_hour (itt_end), i_cal_time_get_minute (itt_end), i_cal_time_get_second
(itt_end));
sexp = e_cal_backend_sexp_new (expr);
@@ -144,7 +144,7 @@ create_test_component (time_t start,
{
ECalComponent *comp;
ECalComponentText *summary;
- ICalTimetype *current, *ittstart, *ittend;
+ ICalTime *current, *ittstart, *ittend;
gchar *startstr, *endstr, *tmp;
comp = e_cal_component_new ();
diff --git a/tests/libedata-cal/test-cal-meta-backend.c b/tests/libedata-cal/test-cal-meta-backend.c
index cdda78729..14bb61db1 100644
--- a/tests/libedata-cal/test-cal-meta-backend.c
+++ b/tests/libedata-cal/test-cal-meta-backend.c
@@ -93,7 +93,7 @@ ecmb_test_get_rid_as_string (ICalComponent *icomp)
g_assert_nonnull (icomp);
if (e_cal_util_component_has_property (icomp, I_CAL_RECURRENCEID_PROPERTY)) {
- ICalTimetype *itt;
+ ICalTime *itt;
itt = i_cal_component_get_recurrenceid (icomp);
rid = i_cal_time_as_ical_string_r (itt);
@@ -1844,7 +1844,7 @@ test_get_free_busy (ECalMetaBackend *meta_backend)
"END:VFREEBUSY\r\n";
ECalBackendSyncClass *backend_class;
GSList *users, *objects = NULL;
- ICalTimetype *itt;
+ ICalTime *itt;
time_t start, end;
GError *error = NULL;
@@ -2056,7 +2056,7 @@ ecmb_test_modify_case (const gchar *case_name,
i_cal_component_set_sequence (icomp, i_cal_component_get_sequence (icomp) + 1);
if (ridstr) {
- ICalTimetype *itt;
+ ICalTime *itt;
itt = i_cal_time_from_string (ridstr);
i_cal_component_set_recurrenceid (icomp, itt);
diff --git a/tests/libedata-cal/test-intervaltree.c b/tests/libedata-cal/test-intervaltree.c
index f1f65a9f6..5f724d3fc 100644
--- a/tests/libedata-cal/test-intervaltree.c
+++ b/tests/libedata-cal/test-intervaltree.c
@@ -140,7 +140,7 @@ create_test_component (time_t start,
{
ECalComponent *comp = e_cal_component_new ();
ECalComponentText *summary;
- ICalTimetype *current;
+ ICalTime *current;
gchar *txt;
/* ECalComponentDateTime *dt; */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]