The different parts of the codebase are very tightly coupled. The goal of this patchset is to start decoupling maiboxes of the rest of the application. To do so, a new structure mx_ops is introduced to define operations that a mailbox should implement in order to work with the rest of mutt. For now, it has only 2 callbacks: open, and close, which are pretty self-explanatory.
Changes in v2: - Addressed styling issues - Got rid of the probing logic. For now, we still rely on a switch case to retrieve the correct mx_ops. So, one switch case was remove and another one was added, but as more functions will be added in the struct mx_ops, we will get rid of more {switch,if}(ctx->magic). This is only the first step! - Removed patches that changed mx_fastclose_mailbox - Folded similar patches into larger commits Thanks, -- Damien