aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/client-test.c
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-06-08 03:59:48 +0800
committerSeth Alves <alves@src.gnome.org>2000-06-08 03:59:48 +0800
commit35c55267f22a30cccd78e1f45efdd2e4b353fd94 (patch)
tree880acbc384eec12469bb2e8a41eae9c7dd997164 /calendar/cal-client/client-test.c
parentf0e9a692608d04c14f2060f32b18c91bf8b2982d (diff)
downloadgsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.gz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.bz2
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.lz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.xz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.zst
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.zip
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
Diffstat (limited to 'calendar/cal-client/client-test.c')
-rw-r--r--calendar/cal-client/client-test.c24
1 files changed, 15 insertions, 9 deletions
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 <config.h>
#include <bonobo.h>
#include <gnome.h>
@@ -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);
}
}