diff options
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 87b2905901..a8b05560fd 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1380,80 +1380,6 @@ mail_get_store (const char *uri, void (*done) (char *uri, CamelStore *store, voi return id; } -/* ** CREATE FOLDER ******************************************************* */ - -/* trying to find a way to remove this entirely and just use get_folder() - to do the same thing. But i dont think it can be done, because one works on - shell uri's (get folder), and the other only works for mail uri's ? */ - -struct _create_folder_msg { - struct _mail_msg msg; - - char *uri; - CamelFolder *folder; - void (*done) (char *uri, CamelFolder *folder, void *data); - void *data; -}; - -static char * -create_folder_desc (struct _mail_msg *mm, int done) -{ - struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - - return g_strdup_printf (_("Creating folder %s"), m->uri); -} - -static void -create_folder_get (struct _mail_msg *mm) -{ - struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - - /* FIXME: supply a way to make indexes optional */ - m->folder = mail_tool_get_folder_from_urlname (m->uri, "mbox", - CAMEL_STORE_FOLDER_CREATE | - CAMEL_STORE_FOLDER_BODY_INDEX, - &mm->ex); -} - -static void -create_folder_got (struct _mail_msg *mm) -{ - struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - - if (m->done) - m->done (m->uri, m->folder, m->data); -} - -static void -create_folder_free (struct _mail_msg *mm) -{ - struct _create_folder_msg *m = (struct _create_folder_msg *)mm; - - g_free (m->uri); - if (m->folder) - camel_object_unref (CAMEL_OBJECT (m->folder)); -} - -static struct _mail_msg_op create_folder_op = { - create_folder_desc, - create_folder_get, - create_folder_got, - create_folder_free, -}; - -void -mail_create_folder (const char *uri, void (*done) (char *uri, CamelFolder *folder, void *data), void *data) -{ - struct _create_folder_msg *m; - - m = mail_msg_new (&create_folder_op, NULL, sizeof(*m)); - m->uri = g_strdup (uri); - m->data = data; - m->done = done; - - e_thread_put (mail_thread_new, (EMsg *)m); -} - /* ** REMOVE FOLDER ******************************************************* */ struct _remove_folder_msg { |