[evolution] Remove mail_get_messages().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Remove mail_get_messages().
- Date: Wed, 11 May 2011 18:30:44 +0000 (UTC)
commit c780b7d21255a5e6a0f15af12e02accbda088f3b
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed May 11 12:11:36 2011 -0400
Remove mail_get_messages().
Use e_mail_folder_get_multiple_messages() instead.
mail/mail-ops.c | 94 -------------------------------------------------------
mail/mail-ops.h | 5 ---
2 files changed, 0 insertions(+), 99 deletions(-)
---
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 8c13507..a521055 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 ac78fdf..f773c82 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]