NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
Mailbox API

The Mailbox API. More...

+ Collaboration diagram for Mailbox API:

Modules

 ac_owns_path()
 Check whether an Account owns a Mailbox path.
 
 ac_add()
 Add a Mailbox to an Account.
 
 mbox_open()
 Open a Mailbox.
 
 mbox_open_append()
 Open a Mailbox for appending.
 
 mbox_check()
 Check for new mail.
 
 mbox_check_stats()
 Check the Mailbox statistics.
 
 mbox_sync()
 Save changes to the Mailbox.
 
 mbox_close()
 Close a Mailbox.
 
 msg_open()
 Open an email message in a Mailbox.
 
 msg_open_new()
 Open a new message in a Mailbox.
 
 msg_commit()
 Save changes to an email.
 
 msg_close()
 Close an email.
 
 msg_padding_size()
 Bytes of padding between messages.
 
 msg_save_hcache()
 Save message to the header cache.
 
 tags_edit()
 Prompt and validate new messages tags.
 
 tags_commit()
 Save the tags to a message.
 
 path_probe()
 Does this Mailbox type recognise this path?
 
 path_canon()
 Canonicalise a Mailbox path.
 
 path_pretty()
 Abbreviate a Mailbox path.
 
 path_parent()
 Find the parent of a Mailbox path.
 
 path_is_empty()
 Is the Mailbox empty?
 

Variables

struct MxOps MxCompOps
 Compressed Mailbox - Implements MxOps -Compress only uses open, close and check. More...
 
struct MxOps MxImapOps
 IMAP Mailbox - Implements MxOps -. More...
 
struct MxOps MxMaildirOps
 Maildir Mailbox - Implements MxOps -. More...
 
struct MxOps MxMhOps
 MH Mailbox - Implements MxOps -. More...
 
struct MxOps MxMboxOps
 Mbox Mailbox - Implements MxOps -. More...
 
struct MxOps MxMmdfOps
 MMDF Mailbox - Implements MxOps -. More...
 
struct MxOps MxNntpOps
 NNTP Mailbox - Implements MxOps -. More...
 
struct MxOps MxNotmuchOps
 Notmuch Mailbox - Implements MxOps -. More...
 
struct MxOps MxPopOps
 POP Mailbox - Implements MxOps -. More...
 

Detailed Description

The Mailbox API.

Each backend provides a set of functions through which the Mailbox, messages, tags and paths are manipulated.

Variable Documentation

◆ MxCompOps

struct MxOps MxCompOps
Initial value:
= {
.type = MUTT_COMPRESSED,
.name = "compressed",
.is_local = true,
.ac_owns_path = comp_ac_owns_path,
.ac_add = comp_ac_add,
.mbox_open = comp_mbox_open,
.mbox_open_append = comp_mbox_open_append,
.mbox_check = comp_mbox_check,
.mbox_check_stats = NULL,
.mbox_sync = comp_mbox_sync,
.mbox_close = comp_mbox_close,
.msg_open = comp_msg_open,
.msg_open_new = comp_msg_open_new,
.msg_commit = comp_msg_commit,
.msg_close = comp_msg_close,
.msg_padding_size = comp_msg_padding_size,
.msg_save_hcache = comp_msg_save_hcache,
.tags_edit = comp_tags_edit,
.tags_commit = comp_tags_commit,
.path_probe = comp_path_probe,
.path_canon = comp_path_canon,
.path_pretty = comp_path_pretty,
.path_parent = comp_path_parent,
.path_is_empty = NULL,
}
static int comp_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: compress.c:911
static bool comp_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: compress.c:419
static bool comp_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: compress.c:734
static enum MxOpenReturns comp_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -Set up a compressed mailbox to be read...
Definition: compress.c:440
static int comp_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: compress.c:788
static int comp_tags_commit(struct Mailbox *m, struct Email *e, char *buf)
Save the tags to a message - Implements MxOps::tags_commit() -.
Definition: compress.c:857
static enum MailboxType comp_path_probe(const char *path, const struct stat *st)
Is this a compressed Mailbox? - Implements MxOps::path_probe() -.
Definition: compress.c:874
static enum MxStatus comp_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -If the mailbox has been changed then re-compress th...
Definition: compress.c:667
static enum MxStatus comp_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -Changes in NeoMutt only affect the tmp f...
Definition: compress.c:615
static int comp_tags_edit(struct Mailbox *m, const char *tags, char *buf, size_t buflen)
Prompt and validate new messages tags - Implements MxOps::tags_edit() -.
Definition: compress.c:840
static int comp_msg_padding_size(struct Mailbox *m)
Bytes of padding between messages - Implements MxOps::msg_padding_size() -.
Definition: compress.c:806
static bool comp_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -.
Definition: compress.c:752
static enum MxStatus comp_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: compress.c:579
static int comp_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: compress.c:897
static int comp_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: compress.c:888
Compressed file Mailbox type.
Definition: mailbox.h:56
static bool comp_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags)
Open a Mailbox for appending - Implements MxOps::mbox_open_append() -flags may also contain MUTT_NEWF...
Definition: compress.c:498
static int comp_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache() -.
Definition: compress.c:823
static bool comp_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: compress.c:427
static int comp_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: compress.c:770

