aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-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 /modules/mail/e-mail-shell-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 'modules/mail/e-mail-shell-backend.c')
-rw-r--r--modules/mail/e-mail-shell-backend.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index ba812c1440..ce563124c6 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -234,6 +234,8 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend)
{
EShell *shell;
EShellBackend *shell_backend;
+ EMailBackend *backend;
+ EMailSession *session;
shell_backend = E_SHELL_BACKEND (mail_shell_backend);
shell = e_shell_backend_get_shell (shell_backend);
@@ -246,9 +248,12 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend)
if (mail_shell_backend->priv->mail_sync_in_progress)
goto exit;
+ backend = E_MAIL_BACKEND (mail_shell_backend);
+ session = e_mail_backend_get_session (backend);
+
e_mail_store_foreach (
- E_MAIL_BACKEND (mail_shell_backend),
- (GFunc) mail_shell_backend_sync_store_cb,
+ session, (GFunc)
+ mail_shell_backend_sync_store_cb,
mail_shell_backend);
exit:
@@ -442,6 +447,7 @@ mail_shell_backend_start (EShellBackend *shell_backend)
EShell *shell;
EShellSettings *shell_settings;
EMailBackend *backend;
+ EMailSession *session;
gboolean enable_search_folders;
const gchar *data_dir;
@@ -451,9 +457,10 @@ mail_shell_backend_start (EShellBackend *shell_backend)
shell_settings = e_shell_get_shell_settings (shell);
backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
data_dir = e_shell_backend_get_data_dir (shell_backend);
- e_mail_store_init (backend, data_dir);
+ e_mail_store_init (session, data_dir);
enable_search_folders = e_shell_settings_get_boolean (
shell_settings, "mail-enable-search-folders");