[evolution-data-server/libgdata-port: 1/5] Converted Google calendar backend to use the external libgdata



commit 6d5917bc4cf165e91149d925389731c863ec67e6
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Apr 19 08:37:27 2009 +0100

    Converted Google calendar backend to use the external libgdata
    
    Updated configure.in and the server Makefile to no longer build e-d-s'
    internal libgdata, and ported the calendar backend to use the external
    libgdata.
---
 calendar/backends/google/Makefile.am               |   12 +-
 .../backends/google/e-cal-backend-google-utils.c   |  386 ++++++++------------
 .../backends/google/e-cal-backend-google-utils.h   |   11 +-
 calendar/backends/google/e-cal-backend-google.c    |   64 ++--
 calendar/backends/google/e-cal-backend-google.h    |   14 +-
 configure.in                                       |   29 +--
 servers/Makefile.am                                |    2 +-
 7 files changed, 210 insertions(+), 308 deletions(-)

diff --git a/calendar/backends/google/Makefile.am b/calendar/backends/google/Makefile.am
index ad409de..bfaefe8 100644
--- a/calendar/backends/google/Makefile.am
+++ b/calendar/backends/google/Makefile.am
@@ -4,13 +4,10 @@ INCLUDES =						\
 	-I$(top_builddir)				\
 	-I$(top_srcdir)/calendar			\
 	-I$(top_builddir)/calendar			\
-	-I$(top_srcdir)/servers/google/libgdata		\
-	-I$(top_builddir)/servers/google/libgdata	\
-	-I$(top_srcdir)/servers/google/libgdata-google	\
-	-I$(top_builddir)/servers/google/libgdata-google\
 	$(EVOLUTION_CALENDAR_CFLAGS)			\
 	$(SOUP_CFLAGS)					\
-	$(DEBUG_CFLAGS)					
+	$(DEBUG_CFLAGS)					\
+	$(GDATA_CFLAGS)				
 
 extension_LTLIBRARIES = libecalbackendgoogle.la
 
@@ -27,10 +24,9 @@ libecalbackendgoogle_la_LIBADD =						\
 	$(top_builddir)/calendar/libedata-cal/libedata-cal-1.2.la		\
 	$(top_builddir)/libedataserver/libedataserver-1.2.la			\
 	$(top_builddir)/libebackend/libebackend-1.2.la				\
-	$(top_builddir)/servers/google/libgdata/libgdata-1.2.la			\
-	$(top_builddir)/servers/google/libgdata-google/libgdata-google-1.2.la	\
 	$(EVOLUTION_CALENDAR_LIBS)						\
-	$(SOUP_LIBS)
+	$(SOUP_LIBS)								\
+	$(GDATA_LIBS)
 
 libecalbackendgoogle_la_LDFLAGS =		\
 	-module -avoid-version $(NO_UNDEFINED)
diff --git a/calendar/backends/google/e-cal-backend-google-utils.c b/calendar/backends/google/e-cal-backend-google-utils.c
index acddb71..24a235b 100644
--- a/calendar/backends/google/e-cal-backend-google-utils.c
+++ b/calendar/backends/google/e-cal-backend-google-utils.c
@@ -2,8 +2,9 @@
 /*
  * Authors :
  *  Ebby Wiselyn <ebbyw gnome org>
+ *  Philip Withnall <philip tecnocode co uk>
  *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ * Copyright (C) 1999-2009 Novell, Inc. (www.novell.com)
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU Lesser General Public
@@ -60,13 +61,12 @@
 #define O_BINARY 0
 #endif
 
-#define GDATA_SCHEMA "http://schemas.google.com/g/2005#";
 #define CACHE_REFRESH_INTERVAL 10000
 
 /****************************************************** Google Connection Helper Functions ***********************************************/
 
-static gboolean gd_date_to_ical (EGoItem *item, const gchar *google_time_string, struct icaltimetype *itt, ECalComponentDateTime *dt, icaltimezone *default_zone);
-static gchar * get_date (ECalComponentDateTime dt);
+static gboolean gd_timeval_to_ical (EGoItem *item, GTimeVal *timeval, struct icaltimetype *itt, ECalComponentDateTime *dt, icaltimezone *default_zone);
+static void get_timeval (ECalComponentDateTime dt, GTimeVal *timeval);
 static gint utils_compare_ids (gconstpointer cache_id, gconstpointer modified_cache_id);
 static gchar * utils_form_query (const gchar *query);
 static gboolean get_deltas_timeout (gpointer cbgo);
@@ -89,7 +89,7 @@ e_cal_backend_google_utils_populate_cache (ECalBackendGoogle *cbgo)
 	ECalBackendGooglePrivate *priv;
 	icalcomponent_kind kind;
 	icaltimetype temp;
-	GSList *entries = NULL, *list = NULL;
+	GList *entries = NULL, *list = NULL;
 
 	cache = e_cal_backend_google_get_cache (cbgo);
 	kind = e_cal_backend_get_kind (E_CAL_BACKEND(cbgo));
