[evolution-ews] Bug #657320 - Set/Modify Birthday of Contact
- From: Vibha Yadav <yvibha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug #657320 - Set/Modify Birthday of Contact
- Date: Fri, 18 Nov 2011 12:26:33 +0000 (UTC)
commit c9945842746c06f806a1ec97c37aace3c1cfbc0d
Author: Vibha Yadav <yvibha suse com>
Date: Fri Nov 18 17:55:31 2011 +0530
Bug #657320 - Set/Modify Birthday of Contact
src/addressbook/e-book-backend-ews.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index dc8f572..7ff1ea3 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -357,6 +357,21 @@ ebews_set_full_name (ESoapMessage *msg, EContact *contact)
static void
ebews_set_birth_date (ESoapMessage *message, EContact *contact)
{
+ EContactDate *date;
+ gchar *birthday;
+
+ date = e_contact_get(contact, E_CONTACT_BIRTH_DATE);
+
+ if (!date)
+ return;
+
+ birthday = g_strdup_printf("%04d-%02d-%02dT00:00:00",
+ date->year, date->month, date->day);
+
+ e_ews_message_write_string_parameter(message, "Birthday", NULL, birthday);
+
+ g_free (birthday);
+
}
@@ -517,7 +532,20 @@ ebews_set_full_name_changes (ESoapMessage *message, EContact *new, EContact *old
static void
ebews_set_birth_date_changes (ESoapMessage *message, EContact *new, EContact *old)
{
+ EContactDate *new_date, *old_date;
+ gchar *birthday;
+
+ new_date = e_contact_get(new, E_CONTACT_BIRTH_DATE);
+ old_date = e_contact_get(old, E_CONTACT_BIRTH_DATE);
+
+ if (e_contact_date_equal(new_date, old_date))
+ return;
+
+ birthday = g_strdup_printf("%04d-%02d-%02dT00:00:00",
+ new_date->year, new_date->month, new_date->day);
+ convert_contact_property_to_updatexml(message, "Birthday", birthday, "contacts", NULL, NULL);
+ g_free (birthday);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]