[evolution] Remove mail_build_attachment().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Remove mail_build_attachment().
- Date: Wed, 11 May 2011 18:30:39 +0000 (UTC)
commit 2b4ea9419a625031a449ba0d6554d525f8cd2538
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed May 11 10:43:53 2011 -0400
Remove mail_build_attachment().
Use e_mail_folder_build_attachment() instead.
mail/mail-ops.c | 61 -------------------------------------------------------
mail/mail-ops.h | 6 -----
2 files changed, 0 insertions(+), 67 deletions(-)
---
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index d6507ec..8c13507 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 c402641..ac78fdf 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]