@@ -100,8 +100,8 @@ e_cal_backend_google_utils_populate_cache (ECalBackendGoogle *cbgo)
 	priv = cbgo->priv;
 
 	for (list = entries; list != NULL; list = list->next) {
-		item->entry = (GDataEntry *)list->data;
-		comp =	e_go_item_to_cal_component (item, cbgo);
+		item->entry = GDATA_ENTRY(list->data);
+		comp = e_go_item_to_cal_component (item, cbgo);
 		if (comp && E_IS_CAL_COMPONENT(comp)) {
 			gchar *comp_str;
 			e_cal_component_commit_sequence (comp);
@@ -165,9 +165,9 @@ e_cal_backend_google_utils_create_cache (ECalBackendGoogle *cbgo)
  * e_cal_backend_google_utils_update:
  *
  * @handle:
- * Call this to Update changes, made to the calendar.
+ * Call this to update changes made to the calendar.
  *
- * Return value: TRUE if update is successful FALSE otherwise .
+ * Return value: %TRUE if update is successful, %FALSE otherwise.
  **/
 gpointer
 e_cal_backend_google_utils_update (gpointer handle)
@@ -178,12 +178,12 @@ e_cal_backend_google_utils_update (gpointer handle)
 
 	ECalBackendCache *cache;
 
-	GDataGoogleService *service;
+	GDataService *service;
 	static GStaticMutex updating = G_STATIC_MUTEX_INIT;
 	icalcomponent_kind kind;
 
-	GSList *ids_list = NULL, *cache_keys = NULL, *entries_list = NULL;
-	GSList *uid_list = NULL, *iter_list = NULL, *remove = NULL;
+	GList *entries_list = NULL, *iter_list = NULL, *ids_list = NULL;
+	GSList *uid_list = NULL, *remove = NULL, *cache_keys = NULL;
 	gboolean needs_to_insert = FALSE;
 	gchar *uri;
 
@@ -199,18 +199,18 @@ e_cal_backend_google_utils_update (gpointer handle)
 
 	cache = e_cal_backend_google_get_cache (cbgo);
 	item =  e_cal_backend_google_get_item (cbgo);
-	service = e_cal_backend_google_get_service (cbgo);
+	service = GDATA_SERVICE (e_cal_backend_google_get_service (cbgo));
 	uri = e_cal_backend_google_get_uri (cbgo);
 
-	item->feed = gdata_service_get_feed (GDATA_SERVICE(service), uri, NULL);
+	item->feed = gdata_service_query (GDATA_SERVICE(service), uri, NULL, GDATA_TYPE_CALENDAR_EVENT, NULL, NULL, NULL, NULL);
 	entries_list = gdata_feed_get_entries (item->feed);
 	cache_keys = e_cal_backend_cache_get_keys (cache);
 	kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgo));
 
 	for (iter_list = entries_list; iter_list != NULL; iter_list = iter_list->next) {
-		gchar *id;
-		id = gdata_entry_get_id ((GDataEntry *)iter_list->data);
-		ids_list = g_slist_prepend (ids_list, id);
+		const gchar *id;
+		id = gdata_entry_get_id (GDATA_ENTRY(iter_list->data));
+		ids_list = g_list_prepend (ids_list, (gchar*) id);
 	}
 
 	/* Find the Removed Item */
@@ -237,29 +237,25 @@ e_cal_backend_google_utils_update (gpointer handle)
 
 	/* Update the inserted entries */
 	if (needs_to_insert) {
-		utils_update_insertion (cbgo, cache, item,uid_list);
+		utils_update_insertion (cbgo, cache, item, uid_list);
 		needs_to_insert = FALSE;
 	}
 
 	if (ids_list) {
-		ids_list = NULL;
-		g_slist_free (ids_list);
+		g_list_free (ids_list);
 	}
 
 	if (uid_list) {
 		/*FIXME could crash while freeing*/
-		uid_list = NULL;
 		g_slist_free (uid_list);
 	}
 
 	if (entries_list) {
 		/* FIXME could crash while freeing */
-		entries_list = NULL;
-		g_slist_free (entries_list);
+		g_list_free (entries_list);
 	}
 
 	if (remove) {
-		remove = NULL;
 		g_slist_free (remove);
 	}
 
@@ -274,12 +270,11 @@ e_cal_backend_google_utils_connect (ECalBackendGoogle *cbgo)
 	EGoItem *item;
 	ESource *source;
 	GDataFeed *feed;
-	GDataGoogleService *service;
+	GDataCalendarService *service;
 
 	ECalSourceType source_type;
 	icalcomponent_kind kind;
 	icaltimezone *default_zone;
-	GSList *entries;
 	GError *error = NULL;
 	GThread *thread;
 	gchar *username, *password;
@@ -289,7 +284,7 @@ e_cal_backend_google_utils_connect (ECalBackendGoogle *cbgo)
 
 	source = e_cal_backend_get_source (E_CAL_BACKEND(cbgo));
 
-	service = gdata_google_service_new ("cl", "evolution-client-0.0.1");
+	service = gdata_calendar_service_new ("evolution-client-0.0.2");
 	e_cal_backend_google_set_service (cbgo, service);
 
 	suri = e_source_get_uri (source);
@@ -300,17 +295,14 @@ e_cal_backend_google_utils_connect (ECalBackendGoogle *cbgo)
 
 	username = e_cal_backend_google_get_username (cbgo);
 	password = e_cal_backend_google_get_password (cbgo);
-	gdata_service_set_credentials (GDATA_SERVICE(service), username, password);
-	feed = gdata_service_get_feed (GDATA_SERVICE(service), uri, NULL);
-
-	if (!feed) {
+	if (!gdata_service_authenticate (GDATA_SERVICE(service), username, password, NULL, NULL)) {
 		g_critical ("%s, Authentication Failed \n ", G_STRLOC);
 		if (username || password)
 			return GNOME_Evolution_Calendar_AuthenticationFailed;
 		return GNOME_Evolution_Calendar_AuthenticationRequired;
 	}
 
-	entries = gdata_feed_get_entries (feed);
+	feed = gdata_service_query (GDATA_SERVICE(service), uri, NULL, GDATA_TYPE_CALENDAR_EVENT, NULL, NULL, NULL, NULL);
 
 	item = g_new0 (EGoItem, 1);
 	item->entry = e_cal_backend_google_get_entry (cbgo);
@@ -361,7 +353,7 @@ e_cal_backend_google_utils_connect (ECalBackendGoogle *cbgo)
 	}
 
 	/* Creating cache when in remote  */
-	if (GDATA_IS_GOOGLE_SERVICE (service)) {
+	if (GDATA_IS_CALENDAR_SERVICE (service)) {
 		cache = e_cal_backend_cache_new (e_cal_backend_get_uri (E_CAL_BACKEND (cbgo)),source_type);
 		e_cal_backend_google_set_cache (cbgo, cache);
 	}
@@ -391,10 +383,10 @@ e_cal_backend_google_utils_connect (ECalBackendGoogle *cbgo)
 
 /**
  * e_go_item_to_cal_component:
- * @item a EGoItem object
- * @cbgo a ECalBackendGoogle object
+ * @item: an #EGoItem
+ * @cbgo: an #ECalBackendGoogle
  *
- * Creates a EGoItem from ECalComponent
+ * Creates an #EGoItem from an #ECalComponent
  **/
 
 ECalComponent *
@@ -405,10 +397,12 @@ e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo)
 	ECalComponentDateTime dt;
 	ECalComponentOrganizer *org = NULL;
 	icaltimezone *default_zone;
-	const char *description, *uid, *temp;
+	const char *description, *uid, *temp, *location = NULL;
+	GTimeVal timeval;
 	struct icaltimetype itt;
-	GSList *category_ids;
-	GSList *go_attendee_list = NULL, *l = NULL, *attendee_list = NULL;
+	GList *category_ids;
+	GList *go_attendee_list = NULL, *go_location_list = NULL, *l = NULL;
+	GSList *attendee_list = NULL;
 
 	comp = e_cal_component_new ();
 	default_zone = e_cal_backend_google_get_default_zone (cbgo);
