aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-backend.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-10-27 00:31:33 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-10-27 00:46:13 +0800
commit2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659 (patch)
treeb2083067a76519ddc6da1f6423d86cbe398cb9fd /mail/e-mail-backend.c
parent251b734a8573a1d6b04d2b82ce1f0be9fe9662ab (diff)
downloadgsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.gz
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.bz2
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.lz
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.xz
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.zst
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.zip
e-mail-store.c: Take EMailSession instead of EMailBackend.
My apologies for flip-flopping the API again. e-mail-store.c functions used to take an EMailSession, then I changed it to take an EMailBackend in preparation for my account-mgmt branch. Having rethought some API decisions on the branch, however, the first flip-flop proved to be unnecessary. And now Srini needs the API to use EMailSession for his mail-factory branch, so I'm flip-flopping again.
Diffstat (limited to 'mail/e-mail-backend.c')
-rw-r--r--mail/e-mail-backend.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index be2f94eeb9..aedbdd2626 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -171,7 +171,7 @@ mail_backend_prepare_for_offline_cb (EShell *shell,
}
e_mail_store_foreach (
- backend, (GFunc) mail_store_prepare_for_offline_cb, activity);
+ session, (GFunc) mail_store_prepare_for_offline_cb, activity);
}
/* Helper for mail_backend_prepare_for_online_cb() */
@@ -197,7 +197,7 @@ mail_backend_prepare_for_online_cb (EShell *shell,
camel_session_set_online (CAMEL_SESSION (session), TRUE);
e_mail_store_foreach (
- backend, (GFunc) mail_store_prepare_for_online_cb, activity);
+ session, (GFunc) mail_store_prepare_for_online_cb, activity);
}
/* Helper for mail_backend_prepare_for_quit_cb() */
@@ -272,6 +272,7 @@ mail_backend_prepare_for_quit_cb (EShell *shell,
EMailBackend *backend)
{
EAccountList *account_list;
+ EMailSession *session;
gboolean delete_junk;
gboolean empty_trash;
@@ -280,6 +281,8 @@ mail_backend_prepare_for_quit_cb (EShell *shell,
gboolean empty_trash;
} sync_data;
+ session = e_mail_backend_get_session (backend);
+
delete_junk = e_mail_backend_delete_junk_policy_decision (backend);
empty_trash = e_mail_backend_empty_trash_policy_decision (backend);
@@ -295,13 +298,13 @@ mail_backend_prepare_for_quit_cb (EShell *shell,
if (delete_junk)
e_mail_store_foreach (
- backend, (GFunc) mail_backend_delete_junk, backend);
+ session, (GFunc) mail_backend_delete_junk, backend);
sync_data.activity = activity;
sync_data.empty_trash = empty_trash;
e_mail_store_foreach (
- backend, (GFunc) mail_backend_final_sync, &sync_data);
+ session, (GFunc) mail_backend_final_sync, &sync_data);
/* Now we poll until all activities are actually cancelled or finished.
* Reffing the activity delays quitting; the reference count