ESourceRegistry: Do not mandate builtin sources.
[platform/upstream/evolution-data-server.git] / tests / libebook / test-self.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 #include <stdlib.h>
4 #include <libebook/libebook.h>
5
6 gint
7 main (gint argc,
8       gchar **argv)
9 {
10 #if 0  /* ACCOUNT_MGMT */
11         EBook *book;
12         EContact *contact;
13         GError *error = NULL;
14         gchar *vcard;
15
16         g_type_init ();
17
18         printf ("getting the self contact\n");
19
20         if (!e_book_get_self (&contact, &book, &error)) {
21                 printf ("error %d getting self: %s\n", error->code, error->message);
22                 g_clear_error (&error);
23                 return -1;
24         }
25
26         vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
27         printf ("self contact = \n%s\n", vcard);
28         g_free (vcard);
29
30         g_object_unref (contact);
31         g_object_unref (book);
32 #endif /* ACCOUNT_MGMT */
33
34         return 0;
35 }