From 51aa4cb7c216c9518516e0bada53ae97849a2bd0 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sun, 7 May 2000 00:41:35 +0000 Subject: Made a NULL callback just mean to not call back. 2000-05-07 Christopher James Lahey * backend/ebook/e-book.c: Made a NULL callback just mean to not call back. * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h: Reordered fields. Added a get_const function to get a constant string that persists until the simple is destroyed. * gui/component/Makefile.am: Added e-addressbook-model.c and e-addressbook-model.h and all of the libraries and includes that they are dependent on. * gui/component/addressbook-factory.c: Initialize e cursors. * gui/component/addressbook.c: Added inactive code to display an ETable view of the addressbook. svn path=/trunk/; revision=2844 --- addressbook/backend/ebook/e-book.c | 23 +++++----- addressbook/backend/ebook/e-card-simple.c | 60 ++++++++++++++++---------- addressbook/backend/ebook/e-card-simple.h | 72 ++++++++++++++++--------------- 3 files changed, 87 insertions(+), 68 deletions(-) (limited to 'addressbook/backend/ebook') diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index 4acd15cba0..ce1c663073 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -118,7 +118,8 @@ e_book_do_response_create_card (EBook *book, return; } - ((EBookIdCallback) op->cb) (book, resp->status, resp->id, op->closure); + if (op->cb) + ((EBookIdCallback) op->cb) (book, resp->status, resp->id, op->closure); g_free (resp->id); g_free (op); } @@ -136,7 +137,8 @@ e_book_do_response_generic (EBook *book, "in local op queue!\n"); } - ((EBookCallback) op->cb) (book, resp->status, op->closure); + if (op->cb) + ((EBookCallback) op->cb) (book, resp->status, op->closure); g_free (op); } @@ -159,7 +161,8 @@ e_book_do_response_get_cursor (EBook *book, cursor = e_card_cursor_new(resp->cursor); - ((EBookCursorCallback) op->cb) (book, resp->status, cursor, op->closure); + if (op->cb) + ((EBookCursorCallback) op->cb) (book, resp->status, cursor, op->closure); /* * Release the remote Evolution_Book in the PAS. @@ -206,8 +209,9 @@ e_book_do_response_get_view (EBook *book, } book_view = e_book_view_new(resp->book_view, op->listener); - - ((EBookBookViewCallback) op->cb) (book, resp->status, book_view, op->closure); + + if (op->cb) + ((EBookBookViewCallback) op->cb) (book, resp->status, book_view, op->closure); /* * Release the remote Evolution_Book in the PAS. @@ -257,7 +261,8 @@ e_book_do_response_open (EBook *book, return; } - ((EBookCallback) op->cb) (book, resp->status, op->closure); + if (op->cb) + ((EBookCallback) op->cb) (book, resp->status, op->closure); g_free (op); } @@ -576,7 +581,6 @@ e_book_remove_card (EBook *book, g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (card != NULL, FALSE); g_return_val_if_fail (E_IS_CARD (card), FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_remove_card: No URI loaded!\n"); @@ -604,7 +608,6 @@ e_book_remove_card_by_id (EBook *book, g_return_val_if_fail (book != NULL, FALSE); g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (id != NULL, FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_remove_card_by_id: No URI loaded!\n"); @@ -649,7 +652,6 @@ e_book_add_card (EBook *book, g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (card != NULL, FALSE); g_return_val_if_fail (E_IS_CARD (card), FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_add_card: No URI loaded!\n"); @@ -684,7 +686,6 @@ e_book_add_vcard (EBook *book, g_return_val_if_fail (book != NULL, FALSE); g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (vcard != NULL, FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_add_vcard: No URI loaded!\n"); @@ -727,7 +728,6 @@ e_book_commit_card (EBook *book, g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (card != NULL, FALSE); g_return_val_if_fail (E_IS_CARD (card), FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_commit_card: No URI loaded!\n"); @@ -763,7 +763,6 @@ e_book_commit_vcard (EBook *book, g_return_val_if_fail (book != NULL, FALSE); g_return_val_if_fail (E_IS_BOOK (book), FALSE); g_return_val_if_fail (vcard != NULL, FALSE); - g_return_val_if_fail (cb != NULL, FALSE); if (book->priv->load_state != URILoaded) { g_warning ("e_book_commit_vcard: No URI loaded!\n"); diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c index cd3d75f957..f2bcaaabc4 100644 --- a/addressbook/backend/ebook/e-card-simple.c +++ b/addressbook/backend/ebook/e-card-simple.c @@ -75,9 +75,26 @@ static ECardSimpleFieldData field_data[] = { { E_CARD_SIMPLE_FIELD_FILE_AS, "file_as", "File As", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_FULL_NAME, "full_name", "Name", "Name", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_BIRTH_DATE, "birth_date", "Birth Date", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, - { E_CARD_SIMPLE_FIELD_URL, "url", "Web Site", "Url", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, + { E_CARD_SIMPLE_FIELD_EMAIL, "", "Email", "Email", E_CARD_SIMPLE_EMAIL_ID_EMAIL, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, + { E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "", "Primary", "Prim", E_CARD_SIMPLE_PHONE_ID_PRIMARY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_PHONE_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_HOME, "", "Home", "Home", E_CARD_SIMPLE_PHONE_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, { E_CARD_SIMPLE_FIELD_ORG, "org", "Organization", "Org", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, + { E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_ADDRESS_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, + { E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "", "Home", "Home", E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, + { E_CARD_SIMPLE_FIELD_PHONE_MOBILE, "", "Mobile", "Mobile", E_CARD_SIMPLE_PHONE_ID_MOBILE, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_CAR, "", "Car", "Car", E_CARD_SIMPLE_PHONE_ID_CAR, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, "", "Business Fax", "Bus Fax", E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, "", "Home Fax", "Home Fax", E_CARD_SIMPLE_PHONE_ID_HOME_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, "", "Business 2", "Bus 2", E_CARD_SIMPLE_PHONE_ID_BUSINESS_2, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_HOME_2, "", "Home 2", "Home 2", E_CARD_SIMPLE_PHONE_ID_HOME_2, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_ISDN, "", "ISDN", "ISDN", E_CARD_SIMPLE_PHONE_ID_ISDN, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_OTHER, "", "Other", "Other", E_CARD_SIMPLE_PHONE_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_PHONE_PAGER, "", "Pager", "Pager", E_CARD_SIMPLE_PHONE_ID_PAGER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, + { E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, "", "Other", "Other", E_CARD_SIMPLE_ADDRESS_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, + { E_CARD_SIMPLE_FIELD_EMAIL_2, "", "Email 2", "Email 2", E_CARD_SIMPLE_EMAIL_ID_EMAIL_2, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, + { E_CARD_SIMPLE_FIELD_EMAIL_3, "", "Email 3", "Email 3", E_CARD_SIMPLE_EMAIL_ID_EMAIL_3, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, + { E_CARD_SIMPLE_FIELD_URL, "url", "Web Site", "Url", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_ORG_UNIT, "org_unit", "Department", "Dep", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_OFFICE, "office", "Office", "Off", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_TITLE, "title", "Title", "Title", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, @@ -86,27 +103,10 @@ static ECardSimpleFieldData field_data[] = { E_CARD_SIMPLE_FIELD_ASSISTANT, "assistant", "Assistant", "Ass", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_NICKNAME, "nickname", "Nickname", "Nick", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_SPOUSE, "spouse", "Spouse", "Spouse", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_ANNIVERSARY, "anniversary", "Anniversary", "Anniv", 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, - { E_CARD_SIMPLE_FIELD_FBURL, "fburl", "Free-busy URL", "FBUrl", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, { E_CARD_SIMPLE_FIELD_NOTE, "note", "Note", "Note", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_PHONE_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, "", "Business 2", "Bus 2", E_CARD_SIMPLE_PHONE_ID_BUSINESS_2, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, "", "Business Fax", "Bus Fax", E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_CAR, "", "Car", "Car", E_CARD_SIMPLE_PHONE_ID_CAR, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_HOME, "", "Home", "Home", E_CARD_SIMPLE_PHONE_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_HOME_2, "", "Home 2", "Home 2", E_CARD_SIMPLE_PHONE_ID_HOME_2, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, "", "Home Fax", "Home Fax", E_CARD_SIMPLE_PHONE_ID_HOME_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_ISDN, "", "ISDN", "ISDN", E_CARD_SIMPLE_PHONE_ID_ISDN, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_MOBILE, "", "Mobile", "Mobile", E_CARD_SIMPLE_PHONE_ID_MOBILE, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_OTHER, "", "Other", "Other", E_CARD_SIMPLE_PHONE_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_PAGER, "", "Pager", "Pager", E_CARD_SIMPLE_PHONE_ID_PAGER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "", "Primary", "Prim", E_CARD_SIMPLE_PHONE_ID_PRIMARY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "", "Home", "Home", E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, - { E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_ADDRESS_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, - { E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, "", "Other", "Other", E_CARD_SIMPLE_ADDRESS_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, - { E_CARD_SIMPLE_FIELD_EMAIL, "", "Email", "Email", E_CARD_SIMPLE_EMAIL_ID_EMAIL, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, - { E_CARD_SIMPLE_FIELD_EMAIL_2, "", "Email 2", "Email 2", E_CARD_SIMPLE_EMAIL_ID_EMAIL_2, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, - { E_CARD_SIMPLE_FIELD_EMAIL_3, "", "Email 3", "Email 3", E_CARD_SIMPLE_EMAIL_ID_EMAIL_3, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, + { E_CARD_SIMPLE_FIELD_FBURL, "fburl", "Free-busy URL", "FBUrl", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, + { E_CARD_SIMPLE_FIELD_ANNIVERSARY, "anniversary", "Anniversary", "Anniv", 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, + { E_CARD_SIMPLE_FIELD_BIRTH_DATE, "birth_date", "Birth Date", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, }; static void e_card_simple_init (ECardSimple *simple); @@ -373,6 +373,9 @@ e_card_simple_destroy (GtkObject *object) if (simple->card) gtk_object_unref(GTK_OBJECT(simple->card)); + g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL); + g_list_free(simple->temp_fields); + simple->temp_fields = NULL; } @@ -388,6 +391,9 @@ e_card_simple_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) case ARG_CARD: if (simple->card) gtk_object_unref(GTK_OBJECT(simple->card)); + g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL); + g_list_free(simple->temp_fields); + simple->temp_fields = NULL; if (GTK_VALUE_OBJECT(*arg)) simple->card = E_CARD(GTK_VALUE_OBJECT(*arg)); else @@ -614,6 +620,7 @@ e_card_simple_init (ECardSimple *simple) simple->email[i] = NULL; for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) simple->address[i] = NULL; + simple->temp_fields = NULL; } static void @@ -829,6 +836,15 @@ void e_card_simple_set_address (ECardSimple *simple, simple->address[id] = e_card_address_label_copy(address); } +const char *e_card_simple_get_const (ECardSimple *simple, + ECardSimpleField field) +{ + char *ret_val = e_card_simple_get(simple, field); + if (ret_val) + simple->temp_fields = g_list_prepend(simple->temp_fields, ret_val); + return ret_val; +} + char *e_card_simple_get (ECardSimple *simple, ECardSimpleField field) { diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h index f0bb6cb541..1949518286 100644 --- a/addressbook/backend/ebook/e-card-simple.h +++ b/addressbook/backend/ebook/e-card-simple.h @@ -77,40 +77,40 @@ enum _ECardSimpleType { enum _ECardSimpleField { E_CARD_SIMPLE_FIELD_FILE_AS, - E_CARD_SIMPLE_FIELD_FULL_NAME, - E_CARD_SIMPLE_FIELD_BIRTH_DATE, - E_CARD_SIMPLE_FIELD_URL, - E_CARD_SIMPLE_FIELD_ORG, - E_CARD_SIMPLE_FIELD_ORG_UNIT, - E_CARD_SIMPLE_FIELD_OFFICE, - E_CARD_SIMPLE_FIELD_TITLE, - E_CARD_SIMPLE_FIELD_ROLE, - E_CARD_SIMPLE_FIELD_MANAGER, - E_CARD_SIMPLE_FIELD_ASSISTANT, - E_CARD_SIMPLE_FIELD_NICKNAME, - E_CARD_SIMPLE_FIELD_SPOUSE, - E_CARD_SIMPLE_FIELD_ANNIVERSARY, - E_CARD_SIMPLE_FIELD_FBURL, - E_CARD_SIMPLE_FIELD_NOTE, - E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, - E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, - E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, - E_CARD_SIMPLE_FIELD_PHONE_CAR, - E_CARD_SIMPLE_FIELD_PHONE_HOME, - E_CARD_SIMPLE_FIELD_PHONE_HOME_2, - E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, - E_CARD_SIMPLE_FIELD_PHONE_ISDN, - E_CARD_SIMPLE_FIELD_PHONE_MOBILE, - E_CARD_SIMPLE_FIELD_PHONE_OTHER, - E_CARD_SIMPLE_FIELD_PHONE_PAGER, - E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, - E_CARD_SIMPLE_FIELD_ADDRESS_HOME, - E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, - E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, - E_CARD_SIMPLE_FIELD_EMAIL, - E_CARD_SIMPLE_FIELD_EMAIL_2, - E_CARD_SIMPLE_FIELD_EMAIL_3, - E_CARD_SIMPLE_FIELD_LAST + E_CARD_SIMPLE_FIELD_FULL_NAME, + E_CARD_SIMPLE_FIELD_EMAIL, + E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, + E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, + E_CARD_SIMPLE_FIELD_PHONE_HOME, + E_CARD_SIMPLE_FIELD_ORG, + E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, + E_CARD_SIMPLE_FIELD_ADDRESS_HOME, + E_CARD_SIMPLE_FIELD_PHONE_MOBILE, + E_CARD_SIMPLE_FIELD_PHONE_CAR, + E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, + E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, + E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, + E_CARD_SIMPLE_FIELD_PHONE_HOME_2, + E_CARD_SIMPLE_FIELD_PHONE_ISDN, + E_CARD_SIMPLE_FIELD_PHONE_OTHER, + E_CARD_SIMPLE_FIELD_PHONE_PAGER, + E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, + E_CARD_SIMPLE_FIELD_EMAIL_2, + E_CARD_SIMPLE_FIELD_EMAIL_3, + E_CARD_SIMPLE_FIELD_URL, + E_CARD_SIMPLE_FIELD_ORG_UNIT, + E_CARD_SIMPLE_FIELD_OFFICE, + E_CARD_SIMPLE_FIELD_TITLE, + E_CARD_SIMPLE_FIELD_ROLE, + E_CARD_SIMPLE_FIELD_MANAGER, + E_CARD_SIMPLE_FIELD_ASSISTANT, + E_CARD_SIMPLE_FIELD_NICKNAME, + E_CARD_SIMPLE_FIELD_SPOUSE, + E_CARD_SIMPLE_FIELD_NOTE, + E_CARD_SIMPLE_FIELD_FBURL, + E_CARD_SIMPLE_FIELD_ANNIVERSARY, + E_CARD_SIMPLE_FIELD_BIRTH_DATE, + E_CARD_SIMPLE_FIELD_LAST }; typedef struct _ECardSimple ECardSimple; @@ -120,6 +120,8 @@ struct _ECardSimple { GtkObject object; ECard *card; + GList *temp_fields; + ECardPhone *phone[E_CARD_SIMPLE_PHONE_ID_LAST]; char *email[E_CARD_SIMPLE_EMAIL_ID_LAST]; ECardAddrLabel *address[E_CARD_SIMPLE_ADDRESS_ID_LAST]; @@ -139,6 +141,8 @@ ECardSimple *e_card_simple_duplicate (ECardSimple *simple); char *e_card_simple_get (ECardSimple *simple, ECardSimpleField field); +const char *e_card_simple_get_const (ECardSimple *simple, + ECardSimpleField field); void e_card_simple_set (ECardSimple *simple, ECardSimpleField field, const char *data); -- cgit v1.2.3