[evolution] Remove mail_get_folder().



commit 5753ec741be2ee2dbc978397510c51bd76a6f614
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu May 12 00:50:29 2011 -0400

    Remove mail_get_folder().
    
    Use camel_store_get_folder() instead.

 mail/mail-ops.c |   79 -------------------------------------------------------
 mail/mail-ops.h |    8 -----
 2 files changed, 0 insertions(+), 87 deletions(-)
---
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index a521055..0a0f80f 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1127,85 +1127,6 @@ mail_get_folderinfo (CamelStore *store,
 	return id;
 }
 
-/* ** LOAD FOLDER ********************************************************* */
-
-/* there should be some way to merge this and create folder, since both can
-   presumably create a folder ... */
-
-struct _get_folder_msg {
-	MailMsg base;
-
-	EMailSession *session;
-	gchar *uri;
-	guint32 flags;
-	CamelFolder *folder;
-	void (*done) (gchar *uri, CamelFolder *folder, gpointer data);
-	gpointer data;
-};
-
-static gchar *
-get_folder_desc (struct _get_folder_msg *m)
-{
-	return g_strdup_printf (_("Opening folder '%s'"), m->uri);
-}
-
-static void
-get_folder_exec (struct _get_folder_msg *m,
-                 GCancellable *cancellable,
-                 GError **error)
-{
-	m->folder = e_mail_session_uri_to_folder_sync (
-		m->session, m->uri, m->flags,
-		cancellable, error);
-}
-
-static void
-get_folder_done (struct _get_folder_msg *m)
-{
-	if (m->done)
-		m->done (m->uri, m->folder, m->data);
-}
-
-static void
-get_folder_free (struct _get_folder_msg *m)
-{
-	g_object_unref (m->session);
-	g_free (m->uri);
-	if (m->folder)
-		g_object_unref (m->folder);
-}
-
-static MailMsgInfo get_folder_info = {
-	sizeof (struct _get_folder_msg),
-	(MailMsgDescFunc) get_folder_desc,
-	(MailMsgExecFunc) get_folder_exec,
-	(MailMsgDoneFunc) get_folder_done,
-	(MailMsgFreeFunc) get_folder_free
-};
-
-gint
-mail_get_folder (EMailSession *session,
-                 const gchar *uri,
-                 guint32 flags,
-                 void (*done)(gchar *uri, CamelFolder *folder, gpointer data),
-                 gpointer data,
-                 MailMsgDispatchFunc dispatch)
-{
-	struct _get_folder_msg *m;
-	gint id;
-
-	m = mail_msg_new (&get_folder_info);
-	m->session = g_object_ref (session);
-	m->uri = g_strdup (uri);
-	m->flags = flags;
-	m->data = data;
-	m->done = done;
-
-	id = m->base.seq;
-	dispatch (m);
-	return id;
-}
-
 /* ** GET FOLDER'S QUOTA ********************************************************* */
 
 struct _get_quota_msg {
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index f773c82..2ccea54 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -47,14 +47,6 @@ gint mail_get_message (CamelFolder *folder, const gchar *uid,
 		       gpointer data,
 		       MailMsgDispatchFunc dispatch);
 
-/* same for a folder */
-gint		mail_get_folder			(EMailSession *session,
-						 const gchar *uri,
-						 guint32 flags,
-						 void (*done) (gchar *uri, CamelFolder *folder, gpointer data),
-						 gpointer data,
-						 MailMsgDispatchFunc dispatch);
-
 /* get quota information for a folder */
 gint mail_get_folder_quota (CamelFolder *folder,
 		 const gchar *folder_uri,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]