Compressed Mailbox - Implements MxOps -Compress only uses open, close and check.

The message functions are delegated to mbox.

Definition at line 932 of file compress.c.

◆ MxImapOps

struct MxOps MxImapOps
Initial value:
= {
.type = MUTT_IMAP,
.name = "imap",
.is_local = false,
.ac_owns_path = imap_ac_owns_path,
.ac_add = imap_ac_add,
.mbox_open = imap_mbox_open,
.mbox_open_append = imap_mbox_open_append,
.mbox_check = imap_mbox_check,
.mbox_check_stats = imap_mbox_check_stats,
.mbox_sync = NULL,
.mbox_close = imap_mbox_close,
.msg_open = imap_msg_open,
.msg_open_new = imap_msg_open_new,
.msg_commit = imap_msg_commit,
.msg_close = imap_msg_close,
.msg_padding_size = NULL,
.msg_save_hcache = imap_msg_save_hcache,
.tags_edit = imap_tags_edit,
.tags_commit = imap_tags_commit,
.path_probe = imap_path_probe,
.path_canon = imap_path_canon,
.path_pretty = imap_path_pretty,
.path_parent = imap_path_parent,
.path_is_empty = imap_path_is_empty,
}
int imap_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache() -.
Definition: message.c:2153
static bool imap_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: imap.c:1744
int imap_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: message.c:2131
bool imap_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: message.c:1927
static enum MxStatus imap_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: imap.c:2169
static enum MxStatus imap_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the Mailbox statistics - Implements MxOps::mbox_check_stats() -.
Definition: imap.c:1219
static bool imap_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -.
Definition: imap.c:2225
static enum MxStatus imap_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: imap.c:2183
enum MailboxType imap_path_probe(const char *path, const struct stat *st)
Is this an IMAP Mailbox? - Implements MxOps::path_probe() -.
Definition: imap.c:2402
int imap_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: imap.c:2416
static bool imap_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags)
Open a Mailbox for appending - Implements MxOps::mbox_open_append() -.
Definition: imap.c:2135
static bool imap_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: imap.c:1762
int imap_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: message.c:2145
static int imap_tags_edit(struct Mailbox *m, const char *tags, char *buf, size_t buflen)
Prompt and validate new messages tags - Implements MxOps::tags_edit() -.
Definition: imap.c:2250
static int imap_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: imap.c:2463
static enum MxOpenReturns imap_mbox_open(struct Mailbox *m)
Open a mailbox - Implements MxOps::mbox_open() -.
Definition: imap.c:1929
'IMAP' Mailbox type
Definition: mailbox.h:53
static int imap_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: imap.c:2451
static int imap_tags_commit(struct Mailbox *m, struct Email *e, char *buf)
Save the tags to a message - Implements MxOps::tags_commit() -This method update the server flags on ...
Definition: imap.c:2337
static int imap_path_is_empty(const char *path)
Is the mailbox empty - Implements MxOps::path_is_empty() -.
Definition: imap.c:2475

IMAP Mailbox - Implements MxOps -.

Definition at line 2489 of file imap.c.

◆ MxMaildirOps

