diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-14 00:43:26 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:15 +0800 |
commit | 426a7bdda444f9cd47c85c59b6f8ab59d6dda86c (patch) | |
tree | a1f96d2ab5e5b9b1c883ac88ea84dc1e5e018d17 | |
parent | 49df008d73d9332134491b2ee7aa1ea59a70c4ad (diff) | |
download | gsoc2013-evolution-426a7bdda444f9cd47c85c59b6f8ab59d6dda86c.tar.gz gsoc2013-evolution-426a7bdda444f9cd47c85c59b6f8ab59d6dda86c.tar.zst gsoc2013-evolution-426a7bdda444f9cd47c85c59b6f8ab59d6dda86c.zip |
Remove mail_get_message().
Use camel_folder_get_message() instead.
-rw-r--r-- | mail/mail-ops.c | 79 | ||||
-rw-r--r-- | mail/mail-ops.h | 6 |
2 files changed, 0 insertions, 85 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 { diff --git a/mail/mail-ops.h b/mail/mail-ops.h index 2ccea541aa..8478595b17 100644 --- a/mail/mail-ops.h +++ b/mail/mail-ops.h @@ -41,12 +41,6 @@ void mail_transfer_messages (EMailSession *session, void (*done) (gboolean ok, gpointer data), gpointer data); -/* get a single message, asynchronously */ -gint mail_get_message (CamelFolder *folder, const gchar *uid, - void (*done) (CamelFolder *folder, const gchar *uid, CamelMimeMessage *msg, gpointer data), - gpointer data, - MailMsgDispatchFunc dispatch); - /* get quota information for a folder */ gint mail_get_folder_quota (CamelFolder *folder, const gchar *folder_uri, |