aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-11 22:43:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-12 00:59:12 +0800
commit2b4ea9419a625031a449ba0d6554d525f8cd2538 (patch)
treea7181d17d585c533f4b2dd2d60327ba32a3e93de /mail
parent648eacf49fb9103bbe00e4baa45c6d05a28861c6 (diff)
downloadgsoc2013-evolution-2b4ea9419a625031a449ba0d6554d525f8cd2538.tar.gz
gsoc2013-evolution-2b4ea9419a625031a449ba0d6554d525f8cd2538.tar.zst
gsoc2013-evolution-2b4ea9419a625031a449ba0d6554d525f8cd2538.zip
Remove mail_build_attachment().
Use e_mail_folder_build_attachment() instead.
Diffstat (limited to 'mail')
-rw-r--r--mail/mail-ops.c61
-rw-r--r--mail/mail-ops.h6
2 files changed, 0 insertions, 67 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index d6507ec4c3..8c13507545 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1127,67 +1127,6 @@ mail_get_folderinfo (CamelStore *store,
return id;
}
-/* ** ATTACH MESSAGES ****************************************************** */
-
-struct _build_data {
- void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, gchar *subject, gpointer data);
- gpointer data;
-};
-
-static void
-do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer data)
-{
- struct _build_data *d = data;
- CamelMultipart *multipart;
- CamelMimePart *part;
- gchar *subject;
- gint i;
-
- if (messages->len == 0) {
- d->done (folder, messages, NULL, NULL, d->data);
- g_free (d);
- return;
- }
-
- if (messages->len == 1) {
- part = mail_tool_make_message_attachment (messages->pdata[0]);
- } else {
- multipart = camel_multipart_new ();
- camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER (multipart), "multipart/digest");
- camel_multipart_set_boundary (multipart, NULL);
-
- for (i=0;i<messages->len;i++) {
- part = mail_tool_make_message_attachment (messages->pdata[i]);
- camel_multipart_add_part (multipart, part);
- g_object_unref (part);
- }
- part = camel_mime_part_new ();
- camel_medium_set_content (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (multipart));
- g_object_unref (multipart);
-
- camel_mime_part_set_description(part, _("Forwarded messages"));
- }
-
- subject = mail_tool_generate_forward_subject (messages->pdata[0]);
- d->done (folder, messages, part, subject, d->data);
- g_free (subject);
- g_object_unref (part);
-
- g_free (d);
-}
-
-void
-mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer data), gpointer data)
-{
- struct _build_data *d;
-
- d = g_malloc (sizeof (*d));
- d->done = done;
- d->data = data;
- mail_get_messages (folder, uids, do_build_attachment, d);
-}
-
/* ** LOAD FOLDER ********************************************************* */
/* there should be some way to merge this and create folder, since both can
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index c4026416f3..ac78fdf7c1 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -66,12 +66,6 @@ gint mail_get_folder_quota (CamelFolder *folder,
void (*done)(CamelFolder *folder, const gchar *folder_uri, CamelFolderQuotaInfo *quota, gpointer data),
gpointer data, MailMsgDispatchFunc dispatch);
-/* build an attachment */
-void mail_build_attachment (CamelFolder *folder, GPtrArray *uids,
- void (*done)(CamelFolder *folder, GPtrArray *messages,
- CamelMimePart *part, gchar *subject, gpointer data),
- gpointer data);
-
void mail_sync_folder (CamelFolder *folder,
void (*done) (CamelFolder *folder, gpointer data), gpointer data);