aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/mail-ops.c94
-rw-r--r--mail/mail-ops.h5
2 files changed, 0 insertions, 99 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 8c13507545..a5210559a6 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1960,100 +1960,6 @@ mail_get_message (CamelFolder *folder, const gchar *uid, void (*done) (CamelFold
return id;
}
-/* ********************************************************************** */
-
-struct _get_messages_msg {
- MailMsg base;
-
- CamelFolder *folder;
- GPtrArray *uids;
- GPtrArray *messages;
-
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data);
- gpointer data;
-};
-
-static gchar *
-get_messages_desc (struct _get_messages_msg *m)
-{
- return g_strdup_printf(ngettext("Retrieving %d message",
- "Retrieving %d messages", m->uids->len),
- m->uids->len);
-}
-
-static void
-get_messages_exec (struct _get_messages_msg *m,
- GCancellable *cancellable,
- GError **error)
-{
- gint i;
- CamelMimeMessage *message;
-
- for (i=0; i<m->uids->len; i++) {
- gint pc = ((i+1) * 100) / m->uids->len;
-
- message = camel_folder_get_message_sync (
- m->folder, m->uids->pdata[i],
- cancellable, error);
- camel_operation_progress (cancellable, pc);
- if (message == NULL)
- break;
-
- g_ptr_array_add (m->messages, message);
- }
-}
-
-static void
-get_messages_done (struct _get_messages_msg *m)
-{
- if (m->done)
- m->done (m->folder, m->uids, m->messages, m->data);
-}
-
-static void
-get_messages_free (struct _get_messages_msg *m)
-{
- gint i;
-
- em_utils_uids_free (m->uids);
- for (i=0;i<m->messages->len;i++) {
- if (m->messages->pdata[i])
- g_object_unref (m->messages->pdata[i]);
- }
- g_ptr_array_free (m->messages, TRUE);
- g_object_unref (m->folder);
-}
-
-static MailMsgInfo get_messages_info = {
- sizeof (struct _get_messages_msg),
- (MailMsgDescFunc) get_messages_desc,
- (MailMsgExecFunc) get_messages_exec,
- (MailMsgDoneFunc) get_messages_done,
- (MailMsgFreeFunc) get_messages_free
-};
-
-gint
-mail_get_messages (CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data),
- gpointer data)
-{
- struct _get_messages_msg *m;
- gint id;
-
- m = mail_msg_new (&get_messages_info);
- m->folder = folder;
- g_object_ref (folder);
- m->uids = uids;
- m->messages = g_ptr_array_new ();
- m->data = data;
- m->done = done;
- id = m->base.seq;
-
- mail_msg_unordered_push (m);
-
- return id;
-}
-
/* ** SAVE MESSAGES ******************************************************* */
struct _save_messages_msg {
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index ac78fdf7c1..f773c825f7 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -47,11 +47,6 @@ gint mail_get_message (CamelFolder *folder, const gchar *uid,
gpointer data,
MailMsgDispatchFunc dispatch);
-/* get several messages */
-gint mail_get_messages (CamelFolder *folder, GPtrArray *uids,
- void (*done) (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, gpointer data),
- gpointer data);
-
/* same for a folder */
gint mail_get_folder (EMailSession *session,
const gchar *uri,