aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-18 22:34:51 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:17 +0800
commite6031666023c3f81567350f637cfae6913166170 (patch)
treef263fe3efb5785c8a90304deae16c19d6892b23b /mail/mail-ops.c
parentc7fd79113912499bc9dea03b68e381026c5afc19 (diff)
downloadgsoc2013-evolution-e6031666023c3f81567350f637cfae6913166170.tar.gz
gsoc2013-evolution-e6031666023c3f81567350f637cfae6913166170.tar.zst
gsoc2013-evolution-e6031666023c3f81567350f637cfae6913166170.zip
Remove mail_get_folderinfo().
Use camel_store_get_folder_info() instead.
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c96
1 files changed, 0 insertions, 96 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index ad86c772d6..cbb50315ec 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1031,102 +1031,6 @@ mail_transfer_messages (EMailSession *session,
mail_msg_slow_ordered_push (m);
}
-/* ** SCAN SUBFOLDERS ***************************************************** */
-
-struct _get_folderinfo_msg {
- MailMsg base;
-
- CamelStore *store;
- CamelFolderInfo *info;
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data);
- gpointer data;
- gboolean can_clear; /* whether we can clear folder info */
-};
-
-static gchar *
-get_folderinfo_desc (struct _get_folderinfo_msg *m)
-{
- gchar *ret, *name;
-
- name = camel_service_get_name ((CamelService *) m->store, TRUE);
- ret = g_strdup_printf (_("Scanning folders in '%s'"), name);
- g_free (name);
- return ret;
-}
-
-static void
-get_folderinfo_exec (struct _get_folderinfo_msg *m,
- GCancellable *cancellable,
- GError **error)
-{
- guint32 flags;
-
- flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE |
- CAMEL_STORE_FOLDER_INFO_FAST |
- CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
- m->info = camel_store_get_folder_info_sync (
- m->store, NULL, flags,
- cancellable, error);
-}
-
-static void
-get_folderinfo_done (struct _get_folderinfo_msg *m)
-{
- if (!m->info && m->base.error != NULL) {
- gchar *url;
-
- url = camel_service_get_url (CAMEL_SERVICE (m->store));
- w(g_warning ("Error getting folder info from store at %s: %s",
- url, m->base.error->message));
- g_free (url);
- }
-
- if (m->done)
- m->can_clear = m->done (m->store, m->info, m->data);
- else
- m->can_clear = TRUE;
-}
-
-static void
-get_folderinfo_free (struct _get_folderinfo_msg *m)
-{
- if (m->info && m->can_clear)
- camel_store_free_folder_info (m->store, m->info);
- g_object_unref (m->store);
-}
-
-static MailMsgInfo get_folderinfo_info = {
- sizeof (struct _get_folderinfo_msg),
- (MailMsgDescFunc) get_folderinfo_desc,
- (MailMsgExecFunc) get_folderinfo_exec,
- (MailMsgDoneFunc) get_folderinfo_done,
- (MailMsgFreeFunc) get_folderinfo_free
-};
-
-gint
-mail_get_folderinfo (CamelStore *store,
- GCancellable *cancellable,
- gboolean (*done)(CamelStore *store, CamelFolderInfo *info, gpointer data),
- gpointer data)
-{
- struct _get_folderinfo_msg *m;
- gint id;
-
- m = mail_msg_new (&get_folderinfo_info);
- if (G_IS_CANCELLABLE (cancellable))
- e_activity_set_cancellable (m->base.activity, cancellable);
- m->store = store;
- g_object_ref (store);
- m->done = done;
- m->data = data;
- id = m->base.seq;
-
- mail_msg_unordered_push (m);
-
- return id;
-}
-
/* ** REMOVE FOLDER ******************************************************* */
struct _remove_folder_msg {