diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-18 00:08:07 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:16 +0800 |
commit | dba093c80487fbaeef12b7d34081b70acd844657 (patch) | |
tree | 61415e77ce27244e3683e71f4c786a2d64604246 /mail/mail-ops.c | |
parent | d1777cbb0f2439a64edbbb3ab88b0f1b233e9a05 (diff) | |
download | gsoc2013-evolution-dba093c80487fbaeef12b7d34081b70acd844657.tar gsoc2013-evolution-dba093c80487fbaeef12b7d34081b70acd844657.tar.gz gsoc2013-evolution-dba093c80487fbaeef12b7d34081b70acd844657.tar.bz2 gsoc2013-evolution-dba093c80487fbaeef12b7d34081b70acd844657.tar.lz gsoc2013-evolution-dba093c80487fbaeef12b7d34081b70acd844657.tar.xz gsoc2013-evolution-dba093c80487fbaeef12b7d34081b70acd844657.tar.zst gsoc2013-evolution-dba093c80487fbaeef12b7d34081b70acd844657.zip |
Remove mail_store_prepare_offline().
Use e_mail_store_prepare_for_offline() instead.
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 0678370b49..1438805321 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1894,87 +1894,6 @@ mail_save_messages (CamelFolder *folder, GPtrArray *uids, const gchar *path, return id; } -/* ** Prepare OFFLINE ***************************************************** */ - -struct _set_offline_msg { - MailMsg base; - - CamelStore *store; - gboolean offline; - void (*done)(CamelStore *store, gpointer data); - gpointer data; -}; - -static gchar * -prepare_offline_desc (struct _set_offline_msg *m) -{ - gchar *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE); - gchar *msg; - - msg = g_strdup_printf (_("Preparing account '%s' for offline"), service_name); - g_free (service_name); - - return msg; -} - -static void -prepare_offline_exec (struct _set_offline_msg *m, - GCancellable *cancellable, - GError **error) -{ - if (CAMEL_IS_DISCO_STORE (m->store)) { - camel_disco_store_prepare_for_offline ( - CAMEL_DISCO_STORE (m->store), - cancellable, error); - } else if (CAMEL_IS_OFFLINE_STORE (m->store)) { - camel_offline_store_prepare_for_offline_sync ( - CAMEL_OFFLINE_STORE (m->store), - cancellable, error); - } -} - -static void -prepare_offline_done (struct _set_offline_msg *m) -{ - if (m->done) - m->done (m->store, m->data); -} - -static void -prepare_offline_free (struct _set_offline_msg *m) -{ - g_object_unref (m->store); -} - -static MailMsgInfo prepare_offline_info = { - sizeof (struct _set_offline_msg), - (MailMsgDescFunc) prepare_offline_desc, - (MailMsgExecFunc) prepare_offline_exec, - (MailMsgDoneFunc) prepare_offline_done, - (MailMsgFreeFunc) prepare_offline_free -}; - -gint -mail_store_prepare_offline (CamelStore *store) -{ - struct _set_offline_msg *m; - gint id; - - /* Cancel any pending connect first so the set_offline_op - * thread won't get queued behind a hung connect op. - */ - - m = mail_msg_new (&prepare_offline_info); - m->store = store; - g_object_ref (store); - m->data = NULL; - m->done = NULL; - - id = m->base.seq; - mail_msg_unordered_push (m); - - return id; -} /* ** Execute Shell Command ***************************************************** */ void |