[evolution-patches] Address book: REV field support for GW backend



Hi,

This is the patch to handle last modified time for a contact in 
GW backend.

Please review,
-Sushma.

Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.264
diff -u -p -r1.264 ChangeLog
--- addressbook/ChangeLog	27 Apr 2005 10:19:40 -0000	1.264
+++ addressbook/ChangeLog	2 May 2005 09:34:48 -0000
@@ -1,3 +1,13 @@
+2005-05-02  Sushma Rai  <rsushma novell com>
+
+	* backends/groupwise/e-book-backend-groupwise.c: Added E_CONTACT_REV
+	filed.
+
+	* servers/groupwise/e-gw-item.c 
+	(set_common_addressbook_item_fields_from_soap_parameter):
+	Reading and saving modified time parameter value from the server 
+	response.
+	
 2005-04-27  Sushma Rai  <rsushma novell com>
 
 	* libebook/e-book.c (e_book_response_add_contact): Setting the status
Index: addressbook/backends/groupwise/e-book-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c,v
retrieving revision 1.51
diff -u -p -r1.51 e-book-backend-groupwise.c
--- addressbook/backends/groupwise/e-book-backend-groupwise.c	8 Mar 2005 01:13:41 -0000	1.51
+++ addressbook/backends/groupwise/e-book-backend-groupwise.c	2 May 2005 09:35:17 -0000
@@ -116,7 +116,8 @@ struct field_element_mapping {
 	{ E_CONTACT_ADDRESS_HOME, ELEMENT_TYPE_COMPLEX, "Home", populate_address, set_address_in_gw_item, set_address_changes },
 	{ E_CONTACT_IM_AIM, ELEMENT_TYPE_COMPLEX, "ims", populate_ims, set_ims_in_gw_item, set_im_changes },
 	{ E_CONTACT_CATEGORIES, ELEMENT_TYPE_COMPLEX, "categories", NULL, NULL, set_categories_changes},
-	{ E_CONTACT_EMAIL_1, ELEMENT_TYPE_COMPLEX, "email", populate_emails, set_emails_in_gw_item, set_emails_changes }
+	{ E_CONTACT_EMAIL_1, ELEMENT_TYPE_COMPLEX, "email", populate_emails, set_emails_in_gw_item, set_emails_changes },
+	{ E_CONTACT_REV, ELEMENT_TYPE_SIMPLE, "modified_time"}
 }; 
 
 
Index: servers/groupwise/e-gw-item.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-item.c,v
retrieving revision 1.77
diff -u -p -r1.77 e-gw-item.c
--- servers/groupwise/e-gw-item.c	26 Apr 2005 12:48:25 -0000	1.77
+++ servers/groupwise/e-gw-item.c	2 May 2005 09:35:53 -0000
@@ -868,6 +868,12 @@ set_common_addressbook_item_fields_from_
 		item->priv->id = g_strdup (value);
 	}
 	value = NULL;
+	subparam = soup_soap_parameter_get_first_child_by_name(param, "modified");
+	if(subparam) {
+		value = soup_soap_parameter_get_string_value (subparam);
+		g_hash_table_insert (simple_fields, "modified_time", value);
+	}
+	value = NULL;
 	subparam = soup_soap_parameter_get_first_child_by_name (param, "comment");
 	if(subparam) {
 		value = soup_soap_parameter_get_string_value (subparam);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]