summaryrefslogtreecommitdiff
path: root/include/mailutils/mailbox.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-12-16 16:36:29 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2011-12-16 20:58:59 +0200
commit33a5d85239028bc3e34eec59909253d12d5434f4 (patch)
tree5bd640ccf3988c2a616d7c44575c9be35e02f16f /include/mailutils/mailbox.h
parenta837453677a2888155aa565666acc956cdd3f896 (diff)
downloadmailutils-33a5d85239028bc3e34eec59909253d12d5434f4.tar.gz
mailutils-33a5d85239028bc3e34eec59909253d12d5434f4.tar.bz2
Share folder implementation between mbox, mh and maildir. Fix mu_folder_delete.
* include/mailutils/folder.h (_mu_fsfolder_init): New proto. * include/mailutils/mailbox.h (mu_mailbox_create_at): New proto. * libmailutils/mailbox/mailbox.c (mu_mailbox_create_at): New function. * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add fsfolder.c * libmailutils/mailbox/folder.c (mu_folder_delete): If folder does not provide its own method for deletion, use mu_mailbox_remove. (mu_folder_open, mu_folder_close, mu_folder_enumerate) (mu_folder_lsub, mu_folder_subscribe, mu_folder_unsubscribe) (mu_folder_rename): Return EINVAL if folder is NULL. (mu_folder_match): Bugfix: don't pass folder flags to fnmatch. * libmailutils/mailbox/fsfolder.c: New file. Implementation of file-system based folders. * libmailutils/mailbox/mailbox (_create_mailbox0): Propagate error return from mu_registrar_lookup_url. * libmailutils/tests/fsfolder00.at: New test case. * libmailutils/tests/fsfolder01.at: New test case. * libmailutils/tests/fsfolder02.at: New test case. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add fsfolder. (TESTSUITE_AT): Add fsfolder tests. * libmailutils/tests/testsuite.at: Include fsfolder tests. * libproto/mbox/folder.c: Use fsfolder. (_mh_is_scheme): Check file even if scheme matches. * libproto/maildir/folder.c: Likewise. (_maildir_is_scheme): Check file even if scheme matches. * libproto/mh/folder.c: Likewise. * testsuite/fldel.c: New file. * testsuite/Makefile.am (noinst_PROGRAMS): Buld fldel.
Diffstat (limited to 'include/mailutils/mailbox.h')
-rw-r--r--include/mailutils/mailbox.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mailutils/mailbox.h b/include/mailutils/mailbox.h
index 89698592a..f21dc89a6 100644
--- a/include/mailutils/mailbox.h
+++ b/include/mailutils/mailbox.h
@@ -43,6 +43,8 @@ extern int mu_mailbox_create_from_record (mu_mailbox_t *pmbox,
mu_record_t record,
const char *name);
extern int mu_mailbox_create_default (mu_mailbox_t *, const char *);
+extern int mu_mailbox_create_at (mu_mailbox_t *pmbox, mu_folder_t folder,
+ const char *name);
extern void mu_mailbox_destroy (mu_mailbox_t *);

Return to:

Send suggestions and report system problems to the System administrator.