[evolution-patches] Patch for Evolution GW backend - minor fixes in the code



hi,

The following patch contains code added to return UTC as the default
internal time_zone for GW calendars, changes in the parsing of the
response elements aligned to changes in the server implementation
and fixes for compiler warnings.

harish

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.145
diff -u -p -r1.145 ChangeLog
--- ChangeLog	24 Jan 2004 22:03:55 -0000	1.145
+++ ChangeLog	26 Jan 2004 07:34:27 -0000
@@ -1,3 +1,17 @@
+2004-01-26  Harish K <kharish novell com>
+	* calendar/backends/groupwise/e-cal-backend-groupwise.c :
+	(e_cal_backend_groupwise_internal_get_default_timezone,
+	e_cal_backend_groupwise_internal_get_timezone) : added and 
+	implemented.
+	(e_cal_backend_groupwise_get_object_list) : fixed incorrect
+	access to the list.
+	(e_cal_backend_groupwise_start_query) : fixed compiler warnings.
+	 
+	* calendar/backends/groupwise/e-gw-connection.c :
+	(e_gw_connection_get_container_id) : Modified elements 'Folders' to 
+	the 'folders' due to change in the server implementation.
+	Fixed compiler warnings.
+
 2004-01-24  Rodrigo Moya <rodrigo ximian com>
 
 	* calendar/backends/http/e-cal-backend-http.c: make it use
Index: backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file:
/cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.33
diff -u -p -r1.33 e-cal-backend-groupwise.c
--- backends/groupwise/e-cal-backend-groupwise.c	23 Jan 2004 16:01:51
-0000	1.33
+++ backends/groupwise/e-cal-backend-groupwise.c	26 Jan 2004 07:34:28
-0000
@@ -89,7 +89,6 @@ populate_cache (ECalBackendGroupwisePriv
         
         g_list_free (list);
         return E_GW_CONNECTION_STATUS_OK;        
-                                                                                                                    
 }
 
 static GnomeVFSURI *
@@ -599,7 +598,8 @@ e_cal_backend_groupwise_get_object_list 
 
         for( l = e_cal_backend_cache_get_components (priv->cache); l !=
NULL; l = g_list_next (l)) {
                 const char *uid;
-                ECalComponent *comp = E_CAL_COMPONENT (l);
+		ECalComponent *comp = E_CAL_COMPONENT (l->data);
+
                 e_cal_component_get_uid (comp, &uid);
                 match_object_sexp (uid, comp, &match_data);
         }
@@ -651,8 +651,8 @@ e_cal_backend_groupwise_start_query (ECa
 		e_data_cal_view_notify_objects_added (query, (const GList *)
match_data.obj_list);
 
 		/* free memory */
-		g_list_foreach (match_data.obj_list, (GFunc) g_free, NULL);
-		g_list_free (match_data.obj_list);
+		g_list_foreach ((GList *) match_data.obj_list, (GFunc) g_free, NULL);
+		g_list_free ((GList *) match_data.obj_list);
 	}
 
 	e_data_cal_view_notify_done (query, GNOME_Evolution_Calendar_Success);
@@ -794,6 +794,19 @@ e_cal_backend_groupwise_discard_alarm (E
 	return GNOME_Evolution_Calendar_OtherError;
 }
 
