[evolution-ews] Pass GCancellable into camel_ews_store_connected()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Pass GCancellable into camel_ews_store_connected()
- Date: Wed, 5 Sep 2012 08:52:42 +0000 (UTC)
commit d049ef2d6f1a0908f78e82cfbba7b30bbeeab685
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 5 10:52:11 2012 +0200
Pass GCancellable into camel_ews_store_connected()
src/camel/camel-ews-folder.c | 18 +++++++++---------
src/camel/camel-ews-store.c | 9 +++++----
src/camel/camel-ews-store.h | 1 +
3 files changed, 15 insertions(+), 13 deletions(-)
---
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index 2ca80f4..233050d 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -406,7 +406,7 @@ camel_ews_folder_get_message (CamelFolder *folder,
ews_folder = (CamelEwsFolder *) folder;
priv = ews_folder->priv;
- if (!camel_ews_store_connected (ews_store, error))
+ if (!camel_ews_store_connected (ews_store, cancellable, error))
return NULL;
g_mutex_lock (priv->state_lock);
@@ -819,7 +819,7 @@ ews_sync_mi_flags (CamelFolder *folder,
ews_store = (CamelEwsStore *) camel_folder_get_parent_store (folder);
- if (!camel_ews_store_connected (ews_store, error)) {
+ if (!camel_ews_store_connected (ews_store, cancellable, error)) {
return FALSE;
}
@@ -891,7 +891,7 @@ ews_move_to_junk_folder (CamelFolder *folder,
ews_folder = CAMEL_EWS_FOLDER (folder);
ews_store = CAMEL_EWS_STORE (parent_store);
- if (!camel_ews_store_connected (ews_store, error))
+ if (!camel_ews_store_connected (ews_store, cancellable, error))
return FALSE;
cnc = camel_ews_store_ref_connection (ews_store);
@@ -972,7 +972,7 @@ ews_synchronize_sync (CamelFolder *folder,
ews_store = (CamelEwsStore *) camel_folder_get_parent_store (folder);
- if (!camel_ews_store_connected (ews_store, error))
+ if (!camel_ews_store_connected (ews_store, cancellable, error))
return FALSE;
if (camel_folder_summary_get_deleted_count (folder->summary) > 0 ||
@@ -1392,7 +1392,7 @@ ews_refresh_info_sync (CamelFolder *folder,
ews_folder = (CamelEwsFolder *) folder;
priv = ews_folder->priv;
- if (!camel_ews_store_connected (ews_store, error))
+ if (!camel_ews_store_connected (ews_store, cancellable, error))
return FALSE;
g_mutex_lock (priv->state_lock);
@@ -1515,7 +1515,7 @@ ews_append_message_sync (CamelFolder *folder,
from = CAMEL_ADDRESS (camel_mime_message_get_from (message));
- if (!camel_ews_store_connected (ews_store, error)) {
+ if (!camel_ews_store_connected (ews_store, cancellable, error)) {
return FALSE;
}
@@ -1576,7 +1576,7 @@ ews_transfer_messages_to_sync (CamelFolder *source,
dst_full_name = camel_folder_get_full_name (destination);
dst_ews_store = (CamelEwsStore *) camel_folder_get_parent_store (destination);
- if (!camel_ews_store_connected (dst_ews_store, error))
+ if (!camel_ews_store_connected (dst_ews_store, cancellable, error))
return FALSE;
cnc = camel_ews_store_ref_connection (dst_ews_store);
@@ -1644,7 +1644,7 @@ ews_delete_messages (CamelFolder *folder,
ews_store = CAMEL_EWS_STORE (parent_store);
deleted_head = deleted_items;
- if (!camel_ews_store_connected (ews_store, error)) {
+ if (!camel_ews_store_connected (ews_store, cancellable, error)) {
return FALSE;
}
@@ -1718,7 +1718,7 @@ ews_expunge_sync (CamelFolder *folder,
parent_store = camel_folder_get_parent_store (folder);
ews_store = CAMEL_EWS_STORE (parent_store);
- if (!camel_ews_store_connected (ews_store, error))
+ if (!camel_ews_store_connected (ews_store, cancellable, error))
return FALSE;
is_trash = ews_folder_is_of_type (folder, CAMEL_FOLDER_TYPE_TRASH);
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 7358b94..48248da 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -960,7 +960,7 @@ ews_create_folder_sync (CamelStore *store,
}
}
- if (!camel_ews_store_connected (ews_store, error)) {
+ if (!camel_ews_store_connected (ews_store, cancellable, error)) {
if (fid) g_free (fid);
return NULL;
}
@@ -1037,7 +1037,7 @@ ews_delete_folder_sync (CamelStore *store,
return FALSE;
}
- if (!camel_ews_store_connected (ews_store, error)) {
+ if (!camel_ews_store_connected (ews_store, cancellable, error)) {
g_free (fid);
return FALSE;
}
@@ -1130,7 +1130,7 @@ ews_rename_folder_sync (CamelStore *store,
if (!strcmp (old_name, new_name))
return TRUE;
- if (!camel_ews_store_connected (ews_store, error)) {
+ if (!camel_ews_store_connected (ews_store, cancellable, error)) {
return FALSE;
}
@@ -1493,6 +1493,7 @@ ews_store_unsubscribe_folder_sync (CamelSubscribable *subscribable,
gboolean
camel_ews_store_connected (CamelEwsStore *ews_store,
+ GCancellable *cancellable,
GError **error)
{
@@ -1504,7 +1505,7 @@ camel_ews_store_connected (CamelEwsStore *ews_store,
return FALSE;
}
- if (!camel_service_connect_sync ((CamelService *) ews_store, NULL, error))
+ if (!camel_service_connect_sync ((CamelService *) ews_store, cancellable, error))
return FALSE;
return TRUE;
diff --git a/src/camel/camel-ews-store.h b/src/camel/camel-ews-store.h
index d4115a3..1c45bb4 100644
--- a/src/camel/camel-ews-store.h
+++ b/src/camel/camel-ews-store.h
@@ -78,6 +78,7 @@ EEwsConnection *
camel_ews_store_ref_connection (CamelEwsStore *ews_store);
gboolean camel_ews_store_connected (CamelEwsStore *store,
+ GCancellable *cancellable,
GError **error);
void camel_ews_store_maybe_disconnect
(CamelEwsStore *store,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]