@@ -427,22 +421,25 @@ e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo)
 		l.data = &text;
 		l.next = NULL;
 		e_cal_component_set_description_list (comp, &l);
-
 	}
 
 	/* Creation/Last update */
-	if (gd_date_to_ical (item, gdata_entry_get_custom (item->entry, "published"), &itt, &dt, default_zone))
+	gdata_entry_get_published (item->entry, &timeval);
+	if (gd_timeval_to_ical (item, &timeval, &itt, &dt, default_zone))
 		e_cal_component_set_created (comp, &itt);
 
-	if (gd_date_to_ical (item, gdata_entry_get_custom (item->entry, "updated"), &itt, &dt, default_zone))
+	gdata_entry_get_updated (item->entry, &timeval);
+	if (gd_timeval_to_ical (item, &timeval, &itt, &dt, default_zone))
 		e_cal_component_set_dtstamp (comp, &itt);
 
 	/* Start time */
-	if (gd_date_to_ical (item, gdata_entry_get_start_time (item->entry), &itt, &dt, default_zone))
+	gdata_calendar_event_get_start_time (GDATA_CALENDAR_EVENT(item->entry), &timeval);
+	if (gd_timeval_to_ical (item, &timeval, &itt, &dt, default_zone))
 		e_cal_component_set_dtstart (comp, &dt);
 
 	/* End time */
-	if (gd_date_to_ical (item, gdata_entry_get_end_time (item->entry), &itt, &dt, default_zone))
+	gdata_calendar_event_get_end_time (GDATA_CALENDAR_EVENT(item->entry), &timeval);
+	if (gd_timeval_to_ical (item, &timeval, &itt, &dt, default_zone))
 		e_cal_component_set_dtend (comp, &dt);
 
 	/* Summary of the Entry */
@@ -459,9 +456,9 @@ e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo)
 
 	/* Classification or Visibility */
 	temp = NULL;
-	temp = gdata_entry_get_visibility (item->entry);
+	temp = gdata_calendar_event_get_visibility (GDATA_CALENDAR_EVENT(item->entry));
 
-	if (temp)
+	if (strcmp (temp, "public") == 0)
 		e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PUBLIC);
 	else
 		e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_NONE);
@@ -470,55 +467,68 @@ e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo)
 	temp = NULL;
 
 	/* Transparency */
-	temp = gdata_entry_get_transparency (item->entry);
-	e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
+	temp = gdata_calendar_event_get_transparency (GDATA_CALENDAR_EVENT(item->entry));
+	if (strcmp (temp, "http://schemas.google.com/g/2005#event.opaque";) == 0)
+		e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_OPAQUE);
+	else if (strcmp (temp, "http://schemas.google.com/g/2005#event.transparent";) == 0)
+		e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
+	else
+		e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_UNKNOWN);
 
 	/* Attendees */
-	go_attendee_list = gdata_entry_get_attendee_list (item->entry);
-		
-	if (go_attendee_list != NULL) {
+	go_attendee_list = gdata_calendar_event_get_people (GDATA_CALENDAR_EVENT(item->entry));
 
-		for (l = go_attendee_list; l != NULL; l = l->next) {
-			Attendee *go_attendee;
-			ECalComponentAttendee *attendee;
+	for (l = go_attendee_list; l != NULL; l = l->next) {
+		GDataGDWho *go_attendee;
+		ECalComponentAttendee *attendee;
 
-			go_attendee = (Attendee *)l->data;
+		go_attendee = (GDataGDWho *)l->data;
 
-			attendee = g_new0 (ECalComponentAttendee, 1);
+		attendee = g_new0 (ECalComponentAttendee, 1);
 #if 0
-			_print_attendee ((Attendee *)l->data);
+		_print_attendee ((Attendee *)l->data);
 #endif
-			attendee->value = g_strconcat ("MAILTO:", go_attendee->attendee_email, NULL);
-			attendee->cn = g_strdup (go_attendee->attendee_value);
-			attendee->role = ICAL_ROLE_OPTPARTICIPANT;
-			attendee->status = ICAL_PARTSTAT_NEEDSACTION;
-			attendee->cutype =  ICAL_CUTYPE_INDIVIDUAL;
-
-			/* Check for Organizer */
-			if (go_attendee->attendee_rel) {
-				gchar *val;
-				val = strstr ((const gchar *)go_attendee->attendee_rel, (const gchar *)"organizer");
-				if (val != NULL && !strcmp ("organizer", val)) {	
-					org = g_new0 (ECalComponentOrganizer, 1);	
-
-					if (go_attendee->attendee_email) 
-						org->value = g_strconcat("MAILTO:", go_attendee->attendee_email, NULL);
-					if (go_attendee->attendee_value) 
-						org->cn =  g_strdup (go_attendee->attendee_value);
-				}	
-			}
-			
-			attendee_list = g_slist_prepend (attendee_list, attendee);	
+		attendee->value = g_strconcat ("MAILTO:", go_attendee->email, NULL);
+		attendee->cn = g_strdup (go_attendee->value_string);
+		/* TODO: This could be made less static once the GData API's in place */
+		attendee->role = ICAL_ROLE_OPTPARTICIPANT;
+		attendee->status = ICAL_PARTSTAT_NEEDSACTION;
+		attendee->cutype =  ICAL_CUTYPE_INDIVIDUAL;
+
+		/* Check for Organizer */
+		if (go_attendee->rel) {
+			gchar *val;
+			val = strstr ((const gchar *)go_attendee->rel, (const gchar *)"organizer");
+			if (val != NULL && !strcmp ("organizer", val)) {	
+				org = g_new0 (ECalComponentOrganizer, 1);	
+
+				if (go_attendee->email) 
+					org->value = g_strconcat ("MAILTO:", go_attendee->email, NULL);
+				if (go_attendee->value_string) 
+					org->cn = g_strdup (go_attendee->value_string);
+			}	
 		}
-		e_cal_component_set_attendee_list (comp, attendee_list);
+		
+		attendee_list = g_slist_prepend (attendee_list, attendee);	
 	}
-	
+	e_cal_component_set_attendee_list (comp, attendee_list);
+
 	/* Set the organizer if any */
 	if (org)
 		e_cal_component_set_organizer (comp, org);
-	
+
 	/* Location */
-	e_cal_component_set_location (comp, gdata_entry_get_location (item->entry));
+	go_location_list = gdata_calendar_event_get_places (GDATA_CALENDAR_EVENT(item->entry));
+
+	for (l = go_location_list; l != NULL; l = l->next) {
+		GDataGDWhere *go_location;
+
+		go_location = (GDataGDWhere *)l->data;
+
+		if (go_location->rel == NULL || strcmp (go_location->rel, "http://schemas.google.com/g/2005#event";) == 0)
+			location = go_location->value_string;
+	}
+	e_cal_component_set_location (comp, location);
 
 #if 0
 	/* temp hack to see how recurrence work */
@@ -527,8 +537,8 @@ e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo)
 	recur_id->datetime = dt;
 	recur_id->type = E_CAL_COMPONENT_RANGE_THISFUTURE;
 	e_cal_component_set_recurid (comp, recur_id);
-#endif
 	e_cal_component_set_dtend (comp, &dt);
+#endif
 
 	uid = gdata_entry_get_id (item->entry);
 	e_cal_component_set_uid (comp, (const char *)uid);
@@ -553,25 +563,29 @@ e_go_item_from_cal_component (ECalBackendGoogle *cbgo, ECalComponent *comp)
 	EGoItem *item;
 	ECalComponentText text;
 	ECalComponentDateTime dt;
-	gchar *temp, *term = NULL;
+	gchar *term = NULL;
 	icaltimezone *default_zone;
 	icaltimetype itt;
+	GTimeVal timeval;
 	const char *uid;
 	const char *location;
 	GSList *list = NULL;
-	GDataEntry *entry;
+	GDataCalendarEvent *entry;
+	GDataCategory *category;
 	ECalComponentText *t;
 	GSList *attendee_list = NULL, *l = NULL;
 
 	priv = cbgo->priv;
 
+	e_cal_component_get_uid (comp, &uid);
+
 	item = g_new0 (EGoItem, 1);
-	entry = gdata_entry_new ();
+	entry = gdata_calendar_event_new (uid);
 
 	/* Summary */
 	e_cal_component_get_summary (comp, &text);
-	if (text.value!=NULL)
-		gdata_entry_set_title (entry, text.value);
+	if (text.value != NULL)
+		gdata_entry_set_title (GDATA_ENTRY(entry), text.value);
 
 	default_zone = e_cal_backend_google_get_default_zone (cbgo);
 
@@ -579,51 +593,73 @@ e_go_item_from_cal_component (ECalBackendGoogle *cbgo, ECalComponent *comp)
 	e_cal_component_get_dtstart (comp, &dt);
 	itt = icaltime_convert_to_zone (*dt.value, default_zone);
 	dt.value = &itt;
-	temp = get_date (dt);
-	gdata_entry_set_start_time (entry, temp);
+	get_timeval (dt, &timeval);
+	gdata_calendar_event_set_start_time (entry, &timeval);
 
 	/* End Time */
 	e_cal_component_get_dtend (comp, &dt);
 	itt = icaltime_convert_to_zone (*dt.value, default_zone);
 	dt.value = &itt;
-	temp = get_date (dt);
-	gdata_entry_set_end_time (entry, temp);
+	get_timeval (dt, &timeval);
+	gdata_calendar_event_set_end_time (entry, &timeval);
 
 	/* Content / Description */
 	e_cal_component_get_description_list (comp, &list);
 	if (list != NULL) {
 		t = (ECalComponentText *)list->data;
-		gdata_entry_set_content (entry, t->value);
-	}
-	else
-		gdata_entry_set_content (entry, "");
-
-	e_cal_component_get_uid (comp, &uid);
-	gdata_entry_set_id (entry, g_strdup(uid));
+		gdata_entry_set_content (GDATA_ENTRY (entry), t->value);
+	} else
+		gdata_entry_set_content (GDATA_ENTRY (entry), "");
 
 	/* Location */
 	e_cal_component_get_location (comp, &location);
