aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r--addressbook/backend/ebook/e-destination.c8
-rw-r--r--addressbook/backend/ebook/e-destination.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
index 3b7ad60189..a44ce3ddc8 100644
--- a/addressbook/backend/ebook/e-destination.c
+++ b/addressbook/backend/ebook/e-destination.c
@@ -126,6 +126,14 @@ e_destination_copy (EDestination *dest)
return new_dest;
}
+gboolean
+e_destination_is_empty (EDestination *dest)
+{
+ g_return_val_if_fail (dest && E_IS_DESTINATION (dest), TRUE);
+
+ return !(dest->priv->card || (dest->priv->string && *dest->priv->string));
+}
+
static void
e_destination_clear_card (EDestination *dest)
{
diff --git a/addressbook/backend/ebook/e-destination.h b/addressbook/backend/ebook/e-destination.h
index 618cfdb458..d0af6b0d23 100644
--- a/addressbook/backend/ebook/e-destination.h
+++ b/addressbook/backend/ebook/e-destination.h
@@ -57,6 +57,8 @@ GtkType e_destination_get_type (void);
EDestination *e_destination_new (void);
EDestination *e_destination_copy (EDestination *);
+gboolean e_destination_is_empty (EDestination *);
+
void e_destination_set_card (EDestination *, ECard *card, gint email_num);
void e_destination_set_string (EDestination *, const gchar *string);