aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-11-14 07:15:50 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-11-14 07:15:50 +0800
commitedf8ad6eff6d41b052e48a9a02f07351dc5d4ca8 (patch)
treecd17b3702529be7afe3469cbf2966766b8801796 /libemail-engine
parentb5bbf34c97eeda444b1dc3d4e9a4116dd6c89b82 (diff)
downloadgsoc2013-evolution-edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8.tar
gsoc2013-evolution-edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8.tar.gz
gsoc2013-evolution-edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8.tar.bz2
gsoc2013-evolution-edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8.tar.lz
gsoc2013-evolution-edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8.tar.xz
gsoc2013-evolution-edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8.tar.zst
gsoc2013-evolution-edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8.zip
"Disco is dead!", says Camel.
All offline-capable Camel providers use CamelOfflineStore now.
Diffstat (limited to 'libemail-engine')
-rw-r--r--libemail-engine/e-mail-store-utils.c28
-rw-r--r--libemail-engine/mail-folder-cache.c17
2 files changed, 4 insertions, 41 deletions
diff --git a/libemail-engine/e-mail-store-utils.c b/libemail-engine/e-mail-store-utils.c
index 9a9828e02e..1d9c5f3468 100644
--- a/libemail-engine/e-mail-store-utils.c
+++ b/libemail-engine/e-mail-store-utils.c
@@ -189,20 +189,7 @@ e_mail_store_go_offline_sync (CamelStore *store,
camel_operation_push_message (
cancellable, _("Disconnecting from '%s'"), display_name);
- if (CAMEL_IS_DISCO_STORE (store)) {
- CamelDiscoStore *disco_store;
-
- disco_store = CAMEL_DISCO_STORE (store);
-
- if (camel_disco_store_can_work_offline (disco_store))
- success = camel_disco_store_set_status (
- disco_store, CAMEL_DISCO_STORE_OFFLINE,
- cancellable, error);
- else
- success = camel_service_disconnect_sync (
- service, TRUE, cancellable, error);
-
- } else if (CAMEL_IS_OFFLINE_STORE (store)) {
+ if (CAMEL_IS_OFFLINE_STORE (store)) {
success = camel_offline_store_set_online_sync (
CAMEL_OFFLINE_STORE (store),
FALSE, cancellable, error);
@@ -278,12 +265,6 @@ e_mail_store_go_online_sync (CamelStore *store,
camel_operation_push_message (
cancellable, _("Reconnecting to '%s'"), display_name);
- if (CAMEL_IS_DISCO_STORE (store))
- success = camel_disco_store_set_status (
- CAMEL_DISCO_STORE (store),
- CAMEL_DISCO_STORE_ONLINE,
- cancellable, error);
-
if (CAMEL_IS_OFFLINE_STORE (store))
success = camel_offline_store_set_online_sync (
CAMEL_OFFLINE_STORE (store),
@@ -370,12 +351,7 @@ mail_store_prepare_for_offline_thread (GSimpleAsyncResult *simple,
cancellable, _("Preparing account '%s' for offline"),
display_name);
- if (CAMEL_IS_DISCO_STORE (service))
- camel_disco_store_prepare_for_offline (
- CAMEL_DISCO_STORE (service),
- cancellable, &local_error);
-
- else if (CAMEL_IS_OFFLINE_STORE (service))
+ if (CAMEL_IS_OFFLINE_STORE (service))
camel_offline_store_prepare_for_offline_sync (
CAMEL_OFFLINE_STORE (service),
cancellable, &local_error);
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index af5d2b946e..e54cdbb09c 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -1256,11 +1256,7 @@ ping_store_exec (struct _ping_store_msg *m,
status = camel_service_get_connection_status (service);
if (status == CAMEL_SERVICE_CONNECTED) {
- if (CAMEL_IS_DISCO_STORE (m->store) &&
- camel_disco_store_status (
- CAMEL_DISCO_STORE (m->store)) !=CAMEL_DISCO_STORE_OFFLINE)
- online = TRUE;
- else if (CAMEL_IS_OFFLINE_STORE (m->store) &&
+ if (CAMEL_IS_OFFLINE_STORE (m->store) &&
camel_offline_store_get_online (
CAMEL_OFFLINE_STORE (m->store)))
online = TRUE;
@@ -1827,20 +1823,11 @@ mail_folder_cache_note_store_thread (GSimpleAsyncResult *simple,
* catches and fixes it up when the shell opens us.
*
* XXX This is a Bonobo-era artifact. Do we really still need
- * to do this? Also, CamelDiscoStore needs to die already!
+ * to do this?
*/
if (camel_session_get_online (session)) {
gboolean store_online = TRUE;
- if (CAMEL_IS_DISCO_STORE (service)) {
- CamelDiscoStore *disco_store;
- CamelDiscoStoreStatus status;
-
- disco_store = CAMEL_DISCO_STORE (service);
- status = camel_disco_store_status (disco_store);
- store_online = (status != CAMEL_DISCO_STORE_OFFLINE);
- }
-
if (CAMEL_IS_OFFLINE_STORE (service)) {
store_online = camel_offline_store_get_online (
CAMEL_OFFLINE_STORE (service));