aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-31 02:23:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-31 09:01:11 +0800
commit831d6dca44ecaa272b4ef5e1cfc29578e7ba5435 (patch)
treecbb127fed5476107f8808bf08328ca095b2fc2de /mail/mail-ops.c
parentc2fccbbb626c04ec2dbaa80dd5224280041d8703 (diff)
downloadgsoc2013-evolution-831d6dca44ecaa272b4ef5e1cfc29578e7ba5435.tar.gz
gsoc2013-evolution-831d6dca44ecaa272b4ef5e1cfc29578e7ba5435.tar.zst
gsoc2013-evolution-831d6dca44ecaa272b4ef5e1cfc29578e7ba5435.zip
Kill mail_append_mail().
Use e_mail_folder_append_message() instead.
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index ffaa7e41af..ccbd934fe7 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -919,92 +919,6 @@ mail_send_queue (EMailSession *session,
mail_msg_unordered_push (m);
}
-/* ** APPEND MESSAGE TO FOLDER ******************************************** */
-
-struct _append_msg {
- MailMsg base;
-
- CamelFolder *folder;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- gchar *appended_uid;
-
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data);
- gpointer data;
-};
-
-static gchar *
-append_mail_desc (struct _append_msg *m)
-{
- return g_strdup_printf (_("Saving message to folder '%s'"), camel_folder_get_full_name (m->folder));
-}
-
-static void
-append_mail_exec (struct _append_msg *m,
- GCancellable *cancellable,
- GError **error)
-{
- camel_mime_message_set_date (
- m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
-
- camel_folder_append_message_sync (
- m->folder, m->message,
- m->info, &m->appended_uid,
- cancellable, error);
-}
-
-static void
-append_mail_done (struct _append_msg *m)
-{
- if (m->done)
- m->done (
- m->folder, m->message,
- m->info, m->base.error == NULL,
- m->appended_uid, m->data);
-}
-
-static void
-append_mail_free (struct _append_msg *m)
-{
- g_object_unref (m->message);
- g_object_unref (m->folder);
- g_free (m->appended_uid);
-}
-
-static MailMsgInfo append_mail_info = {
- sizeof (struct _append_msg),
- (MailMsgDescFunc) append_mail_desc,
- (MailMsgExecFunc) append_mail_exec,
- (MailMsgDoneFunc) append_mail_done,
- (MailMsgFreeFunc) append_mail_free
-};
-
-void
-mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
- void (*done)(CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, gint ok, const gchar *appended_uid, gpointer data),
- gpointer data)
-{
- struct _append_msg *m;
-
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
-
- if (!camel_medium_get_header (CAMEL_MEDIUM (message), "X-Mailer"))
- camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer", x_mailer);
-
- m = mail_msg_new (&append_mail_info);
- m->folder = folder;
- g_object_ref (folder);
- m->message = message;
- g_object_ref (message);
- m->info = info;
-
- m->done = done;
- m->data = data;
-
- mail_msg_unordered_push (m);
-}
-
/* ** TRANSFER MESSAGES **************************************************** */
struct _transfer_msg {