[evolution-exchange] Adapt to Camel API changes.



commit 4a18ac417629b562aab0799d096e7eb0b209c695
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri May 7 15:15:16 2010 -0400

    Adapt to Camel API changes.

 camel/camel-exchange-folder.c |   15 +++++----------
 camel/camel-exchange-store.c  |   27 +++++++++++----------------
 camel/camel-exchange-utils.c  |    2 +-
 eplugin/exchange-folder.c     |    3 +--
 4 files changed, 18 insertions(+), 29 deletions(-)
---
diff --git a/camel/camel-exchange-folder.c b/camel/camel-exchange-folder.c
index 19866f7..5d16a05 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -832,8 +832,7 @@ camel_exchange_folder_add_message (CamelExchangeFolder *exch,
 	changes = camel_folder_change_info_new ();
 	camel_folder_change_info_add_uid (changes, uid);
 	camel_folder_change_info_recent_uid (changes, uid);
-	camel_object_trigger_event (CAMEL_OBJECT (exch),
-				    "folder_changed", changes);
+	camel_folder_changed (CAMEL_FOLDER (exch), changes);
 	camel_folder_change_info_free (changes);
 	return;
 }
@@ -877,8 +876,7 @@ camel_exchange_folder_remove_message (CamelExchangeFolder *exch,
 
 	changes = camel_folder_change_info_new ();
 	camel_folder_change_info_remove_uid (changes, uid);
-	camel_object_trigger_event (CAMEL_OBJECT (exch), "folder_changed",
-				    changes);
+	camel_folder_changed (CAMEL_FOLDER (exch), changes);
 	camel_folder_change_info_free (changes);
 }
 
@@ -926,8 +924,7 @@ camel_exchange_folder_update_message_flags (CamelExchangeFolder *exch,
 
 		changes = camel_folder_change_info_new ();
 		camel_folder_change_info_change_uid (changes, uid);
-		camel_object_trigger_event (CAMEL_OBJECT (exch),
-					    "folder_changed", changes);
+		camel_folder_changed (CAMEL_FOLDER (exch), changes);
 		camel_folder_change_info_free (changes);
 	}
 }
@@ -967,8 +964,7 @@ camel_exchange_folder_update_message_flags_ex (CamelExchangeFolder *exch,
 
 		changes = camel_folder_change_info_new ();
 		camel_folder_change_info_change_uid (changes, uid);
-		camel_object_trigger_event (CAMEL_OBJECT (exch),
-					    "folder_changed", changes);
+		camel_folder_changed (CAMEL_FOLDER (exch), changes);
 		camel_folder_change_info_free (changes);
 	}
 }
@@ -1002,8 +998,7 @@ camel_exchange_folder_update_message_tag (CamelExchangeFolder *exch,
 	camel_folder_summary_touch (folder->summary);
 	changes = camel_folder_change_info_new ();
 	camel_folder_change_info_change_uid (changes, uid);
-	camel_object_trigger_event (CAMEL_OBJECT (exch),
-				    "folder_changed", changes);
+	camel_folder_changed (CAMEL_FOLDER (exch), changes);
 	camel_folder_change_info_free (changes);
 }
 