+static icaltimezone *
+e_cal_backend_groupwise_internal_get_default_timezone (ECalBackend
*backend)
+{
+	/* Groupwise server maintains data in UTC  */
+	return icaltimezone_get_utc_timezone ();
+}
+
+static icaltimezone *
+e_cal_backend_groupwise_internal_get_timezone (ECalBackend *backend,
const char *tzid)
+{
+	return icaltimezone_get_utc_timezone ();
+}
+
 static ECalBackendSyncStatus
 e_cal_backend_groupwise_create_object (ECalBackendSync *backend,
EDataCal *cal, const char *calobj, char **uid)
 {
@@ -1048,6 +1061,8 @@ e_cal_backend_groupwise_class_init (ECal
 	backend_class->start_query = e_cal_backend_groupwise_start_query;
 	backend_class->get_mode = e_cal_backend_groupwise_get_mode;
 	backend_class->set_mode = e_cal_backend_groupwise_set_mode;
+	backend_class->internal_get_default_timezone =
e_cal_backend_groupwise_internal_get_default_timezone;
+	backend_class->internal_get_timezone =
e_cal_backend_groupwise_internal_get_timezone;
 }
 
 
Index: backends/groupwise/e-gw-connection.c
===================================================================
RCS file:
/cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-gw-connection.c,v
retrieving revision 1.39
diff -u -p -r1.39 e-gw-connection.c
--- backends/groupwise/e-gw-connection.c	23 Jan 2004 16:02:48 -0000	1.39
+++ backends/groupwise/e-gw-connection.c	26 Jan 2004 07:34:28 -0000
@@ -400,6 +400,7 @@ get_attendee_list_from_soap_parameter (S
 
                 SoupSoapParameter *subparam;
                 attendee = g_new0 (ECalComponentAttendee, 1);
+		
                 subparam = soup_soap_parameter_get_first_child_by_name
(param_recipient, "email");
                 if (subparam) {
                         email = soup_soap_parameter_get_string_value
(subparam);
@@ -499,7 +500,7 @@ get_e_cal_component_from_soap_parameter 
 	/* Message Body set to description */
 	subparam = soup_soap_parameter_get_first_child_by_name (param,
"message");
 	if (subparam) {
-		const char description; 
+		const char *description; 
 		GSList *l = NULL;
 
 		description = g_strdup (soup_soap_parameter_get_string_value
(subparam));
@@ -552,7 +553,6 @@ get_e_cal_component_from_soap_parameter 
         subparam = soup_soap_parameter_get_first_child_by_name
(subparam, "recipients");
         if (subparam) 
                 attendee_list = get_attendee_list_from_soap_parameter
(subparam);
-               
         if (attendee_list) {
                 GSList *l;
                 e_cal_component_set_attendee_list (comp,
attendee_list);
@@ -565,6 +565,7 @@ get_e_cal_component_from_soap_parameter 
                 g_slist_foreach (attendee_list, (GFunc) g_free, NULL);
         }
         
+
         /* FIXME  Property - status*/
         /* FIXME  Property priority */  
         subparam = soup_soap_parameter_get_first_child_by_name (param,
"options");
@@ -701,9 +702,9 @@ e_gw_connection_get_container_id (EGwCon
                 return NULL;
         } else {
 		SoupSoapParameter *subparam, *name_param, *id;
-		for (subparam = soup_soap_parameter_get_first_child_by_name (param,
"Folder");
+		for (subparam = soup_soap_parameter_get_first_child_by_name (param,
"folder");
 		     subparam != NULL;
-		     subparam = soup_soap_parameter_get_next_child_by_name (subparam,
"Folder")) {
+		     subparam = soup_soap_parameter_get_next_child_by_name (subparam,
"folder")) {
 			name_param = soup_soap_parameter_get_first_child_by_name (subparam,
"name");
 			if (name_param && (!strcmp (soup_soap_parameter_get_string_value
(name_param), name))) {
 				id = soup_soap_parameter_get_first_child_by_name (subparam, "id");
@@ -1297,7 +1298,7 @@ e_gw_connection_get_freebusy_info (EGwCo
                 subparam != NULL;
                 subparam = soup_soap_parameter_get_next_child_by_name
(subparam, "user")) {
                         SoupSoapParameter *param_blocks,
*subparam_block, *tmp;
-                        const char *uuid, *email, *name;
+                        const char *uuid = NULL, *email = NULL, *name =
NULL;
 
                         tmp =
soup_soap_parameter_get_first_child_by_name (subparam, "email");
                         if (tmp)






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