[evolution-mapi] Adapt to more Camel API changes.



commit 63c35ab126d3f6e95552025131606a40e64f4db4
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Apr 30 17:10:35 2010 -0400

    Adapt to more Camel API changes.

 src/camel/camel-mapi-folder.c        |   56 +++++++++++++++++-----------------
 src/camel/camel-mapi-notifications.c |   16 +++++-----
 src/camel/camel-mapi-store-summary.c |   12 ++++----
 src/camel/camel-mapi-store.c         |   40 ++++++++++++------------
 4 files changed, 62 insertions(+), 62 deletions(-)
---
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index 23d591a..0a54083 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -572,9 +572,9 @@ mapi_update_cache (CamelFolder *folder, GSList *list, CamelFolderChangeInfo **ch
 			}
 
 			if ((item->header.from_type != NULL) && !g_utf8_collate (item->header.from_type, "EX")) {
-				camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+				camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 				from_email = exchange_mapi_connection_ex_to_smtp (camel_mapi_store_get_exchange_connection (mapi_store), item->header.from_email);
-				camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+				camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 				g_free (item->header.from_email);
 				item->header.from_email = g_strdup (from_email);
@@ -713,7 +713,7 @@ mapi_sync_deleted (CamelSession *session, CamelSessionThreadMsg *msg)
 		NULL, _("Retrieving message IDs from server for %s"),
 		camel_folder_get_name (m->folder));
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	/*Get the UID list from server.*/
 	exchange_mapi_connection_fetch_items  (camel_mapi_store_get_exchange_connection (mapi_store), m->folder_id, NULL, NULL,
@@ -723,7 +723,7 @@ mapi_sync_deleted (CamelSession *session, CamelSessionThreadMsg *msg)
 
 	camel_operation_end (NULL);
 
-	camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	/* Check if we have to stop */
 	if (camel_operation_cancel_check(NULL))
@@ -799,10 +799,10 @@ mapi_sync_deleted_free (CamelSession *session, CamelSessionThreadMsg *msg)
 		if (mapi_summary) {
 			CamelException ex = CAMEL_EXCEPTION_INITIALISER;
 
-			camel_service_lock (CAMEL_SERVICE (parent_store), CS_REC_CONNECT_LOCK);
+			camel_service_lock (CAMEL_SERVICE (parent_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			g_free (mapi_summary->sync_time_stamp);
 			mapi_summary->sync_time_stamp = NULL;
-			camel_service_unlock (CAMEL_SERVICE (parent_store), CS_REC_CONNECT_LOCK);
+			camel_service_unlock (CAMEL_SERVICE (parent_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 			mapi_refresh_folder (m->folder, &ex);
 
@@ -858,13 +858,13 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
 	folder_id =  camel_mapi_store_folder_id_lookup (mapi_store, full_name);
 	exchange_mapi_util_mapi_id_from_string (folder_id, &fid);
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	if (!camel_mapi_store_connected (mapi_store, ex)) {
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		camel_exception_clear (ex);
 		return TRUE;
 	}
-	camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	count = camel_folder_summary_count (folder->summary);
 	CAMEL_MAPI_FOLDER_REC_LOCK (folder, cache_lock);
@@ -939,15 +939,15 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
 	*/
 
 	if (read_items) {
-		camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		exchange_mapi_connection_set_flags (camel_mapi_store_get_exchange_connection (mapi_store), 0, fid, read_items, 0, options);
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		g_slist_free (read_items);
 	}
 
 	/* Remove messages from server*/
 	if (deleted_items) {
-		camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		if ((mapi_folder->type & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH) {
 			exchange_mapi_connection_remove_items (camel_mapi_store_get_exchange_connection (mapi_store), 0, fid, deleted_items);
 		} else {
@@ -955,7 +955,7 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
 			exchange_mapi_connection_move_items (camel_mapi_store_get_exchange_connection (mapi_store), fid, deleted_items_fid, deleted_items);
 		}
 
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	}
 
 	/*Remove messages from local cache*/
@@ -980,9 +980,9 @@ mapi_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
 		/* TODO */
 	}
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	mapi_sync_summary (folder, ex);
-	camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	return !camel_exception_is_set (ex);
 }
@@ -1025,14 +1025,14 @@ camel_mapi_folder_fetch_summary (CamelStore *store, const mapi_id_t fid, struct
 
 	camel_operation_start (NULL, _("Fetching summary information for new messages in")); /* %s"), folder->name); */
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	status = exchange_mapi_connection_fetch_items  (camel_mapi_store_get_exchange_connection (mapi_store), fid, res, sort,
 							mapi_camel_get_summary_list, NULL,
 							fetch_items_summary_cb, fetch_data,
 							options);
 
-	camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	camel_operation_end (NULL);
 
@@ -1088,7 +1088,7 @@ mapi_refresh_folder(CamelFolder *folder, CamelException *ex)
 		mapi_folder->need_refresh = TRUE;
 	}
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	is_locked = TRUE;
 
 	if (!camel_mapi_store_connected (mapi_store, ex))
@@ -1160,7 +1160,7 @@ mapi_refresh_folder(CamelFolder *folder, CamelException *ex)
 		camel_folder_summary_touch (folder->summary);
 		mapi_sync_summary (folder, ex);
 
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		is_locked = FALSE;
 
 		/* Downsync deleted items */
@@ -1179,7 +1179,7 @@ mapi_refresh_folder(CamelFolder *folder, CamelException *ex)
 
 end1:
 	if (is_locked)
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	g_slist_foreach (fetch_data->items_list, (GFunc) mapi_item_free, NULL);
 	g_slist_free (fetch_data->items_list);
@@ -1471,9 +1471,9 @@ mapi_mime_set_msg_headers (CamelFolder *folder, CamelMimeMessage *msg, MapiItem
 
 	if (item->header.from) {
 		if ((item->header.from_type != NULL) && !g_utf8_collate (item->header.from_type, "EX")) {
-			camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+			camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			from_email = exchange_mapi_connection_ex_to_smtp (camel_mapi_store_get_exchange_connection (mapi_store), item->header.from_email);
-			camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+			camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			g_free (item->header.from_email);
 			item->header.from_email = g_strdup (from_email);
 		}
@@ -1850,12 +1850,12 @@ mapi_folder_get_message( CamelFolder *folder, const gchar *uid, CamelException *
 		options |= MAPI_OPTIONS_USE_PFSTORE;
 	}
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	exchange_mapi_connection_fetch_item (camel_mapi_store_get_exchange_connection (mapi_store), id_folder, id_message,
 					mapi_camel_get_item_prop_list, NULL,
 					fetch_item_cb, &item,
 					options);
-	camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	if (item == NULL) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Could not get message"));
@@ -1975,9 +1975,9 @@ mapi_expunge (CamelFolder *folder, CamelException *ex)
 	exchange_mapi_util_mapi_id_from_string (folder_id, &fid);
 
 	if ((mapi_folder->type & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH) {
-		camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		status = exchange_mapi_connection_empty_folder (camel_mapi_store_get_exchange_connection (mapi_store), fid);
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 		if (status) {
 			camel_folder_freeze (folder);
@@ -2018,11 +2018,11 @@ mapi_expunge (CamelFolder *folder, CamelException *ex)
 	deleted_items_uid_head = deleted_items_uid;
 
 	if (deleted_items) {
-		camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 		status = exchange_mapi_connection_remove_items (camel_mapi_store_get_exchange_connection (mapi_store), 0, fid, deleted_items);
 
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 		if (status) {
 			while (deleted_items_uid) {
diff --git a/src/camel/camel-mapi-notifications.c b/src/camel/camel-mapi-notifications.c
index cdaad4a..8d48cb9 100644
--- a/src/camel/camel-mapi-notifications.c
+++ b/src/camel/camel-mapi-notifications.c
@@ -116,9 +116,9 @@ process_mapi_new_mail_notif (CamelMapiStore *store, struct NewMailNotification *
 	fetch_data->changes = camel_folder_change_info_new ();
 	fetch_data->folder = folder;
 
-	camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	camel_mapi_folder_fetch_summary ((CamelStore *)store, new_mail_notif->FID, res, NULL, fetch_data, options);
-	camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	camel_folder_summary_touch (folder->summary);
 	/* mapi_sync_summary */
@@ -221,11 +221,11 @@ mapi_push_notification_listener_thread (gpointer data)
 	cb_data->callback = mapi_notifications_continue_check;
 	cb_data->data = thread_data;
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	conn = camel_mapi_store_get_exchange_connection (mapi_store);
 	if (!conn) {
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		g_return_val_if_reached (NULL);
 	}
 
@@ -236,11 +236,11 @@ mapi_push_notification_listener_thread (gpointer data)
 						&thread_data->connection, mapi_notifications_filter,
 						thread_data->event_data);
 
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		exchange_mapi_connection_events_monitor (conn, cb_data); /*Blocking call. Don't hold locks here*/
 		exchange_mapi_connection_events_unsubscribe (conn, thread_data->connection);
 	} else
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	g_free (cb_data);
 	g_object_unref (conn);
@@ -288,8 +288,8 @@ camel_mapi_notification_listener_stop (CamelMapiStore *mstore, gpointer start_va
 	g_free (thread_data);
 
 	g_object_ref (mstore);
-	camel_service_lock (CAMEL_SERVICE (mstore), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mstore), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	camel_mapi_store_unset_notification_data (mstore);
-	camel_service_unlock (CAMEL_SERVICE (mstore), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (mstore), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	g_object_unref (mstore);
 }
diff --git a/src/camel/camel-mapi-store-summary.c b/src/camel/camel-mapi-store-summary.c
index 5b7f40c..933ec3e 100644
--- a/src/camel/camel-mapi-store-summary.c
+++ b/src/camel/camel-mapi-store-summary.c
@@ -210,24 +210,24 @@ store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const
 	switch (type) {
 		case CAMEL_MAPI_STORE_INFO_FULL_NAME:
 			d(printf("Set full name %s -> %s\n", isi->full_name, str));
-			camel_store_summary_lock (s, CSS_SUMMARY_LOCK);
+			camel_store_summary_lock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 			g_free(isi->full_name);
 			isi->full_name = g_strdup(str);
-			camel_store_summary_unlock (s, CSS_SUMMARY_LOCK);
+			camel_store_summary_unlock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 			break;
 		case CAMEL_MAPI_STORE_INFO_FOLDER_ID:
 			d(printf("Set folder id %s -> %s\n", isi->folder_id, str));
-			camel_store_summary_lock (s, CSS_SUMMARY_LOCK);
+			camel_store_summary_lock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 			g_free(isi->folder_id);
 			isi->folder_id = g_strdup(str);
-			camel_store_summary_unlock (s, CSS_SUMMARY_LOCK);
+			camel_store_summary_unlock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 			break;
 		case CAMEL_MAPI_STORE_INFO_PARENT_ID:
 			d(printf("Set parent id %s -> %s\n", isi->parent_id, str));
-			camel_store_summary_lock (s, CSS_SUMMARY_LOCK);
+			camel_store_summary_lock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 			g_free(isi->parent_id);
 			isi->parent_id = g_strdup(str);
-			camel_store_summary_unlock (s, CSS_SUMMARY_LOCK);
+			camel_store_summary_unlock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 			break;
 		default:
 			store_summary_class->store_info_set_string(s, mi, type, str);
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index 199af49..ca175d4 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -400,14 +400,14 @@ mapi_connect(CamelService *service, CamelException *ex)
 		camel_service_construct (service, service->session, service->provider, service->url, ex);
 	}
 
-	camel_service_lock (service, CS_REC_CONNECT_LOCK);
+	camel_service_lock (service, CAMEL_SERVICE_REC_CONNECT_LOCK);
 	if (check_for_connection (service, ex)) {
-		camel_service_unlock (service, CS_REC_CONNECT_LOCK);
+		camel_service_unlock (service, CAMEL_SERVICE_REC_CONNECT_LOCK);
 		return TRUE;
 	}
 
 	if (!mapi_auth_loop (service, ex)) {
-		camel_service_unlock (service, CS_REC_CONNECT_LOCK);
+		camel_service_unlock (service, CAMEL_SERVICE_REC_CONNECT_LOCK);
 		camel_service_disconnect (service, TRUE, NULL);
 		return FALSE;
 	}
@@ -424,7 +424,7 @@ mapi_connect(CamelService *service, CamelException *ex)
 
 	camel_store_summary_save ((CamelStoreSummary *) store->summary);
 
-	camel_service_unlock (service, CS_REC_CONNECT_LOCK);
+	camel_service_unlock (service, CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	return TRUE;
 }
@@ -566,7 +566,7 @@ mapi_create_folder(CamelStore *store, const gchar *parent_name, const gchar *fol
 			return NULL;
 	}
 
-	camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	exchange_mapi_util_mapi_id_from_string (parent_id, &parent_fid);
 	new_folder_id = exchange_mapi_connection_create_folder (priv->conn, olFolderInbox, parent_fid, folder_name);
@@ -584,7 +584,7 @@ mapi_create_folder(CamelStore *store, const gchar *parent_name, const gchar *fol
 		camel_object_trigger_event (CAMEL_OBJECT (store), "folder_created", root);
 	}
 
-	camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	return root;
 
 }
@@ -636,10 +636,10 @@ mapi_delete_folder(CamelStore *store, const gchar *folder_name, CamelException *
 	mapi_id_t folder_fid;
 	gboolean status = FALSE;
 
-	camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	if (!camel_mapi_store_connected ((CamelMapiStore *)store, ex)) {
-		camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		return !camel_exception_is_set (ex);
 	}
 
@@ -659,7 +659,7 @@ mapi_delete_folder(CamelStore *store, const gchar *folder_name, CamelException *
 		g_hash_table_remove (priv->name_hash, folder_name);
 	}
 
-	camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	return !camel_exception_is_set (ex);
 }
@@ -724,10 +724,10 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
 	const gchar *old_fid_str, *new_parent_fid_str = NULL;
 	mapi_id_t old_fid;
 
-	camel_service_lock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	if (!camel_mapi_store_connected ((CamelMapiStore *)store, ex)) {
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		return !camel_exception_is_set (ex);
 	}
 
@@ -738,7 +738,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Cannot rename MAPI folder '%s'. Folder does not exist."),
 				      old_name);
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		return FALSE;
 	}
 
@@ -749,7 +749,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Cannot rename MAPI default folder '%s' to '%s'."),
 				      old_name, new_name);
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		return FALSE;
 	}
 
@@ -773,7 +773,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
 
 	if (!exchange_mapi_util_mapi_id_from_string (old_fid_str, &old_fid)) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot rename MAPI folder '%s' to '%s'"), old_name, new_name);
-		camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+		camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		g_free (old_parent);
 		g_free (new_parent);
 		return FALSE;
@@ -789,7 +789,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 						  _("Cannot rename MAPI folder '%s' to '%s'"), old_name, new_name);
 
-			camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+			camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			g_free (old_parent);
 			g_free (new_parent);
 			return FALSE;
@@ -837,7 +837,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
 			   !exchange_mapi_util_mapi_id_from_string (old_parent_fid_str, &old_parent_fid) ||
 			   !exchange_mapi_util_mapi_id_from_string (new_parent_fid_str, &new_parent_fid) ||
 			   !exchange_mapi_connection_move_folder (priv->conn, old_fid, old_parent_fid, new_parent_fid, tmp)) {
-			camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+			camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot rename MAPI folder '%s' to '%s'"), old_name, new_name);
 			g_free (old_parent);
 			g_free (new_parent);
@@ -860,7 +860,7 @@ mapi_rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_na
 		g_free (folder_id);
 	}
 
-	camel_service_unlock (CAMEL_SERVICE (mapi_store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (mapi_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	si = camel_store_summary_path ((CamelStoreSummary *)mapi_store->summary, old_name);
 	if (si) {
@@ -1548,7 +1548,7 @@ mapi_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelEx
 	 * is used as is here.
 	 */
 
-	camel_service_lock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	if (((CamelOfflineStore *) store)->state == CAMEL_OFFLINE_STORE_NETWORK_AVAIL) {
 		if (((CamelService *)store)->status == CAMEL_SERVICE_DISCONNECTED) {
@@ -1568,14 +1568,14 @@ mapi_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelEx
 		mapi_folders_sync (mapi_store, top, flags, ex);
 
 		if (camel_exception_is_set (ex)) {
-			camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+			camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			return NULL;
 		}
 		camel_store_summary_touch ((CamelStoreSummary *)mapi_store->summary);
 		camel_store_summary_save ((CamelStoreSummary *)mapi_store->summary);
 	}
 
-	camel_service_unlock (CAMEL_SERVICE (store), CS_REC_CONNECT_LOCK);
+	camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
 	s_count = camel_store_summary_count((CamelStoreSummary *)mapi_store->summary);
 	info = mapi_get_folder_info_offline (store, top, flags, ex);



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