static void calendar_appointment_init (CalendarAppointment *appointment, icalcomponent *ical, ECalClient *cal, icaltimezone *default_zone) { const char *source_uid; appointment->uid = get_ical_uid (ical); appointment->rid = get_ical_rid (ical); appointment->backend_name = get_source_backend_name (cal); appointment->summary = get_ical_summary (ical); appointment->description = get_ical_description (ical); appointment->color_string = get_source_color (cal); appointment->start_time = get_ical_start_time (ical, default_zone); appointment->end_time = get_ical_end_time (ical, default_zone); appointment->is_all_day = get_ical_is_all_day (ical, appointment->start_time, default_zone); /* While the UID is usually enough to identify an event, only the triple * of (source,UID,RID) is fully unambiguous; neither may contain '\n', * so we can safely use it to create a unique ID from the triple */ source_uid = e_source_get_uid (e_client_get_source (E_CLIENT (cal))); appointment->id = g_strdup_printf ("%s\n%s\n%s", source_uid, appointment->uid, appointment->rid ? appointment->rid : ""); }
static void calendar_appointment_init (CalendarAppointment *appointment, icalcomponent *ical, ECalClient *cal, icaltimezone *default_zone) { appointment->uid = get_ical_uid (ical); appointment->rid = get_ical_rid (ical); appointment->backend_name = get_source_backend_name (cal); appointment->summary = get_ical_summary (ical); appointment->description = get_ical_description (ical); appointment->color_string = get_source_color (cal); appointment->start_time = get_ical_start_time (ical, default_zone); appointment->end_time = get_ical_end_time (ical, default_zone); appointment->is_all_day = get_ical_is_all_day (ical, appointment->start_time, default_zone); }