aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-14 00:43:26 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:15 +0800
commit426a7bdda444f9cd47c85c59b6f8ab59d6dda86c (patch)
treea1f96d2ab5e5b9b1c883ac88ea84dc1e5e018d17 /mail/mail-ops.c
parent49df008d73d9332134491b2ee7aa1ea59a70c4ad (diff)
downloadgsoc2013-evolution-426a7bdda444f9cd47c85c59b6f8ab59d6dda86c.tar.gz
gsoc2013-evolution-426a7bdda444f9cd47c85c59b6f8ab59d6dda86c.tar.zst
gsoc2013-evolution-426a7bdda444f9cd47c85c59b6f8ab59d6dda86c.zip
Remove mail_get_message().
Use camel_folder_get_message() instead.
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 0a0f80fd93..e57b63445e 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1802,85 +1802,6 @@ mail_empty_trash (EMailSession *session,
mail_msg_slow_ordered_push (m);
}
-/* ** GET MESSAGE(s) ***************************************************** */
-
-struct _get_message_msg {
- MailMsg base;
-
- CamelFolder *folder;
- gchar *uid;
- void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data);
- gpointer data;
- CamelMimeMessage *message;
- GCancellable *cancellable;
-};
-
-static gchar *
-get_message_desc (struct _get_message_msg *m)
-{
- return g_strdup_printf (_("Retrieving message '%s'"), m->uid);
-}
-
-static void
-get_message_exec (struct _get_message_msg *m,
- GCancellable *cancellable,
- GError **error)
-{
- if (g_cancellable_is_cancelled (cancellable))
- m->message = NULL;
- else
- m->message = camel_folder_get_message_sync (
- m->folder, m->uid, cancellable, error);
-}
-
-static void
-get_message_done (struct _get_message_msg *m)
-{
- if (m->done)
- m->done (m->folder, m->uid, m->message, m->data);
-}
-
-static void
-get_message_free (struct _get_message_msg *m)
-{
- g_free (m->uid);
- g_object_unref (m->folder);
- g_object_unref (m->cancellable);
-
- if (m->message)
- g_object_unref (m->message);
-}
-
-static MailMsgInfo get_message_info = {
- sizeof (struct _get_message_msg),
- (MailMsgDescFunc) get_message_desc,
- (MailMsgExecFunc) get_message_exec,
- (MailMsgDoneFunc) get_message_done,
- (MailMsgFreeFunc) get_message_free
-};
-
-gint
-mail_get_message (CamelFolder *folder, const gchar *uid, void (*done) (CamelFolder *folder, const gchar *uid,
- CamelMimeMessage *msg, gpointer data),
- gpointer data, MailMsgDispatchFunc dispatch)
-{
- struct _get_message_msg *m;
- gint id;
-
- m = mail_msg_new (&get_message_info);
- m->folder = folder;
- g_object_ref (folder);
- m->uid = g_strdup (uid);
- m->data = data;
- m->done = (void (*) (CamelFolder *, const gchar *, CamelMimeMessage *, gpointer )) done;
- m->cancellable = camel_operation_new ();
- id = m->base.seq;
-
- dispatch (m);
-
- return id;
-}
-
/* ** SAVE MESSAGES ******************************************************* */
struct _save_messages_msg {