EXPORTED int mailbox_delete_dav(struct mailbox *mailbox)
{
    switch (mbtype_isa(mailbox_mbtype(mailbox))) {
    case MBTYPE_ADDRESSBOOK:
        return mailbox_delete_carddav(mailbox);
    case MBTYPE_CALENDAR:
        return mailbox_delete_caldav(mailbox);
    case MBTYPE_COLLECTION:
        return mailbox_delete_webdav(mailbox);
    }

    return 0;
}
EXPORTED int mailbox_delete_dav(struct mailbox *mailbox)
{
    switch (mbtype_isa(mailbox_mbtype(mailbox))) {
    case MBTYPE_ADDRESSBOOK:
        return mailbox_delete_carddav(mailbox);
    case MBTYPE_CALENDAR:
        return mailbox_delete_caldav(mailbox);
    case MBTYPE_COLLECTION:
        return mailbox_delete_webdav(mailbox);
    }

    return 0;
}