99 do_free ?
"" :
"not ", m->
visible ?
"visible" :
"invisible",
116 for (
size_t i = 0; i < m->
email_max; i++)
155 struct stat st = { 0 };
156 struct stat st_tmp = { 0 };
158 if (stat(path, &st) != 0)
168 (st.st_dev == st_tmp.st_dev) && (st.st_ino == st_tmp.st_ino))
217 struct stat st = { 0 };
223 m->
size = (off_t) st.st_size;
272 if (!m || m->
sub || !sub)
314 for (
size_t i = 0; i <
GC.
idx; i++)
void buf_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
struct Buffer * buf_init(struct Buffer *buf)
Initialise a new Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Convenience wrapper for the config headers.
bool mailbox_set_subset(struct Mailbox *m, struct ConfigSubset *sub)
Set a Mailbox's Config Subset.
void mailbox_gc_run(void)
Run the garbage-collection.
void mailbox_size_add(struct Mailbox *m, const struct Email *e)
Add an email's size to the total size of a Mailbox.
void mailbox_size_sub(struct Mailbox *m, const struct Email *e)
Subtract an email's size from the total size of a Mailbox.
int mailbox_gen(void)
Get the next generation number.
struct Mailbox * mailbox_new(void)
Create a new Mailbox.
void mailbox_gc_add(struct Email *e)
Add an Email to the garbage-collection set.
void mailbox_update(struct Mailbox *m)
Get the mailbox's current size.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
static const struct Mapping MailboxTypes[]
Lookups for Mailbox types.
struct Mailbox * mailbox_find_name(const char *name)
Find the mailbox with a given name.
static struct EmailGarbageCollector GC
Set of Emails to be deleted.
void mailbox_changed(struct Mailbox *m, enum NotifyMailbox action)
Notify observers of a change to a Mailbox.
const char * mailbox_get_type_name(enum MailboxType type)
Get the type of a Mailbox.
struct Mailbox * mailbox_find(const char *path)
Find the mailbox with a given path.
NotifyMailbox
Types of Mailbox Event.
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
MailboxType
Supported mailbox formats.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_MMDF
'mmdf' Mailbox type
@ MUTT_POP
'POP3' Mailbox type
@ MUTT_MH
'MH' Mailbox type
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
@ MUTT_MBOX
'mbox' Mailbox type
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
@ MUTT_COMPRESSED
Compressed file Mailbox type.
@ MUTT_MAILDIR
'Maildir' Mailbox type
size_t email_size(const struct Email *e)
Compute the size of an email.
void email_free(struct Email **ptr)
Free an Email.
Structs that make up an email.
@ NT_EMAIL_DELETE_ALL
All the Emails are about to be deleted.
#define mutt_debug(LEVEL,...)
@ LL_DEBUG3
Log at debug level 3.
@ LL_NOTIFY
Log of notifications.
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
#define mutt_array_size(x)
struct Notify * notify_new(void)
Create a new notifications handler.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
void notify_free(struct Notify **ptr)
Free a notification handler.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
Container for Accounts, Notifications.
@ NT_EMAIL
Email has changed, NotifyEmail, EventEmail.
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FOREACH(var, head, field)
A set of inherited config items.
enum ConfigScope scope
Scope of Subset, e.g. SET_SCOPE_ACCOUNT.
Email garbage collection.
size_t idx
Current position.
struct Email * arr[10]
Array of Emails to be deleted.
The envelope/body of an email.
An Event that happened to an Email.
An Event that happened to a Mailbox.
struct Mailbox * mailbox
Mailbox in the list.
void(* mdata_free)(void **ptr)
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
int * v2r
Mapping from virtual to real msgno.
int msg_new
Number of new messages.
int msg_count
Total number of messages.
int email_max
Size of emails array.
enum MailboxType type
Mailbox type.
bool poll_new_mail
Check for new mail.
void * mdata
Driver specific data.
struct Email ** emails
Array of Emails.
char * name
A short name for the Mailbox.
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
bool notify_user
Notify the user of new mail.
struct Buffer pathbuf
Path of the Mailbox.
int msg_deleted
Number of deleted messages.
off_t size
Size of the Mailbox.
bool visible
True if a result of "mailboxes".
int msg_flagged
Number of flagged messages.
int opened
Number of times mailbox is opened.
int msg_tagged
How many messages are tagged?
int msg_unread
Number of unread messages.
int gen
Generation number, for sorting.
struct ConfigSubset * sub
Inherited config items.
Mapping between user-readable string and a constant.
Container for Accounts, Notifications.
struct ConfigSubset * cs_subset_new(const char *name, struct ConfigSubset *sub_parent, struct Notify *not_parent)
Create a new Config Subset.
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
@ SET_SCOPE_MAILBOX
This Config is Mailbox-specific.