51 #ifndef MUTT_IMAP_LIB_H 52 #define MUTT_IMAP_LIB_H 57 #include <sys/types.h> 84 int imap_complete(
char *buf,
size_t buflen,
const char *path);
110 int imap_mxcmp(
const char *mx1,
const char *mx2);
bool imap_search(struct Mailbox *m, const struct PatternList *pat)
Find messages in mailbox matching a pattern.
bool config_init_imap(struct ConfigSet *cs)
Register imap config variables - Implements module_init_config_t.
Container for lots of config items.
bool C_ImapPeek
Config: (imap) Don't mark messages as read when fetching them from the server.
The envelope/body of an email.
void imap_init(void)
Setup feature commands.
int imap_parse_path(const char *path, struct ConnAccount *cac, char *mailbox, size_t mailboxlen)
Parse an IMAP mailbox name into ConnAccount, name.
void imap_keepalive(void)
poll the current folder to keep the connection alive
static size_t plen
Length of cached packet.
State of the file/mailbox browser.
bool C_ImapListSubscribed
Config: (imap) When browsing a mailbox, only display subscribed folders.
String manipulation buffer.
void imap_pretty_mailbox(char *path, size_t pathlen, const char *folder)
Prettify an IMAP mailbox name.
int imap_subscribe(char *path, bool subscribe)
Subscribe to a mailbox.
int imap_fast_trash(struct Mailbox *m, char *dest)
Use server COPY command to copy deleted messages to trash.
enum MailboxType imap_path_probe(const char *path, const struct stat *st)
Is this an IMAP Mailbox? - Implements MxOps::path_probe()
int imap_browse(const char *path, struct BrowserState *state)
IMAP hook into the folder browser.
int imap_expand_path(struct Buffer *buf)
Buffer wrapper around imap_path_canon()
void imap_notify_delete_email(struct Mailbox *m, struct Email *e)
Inform IMAP that an Email has been deleted.
void imap_get_parent_path(const char *path, char *buf, size_t buflen)
Get the path of the parent folder.
Convenience wrapper for the core headers.
int imap_check_mailbox(struct Mailbox *m, bool force)
use the NOOP or IDLE command to poll for new mail
int imap_mailbox_create(const char *folder)
Create a new IMAP mailbox.
int imap_mxcmp(const char *mx1, const char *mx2)
Compare mailbox names, giving priority to INBOX.
void imap_logout_all(void)
close all open connections
int imap_path_status(const char *path, bool queue)
Refresh the number of total and new messages.
int imap_mailbox_status(struct Mailbox *m, bool queue)
Refresh the number of total and new messages.
short C_ImapKeepalive
Config: (imap) Time to wait before polling an open IMAP connection.
int imap_access(const char *path)
Check permissions on an IMAP mailbox with a new connection.
int imap_mailbox_rename(const char *path)
Rename a mailbox.
int imap_sync_mailbox(struct Mailbox *m, bool expunge, bool close)
Sync all the changes to the server.
bool C_ImapPassive
Config: (imap) Reuse an existing IMAP connection to check for new mail.
int imap_copy_messages(struct Mailbox *m, struct EmailList *el, const char *dest, bool delete_original)
Server COPY messages to another folder.
int imap_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon()
int imap_wait_keepalive(pid_t pid)
Wait for a process to change state.
Login details for a remote server.
MailboxType
Supported mailbox formats.
void imap_clean_path(char *path, size_t plen)
Cleans an IMAP path using imap_fix_path.
struct MxOps MxImapOps
IMAP Mailbox - Implements MxOps.
int imap_complete(char *buf, size_t buflen, const char *path)
Try to complete an IMAP folder path.
int imap_delete_mailbox(struct Mailbox *m, char *path)
Delete a mailbox.