[evolution-data-server/meego-eds] Add e_vcard_is_parsed() function
- From: Christophe Dumez <cdumez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/meego-eds] Add e_vcard_is_parsed() function
- Date: Tue, 21 Jun 2011 18:22:03 +0000 (UTC)
commit 3cf615bd85c37e32770ce343f7d8d52833786077
Author: Christophe Dumez <christophe dumez intel com>
Date: Tue Jun 21 21:21:18 2011 +0300
Add e_vcard_is_parsed() function
This function is useful for debugging lazy vCard parsing.
addressbook/libebook/e-vcard.c | 16 ++++++++++++++++
addressbook/libebook/e-vcard.h | 2 ++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libebook/e-vcard.c b/addressbook/libebook/e-vcard.c
index 77bfe47..90597a6 100644
--- a/addressbook/libebook/e-vcard.c
+++ b/addressbook/libebook/e-vcard.c
@@ -2085,6 +2085,22 @@ e_vcard_attribute_get_param (EVCardAttribute *attr, const gchar *name)
}
/**
+ * e_vcard_is_parsed:
+ * @evc: an #EVCard
+ *
+ * Check if the @evc has been parsed already. Used for debugging.
+ *
+ * Return value: %TRUE if @evc has been parsed, %FALSE otherwise.
+ **/
+gboolean
+e_vcard_is_parsed (EVCard *evc)
+{
+ g_return_val_if_fail (E_IS_VCARD (evc), FALSE);
+ return (!evc->priv->vcard && evc->priv->attributes);
+}
+
+
+/**
* e_vcard_attribute_param_get_name:
* @param: an #EVCardAttributeParam
*
diff --git a/addressbook/libebook/e-vcard.h b/addressbook/libebook/e-vcard.h
index 00913d6..613e4ec 100644
--- a/addressbook/libebook/e-vcard.h
+++ b/addressbook/libebook/e-vcard.h
@@ -156,6 +156,8 @@ void e_vcard_construct (EVCard *evc, const gchar *str);
EVCard* e_vcard_new (void);
EVCard* e_vcard_new_from_string (const gchar *str);
+gboolean e_vcard_is_parsed (EVCard *evc);
+
gchar * e_vcard_to_string (EVCard *evc, EVCardFormat format);
/* mostly for debugging */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]