NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
maildir.c
Go to the documentation of this file.
1
32#include "config.h"
33#include <stdbool.h>
34#include <stddef.h>
35#include "core/lib.h"
36#include "account.h"
37#include "mailbox.h"
38#include "message.h"
39#include "path.h"
40
44const struct MxOps MxMaildirOps = {
45 // clang-format off
47 .name = "maildir",
48 .is_local = true,
49 .ac_owns_path = maildir_ac_owns_path,
50 .ac_add = maildir_ac_add,
51 .mbox_open = maildir_mbox_open,
52 .mbox_open_append = maildir_mbox_open_append,
53 .mbox_check = maildir_mbox_check,
54 .mbox_check_stats = maildir_mbox_check_stats,
55 .mbox_sync = maildir_mbox_sync,
56 .mbox_close = maildir_mbox_close,
57 .msg_open = maildir_msg_open,
58 .msg_open_new = maildir_msg_open_new,
59 .msg_commit = maildir_msg_commit,
60 .msg_close = maildir_msg_close,
61 .msg_padding_size = NULL,
62 .msg_save_hcache = maildir_msg_save_hcache,
63 .tags_edit = NULL,
64 .tags_commit = NULL,
65 .path_probe = maildir_path_probe,
66 .path_canon = maildir_path_canon,
67 .path_is_empty = maildir_path_is_empty,
68 // clang-format on
69};
Convenience wrapper for the core headers.
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:48
bool maildir_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Implements MxOps::ac_add() -.
Definition: account.c:37
bool maildir_ac_owns_path(struct Account *a, const char *path)
Check whether an Account owns a Mailbox path - Implements MxOps::ac_owns_path() -.
Definition: account.c:45
const struct MxOps MxMaildirOps
Maildir Mailbox - Implements MxOps -.
Definition: maildir.c:44
enum MxStatus maildir_mbox_check_stats(struct Mailbox *m, uint8_t flags)
Check the Mailbox statistics - Implements MxOps::mbox_check_stats() -.
Definition: mailbox.c:809
enum MxStatus maildir_mbox_check(struct Mailbox *m)
Check for new mail - Implements MxOps::mbox_check() -.
Definition: mailbox.c:801
enum MxStatus maildir_mbox_close(struct Mailbox *m)
Close a Mailbox - Implements MxOps::mbox_close() -.
Definition: mailbox.c:898
bool maildir_mbox_open_append(struct Mailbox *m, OpenMailboxFlags flags)
Open a Mailbox for appending - Implements MxOps::mbox_open_append() -.
Definition: mailbox.c:747
enum MxOpenReturns maildir_mbox_open(struct Mailbox *m)
Open a Mailbox - Implements MxOps::mbox_open() -.
Definition: mailbox.c:736
enum MxStatus maildir_mbox_sync(struct Mailbox *m)
Save changes to the Mailbox - Implements MxOps::mbox_sync() -.
Definition: mailbox.c:838
int maildir_msg_close(struct Mailbox *m, struct Message *msg)
Close an email - Implements MxOps::msg_close() -.
Definition: message.c:614
int maildir_msg_commit(struct Mailbox *m, struct Message *msg)
Save changes to an email - Implements MxOps::msg_commit() -.
Definition: message.c:604
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() -.
Definition: message.c:532
bool maildir_msg_open(struct Mailbox *m, struct Message *msg, struct Email *e)
Open an email message in a Mailbox - Implements MxOps::msg_open() -.
Definition: message.c:505
int maildir_msg_save_hcache(struct Mailbox *m, struct Email *e)
Save message to the header cache - Implements MxOps::msg_save_hcache() -.
Definition: message.c:622
int maildir_path_canon(struct Buffer *path)
Canonicalise a Mailbox path - Implements MxOps::path_canon() -.
Definition: path.c:44
enum MailboxType maildir_path_probe(const char *path, const struct stat *st)
Is this a Maildir Mailbox? - Implements MxOps::path_probe() -.
Definition: path.c:94
Maildir Account.
Maildir Mailbox.
int maildir_path_is_empty(struct Buffer *path)
Is the mailbox empty.
Definition: path.c:57
Message logging.
Path manipulation functions.
Definition: mxapi.h:91
enum MailboxType type
Mailbox type, e.g. MUTT_IMAP.
Definition: mxapi.h:92