aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/test-client.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c
index 074709aef7..dce7e7fc87 100644
--- a/addressbook/backend/ebook/test-client.c
+++ b/addressbook/backend/ebook/test-client.c
@@ -5,6 +5,30 @@
#include <e-book.h>
+#define TEST_VCARD \
+"BEGIN:VCARD
+" \
+"FN:Nat
+" \
+"N:Friedman;Nat;D;Mr.
+" \
+"BDAY:1977-08-06
+" \
+"TEL;WORK:617 679 1984
+" \
+"TEL;CELL:123 456 7890
+" \
+"EMAIL;INTERNET:nat@nat.org
+" \
+"EMAIL;INTERNET:nat@helixcode.com
+" \
+"ADR;WORK;POSTAL:P.O. Box 101;;;Any Town;CA;91921-1234;
+" \
+"END:VCARD
+" \
+"
+"
+
CORBA_Environment ev;
CORBA_ORB orb;
@@ -24,7 +48,7 @@ init_bonobo (int argc, char **argv)
}
static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
+add_card_cb (EBook *book, EBookStatus status, gpointer closure)
{
char *vcard;
GTimer *timer;
@@ -40,6 +64,12 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure)
printf ("[%s]\n", vcard);
}
+static void
+book_open_cb (EBook *book, EBookStatus status, gpointer closure)
+{
+ e_book_add_vcard(book, TEST_VCARD, add_card_cb, NULL);
+}
+
static guint
ebook_create (void)
{