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-card-simple.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'addressbook/backend/ebook/e-card-simple.h') diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h index e23f5fe90c..bcdc37f914 100644 --- a/addressbook/backend/ebook/e-card-simple.h +++ b/addressbook/backend/ebook/e-card-simple.h @@ -81,7 +81,10 @@ enum _ECardSimpleField { E_CARD_SIMPLE_FIELD_FAMILY_NAME, E_CARD_SIMPLE_FIELD_EMAIL, E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, + E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, + E_CARD_SIMPLE_FIELD_PHONE_CALLBACK, + E_CARD_SIMPLE_FIELD_PHONE_COMPANY, E_CARD_SIMPLE_FIELD_PHONE_HOME, E_CARD_SIMPLE_FIELD_ORG, E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, @@ -94,7 +97,11 @@ enum _ECardSimpleField { E_CARD_SIMPLE_FIELD_PHONE_HOME_2, E_CARD_SIMPLE_FIELD_PHONE_ISDN, E_CARD_SIMPLE_FIELD_PHONE_OTHER, + E_CARD_SIMPLE_FIELD_PHONE_OTHER_FAX, E_CARD_SIMPLE_FIELD_PHONE_PAGER, + E_CARD_SIMPLE_FIELD_PHONE_RADIO, + E_CARD_SIMPLE_FIELD_PHONE_TELEX, + E_CARD_SIMPLE_FIELD_PHONE_TTYTTD, E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, E_CARD_SIMPLE_FIELD_EMAIL_2, E_CARD_SIMPLE_FIELD_EMAIL_3, @@ -151,6 +158,9 @@ void e_card_simple_set (ECardSimple const char *data); ECardSimpleType e_card_simple_type (ECardSimple *simple, ECardSimpleField field); + +const char *e_card_simple_get_ecard_field (ECardSimple *simple, + ECardSimpleField field); const char *e_card_simple_get_name (ECardSimple *simple, ECardSimpleField field); const char *e_card_simple_get_short_name (ECardSimple *simple, @@ -193,6 +203,11 @@ void e_card_simple_set_arbitrary (ECardSimple const char *value); void e_card_simple_sync_card (ECardSimple *simple); +/* These map between the individual list types and ECardSimpleField */ +ECardSimpleField e_card_simple_map_phone_to_field (ECardSimplePhoneId phone_id); +ECardSimpleField e_card_simple_map_email_to_field (ECardSimpleEmailId email_id); +ECardSimpleField e_card_simple_map_address_to_field (ECardSimpleAddressId address_id); + /* Standard Gtk function */ GtkType e_card_simple_get_type (void); -- cgit