diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-12 12:50:29 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-12 12:50:29 +0800 |
commit | 5753ec741be2ee2dbc978397510c51bd76a6f614 (patch) | |
tree | 14e46678f0fc8ffa2d452045d868d3cfdcda4e3b | |
parent | 1c68dd833916876757fec8796d2a205c652b792f (diff) | |
download | gsoc2013-evolution-5753ec741be2ee2dbc978397510c51bd76a6f614.tar.gz gsoc2013-evolution-5753ec741be2ee2dbc978397510c51bd76a6f614.tar.zst gsoc2013-evolution-5753ec741be2ee2dbc978397510c51bd76a6f614.zip |
Remove mail_get_folder().
Use camel_store_get_folder() instead.
-rw-r--r-- | mail/mail-ops.c | 79 | ||||
-rw-r--r-- | 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 a5210559a6..0a0f80fd93 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 f773c825f7..2ccea541aa 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, |