[evolution-ews] Rename camel_ews_store_get_connection().



commit dba6fe1e080b8b3631e63bc07de5408e251a797b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 30 17:09:16 2012 -0400

    Rename camel_ews_store_get_connection().
    
    New name is camel_ews_store_ref_connection() since it returns a new
    reference which the caller must unreference with g_object_unref().

 src/camel/camel-ews-folder.c |   14 +++++++-------
 src/camel/camel-ews-store.c  |    4 +++-
 src/camel/camel-ews-store.h  |    2 +-
 3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index cc430ac..fe8b28c 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -426,7 +426,7 @@ camel_ews_folder_get_message (CamelFolder *folder,
 	g_hash_table_insert (priv->uid_eflags, (gchar *) uid, (gchar *) uid);
 	g_mutex_unlock (priv->state_lock);
 
-	cnc = camel_ews_store_get_connection (ews_store);
+	cnc = camel_ews_store_ref_connection (ews_store);
 	ids = g_slist_append (ids, (gchar *) uid);
 
 	mime_dir = g_build_filename (camel_data_cache_get_path (ews_folder->cache),
@@ -799,7 +799,7 @@ ews_sync_mi_flags (CamelFolder *folder,
 		return FALSE;
 	}
 
-	cnc = camel_ews_store_get_connection (ews_store);
+	cnc = camel_ews_store_ref_connection (ews_store);
 
 	res = e_ews_connection_update_items_sync (
 		cnc, EWS_PRIORITY_LOW,
@@ -870,7 +870,7 @@ ews_move_to_junk_folder (CamelFolder *folder,
 	if (!camel_ews_store_connected (ews_store, error))
 		return FALSE;
 
-	cnc = camel_ews_store_get_connection (ews_store);
+	cnc = camel_ews_store_ref_connection (ews_store);
 
 	if (junk_uids) {
 		GSList *moved_items = NULL;
@@ -1346,7 +1346,7 @@ ews_refresh_info_sync (CamelFolder *folder,
 	priv->refreshing = TRUE;
 	g_mutex_unlock (priv->state_lock);
 
-	cnc = camel_ews_store_get_connection (ews_store);
+	cnc = camel_ews_store_ref_connection (ews_store);
 	g_return_val_if_fail (cnc != NULL, FALSE);
 
 	camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
@@ -1461,7 +1461,7 @@ ews_append_message_sync (CamelFolder *folder,
 		return FALSE;
 	}
 
-	cnc = camel_ews_store_get_connection (ews_store);
+	cnc = camel_ews_store_ref_connection (ews_store);
 
 	if (!cnc) {
 		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -1520,7 +1520,7 @@ ews_transfer_messages_to_sync (CamelFolder *source,
 	if (!camel_ews_store_connected (dst_ews_store, error))
 		return FALSE;
 
-	cnc = camel_ews_store_get_connection (dst_ews_store);
+	cnc = camel_ews_store_ref_connection (dst_ews_store);
 	dst_id = camel_ews_store_summary_get_folder_id_from_name
 						(dst_ews_store->summary,
 						 dst_full_name);
@@ -1590,7 +1590,7 @@ ews_delete_messages (CamelFolder *folder,
 		return FALSE;
 	}
 
-	cnc = camel_ews_store_get_connection (ews_store);
+	cnc = camel_ews_store_ref_connection (ews_store);
 	changes = camel_folder_change_info_new ();
 
 	if (deleted_items) {
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 6a10581..7e4ec25 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -979,8 +979,10 @@ ews_get_name (CamelService *service,
 }
 
 EEwsConnection *
-camel_ews_store_get_connection (CamelEwsStore *ews_store)
+camel_ews_store_ref_connection (CamelEwsStore *ews_store)
 {
+	g_return_val_if_fail (CAMEL_IS_EWS_STORE (ews_store), NULL);
+
 	return g_object_ref (ews_store->priv->cnc);
 }
 
diff --git a/src/camel/camel-ews-store.h b/src/camel/camel-ews-store.h
index 5ac981d..37b2bf3 100644
--- a/src/camel/camel-ews-store.h
+++ b/src/camel/camel-ews-store.h
@@ -72,7 +72,7 @@ struct _CamelEwsStoreClass {
 GType camel_ews_store_get_type (void);
 gchar *		ews_get_name	(CamelService *service, gboolean brief);
 EEwsConnection *
-		camel_ews_store_get_connection	(CamelEwsStore *ews_store);
+		camel_ews_store_ref_connection	(CamelEwsStore *ews_store);
 
 gboolean	camel_ews_store_connected	(CamelEwsStore *store,
 						 GError **error);



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