aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-card.h
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-09-02 14:27:53 +0800
committerChris Lahey <clahey@src.gnome.org>2001-09-02 14:27:53 +0800
commit0fbeb97f39c4c27665b53ae45707ba065d71ebb2 (patch)
treecfbaaca6c2389b42737c09e6d779f42ef890b111 /addressbook/backend/ebook/e-card.h
parent03a5d4a3d316d8ec923d7bde331b1e96d08c6720 (diff)
downloadgsoc2013-evolution-0fbeb97f39c4c27665b53ae45707ba065d71ebb2.tar
gsoc2013-evolution-0fbeb97f39c4c27665b53ae45707ba065d71ebb2.tar.gz
gsoc2013-evolution-0fbeb97f39c4c27665b53ae45707ba065d71ebb2.tar.bz2
gsoc2013-evolution-0fbeb97f39c4c27665b53ae45707ba065d71ebb2.tar.lz
gsoc2013-evolution-0fbeb97f39c4c27665b53ae45707ba065d71ebb2.tar.xz
gsoc2013-evolution-0fbeb97f39c4c27665b53ae45707ba065d71ebb2.tar.zst
gsoc2013-evolution-0fbeb97f39c4c27665b53ae45707ba065d71ebb2.zip
Use e_card_get_vcard_assume_utf8 instead of e_card_get_vcard here since
2001-09-02 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-book.c (e_book_add_card, e_book_commit_card), backend/pas/pas-backend-file.c (do_create), backend/pas/pas-backend-ldap.c (create_card_handler, remove_card_handler, modify_card_handler, pas_backend_ldap_process_get_vcard, poll_ldap): Use e_card_get_vcard_assume_utf8 instead of e_card_get_vcard here since all internal communications and database storage are assumed to be utf8. * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h (e_card_simple_duplicate): Simplified this function considerably. (e_card_simple_get_vcard_assume_utf8): Added this function. * backend/ebook/e-card.c, backend/ebook/e-card.h (e_card_new, e_card_load_cards_from_file, e_card_load_cards_from_string): Made these functions pay attention to charset attributes. (e_card_new_with_default_charset, e_card_load_cards_from_file_with_default_charset, e_card_load_cards_from_string_with_default_charset): New functions that let you change the default charset from UTF-8. (e_card_get_vcard): Made this write out charset attributes when necessary. (e_card_get_vcard_assume_utf8): New function that writes out a card without writing out charset attributes. * backend/ebook/evolution-vcard-importer.c (book_open_cb), backend/ebook/load-gnomecard-addressbook.c (book_open_cb), backend/ebook/test-card.c (main), gui/component/addressbook-component.c (destination_folder_handle_drop), gui/contact-editor/test-editor.c (main), gui/contact-list-editor/e-contact-list-editor.c (table_drag_data_received_cb), gui/widgets/e-addressbook-view.c (selection_received), gui/widgets/e-minicard-control.c (pstream_load): Changed the default charset to be used here to ISO-8859-1. * backend/ebook/load-gnomecard-addressbook.c (add_card_cb), backend/ebook/load-pine-addressbook.c (add_card_cb), backend/ebook/test-client-list.c (get_cursor_cb), backend/ebook/test-client.c (get_cursor_cb, get_card_cb): Use e_card_get_vcard_assume_utf8 to print out testing strings. * gui/component/select-names/e-select-names-model.c, gui/component/select-names/e-select-names-model.h (e_select_names_model_contains): Changed this to be const EDestination *dest to fix a warning. * gui/contact-editor/e-contact-editor.c (e_contact_editor_init): Translate window title here. svn path=/trunk/; revision=12558
Diffstat (limited to 'addressbook/backend/ebook/e-card.h')
-rw-r--r--addressbook/backend/ebook/e-card.h97
1 files changed, 52 insertions, 45 deletions
diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h
index c870ae2978..c9ac994a0d 100644
--- a/addressbook/backend/ebook/e-card.h
+++ b/addressbook/backend/ebook/e-card.h
@@ -116,68 +116,75 @@ struct _ECardClass {
/* Simple functions */
-ECard *e_card_new (char *vcard);
-const char *e_card_get_id (ECard *card);
-void e_card_set_id (ECard *card,
- const char *character);
-
-struct _EBook *e_card_get_book (ECard *card);
-void e_card_set_book (ECard *card,
- struct _EBook *book);
-char *e_card_get_vcard (ECard *card);
-char *e_card_list_get_vcard (GList *list);
-ECard *e_card_duplicate (ECard *card);
-float e_card_get_use_score (ECard *card);
-void e_card_touch (ECard *card);
+ECard *e_card_new (char *vcard); /* Assumes utf8 */
+ECard *e_card_new_with_default_charset (char *vcard,
+ char *default_charset);
+const char *e_card_get_id (ECard *card);
+void e_card_set_id (ECard *card,
+ const char *character);
+
+struct _EBook *e_card_get_book (ECard *card);
+void e_card_set_book (ECard *card,
+ struct _EBook *book);
+char *e_card_get_vcard (ECard *card);
+char *e_card_get_vcard_assume_utf8 (ECard *card);
+char *e_card_list_get_vcard (GList *list);
+ECard *e_card_duplicate (ECard *card);
+float e_card_get_use_score (ECard *card);
+void e_card_touch (ECard *card);
/* Evolution List convenience functions */
/* used for encoding uids in email addresses */
-gboolean e_card_evolution_list (ECard *card);
-gboolean e_card_evolution_list_show_addresses (ECard *card);
+gboolean e_card_evolution_list (ECard *card);
+gboolean e_card_evolution_list_show_addresses (ECard *card);
/* ECardPhone manipulation */
-ECardPhone *e_card_phone_new (void);
-ECardPhone *e_card_phone_copy (const ECardPhone *phone);
-void e_card_phone_free (ECardPhone *phone);
+ECardPhone *e_card_phone_new (void);
+ECardPhone *e_card_phone_copy (const ECardPhone *phone);
+void e_card_phone_free (ECardPhone *phone);
/* ECardDeliveryAddress manipulation */
-ECardDeliveryAddress *e_card_delivery_address_new (void);
-ECardDeliveryAddress *e_card_delivery_address_copy (const ECardDeliveryAddress *addr);
-void e_card_delivery_address_free (ECardDeliveryAddress *addr);
-gboolean e_card_delivery_address_is_empty (const ECardDeliveryAddress *addr);
-char *e_card_delivery_address_to_string (const ECardDeliveryAddress *addr);
-ECardDeliveryAddress *e_card_delivery_address_from_label (const ECardAddrLabel *label);
-ECardAddrLabel *e_card_delivery_address_to_label (const ECardDeliveryAddress *addr);
+ECardDeliveryAddress *e_card_delivery_address_new (void);
+ECardDeliveryAddress *e_card_delivery_address_copy (const ECardDeliveryAddress *addr);
+void e_card_delivery_address_free (ECardDeliveryAddress *addr);
+gboolean e_card_delivery_address_is_empty (const ECardDeliveryAddress *addr);
+char *e_card_delivery_address_to_string (const ECardDeliveryAddress *addr);
+ECardDeliveryAddress *e_card_delivery_address_from_label (const ECardAddrLabel *label);
+ECardAddrLabel *e_card_delivery_address_to_label (const ECardDeliveryAddress *addr);
/* ECardAddrLabel manipulation */
-ECardAddrLabel *e_card_address_label_new (void);
-ECardAddrLabel *e_card_address_label_copy (const ECardAddrLabel *addr);
-void e_card_address_label_free (ECardAddrLabel *addr);
+ECardAddrLabel *e_card_address_label_new (void);
+ECardAddrLabel *e_card_address_label_copy (const ECardAddrLabel *addr);
+void e_card_address_label_free (ECardAddrLabel *addr);
/* ECardName manipulation */
-ECardName *e_card_name_new (void);
-ECardName *e_card_name_copy (const ECardName *name);
-void e_card_name_free (ECardName *name);
-char *e_card_name_to_string (const ECardName *name);
-ECardName *e_card_name_from_string (const char *full_name);
-gboolean e_card_name_match_string (const ECardName *name,
- const gchar *str);
+ECardName *e_card_name_new (void);
+ECardName *e_card_name_copy (const ECardName *name);
+void e_card_name_free (ECardName *name);
+char *e_card_name_to_string (const ECardName *name);
+ECardName *e_card_name_from_string (const char *full_name);
+gboolean e_card_name_match_string (const ECardName *name,
+ const gchar *str);
/* ECardArbitrary manipulation */
-ECardArbitrary *e_card_arbitrary_new (void);
-ECardArbitrary *e_card_arbitrary_copy (const ECardArbitrary *arbitrary);
-void e_card_arbitrary_free (ECardArbitrary *arbitrary);
+ECardArbitrary *e_card_arbitrary_new (void);
+ECardArbitrary *e_card_arbitrary_copy (const ECardArbitrary *arbitrary);
+void e_card_arbitrary_free (ECardArbitrary *arbitrary);
/* ECard email manipulation */
-gboolean e_card_email_match_string (const ECard *card,
- const gchar *str);
-gint e_card_email_find_number (const ECard *card,
- const gchar *email);
+gboolean e_card_email_match_string (const ECard *card,
+ const gchar *str);
+gint e_card_email_find_number (const ECard *card,
+ const gchar *email);
/* Specialized functionality */
-GList *e_card_load_cards_from_file (const char *filename);
-GList *e_card_load_cards_from_string (const char *str);
-void e_card_free_empty_lists (ECard *card);
+GList *e_card_load_cards_from_file (const char *filename);
+GList *e_card_load_cards_from_file_with_default_charset (const char *filename,
+ char *default_charset);
+GList *e_card_load_cards_from_string (const char *str);
+GList *e_card_load_cards_from_string_with_default_charset (const char *str,
+ char *default_charset);
+void e_card_free_empty_lists (ECard *card);
enum _ECardDisposition {
E_CARD_DISPOSITION_AS_ATTACHMENT,