aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/test-client.c
diff options
context:
space:
mode:
authorMatthew Loper <mloper@src.gnome.org>2000-03-30 06:24:08 +0800
committerMatthew Loper <mloper@src.gnome.org>2000-03-30 06:24:08 +0800
commit96fd9a95558ba087b980bc5bb9a567fe7b02e0a8 (patch)
tree5abc11ba806ff13a994b05dde7472756ecb99da3 /addressbook/backend/ebook/test-client.c
parentf729bbb6c500c42b12246ad7ab1a9b978e44f77f (diff)
downloadgsoc2013-evolution-96fd9a95558ba087b980bc5bb9a567fe7b02e0a8.tar
gsoc2013-evolution-96fd9a95558ba087b980bc5bb9a567fe7b02e0a8.tar.gz
gsoc2013-evolution-96fd9a95558ba087b980bc5bb9a567fe7b02e0a8.tar.bz2
gsoc2013-evolution-96fd9a95558ba087b980bc5bb9a567fe7b02e0a8.tar.lz
gsoc2013-evolution-96fd9a95558ba087b980bc5bb9a567fe7b02e0a8.tar.xz
gsoc2013-evolution-96fd9a95558ba087b980bc5bb9a567fe7b02e0a8.tar.zst
gsoc2013-evolution-96fd9a95558ba087b980bc5bb9a567fe7b02e0a8.zip
+ * addressbook/backend/ebook/test-client.c (get_cursor_cb): Added
+ some debugging. + + * addressbook/backend/ebook/e-book-listener.c: Added inline + documentation for exposed functions. + * addressbook/backend/ebook/e-card-cursor.c: same. + * addressbook/backend/ebook/e-card.c: same. svn path=/trunk/; revision=2248
Diffstat (limited to 'addressbook/backend/ebook/test-client.c')
-rw-r--r--addressbook/backend/ebook/test-client.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c
index 3091fede1d..ffe20ee030 100644
--- a/addressbook/backend/ebook/test-client.c
+++ b/addressbook/backend/ebook/test-client.c
@@ -53,11 +53,17 @@ get_cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer cl
{
long length = e_card_cursor_get_length(cursor);
long i;
+
+ /* we just added a card, so the length should be >1 */
+ printf ("\n%s: %s(): Number of cards is %ld\n",
+ __FILE__, __FUNCTION__, length);
+ if (length < 1)
+ printf ("*** Why isn't this above zero?? ***\n\n");
for ( i = 0; i < length; i++ ) {
ECard *card = e_card_cursor_get_nth(cursor, i);
char *vcard = e_card_get_vcard(card);
- printf("[%s]\n", vcard);
+ printf("Get all cards callback: [%s]\n", vcard);
g_free(vcard);
gtk_object_unref(GTK_OBJECT(card));
}
@@ -82,11 +88,13 @@ add_card_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure)
vcard = e_card_get_vcard(card);
printf ("%g\n", g_timer_elapsed (timer, NULL));
- printf ("[%s]\n", vcard);
+ printf ("Card added: [%s]\n", vcard);
g_free(vcard);
gtk_object_unref(GTK_OBJECT(card));
+ printf ("Getting cards..\n");
e_book_get_all_cards(book, get_cursor_cb, NULL);
+ printf ("Done getting all cards.\n");
}
static void
@@ -103,7 +111,7 @@ ebook_create (void)
book = e_book_new ();
if (!book) {
- printf ("%s: %s: Couldn't create EBook, bailing.\n",
+ printf ("%s: %s(): Couldn't create EBook, bailing.\n",
__FILE__,
__FUNCTION__);
return FALSE;
@@ -126,7 +134,7 @@ main (int argc, char **argv)
init_bonobo (argc, argv);
gtk_idle_add ((GtkFunction) ebook_create, NULL);
-
+
bonobo_main ();
return 0;