diff --git a/camel/camel-exchange-store.c b/camel/camel-exchange-store.c
index 5b98e18..c5de197 100644
--- a/camel/camel-exchange-store.c
+++ b/camel/camel-exchange-store.c
@@ -355,7 +355,7 @@ exchange_store_connect (CamelService *service,
 
 	g_mutex_lock (exch->connect_lock);
 
-	online_mode = camel_session_is_online (service->session);
+	online_mode = camel_session_get_online (service->session);
 
 	if (online_mode) {
 		camel_exchange_get_password (service, ex);
@@ -617,7 +617,6 @@ exchange_store_rename_folder (CamelStore *store,
 	GArray *folder_flags = NULL;
 	CamelFolderInfo *info;
 	gint i;
-	CamelRenameInfo reninfo;
 	CamelFolder *folder;
 
 	CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
@@ -659,27 +658,23 @@ exchange_store_rename_folder (CamelStore *store,
 		info = postprocess_tree (info);
 	g_ptr_array_free (folders, TRUE);
 
-	reninfo.new = info;
-	reninfo.old_base = (gchar *)old_name;
-
 	g_mutex_lock (exch->folders_lock);
-	folder = g_hash_table_lookup (exch->folders, reninfo.old_base);
+	folder = g_hash_table_lookup (exch->folders, old_name);
 	if (folder) {
-		g_hash_table_remove (exch->folders, reninfo.old_base);
+		g_hash_table_remove (exch->folders, old_name);
 		g_object_unref (folder);
 	}
 	g_mutex_unlock (exch->folders_lock);
 
-	camel_object_trigger_event (CAMEL_OBJECT (exch),
-				    "folder_renamed", &reninfo);
-	camel_folder_info_free (reninfo.new);
+	camel_store_folder_renamed (CAMEL_STORE (exch), old_name, info);
+	camel_folder_info_free (info);
 
 	return TRUE;
 }
 
 static gboolean
-exchange_store_folder_subscribed (CamelStore *store,
-                                  const gchar *folder_name)
+exchange_store_folder_is_subscribed (CamelStore *store,
+                                     const gchar *folder_name)
 {
 	gboolean is_subscribed = FALSE;
 
@@ -772,7 +767,7 @@ camel_exchange_store_class_init (CamelExchangeStoreClass *class)
 	store_class->create_folder = exchange_store_create_folder;
 	store_class->delete_folder = exchange_store_delete_folder;
 	store_class->rename_folder = exchange_store_rename_folder;
-	store_class->folder_subscribed = exchange_store_folder_subscribed;
+	store_class->folder_is_subscribed = exchange_store_folder_is_subscribed;
 	store_class->subscribe_folder = exchange_store_subscribe_folder;
 	store_class->unsubscribe_folder = exchange_store_unsubscribe_folder;
 	store_class->can_refresh_folder = exchange_store_can_refresh_folder;
@@ -809,7 +804,7 @@ camel_exchange_store_connected (CamelExchangeStore *store, CamelException *ex)
 	session = service->session;
 
 	if (service->status != CAMEL_SERVICE_CONNECTED &&
-	    camel_session_is_online (session) &&
+	    camel_session_get_online (session) &&
 	    !camel_service_connect (service, ex)) {
 		return FALSE;
 	}
@@ -828,7 +823,7 @@ camel_exchange_store_folder_created (CamelExchangeStore *estore, const gchar *na
 	info = make_folder_info (estore, g_strdup (name), uri, -1, 0);
 	info->flags |= CAMEL_FOLDER_NOCHILDREN;
 
-	camel_object_trigger_event (CAMEL_OBJECT (estore), "folder_subscribed", info);
+	camel_store_folder_subscribed (CAMEL_STORE (estore), info);
 
 	camel_folder_info_free (info);
 }
@@ -852,7 +847,7 @@ camel_exchange_store_folder_deleted (CamelExchangeStore *estore, const gchar *na
 	}
 	g_mutex_unlock (estore->folders_lock);
 
-	camel_object_trigger_event (CAMEL_OBJECT (estore), "folder_unsubscribed", info);
+	camel_store_folder_unsubscribed (CAMEL_STORE (estore), info);
 
 	camel_folder_info_free (info);
 }
diff --git a/camel/camel-exchange-utils.c b/camel/camel-exchange-utils.c
index 105970b..a77a665 100644
--- a/camel/camel-exchange-utils.c
+++ b/camel/camel-exchange-utils.c
@@ -206,7 +206,7 @@ is_online (ExchangeData *ed)
 	session = camel_service_get_session (CAMEL_SERVICE (ed->estore));
 	g_return_val_if_fail (session != NULL, OFFLINE_MODE);
 
-	return camel_session_is_online (session) ? ONLINE_MODE : OFFLINE_MODE;
+	return camel_session_get_online (session) ? ONLINE_MODE : OFFLINE_MODE;
 }
 
 static void
diff --git a/eplugin/exchange-folder.c b/eplugin/exchange-folder.c
index 9bad01b..940b57c 100644
--- a/eplugin/exchange-folder.c
+++ b/eplugin/exchange-folder.c
@@ -100,8 +100,7 @@ exchange_get_folder (gchar *uri, CamelFolder *folder, gpointer data)
 
 	/* Construct the CamelFolderInfo */
 	info = ex_create_folder_info (store, name, target_uri, -1, 0);
-	camel_object_trigger_event (CAMEL_OBJECT (store),
-				    "folder_unsubscribed", info);
+	camel_store_folder_unsubscribed (store, info);
 	g_free (target_uri);
 }
 



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