From 3e7e23772816efd672b314bcf507609cea821dd5 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 2 Mar 2001 10:39:16 +0000 Subject: add new entries for phone enums, and fill in the ecard_field with (bogus 2001-03-02 Chris Toshok * backend/ebook/e-card-simple.c (field_data): add new entries for phone enums, and fill in the ecard_field with (bogus in all but a few cases) strings. these are the strings sent from wombat to evolution-addressbook for supported_fields. (e_card_simple_get_ecard_field): new function. (e_card_simple_map_phone_to_field): new function. (e_card_simple_map_email_to_field): new function. (e_card_simple_map_address_to_field): new function. * backend/ebook/e-card-simple.h: add a few phone entries to the ECardSimpleField enum, and add prototypes for mapping the list types (phone, email, address) to ECardSimpleField. Also, add prototype for e_card_simple_get_ecard_field. * backend/ebook/e-book.c (e_book_do_response_get_supported_fields): don't build the EList here, it's already built. * backend/ebook/e-book-listener.h: change fields from the CORBA sequence to the EList in our reponse struct. * backend/ebook/e-book-listener.c (e_book_listener_queue_get_supported_fields_response): we make the EList here, since after we return the CORBA list is freed up. svn path=/trunk/; revision=8515 --- addressbook/backend/ebook/e-book.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'addressbook/backend/ebook/e-book.c') diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index 1471d67f4c..438445aa9a 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -336,8 +336,6 @@ e_book_do_response_get_supported_fields (EBook *book, EBookListenerResponse *resp) { EBookOp *op; - EList *list; - int i; op = e_book_pop_op (book); @@ -347,14 +345,8 @@ e_book_do_response_get_supported_fields (EBook *book, return; } - list = e_list_new ((EListCopyFunc)g_strdup, (EListFreeFunc)g_free, NULL); - - for (i = 0; i < resp->fields->_length; i ++) { - e_list_append (list, g_strdup (resp->fields->_buffer[i])); - } - if (op->cb) - ((EBookFieldsCallback) op->cb) (book, resp->status, list, op->closure); + ((EBookFieldsCallback) op->cb) (book, resp->status, resp->fields, op->closure); g_free (op); } -- cgit v1.2.3