struct MxOps MxMaildirOps
Initial value:
= {
.type = MUTT_MAILDIR,
.name = "maildir",
.is_local = true,
.ac_owns_path = maildir_ac_owns_path,
.ac_add = maildir_ac_add,
.mbox_open = maildir_mbox_open,
.mbox_open_append = maildir_mbox_open_append,
.mbox_check = maildir_mbox_check,
.mbox_check_stats = maildir_mbox_check_stats,
.mbox_sync = maildir_mbox_sync,
.mbox_close = maildir_mbox_close,
.msg_open = maildir_msg_open,
.msg_open_new = maildir_msg_open_new,
.msg_commit = maildir_msg_commit,
.msg_close = maildir_msg_close,
.msg_padding_size = NULL,
.msg_save_hcache = maildir_msg_save_hcache,
.tags_edit = NULL,
.tags_commit = NULL,
.path_probe = maildir_path_probe,
.path_canon = maildir_path_canon,
.path_pretty = maildir_path_pretty,
.path_parent = maildir_path_parent,
.path_is_empty = maildir_check_empty,
}
bool maildir_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: maildir.c:1084
static int maildir_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache() -.
Definition: maildir.c:1571
enum MxStatus maildir_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -This function handles arrival of new mail and re...
Definition: maildir.c:1166
int maildir_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: maildir.c:1563
enum MxStatus maildir_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -.
Definition: maildir.c:1373
bool maildir_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -Open a new (temporary) message in...
Definition: maildir.c:1488
static int maildir_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: maildir.c:1553
static enum MxStatus maildir_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the Mailbox statistics - Implements MxOps::mbox_check_stats() -.
Definition: maildir.c:1343
static bool maildir_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: maildir.c:1456
int maildir_check_empty(const char *path)
Is the mailbox empty.
Definition: maildir.c:1040
int maildir_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: maildir.c:1598
'Maildir' Mailbox type
Definition: mailbox.h:51
bool maildir_ac_owns_path(struct Account *a, const char *path)
Check whether an Account own a Mailbox path - Implements MxOps::ac_owns_path() -. ...
Definition: maildir.c:1076
static enum MxOpenReturns maildir_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -.
Definition: maildir.c:1092
enum MxStatus maildir_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: maildir.c:1448
int maildir_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: maildir.c:1589
int maildir_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: maildir.c:1615
static enum MailboxType maildir_path_probe(const char *path, const struct stat *st)
Is this a Maildir Mailbox? - Implements MxOps::path_probe() -.
Definition: maildir.c:1629
static bool maildir_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags)
Open a Mailbox for appending - Implements MxOps::mbox_open_append() -.
Definition: maildir.c:1105

Maildir Mailbox - Implements MxOps -.

Definition at line 1648 of file maildir.c.

◆ MxMhOps

struct MxOps MxMhOps
Initial value:
= {
.type = MUTT_MH,
.name = "mh",
.is_local = true,
.ac_owns_path = mh_ac_owns_path,
.ac_add = mh_ac_add,
.mbox_open = mh_mbox_open,
.mbox_open_append = mh_mbox_open_append,
.mbox_check = mh_mbox_check,
.mbox_check_stats = mh_mbox_check_stats,
.mbox_sync = mh_mbox_sync,
.mbox_close = mh_mbox_close,
.msg_open = mh_msg_open,
.msg_open_new = mh_msg_open_new,
.msg_commit = mh_msg_commit,
.msg_close = mh_msg_close,
.msg_padding_size = NULL,
.msg_save_hcache = mh_msg_save_hcache,
.tags_edit = NULL,
.tags_commit = NULL,
.path_probe = mh_path_probe,
.path_canon = mh_path_canon,
.path_pretty = mh_path_pretty,
.path_parent = mh_path_parent,
.path_is_empty = mh_check_empty,
}
enum MxStatus mh_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: mh.c:1104
int mh_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: mh.c:1167
bool mh_ac_owns_path(struct Account *a, const char *path)
Check whether an Account own a Mailbox path - Implements MxOps::ac_owns_path() -. ...
Definition: mh.c:826
static enum MailboxType mh_path_probe(const char *path, const struct stat *st)
Is this an mh Mailbox? - Implements MxOps::path_probe() -.
Definition: mh.c:1207
static enum MxOpenReturns mh_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -.
Definition: mh.c:842
int mh_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: mh.c:1159
static enum MxStatus mh_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the Mailbox statistics - Implements MxOps::mbox_check_stats() -.
Definition: mh.c:189
int mh_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: mh.c:1176
bool mh_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: mh.c:834
int mh_check_empty(const char *path)
Is mailbox empty.
Definition: mh.c:165
int mh_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: mh.c:1193
enum MxStatus mh_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -This function handles arrival of new mail and re...
Definition: mh.c:885
'MH' Mailbox type
Definition: mailbox.h:50
enum MxStatus mh_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -.
Definition: mh.c:1029
static bool mh_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -Open a new (temporary) message in...
Definition: mh.c:1141
static int mh_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: mh.c:1149
int mh_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache() -.
Definition: mh.c:810
static bool mh_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags)
Open a Mailbox for appending - Implements MxOps::mbox_open_append() -.
Definition: mh.c:850
static bool mh_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: mh.c:1112

