2 * This file is part of mutt-ng, see http://www.muttng.org/.
3 * It's licensed under the GNU General Public License,
4 * please see the file GPL in the top level source directory.
11 #include "imap_private.h"
21 static int imap_is_magic (const char* path) {
25 if (*path == '{') /* pain
\17pine compatibility */
27 s = url_check_scheme (NONULL (path));
28 return ((s == U_IMAP || s == U_IMAPS) ? M_IMAP : -1);
31 static int acl_check_imap (CONTEXT* ctx, int bit) {
32 return (!mutt_bit_isset (((IMAP_DATA*) ctx->data)->capabilities, ACL) ||
33 mutt_bit_isset (((IMAP_DATA*) ctx->data)->rights, bit));
36 mx_t* imap_reg_mx (void) {
37 mx_t* fmt = safe_calloc (1, sizeof (mx_t));
39 /* make up mx_t record... */
41 fmt->mx_is_magic = imap_is_magic;
42 fmt->mx_access = imap_access;
43 fmt->mx_open_mailbox = imap_open_mailbox;
44 fmt->mx_acl_check = acl_check_imap;