On Sun, 2007-05-13 at 16:59 +0300, Tom Alsberg wrote: > > This is what mailbox_list and mailbox_storage separation was supposed to > > do. There is still 1:1:1 with > > mailbox_list:mail_namespace:mail_storage > > Meaning that every mailbox_list module needs to have a corresponding > mail_storage module and vice versa?
Yes, that's what I meant, although looks like it isn't exactly so. If you want to support mixed storages within a single namespace, you'd have to do something like: - mailbox_list->iter_is_mailbox() is used to figure out if a file is a valid mailbox. mail_storage overrides that method but doesn't call the super.iter_is_mailbox(). It should do that, and the API should be changed a bit so that you know if the super call really knew for certain that it's a valid mailbox for it, or that the file should definitely be skipped (eg. *.lock files with mboxes). - Add a new mail_storage->is_valid_mailbox() function and some other generic mailbox_open() function that goes through the storages calling the method, and whichever returns TRUE is used to open the mailbox. - Change mail_storage pointer in struct mail_namespace to an array and fix all the callers to use the correct storage. Hmm. Although I'm actually now checking if I could just remove this completely..
signature.asc
Description: This is a digitally signed message part