aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-destination.h
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-06-30 13:23:09 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-06-30 13:23:09 +0800
commit7c5dd95cd7aefa8243edac3c67bf1910fc905c4e (patch)
tree5c8dc3c28a6bac7d3e1643e9cdcfb0b75f28ebbc /addressbook/backend/ebook/e-destination.h
parentc187a911c8926429946cc385fd5f7c8f0932d3e3 (diff)
downloadgsoc2013-evolution-7c5dd95cd7aefa8243edac3c67bf1910fc905c4e.tar
gsoc2013-evolution-7c5dd95cd7aefa8243edac3c67bf1910fc905c4e.tar.gz
gsoc2013-evolution-7c5dd95cd7aefa8243edac3c67bf1910fc905c4e.tar.bz2
gsoc2013-evolution-7c5dd95cd7aefa8243edac3c67bf1910fc905c4e.tar.lz
gsoc2013-evolution-7c5dd95cd7aefa8243edac3c67bf1910fc905c4e.tar.xz
gsoc2013-evolution-7c5dd95cd7aefa8243edac3c67bf1910fc905c4e.tar.zst
gsoc2013-evolution-7c5dd95cd7aefa8243edac3c67bf1910fc905c4e.zip
Make the standard for considering two cards to be match stricter.
2001-06-30 Jon Trowbridge <trow@ximian.com> * gui/merging/e-card-merging.c (match_query_callback): Make the standard for considering two cards to be match stricter. * gui/component/select-names/e-select-names-completion.c (make_match): Use the card's use-score to set the match's sort_major value. (match_name): Removed obsolete code. (e_select_names_completion_begin): Added (double) cast to make match->score calculation come out properly. * backend/ebook/e-card.c: Added X-EVOLUTION-LAST-USE and X-EVOLUTION-USE-SCORE to attribute_jump_array. (e_card_get_today): Added. A convenience routine for getting today's date and putting it in a GDate. (e_card_get_use_score): Added. Compute the current, time-decayed, use-score for the card. (e_card_touch): Increment the use-score by one; update the last used date. (e_card_date_to_string): Added as a convenience routine, getting rid of some code duplication. (e_card_get_vobject): Add handlers for X-EVOLUTION-USE-SCORE and X-EVOLUTION-LAST-USE. (parse_last_use): Added. (parse_use_score): Added. (e_card_class_init): Added args for last-use and use-score. (e_card_get_arg): Added handlers for last-use and use-score. o (e_card_set_arg): Added handlers for last-use and use-score. * backend/ebook/e-destination.c: Added pending_card_id to EDestinationPrivate struct. (e_destination_copy): Copy the pending_card_id. (e_destination_is_empty): Check for a pending_card_id. We are non-empty if we have one. (e_destination_clear_card): Clear pending_card_id. (e_destination_set_card): Clear pending_card_id. (e_destination_has_pending_card): Added. (e_destination_use_card): Added. An asynchronous way to load a pending card and then apply a callback to it. (build_field): Be paranoid, map our special characters to '_'. (e_destination_export): Use EXPORT_MAX_FIELDS symbol rather than a hard-wired array size. Added the "card" entry. (e_destination_import): Fix bug in handling of the "name" field. Process the "card" field. (e_destination_touch): "Touch" and commit the ECard corresponding to the e-mail address in the destination. (A query against the local addressbook is actually performed, in case the destination isn't cardified. * backend/ebook/e-card-compare.c (e_card_compare_name): Revamp the way E_CARD_MATCH_FOO results are mapped to comparison results. Report better matches when the family name is matched. svn path=/trunk/; revision=10626
Diffstat (limited to 'addressbook/backend/ebook/e-destination.h')
-rw-r--r--addressbook/backend/ebook/e-destination.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/addressbook/backend/ebook/e-destination.h b/addressbook/backend/ebook/e-destination.h
index bb3c77d475..bacd9dd428 100644
--- a/addressbook/backend/ebook/e-destination.h
+++ b/addressbook/backend/ebook/e-destination.h
@@ -30,6 +30,7 @@
#include <gtk/gtkobject.h>
#include <addressbook/backend/ebook/e-card.h>
+#include <addressbook/backend/ebook/e-book.h>
#define E_TYPE_DESTINATION (e_destination_get_type ())
#define E_DESTINATION(o) (GTK_CHECK_CAST ((o), E_TYPE_DESTINATION, EDestination))
@@ -40,6 +41,8 @@
typedef struct _EDestination EDestination;
typedef struct _EDestinationClass EDestinationClass;
+typedef void (*EDestinationCardCallback) (EDestination *dest, ECard *card, gpointer closure);
+
struct _EDestinationPrivate;
struct _EDestination {
@@ -64,6 +67,11 @@ void e_destination_set_card (EDestination *, ECard *card, gi
void e_destination_set_string (EDestination *, const gchar *string);
void e_destination_set_html_mail_pref (EDestination *, gboolean);
+gboolean e_destination_has_card (const EDestination *);
+gboolean e_destination_has_pending_card (const EDestination *);
+
+void e_destination_use_card (EDestination *, EDestinationCardCallback cb, gpointer closure);
+
ECard *e_destination_get_card (const EDestination *);
gint e_destination_get_email_num (const EDestination *);
const gchar *e_destination_get_string (const EDestination *);
@@ -79,16 +87,13 @@ gboolean e_destination_get_html_mail_pref (const EDestination *);
gchar *e_destination_get_address_textv (EDestination **);
-
gchar *e_destination_export (const EDestination *);
EDestination *e_destination_import (const gchar *str);
gchar *e_destination_exportv (EDestination **);
EDestination **e_destination_importv (const gchar *str);
-
-
-
+void e_destination_touch (EDestination *);
#endif /* __E_DESTINATION_H__ */