From 35c55267f22a30cccd78e1f45efdd2e4b353fd94 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 7 Jun 2000 19:59:48 +0000 Subject: instead of returning a text representation, decode the text and return an * cal-client/cal-client.c (cal_client_get_object): instead of returning a text representation, decode the text and return an iCalObject. Also added CalClientGetStatus which indicates success or type of failure. * cal-util/calobj.c (ical_object_find_in_string): #ifed out ical_object_find_in_string since it is unused now. * cal-client/client-test.c (list_uids): track get_object change * gui/calendar-commands.c (calendar_iterate): same * gui/e-day-view.c (e_day_view_update_event): same * gui/e-week-view.c (e_week_view_update_event): same * gui/print.c (print_day_details): same (print_day_summary): same (print_todo_details): same * gui/gnome-cal.c (trigger_alarm_cb): same * gui/gncal-todo.c (gncal_todo_update): same svn path=/trunk/; revision=3463 --- calendar/cal-client/client-test.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'calendar/cal-client/client-test.c') diff --git a/calendar/cal-client/client-test.c b/calendar/cal-client/client-test.c index f4b847eb65..f8741f4539 100644 --- a/calendar/cal-client/client-test.c +++ b/calendar/cal-client/client-test.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ #include #include #include @@ -48,17 +49,22 @@ list_uids (gpointer data) for (l = uids; l; l = l->next) { char *uid; - char *calobj; + iCalObject *ico; + CalClientGetStatus status; uid = l->data; - calobj = cal_client_get_object (client, uid); - - printf ("------------------------------\n%s", calobj); - printf ("------------------------------\n"); - - cal_client_update_object (client, uid, calobj); - - g_free (calobj); + status = cal_client_get_object (client, uid, &ico); + + if (status == CAL_CLIENT_GET_SUCCESS) { + printf ("------------------------------\n"); + dump_icalobject (ico); + printf ("------------------------------\n"); + } else { + printf ("FAILED: %d\n", status); + } + + // cal_client_update_object (client, uid, calobj); + // g_free (calobj); } } -- cgit v1.2.3