MH Mailbox - Implements MxOps -.

Definition at line 1248 of file mh.c.

◆ MxMboxOps

struct MxOps MxMboxOps
Initial value:
= {
.type = MUTT_MBOX,
.name = "mbox",
.is_local = true,
.ac_owns_path = mbox_ac_owns_path,
.ac_add = mbox_ac_add,
.mbox_open = mbox_mbox_open,
.mbox_open_append = mbox_mbox_open_append,
.mbox_check = mbox_mbox_check,
.mbox_check_stats = mbox_mbox_check_stats,
.mbox_sync = mbox_mbox_sync,
.mbox_close = mbox_mbox_close,
.msg_open = mbox_msg_open,
.msg_open_new = mbox_msg_open_new,
.msg_commit = mbox_msg_commit,
.msg_close = mbox_msg_close,
.msg_padding_size = mbox_msg_padding_size,
.msg_save_hcache = NULL,
.tags_edit = NULL,
.tags_commit = NULL,
.path_probe = mbox_path_probe,
.path_canon = mbox_path_canon,
.path_pretty = mbox_path_pretty,
.path_parent = mbox_path_parent,
.path_is_empty = mbox_path_is_empty,
}
static enum MxStatus mbox_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the Mailbox statistics - Implements MxOps::mbox_check_stats() -.
Definition: mbox.c:1773
static bool mbox_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: mbox.c:1564
static enum MxStatus mbox_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -.
Definition: mbox.c:1146
static int mbox_msg_padding_size(struct Mailbox *m)
Bytes of padding between messages - Implements MxOps::msg_padding_size() -.
Definition: mbox.c:1625
static bool mbox_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags)
Open a Mailbox for appending - Implements MxOps::mbox_open_append() -.
Definition: mbox.c:974
static int mbox_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: mbox.c:1707
static int mbox_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: mbox.c:1610
static enum MxOpenReturns mbox_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -.
Definition: mbox.c:925
static int mbox_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: mbox.c:1593
static int mbox_path_is_empty(const char *path)
Is the mailbox empty - Implements MxOps::path_is_empty() -.
Definition: mbox.c:1738
static int mbox_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: mbox.c:1698
static int mbox_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: mbox.c:1721
'mbox' Mailbox type
Definition: mailbox.h:48
static enum MxStatus mbox_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: mbox.c:1023
static bool mbox_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -.
Definition: mbox.c:1580
static bool mbox_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: mbox.c:872
enum MailboxType mbox_path_probe(const char *path, const struct stat *st)
Is this an mbox Mailbox? - Implements MxOps::path_probe() -.
Definition: mbox.c:1633
static bool mbox_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: mbox.c:887
static enum MxStatus mbox_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: mbox.c:1524

Mbox Mailbox - Implements MxOps -.

Definition at line 1831 of file mbox.c.

◆ MxMmdfOps

