diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-08-14 10:17:04 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-08-14 10:17:04 +0800 |
commit | 476458f355b639cb725188d9d8e767affa71f4ab (patch) | |
tree | 8d6686abbf6334ad7b65aa8ea15895d58e88b6bd /addressbook/backend/ebook/e-card.c | |
parent | 3157a507b2074766bbd88300cec543a28418d443 (diff) | |
download | gsoc2013-evolution-476458f355b639cb725188d9d8e767affa71f4ab.tar.gz gsoc2013-evolution-476458f355b639cb725188d9d8e767affa71f4ab.tar.zst gsoc2013-evolution-476458f355b639cb725188d9d8e767affa71f4ab.zip |
Changed get_card to be asyncronous.
2001-08-13 Christopher James Lahey <clahey@ximian.com>
* backend/ebook/e-book-listener.c,
backend/ebook/e-book-listener.h, backend/ebook/e-book.c,
backend/ebook/e-book.h, backend/idl/addressbook.idl,
backend/pas/pas-backend-file.c, backend/pas/pas-book.c,
backend/pas/pas-book.h: Changed get_card to be asyncronous.
* backend/ebook/e-card.c, backend/ebook/test-client.c: Changed
these to deal with the new get_card functionality.
svn path=/trunk/; revision=11984
Diffstat (limited to 'addressbook/backend/ebook/e-card.c')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index 4b85c33868..5c1efb42f5 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -4171,13 +4171,9 @@ struct _CardLoadData { }; static void -card_load_cb (EBook *book, EBookStatus status, gpointer closure) +card_get_cb (EBook *book, EBookStatus status, ECard *card, gpointer closure) { CardLoadData *data = (CardLoadData *) closure; - ECard *card = NULL; - - if (status == E_BOOK_STATUS_SUCCESS) - card = e_book_get_card (book, data->card_id); if (data->cb != NULL) data->cb (card, data->closure); @@ -4186,6 +4182,15 @@ card_load_cb (EBook *book, EBookStatus status, gpointer closure) g_free (data); } +static void +card_load_cb (EBook *book, EBookStatus status, gpointer closure) +{ + CardLoadData *data = (CardLoadData *) closure; + + if (status == E_BOOK_STATUS_SUCCESS) + e_book_get_card (book, data->card_id, card_get_cb, closure); +} + void e_card_load_uri (const gchar *uri, ECardCallback cb, gpointer closure) { |