#ifdef USE_NOTMUCH
#include "notmuch/mutt_notmuch.h"
#endif
+#ifdef USE_POP
+#include "pop/pop.h"
+#endif
/* These Config Variables are only used in browser.c */
bool BrowserAbbreviateMailboxes; ///< Config: Abbreviate mailboxes using '~' and '=' in the browser
}
#endif
#ifdef USE_POP
- if (mx_is_pop(np->b->path))
+ if (pop_path_probe(np->b->path, NULL) == MUTT_POP)
{
add_folder(menu, state, buffer, NULL, NULL, np->b, NULL);
continue;
#ifdef USE_NNTP
#include "nntp/nntp.h"
#endif
+#ifdef USE_POP
+#include "pop/pop.h"
+#endif
/* These Config Variables are only used in compose.c */
char *ComposeFormat; ///< Config: printf-like format string for the Compose panel's status bar
if (!mx_is_imap(fname))
#endif
#ifdef USE_POP
- if (!mx_is_pop(fname))
+ if (pop_path_probe(fname, NULL) != MUTT_POP)
#endif
#ifdef USE_NNTP
if (!OptNews && (nntp_path_probe(fname, NULL) != MUTT_NNTP))
#ifdef USE_NNTP
#include "nntp/nntp.h"
#endif
+#ifdef USE_POP
+#include "pop/pop.h"
+#endif
/* These Config Variables are only used in mailbox.c */
short MailCheck; ///< Config: Number of seconds before NeoMutt checks for new mail
{
tmp->new = false;
#ifdef USE_POP
- if (mx_is_pop(tmp->path))
+ if (pop_path_probe(tmp->path, NULL) == MUTT_POP)
tmp->magic = MUTT_POP;
else
#endif
}
#endif
-#ifdef USE_POP
-/**
- * mx_is_pop - Is this a POP mailbox
- * @param p Mailbox string to test
- * @retval true It is a POP mailbox
- */
-bool mx_is_pop(const char *p)
-{
- enum UrlScheme scheme;
-
- if (!p)
- return false;
-
- scheme = url_check_scheme(p);
- if (scheme == U_POP || scheme == U_POPS)
- return true;
-
- return false;
-}
-#endif
-
/**
* mx_access - Wrapper for access, checks permissions on a given mailbox
* @param path Path of mailbox
#ifdef USE_IMAP
bool mx_is_imap(const char *p);
#endif
-#ifdef USE_POP
-bool mx_is_pop(const char *p);
-#endif
#endif /* _MUTT_MX_H */
if (!path)
return MUTT_UNKNOWN;
- enum UrlScheme scheme = url_check_scheme(path);
- if ((scheme == U_POP) || (scheme == U_POPS))
- return MUTT_POP;
+ if (mutt_str_strncasecmp(path, "pop://", 6) == 0)
+ return MUTT_NOTMUCH;
+
+ if (mutt_str_strncasecmp(path, "pops://", 7) == 0)
+ return MUTT_NOTMUCH;
return MUTT_UNKNOWN;
}
int pop_reconnect(struct Context *ctx);
void pop_logout(struct Context *ctx);
-
#endif /* _POP_PRIVATE_H */