struct MxOps MxMmdfOps
Initial value:
= {
.type = MUTT_MMDF,
.name = "mmdf",
.is_local = true,
.ac_owns_path = mbox_ac_owns_path,
.ac_add = mbox_ac_add,
.mbox_open = mbox_mbox_open,
.mbox_open_append = mbox_mbox_open_append,
.mbox_check = mbox_mbox_check,
.mbox_check_stats = mbox_mbox_check_stats,
.mbox_sync = mbox_mbox_sync,
.mbox_close = mbox_mbox_close,
.msg_open = mbox_msg_open,
.msg_open_new = mbox_msg_open_new,
.msg_commit = mmdf_msg_commit,
.msg_close = mbox_msg_close,
.msg_padding_size = mmdf_msg_padding_size,
.msg_save_hcache = NULL,
.tags_edit = NULL,
.tags_commit = NULL,
.path_probe = mbox_path_probe,
.path_canon = mbox_path_canon,
.path_pretty = mbox_path_pretty,
.path_parent = mbox_path_parent,
.path_is_empty = mbox_path_is_empty,
}
static enum MxStatus mbox_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the Mailbox statistics - Implements MxOps::mbox_check_stats() -.
Definition: mbox.c:1773
static bool mbox_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: mbox.c:1564
static enum MxStatus mbox_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -.
Definition: mbox.c:1146
static bool mbox_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags)
Open a Mailbox for appending - Implements MxOps::mbox_open_append() -.
Definition: mbox.c:974
static int mbox_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: mbox.c:1707
static int mbox_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: mbox.c:1610
static int mmdf_msg_padding_size(struct Mailbox *m)
Bytes of padding between messages - Implements MxOps::msg_padding_size() -.
Definition: mbox.c:1765
static enum MxOpenReturns mbox_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -.
Definition: mbox.c:925
static int mbox_path_is_empty(const char *path)
Is the mailbox empty - Implements MxOps::path_is_empty() -.
Definition: mbox.c:1738
'mmdf' Mailbox type
Definition: mailbox.h:49
static int mbox_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: mbox.c:1698
static int mbox_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: mbox.c:1721
static enum MxStatus mbox_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: mbox.c:1023
static bool mbox_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -.
Definition: mbox.c:1580
static bool mbox_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: mbox.c:872
enum MailboxType mbox_path_probe(const char *path, const struct stat *st)
Is this an mbox Mailbox? - Implements MxOps::path_probe() -.
Definition: mbox.c:1633
static bool mbox_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: mbox.c:887
static enum MxStatus mbox_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: mbox.c:1524
static int mmdf_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: mbox.c:1746

MMDF Mailbox - Implements MxOps -.

Definition at line 1861 of file mbox.c.

◆ MxNntpOps

struct MxOps MxNntpOps
Initial value:
= {
.type = MUTT_NNTP,
.name = "nntp",
.is_local = false,
.ac_owns_path = nntp_ac_owns_path,
.ac_add = nntp_ac_add,
.mbox_open = nntp_mbox_open,
.mbox_open_append = NULL,
.mbox_check = nntp_mbox_check,
.mbox_check_stats = NULL,
.mbox_sync = nntp_mbox_sync,
.mbox_close = nntp_mbox_close,
.msg_open = nntp_msg_open,
.msg_open_new = NULL,
.msg_commit = NULL,
.msg_close = nntp_msg_close,
.msg_padding_size = NULL,
.msg_save_hcache = NULL,
.tags_edit = NULL,
.tags_commit = NULL,
.path_probe = nntp_path_probe,
.path_canon = nntp_path_canon,
.path_pretty = nntp_path_pretty,
.path_parent = nntp_path_parent,
}
static enum MxStatus nntp_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -.
Definition: nntp.c:2489
static bool nntp_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: nntp.c:2571
'NNTP' (Usenet) Mailbox type
Definition: mailbox.h:52
static enum MxStatus nntp_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: nntp.c:2549
static bool nntp_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: nntp.c:2299
static int nntp_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: nntp.c:2731
static enum MxOpenReturns nntp_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -.
Definition: nntp.c:2307
static bool nntp_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: nntp.c:2291
static int nntp_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: nntp.c:2723
static int nntp_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: nntp.c:2740
enum MailboxType nntp_path_probe(const char *path, const struct stat *st)
Is this an NNTP Mailbox? - Implements MxOps::path_probe() -.
Definition: nntp.c:2709
static enum MxStatus nntp_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: nntp.c:2472
static int nntp_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: nntp.c:2701

NNTP Mailbox - Implements MxOps -.

Definition at line 2750 of file nntp.c.

◆ MxNotmuchOps

