38#define MUTT_MSG_NO_FLAGS 0
39#define MUTT_ADD_FROM (1 << 0)
40#define MUTT_SET_DRAFT (1 << 1)
70int mx_access (
const char *path,
int flags);
Convenience wrapper for the core headers.
MailboxType
Supported mailbox formats.
void mx_alloc_memory(struct Mailbox *m, int req_size)
Create storage for the emails.
int mx_tags_edit(struct Mailbox *m, const char *tags, struct Buffer *buf)
Start the tag editor of the mailbox.
int mx_msg_close(struct Mailbox *m, struct Message **ptr)
Close a message.
int mx_ac_remove(struct Mailbox *m, bool keep_account)
Remove a Mailbox from an Account and delete Account if empty.
int mx_access(const char *path, int flags)
Wrapper for access, checks permissions on a given mailbox.
uint8_t MsgOpenFlags
Flags for mx_msg_open_new(), e.g. MUTT_ADD_FROM.
const struct EnumDef MboxTypeDef
Data for the $mbox_type enumeration.
int mx_msg_padding_size(struct Mailbox *m)
Bytes of padding between messages - Wrapper for MxOps::msg_padding_size()
void mx_fastclose_mailbox(struct Mailbox *m, bool keep_account)
Free up memory associated with the Mailbox.
enum MxStatus mx_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the statistics for a mailbox - Wrapper for MxOps::mbox_check_stats()
int mx_path_canon(struct Buffer *path, const char *folder, enum MailboxType *type)
Canonicalise a mailbox path - Wrapper for MxOps::path_canon()
bool mx_mbox_open(struct Mailbox *m, OpenMailboxFlags flags)
Open a mailbox and parse it.
struct Mailbox * mx_mbox_find(struct Account *a, const char *path)
Find a Mailbox on an Account.
struct Mailbox * mx_resolve(const char *path_or_name)
Get a Mailbox from either a path or name.
bool mx_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Wrapper for MxOps::ac_add()
struct Mailbox * mx_mbox_find2(const char *path)
Find a Mailbox on an Account.
struct Message * mx_msg_open(struct Mailbox *m, struct Email *e)
Return a stream pointer for a message.
const struct MxOps * mx_get_ops(enum MailboxType type)
Get mailbox operations.
bool mx_tags_is_supported(struct Mailbox *m)
Return true if mailbox support tagging.
int mx_tags_commit(struct Mailbox *m, struct Email *e, const char *tags)
Save tags to the Mailbox - Wrapper for MxOps::tags_commit()
int mx_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Wrapper for MxOps::msg_save_hcache()
bool mx_mbox_ac_link(struct Mailbox *m)
Link a Mailbox to an existing or new Account.
struct Account * mx_ac_find(struct Mailbox *m)
Find the Account owning a Mailbox.
enum MailboxType mx_type(struct Mailbox *m)
Return the type of the Mailbox.
int mx_path_is_empty(struct Buffer *path)
Is the mailbox empty.
struct Message * mx_msg_open_new(struct Mailbox *m, const struct Email *e, MsgOpenFlags flags)
Open a new message.
int mx_toggle_write(struct Mailbox *m)
Toggle the mailbox's readonly flag.
int mx_msg_commit(struct Mailbox *m, struct Message *msg)
Commit a message to a folder - Wrapper for MxOps::msg_commit()
enum MailboxType mx_path_probe(const char *path)
Find a mailbox that understands a path.
struct Mailbox * mx_path_resolve(const char *path)
Get a Mailbox for a path.
int mx_path_canon2(struct Mailbox *m, const char *folder)
Canonicalise the path to realpath.
enum MxStatus mx_mbox_check(struct Mailbox *m)
Check for new mail - Wrapper for MxOps::mbox_check()
enum MxStatus mx_mbox_sync(struct Mailbox *m)
Save changes to mailbox.
enum MxStatus mx_mbox_close(struct Mailbox *m)
Save changes and close mailbox.
uint8_t OpenMailboxFlags
Flags for mutt_open_mailbox(), e.g. MUTT_NOSORT.
MxStatus
Return values from mbox_check(), mbox_check_stats(), mbox_sync(), and mbox_close()
A group of associated Mailboxes.
String manipulation buffer.
The envelope/body of an email.
A local copy of an email.
char * path
path to temp file
struct Message::@0 flags
Flags for the Message.
enum MailboxType type
Mailbox type, e.g. MUTT_IMAP.