-	if (location)
-		gdata_entry_set_location (entry , location);
+	if (location) {
+		GDataGDWhere *where;
+
+		where = gdata_gd_where_new (NULL, location, NULL);
+		gdata_calendar_event_add_place (entry, where);
+	}
 
 	if (e_cal_backend_get_kind (E_CAL_BACKEND(cbgo)) == ICAL_VEVENT_COMPONENT)
-		term = g_strconcat (GDATA_SCHEMA, "event", NULL);
+		term = "http://schemas.google.com/g/2005#event";;
+
+	category = gdata_category_new (term, "http://schemas.google.com/g/2005#kind";, "label");
+	gdata_entry_add_category (GDATA_ENTRY(entry), category);
 
-	gdata_entry_create_categories (entry, g_strconcat (GDATA_SCHEMA, "kind", NULL),
-			"label",
-			term);
 	/* Attendee */
 	e_cal_component_get_attendee_list (comp, &attendee_list);
 
-	for (l = attendee_list; l!=NULL; l=l->next) {
+	for (l = attendee_list; l != NULL; l = l->next) {
 		ECalComponentAttendee *ecal_att;
+		GDataGDWho *who;
+		gchar *email;
+		const gchar *rel;
+
 		ecal_att = (ECalComponentAttendee *)l->data;
-		/* TODO Convert ECalComponentAttendee to Attendee, and change during parsing to store the types */
 
+		/* Extract the attendee's e-mail address from att->value, which should be in the form:
+		 * MAILTO:john foobar com
+		 */
+		email = strstr (ecal_att->value, "MAILTO:");
+		if (!email)
+			continue;
+		email += 7; /* length of MAILTO: */
+
+		rel = "http://schemas.google.com/g/2005#event.attendee";;
+		if (e_cal_component_has_organizer (comp)) {
+			ECalComponentOrganizer org;
+
+			e_cal_component_get_organizer (comp, &org);
+			if (strcmp (org.value, ecal_att->value) == 0)
+				rel = "http://schemas.google.com/g/2005#event.organizer";;
+		}
+
+		who = gdata_gd_who_new (rel, ecal_att->cn, email);
+		gdata_calendar_event_add_person (entry, who);
 	}
 
 	/* FIXME For transparency and status */
-	item->entry = entry;
+	item->entry = GDATA_ENTRY (entry);
 	return item;
 }
 
@@ -660,28 +696,6 @@ e_go_item_set_entry (EGoItem *item, GDataEntry *entry)
 	item->entry = entry;
 }
 
-/**
- *
- * gdata_entry_get_entry_by_id:
- * @entries List of entries
- * @id id to retreive
- * Gets the specified entry
- *
- **/
-GDataEntry *
-gdata_entry_get_entry_by_id (GSList *entries, const gchar *id)
-{
-	GSList *l = NULL;
-
-	for (l = entries; l != NULL;l = l->next) {
-		if (!strcmp (gdata_entry_get_id ((GDataEntry *)l->data), id)) {
-			return l->data;
-		}
-	}
-
-	return NULL;
-}
-
 
 /***************************************************************** Utility Functions *********************************************/
 
