Adapt libecal to the new ESource API.
[platform/upstream/evolution-data-server.git] / tests / libecal / test-ecal-get-default-object.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 #include <stdlib.h>
4 #include <libecal/e-cal.h>
5 #include <libical/ical.h>
6
7 #include "ecal-test-utils.h"
8
9 gint
10 main (gint argc,
11       gchar **argv)
12 {
13         ECal *cal;
14         gchar *uri = NULL;
15         icalcomponent *component;
16         gchar *component_string;
17
18         g_type_init ();
19
20         cal = ecal_test_utils_cal_new_temp (&uri, E_CAL_SOURCE_TYPE_EVENT);
21         ecal_test_utils_cal_open (cal, FALSE);
22
23         component = ecal_test_utils_cal_get_default_object (cal);
24         component_string = icalcomponent_as_ical_string (component);
25         test_print ("default object:\n%s", component_string);
26
27         g_free (component_string);
28
29         return 0;
30 }