struct MxOps MxNotmuchOps
Initial value:
= {
.type = MUTT_NOTMUCH,
.name = "notmuch",
.is_local = false,
.ac_owns_path = nm_ac_owns_path,
.ac_add = nm_ac_add,
.mbox_open = nm_mbox_open,
.mbox_open_append = NULL,
.mbox_check = nm_mbox_check,
.mbox_check_stats = nm_mbox_check_stats,
.mbox_sync = nm_mbox_sync,
.mbox_close = nm_mbox_close,
.msg_open = nm_msg_open,
.msg_open_new = maildir_msg_open_new,
.msg_commit = nm_msg_commit,
.msg_close = nm_msg_close,
.msg_padding_size = NULL,
.msg_save_hcache = NULL,
.tags_edit = nm_tags_edit,
.tags_commit = nm_tags_commit,
.path_probe = nm_path_probe,
.path_canon = nm_path_canon,
.path_pretty = nm_path_pretty,
.path_parent = nm_path_parent,
.path_is_empty = NULL,
}
static int nm_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: notmuch.c:2486
static int nm_tags_commit(struct Mailbox *m, struct Email *e, char *buf)
Save the tags to a message - Implements MxOps::tags_commit() -.
Definition: notmuch.c:2419
static enum MxStatus nm_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the Mailbox statistics - Implements MxOps::mbox_check_stats() -.
Definition: notmuch.c:1772
static int nm_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: notmuch.c:2397
bool maildir_msg_open_new(struct Mailbox *m, struct Message *msg, const struct Email *e)
Open a new message in a Mailbox - Implements MxOps::msg_open_new() -Open a new (temporary) message in...
Definition: maildir.c:1488
static int nm_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: notmuch.c:2469
static bool nm_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: notmuch.c:2029
static enum MxStatus nm_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -Nothing to do.
Definition: notmuch.c:2356
static enum MxStatus nm_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: notmuch.c:2094
static int nm_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: notmuch.c:2388
static int nm_tags_edit(struct Mailbox *m, const char *tags, char *buf, size_t buflen)
Prompt and validate new messages tags - Implements MxOps::tags_edit() -.
Definition: notmuch.c:2406
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:54
enum MailboxType nm_path_probe(const char *path, const struct stat *st)
Is this a Notmuch Mailbox? - Implements MxOps::path_probe() -.
Definition: notmuch.c:2458
static enum MxOpenReturns nm_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -.
Definition: notmuch.c:2044
static enum MxStatus nm_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -.
Definition: notmuch.c:2228
static int nm_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: notmuch.c:2477
static bool nm_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: notmuch.c:2021
static bool nm_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: notmuch.c:2364

Notmuch Mailbox - Implements MxOps -.

Definition at line 2496 of file notmuch.c.

◆ MxPopOps

struct MxOps MxPopOps
Initial value:
= {
.type = MUTT_POP,
.name = "pop",
.is_local = false,
.ac_owns_path = pop_ac_owns_path,
.ac_add = pop_ac_add,
.mbox_open = pop_mbox_open,
.mbox_open_append = NULL,
.mbox_check = pop_mbox_check,
.mbox_check_stats = NULL,
.mbox_sync = pop_mbox_sync,
.mbox_close = pop_mbox_close,
.msg_open = pop_msg_open,
.msg_open_new = NULL,
.msg_commit = NULL,
.msg_close = pop_msg_close,
.msg_padding_size = NULL,
.msg_save_hcache = pop_msg_save_hcache,
.tags_edit = NULL,
.tags_commit = NULL,
.path_probe = pop_path_probe,
.path_canon = pop_path_canon,
.path_pretty = pop_path_pretty,
.path_parent = pop_path_parent,
.path_is_empty = NULL,
}
enum MailboxType pop_path_probe(const char *path, const struct stat *st)
Is this a POP Mailbox? - Implements MxOps::path_probe() -.
Definition: pop.c:1165
static enum MxOpenReturns pop_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -Fetch only headers.
Definition: pop.c:748
static int pop_path_pretty(char *buf, size_t buflen, const char *folder)
Abbreviate a Mailbox path - Implements MxOps::path_pretty() -.
Definition: pop.c:1187
static int pop_path_canon(char *buf, size_t buflen)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: pop.c:1179
static enum MxStatus pop_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: pop.c:825
static int pop_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: pop.c:1140
'POP3' Mailbox type
Definition: mailbox.h:55
static bool pop_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: pop.c:983
static int pop_path_parent(char *buf, size_t buflen)
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition: pop.c:1196
static bool pop_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: pop.c:717
static bool pop_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: pop.c:699
static enum MxStatus pop_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -Update POP mailbox, delete messages from...
Definition: pop.c:865
static enum MxStatus pop_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: pop.c:956
static int pop_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache() -.
Definition: pop.c:1148

POP Mailbox - Implements MxOps -.

Definition at line 1206 of file pop.c.