@@ -705,17 +719,16 @@ utils_update_insertion (ECalBackendGoogle *cbgo, ECalBackendCache *cache, EGoIte
 {
 	EGoItem *item_t;
 	ECalComponent *comp;
-	GSList *list = NULL, *entries_list = NULL;
+	GSList *list = NULL;
 	GDataEntry *entry;
 	gchar *temp;
 
 	comp = e_cal_component_new ();
 	item_t = g_new0 (EGoItem, 1);
 	item_t->feed = item->feed;
-	entries_list = gdata_feed_get_entries (item->feed);
 
 	for (list = uid_list; list != NULL; list = list->next) {
-		entry = gdata_entry_get_entry_by_id (entries_list, list->data);
+		entry = gdata_feed_look_up_entry (item->feed, list->data);
 		item_t->entry = entry;
 		comp = e_go_item_to_cal_component (item_t, cbgo);
 
@@ -735,8 +748,6 @@ utils_update_insertion (ECalBackendGoogle *cbgo, ECalBackendCache *cache, EGoIte
 	g_free (item_t);
 	if (list)
 		g_slist_free (list);
-	if (entries_list)
-		g_slist_free (entries_list);
 }
 
 
@@ -769,47 +780,20 @@ utils_update_deletion (ECalBackendGoogle *cbgo, ECalBackendCache *cache, GSList
 }
 
 /**
- * get_date: Returns date in gdata format '2006-04-17T17:00:00.000Z'
+ * get_timeval: Returns date in a GTimeVal
  * @dt a #ECalComponentDateTime value
+ * @timeval a #GTimeVal
  **/
-/* FIXME use proper functions to manipulate the dates */
-gchar *
-get_date (ECalComponentDateTime dt)
+static void
+get_timeval (ECalComponentDateTime dt, GTimeVal *timeval)
 {
-	char *temp;
-	struct icaltimetype itt;
-	struct icaltimetype *itt_u;
-	gchar *month;
-	gchar *day, *minute, *hour, *second;
-
-	itt_u = dt.value;
-	itt.year = itt_u->year;
-	itt.month = itt_u->month;
-	itt.day = itt_u->day;
-	itt.hour = itt_u->hour;
-	itt.minute = itt_u->minute;
-	itt.second = itt_u->second;
-	itt.is_utc = itt_u->is_utc;
-	itt.is_date = itt_u->is_date;
-	itt.is_daylight = itt_u->is_daylight;
-	itt.zone = itt_u->zone;
-
-	month = (itt.month<10) ? g_strdup_printf("0%d", itt.month):g_strdup_printf ("%d", itt.month);
-	day = (itt.day < 10) ? g_strdup_printf("0%d", itt.day):g_strdup_printf ("%d", itt.day);
-
-	hour = (itt.hour<10) ? g_strdup_printf("0%d", itt.hour):g_strdup_printf ("%d", itt.hour);
-	minute = (itt.minute<10) ? g_strdup_printf("0%d", itt.minute):g_strdup_printf ("%d", itt.minute);
-	second = (itt.second<10) ? g_strdup_printf ("0%d", itt.second):g_strdup_printf ("%d", itt.second);
-
-	/* FIXME not the best way to do this */
-	temp =  g_strdup_printf ("%d-%s-%sT%s:%s:%s.000", itt.year, month, day, hour, minute, second);
-	g_free (month);
-	g_free (day);
-	g_free (hour);
-	g_free (minute);
-	g_free (second);
-
-	return temp;
+	time_t tt;
+
+	/* GTimeVals are always in UTC */
+	tt = icaltime_as_timet_with_zone (*(dt.value), icaltimezone_get_utc_timezone ());
+
+	timeval->tv_sec = (glong) tt;
+	timeval->tv_usec = 0;
 }
 
 static gboolean
@@ -831,10 +815,10 @@ get_deltas_timeout (gpointer cbgo)
 
 /**
  *
- * gd_date_to_ical:
+ * gd_timeval_to_ical:
  * Helper Function to convert a gdata format date to ical date
  * @item item from which the time comes. It's used to get to the feed's timezone
- * @google_time_string date in gdata format eg: '2006-04-17T17:00:00.000Z' or '2006-04-17T17:00:00.000+07:00'
+ * @timeval date as a #GTimeVal
  * @iit Resulting icaltimetype.
  * @dt Resulting ECalComponentDateTime.
  * @default_zone Default time zone for the backend. If set, then the time will be converted to that timezone.
@@ -842,59 +826,15 @@ get_deltas_timeout (gpointer cbgo)
  * @note Do not free itt or dt values, those come from buildin structures held by libical
  **/
 static gboolean
-gd_date_to_ical (EGoItem *item, const gchar *google_time_string, struct icaltimetype *itt, ECalComponentDateTime *dt, icaltimezone *default_zone)
+gd_timeval_to_ical (EGoItem *item, GTimeVal *timeval, struct icaltimetype *itt, ECalComponentDateTime *dt, icaltimezone *default_zone)
 {
-	gchar *s, *string, *dup;
-	int count = 0;
-	gboolean is_utc = TRUE;
-
 	g_return_val_if_fail (itt != NULL, FALSE);
 	g_return_val_if_fail (dt != NULL, FALSE);
 
-	if (!google_time_string || !*google_time_string)
+	if (!timeval)
 		return FALSE;
 
-	dup = g_strdup (google_time_string);
-	s = dup;
-	string = dup;
-
-	/* Strip of the string to the gdata format */
-	while (s[0] != '\0') {
-		if ((s[0] != '-') && (s[0] != '+') && (s[0] != ':') && (s[0] != '.')) {
-			*string = *s;
-			string = string + 1;
-			s = s + 1;
-			count = count + 1;
-		}else
-			s = s + 1;
-
-		if (count == 15) {
-			if (strlen (s) >= 5) {
-				is_utc = s [4] == 'Z';
-			}
-
-			string[0] = '\0';
-			break;
-		}
-		if (s[1] == '\0')
-			string[0] = '\0';
-	}
-
-	*itt = icaltime_from_string (dup);
-
-	if (!is_utc) {
-		const char *zone_name = item->feed ? gdata_feed_get_timezone (item->feed) : NULL;
-
-		if (zone_name) {
-			icaltimezone *zone = icaltimezone_get_builtin_timezone (zone_name);
-
-			if (zone)
-				icaltime_set_timezone (itt, zone);
-		}
-	}
-
-	if (!icaltime_get_timezone (*itt))
-		icaltime_set_timezone (itt, icaltimezone_get_utc_timezone ());
+	*itt = icaltime_from_timet_with_zone (timeval->tv_sec, 0, icaltimezone_get_utc_timezone ());
 
 	if (default_zone)
 		*itt = icaltime_convert_to_zone (*itt, default_zone);
@@ -902,7 +842,5 @@ gd_date_to_ical (EGoItem *item, const gchar *google_time_string, struct icaltime
 	dt->value = itt;
 	dt->tzid = icaltimezone_get_tzid ((icaltimezone *) icaltime_get_timezone (*itt));
 
-	g_free (dup);
-
 	return TRUE;
 }
diff --git a/calendar/backends/google/e-cal-backend-google-utils.h b/calendar/backends/google/e-cal-backend-google-utils.h
index 0ecdb97..612cd55 100644
--- a/calendar/backends/google/e-cal-backend-google-utils.h
+++ b/calendar/backends/google/e-cal-backend-google-utils.h
@@ -2,8 +2,9 @@
 /*
  * Authors :
  *  Ebby Wiselyn <ebbywiselyn gmail com>
+ *  Philip Withnall <philip tecnocode co uk>
  *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ * Copyright (C) 1999-2009 Novell, Inc. (www.novell.com)
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU Lesser General Public
@@ -25,10 +26,7 @@
 #endif
 #include <e-cal-backend-google.h>
 #include <libecal/e-cal-component.h>
-#include <servers/google/libgdata/gdata-entry.h>
-#include <servers/google/libgdata/gdata-feed.h>
-#include <servers/google/libgdata-google/gdata-google-service.h>
-#include <servers/google/libgdata/gdata-service-iface.h>
+#include <gdata/gdata-entry.h>
 
 ECalComponent *
 e_go_item_to_cal_component (EGoItem *item, ECalBackendGoogle *cbgo);
@@ -45,9 +43,6 @@ e_go_item_from_cal_component (ECalBackendGoogle *cbgo, ECalComponent *comp);
 gpointer
 e_cal_backend_google_utils_update (gpointer handle);
 
-GDataEntry *
-gdata_entry_get_entry_by_id (GSList *entries, const gchar *id);
-
 ECalBackendSyncStatus
 e_cal_backend_google_utils_connect (ECalBackendGoogle *cbgo);
 
diff --git a/calendar/backends/google/e-cal-backend-google.c b/calendar/backends/google/e-cal-backend-google.c
index 4d49f8c..37f6e99 100644
--- a/calendar/backends/google/e-cal-backend-google.c
+++ b/calendar/backends/google/e-cal-backend-google.c
@@ -2,8 +2,9 @@
 /*
  * Authors :
  *  Ebby Wiselyn <ebbyw gnome org>
+ *  Philip Withnall <philip tecnocode co uk>
  *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ * Copyright (C) 1999-2009 Novell, Inc. (www.novell.com)
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU Lesser General Public
@@ -46,10 +47,9 @@
 #include <libecal/e-cal-time-util.h>
 #include <libecal/e-cal-util.h>
 
-#include <servers/google/libgdata/gdata-entry.h>
-#include <servers/google/libgdata/gdata-feed.h>
-#include <servers/google/libgdata-google/gdata-google-service.h>
-#include <servers/google/libgdata/gdata-service-iface.h>
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-feed.h>
+#include <gdata/services/calendar/gdata-calendar-service.h>
 #include "e-cal-backend-google-utils.h"
 #include "e-cal-backend-google.h"
 
@@ -62,7 +62,7 @@ struct _ECalBackendGooglePrivate {
 	ECalBackendCache *cache;
 	ESource *source;
 
-	GDataGoogleService *service;
+	GDataCalendarService *service;
 	GMutex *mutex;
 	GDataEntry *entry;
 	GSList *entries;
@@ -578,7 +578,7 @@ static receive_object (ECalBackendGoogle *cbgo, EDataCal *cal, icalcomponent *ic
 	if (!GDATA_IS_ENTRY(entry))
 		return GNOME_Evolution_Calendar_InvalidObject;	
 
-	updated_entry = gdata_service_insert_entry (GDATA_SERVICE(priv->service), priv->uri, entry, NULL);
+	updated_entry = gdata_service_insert_entry (GDATA_SERVICE(priv->service), priv->uri, entry, NULL, NULL);
 
 	if (updated_entry) {
 		/* FIXME */
@@ -890,10 +890,8 @@ e_cal_backend_google_modify_object (ECalBackendSync *backend, EDataCal *cal, con
 	icalcomponent *icalcomp;
 	ECalComponent *comp = NULL, *cache_comp = NULL;
 	EGoItem *item;
-	const char *uid=NULL, *rid=NULL;
-	GDataEntry *entry, *entry_from_server=NULL, *updated_entry=NULL;
-	gchar *edit_link;
-	GSList *l;
+	const char *uid = NULL, *rid = NULL;
+	GDataEntry *entry, *entry_from_server = NULL, *updated_entry = NULL;
 
 	*old_object = NULL;
 	cbgo = E_CAL_BACKEND_GOOGLE (backend);
@@ -928,7 +926,8 @@ e_cal_backend_google_modify_object (ECalBackendSync *backend, EDataCal *cal, con
 			}
 
 			item = e_go_item_from_cal_component (cbgo, comp);
-			item->feed = gdata_service_get_feed (GDATA_SERVICE(priv->service), priv->uri, NULL);
+			item->feed = gdata_service_query (GDATA_SERVICE(priv->service), priv->uri, NULL, GDATA_TYPE_CALENDAR_EVENT,
+							  NULL, NULL, NULL, NULL);
 			entry = item->entry;
 
 			if (!item->feed) {
@@ -937,22 +936,20 @@ e_cal_backend_google_modify_object (ECalBackendSync *backend, EDataCal *cal, con
 				return GNOME_Evolution_Calendar_OtherError;
 			}
 
-			l = gdata_feed_get_entries (item->feed);
-			entry_from_server = gdata_entry_get_entry_by_id (l, uid);
+			entry_from_server = gdata_feed_look_up_entry (item->feed, uid);
 
 			if (!GDATA_IS_ENTRY(entry_from_server)) {
 				g_object_unref (comp);
 				return GNOME_Evolution_Calendar_OtherError;
 			}
 
-			edit_link = gdata_entry_get_edit_link (entry_from_server);
-			updated_entry = gdata_service_update_entry_with_link (GDATA_SERVICE (priv->service), 
-					entry, edit_link, NULL);
+			updated_entry = gdata_service_update_entry (GDATA_SERVICE(priv->service), entry, NULL, NULL);
 
 			if (updated_entry) {
 				/* FIXME Response from server contains, additional info about GDataEntry 
 				 * Store and use them later
 				 */
+				g_object_unref (updated_entry);
 			}
 
 			break;
@@ -982,7 +979,6 @@ e_cal_backend_google_remove_object (ECalBackendSync *backend, EDataCal *cal,
 	ECalBackendGooglePrivate *priv;
 	ECalComponent *comp = NULL;
 	char *calobj = NULL;
-	GSList *entries = NULL;
 	EGoItem *item;
 
 	cbgo = E_CAL_BACKEND_GOOGLE (backend);
@@ -991,9 +987,7 @@ e_cal_backend_google_remove_object (ECalBackendSync *backend, EDataCal *cal,
 
 	*old_object = *object = NULL;
 	/* FIXME */
-	item->feed = gdata_service_get_feed (GDATA_SERVICE(priv->service), priv->uri, NULL);
-
-	entries = gdata_feed_get_entries (item->feed);
+	item->feed = gdata_service_query (GDATA_SERVICE(priv->service), priv->uri, NULL, GDATA_TYPE_CALENDAR_EVENT, NULL, NULL, NULL, NULL);
 
 	if (priv->mode == CAL_MODE_REMOTE) {
 		ECalBackendSyncStatus status;
@@ -1005,8 +999,6 @@ e_cal_backend_google_remove_object (ECalBackendSync *backend, EDataCal *cal,
 
 		if (status != GNOME_Evolution_Calendar_Success) {
 			g_free (calobj);
-			if (entries)
-				g_slist_free (entries);
 			return status;
 		}
 
@@ -1017,8 +1009,6 @@ e_cal_backend_google_remove_object (ECalBackendSync *backend, EDataCal *cal,
 
 		if (!icalcomp) {
 			g_free (calobj);
-			if (entries)
-				g_slist_free (entries);
 			return GNOME_Evolution_Calendar_InvalidObject;
 		}
 
@@ -1027,24 +1017,20 @@ e_cal_backend_google_remove_object (ECalBackendSync *backend, EDataCal *cal,
 		e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgo), id, comp_str, NULL);
 		g_free (comp_str);
 
-		entry = gdata_entry_get_entry_by_id (entries, uid);
+		entry = gdata_feed_look_up_entry (item->feed, uid);
 
 		if (!entry) {
 			g_free (calobj);
-			if (entries)
-				g_slist_free (entries);
 			return GNOME_Evolution_Calendar_InvalidObject;
 		}
 
-	        gdata_service_delete_entry (GDATA_SERVICE(priv->service), entry, NULL);
+	        gdata_service_delete_entry (GDATA_SERVICE(priv->service), entry, NULL, NULL);
 		*object = NULL;
 		*old_object = strdup (calobj);
 	}
 
 	if (calobj)
 		g_free (calobj);
-	if (entries)
-		g_slist_free (entries);
 
 	return GNOME_Evolution_Calendar_Success;
 }
@@ -1058,7 +1044,6 @@ e_cal_backend_google_create_object (ECalBackendSync *backend, EDataCal *cal, cha
 	ECalComponent *comp;
 	EGoItem *item;
 	GDataEntry *entry;
-	const gchar *id;
 
 	cbgo = E_CAL_BACKEND_GOOGLE (backend);
 
@@ -1090,18 +1075,21 @@ e_cal_backend_google_create_object (ECalBackendSync *backend, EDataCal *cal, cha
 		case CAL_MODE_REMOTE: {
 			/* Create an appointment */
 			GDataEntry *updated_entry;
+			const gchar *id;
 
 			item = e_go_item_from_cal_component (cbgo, comp);
 			entry = e_go_item_get_entry (item);
 
-			updated_entry = gdata_service_insert_entry (GDATA_SERVICE(priv->service),
-					priv->uri, entry, NULL);
-			if (!GDATA_IS_ENTRY (updated_entry)) {
+			updated_entry = gdata_service_insert_entry (GDATA_SERVICE(priv->service), priv->uri, entry, NULL, NULL);
+
+			if (!updated_entry) {
 				g_message ("\n Entry Insertion Failed %s \n", G_STRLOC);
+				break;
 			}
 
 			id = gdata_entry_get_id (updated_entry);
 			e_cal_component_set_uid (comp, id);
+			g_object_unref (updated_entry);
 
 			break; }
 		default:
@@ -1478,7 +1466,7 @@ e_cal_backend_google_set_item (ECalBackendGoogle *cbgo, EGoItem *item)
  *
  **/
 void
-e_cal_backend_google_set_service (ECalBackendGoogle *cbgo, GDataGoogleService *service)
+e_cal_backend_google_set_service (ECalBackendGoogle *cbgo, GDataCalendarService *service)
 {
 	ECalBackendGooglePrivate *priv;
 
@@ -1632,10 +1620,10 @@ e_cal_backend_google_get_item (ECalBackendGoogle *cbgo)
 /**
  * e_cal_backend_google_get_service:
  * @cbgo a #ECalBackendGoogle object
- * Gets the #GDataGoogleService service object .
+ * Gets the #GDataCalendarService service object .
  *
  **/
-GDataGoogleService *
+GDataCalendarService *
 e_cal_backend_google_get_service (ECalBackendGoogle *cbgo)
 {
 	ECalBackendGooglePrivate *priv;
diff --git a/calendar/backends/google/e-cal-backend-google.h b/calendar/backends/google/e-cal-backend-google.h
index 89e273f..0c217f7 100644
--- a/calendar/backends/google/e-cal-backend-google.h
+++ b/calendar/backends/google/e-cal-backend-google.h
@@ -2,8 +2,9 @@
 /*
  * Authors :
  *  Ebby Wiselyn <ebbywiselyn gmail com>
+ *  Philip Withnall <philip tecnocode co uk>
  *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ * Copyright (C) 1999-2009 Novell, Inc. (www.novell.com)
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU Lesser General Public
@@ -27,10 +28,9 @@
 #include <libedata-cal/e-cal-backend-sync.h>
 #include <libedata-cal/e-cal-backend-cache.h>
 
-#include <servers/google/libgdata/gdata-entry.h>
-#include <servers/google/libgdata/gdata-feed.h>
-#include <servers/google/libgdata-google/gdata-google-service.h>
-#include <servers/google/libgdata/gdata-service-iface.h>
+#include <gdata/gdata-entry.h>
+#include <gdata/gdata-feed.h>
+#include <gdata/services/calendar/gdata-calendar-service.h>
 
 G_BEGIN_DECLS
 
@@ -66,7 +66,7 @@ GType e_cal_backend_google_get_type (void);
 EGoItem * e_cal_backend_google_get_item (ECalBackendGoogle *cbgo);
 GDataEntry * e_cal_backend_google_get_entry (ECalBackendGoogle *cbgo);
 ECalBackendCache * e_cal_backend_google_get_cache (ECalBackendGoogle *cbgo);
-GDataGoogleService * e_cal_backend_google_get_service (ECalBackendGoogle *cbgo);
+GDataCalendarService * e_cal_backend_google_get_service (ECalBackendGoogle *cbgo);
 gchar * e_cal_backend_google_get_uri (ECalBackendGoogle *cbgo);
 icaltimezone * e_cal_backend_google_get_default_zone (ECalBackendGoogle *cbgo);
 gboolean e_cal_backend_google_get_mode_changed (ECalBackendGoogle *cbgo);
@@ -78,7 +78,7 @@ guint e_cal_backend_google_get_timeout_id (ECalBackendGoogle *cbgo);
 void e_cal_backend_google_set_entry (ECalBackendGoogle *cbgo, GDataEntry *entry);
 void e_cal_backend_google_set_cache (ECalBackendGoogle *cbgo, ECalBackendCache *cache);
 void e_cal_backend_google_set_item (ECalBackendGoogle *cbgo, EGoItem *item);
-void e_cal_backend_google_set_service (ECalBackendGoogle *cbgo, GDataGoogleService *service);
+void e_cal_backend_google_set_service (ECalBackendGoogle *cbgo, GDataCalendarService *service);
 void e_cal_backend_google_set_uri (ECalBackendGoogle *cbgo, gchar *uri);
 void e_cal_backend_google_set_item (ECalBackendGoogle *cbgo, EGoItem *item);
 void e_cal_backend_google_set_mode_changed (ECalBackendGoogle *cbgo, gboolean mode_changed);
diff --git a/configure.in b/configure.in
index 29813aa..7b6a3bc 100644
--- a/configure.in
+++ b/configure.in
@@ -30,6 +30,7 @@ m4_define([libglade_minimum_version], [2.0.0])          # XXX Just a Guess
 m4_define([libgnome_minimum_version], [2.0.0])          # XXX Just a Guess
 m4_define([libxml_minimum_version], [2.0.0])            # XXX Just a Guess
 m4_define([libsoup_minimum_version], [2.3.0])
+m4_define([libgdata_minimum_version], [0.1.1])
 m4_define([gnome_keyring_minimum_version], [2.20.1])
 m4_define([sqlite_minimum_version], [3.5])
 m4_define([gweather_minimum_version], [2.25.4])
@@ -90,14 +91,6 @@ LIBEXCHANGE_STORAGE_CURRENT=3
 LIBEXCHANGE_STORAGE_REVISION=0
 LIBEXCHANGE_STORAGE_AGE=0
 
-LIBGDATA_CURRENT=1
-LIBGDATA_REVISION=0
-LIBGDATA_AGE=0
-
-LIBGDATA_GOOGLE_CURRENT=1
-LIBGDATA_GOOGLE_REVISION=0
-LIBGDATA_GOOGLE_AGE=0
-
 LIBEBACKEND_CURRENT=0
 LIBEBACKEND_REVISION=0
 LIBEBACKEND_AGE=0
@@ -132,12 +125,6 @@ AC_SUBST(LIBCAMEL_AGE)
 AC_SUBST(LIBEXCHANGE_STORAGE_CURRENT)
 AC_SUBST(LIBEXCHANGE_STORAGE_REVISION)
 AC_SUBST(LIBEXCHANGE_STORAGE_AGE)
-AC_SUBST(LIBGDATA_CURRENT)
-AC_SUBST(LIBGDATA_REVISION)
-AC_SUBST(LIBGDATA_AGE)
-AC_SUBST(LIBGDATA_GOOGLE_CURRENT)
-AC_SUBST(LIBGDATA_GOOGLE_REVISION)
-AC_SUBST(LIBGDATA_GOOGLE_AGE)
 AC_SUBST(LIBEBACKEND_CURRENT)
 AC_SUBST(LIBEBACKEND_REVISION)
 AC_SUBST(LIBEBACKEND_AGE)
@@ -241,7 +228,8 @@ PKG_CHECK_MODULES(GNOME_PLATFORM,
          libglade-2.0 >= libglade_minimum_version
          libgnome-2.0 >= libgnome_minimum_version
          libxml-2.0 >= libxml_minimum_version
-         libsoup-2.4 >= libsoup_minimum_version])
+         libsoup-2.4 >= libsoup_minimum_version
+         libgdata >= libgdata_minimum_version])
 
 LIBICAL_REQUIRED=libical_minimum_version
 AC_SUBST(LIBICAL_REQUIRED)
@@ -1564,8 +1552,10 @@ AC_SUBST(E_FACTORY_CFLAGS)
 AC_SUBST(E_FACTORY_LIBS)
 
 dnl --- Google flags
-GDATA_DEPS="libsoup-2.4 libxml-2.0"
-EVO_SET_COMPILE_FLAGS(GDATA, $GDATA_DEPS)
+LIBGDATA_REQUIRED=libgdata_minimum_version
+AC_SUBST(LIBGDATA_REQUIRED)
+
+EVO_SET_COMPILE_FLAGS(GDATA, libgdata)
 AC_SUBST(GDATA_CFLAGS)
 AC_SUBST(GDATA_LIBS)
 
@@ -1808,11 +1798,6 @@ servers/exchange/xntlm/Makefile
 servers/exchange/lib/Makefile
 servers/exchange/storage/Makefile
 servers/exchange/storage/libexchange-storage.pc
-servers/google/Makefile
-servers/google/libgdata/Makefile
-servers/google/libgdata/libgdata.pc
-servers/google/libgdata-google/Makefile 
-servers/google/libgdata-google/libgdata-google.pc
 src/Makefile
 win32/Makefile
 docs/Makefile
diff --git a/servers/Makefile.am b/servers/Makefile.am
index 54906a8..78c93bc 100644
--- a/servers/Makefile.am
+++ b/servers/Makefile.am
@@ -4,4 +4,4 @@ else
 EXCHANGE =
 endif
 
-SUBDIRS = groupwise $(EXCHANGE) google
+SUBDIRS = groupwise $(EXCHANGE)



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