102 if (stat(path, &sb) != 0)
112 (sb.st_dev == tmp_sb.st_dev) && (sb.st_ino == tmp_sb.st_ino))
167 m->
size = (off_t) sb.st_size;
214 if (!m || m->
sub || !sub)
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
struct Email ** emails
Array of Emails.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
off_t size
Size of the Mailbox.
NotifyMailbox
Types of Mailbox Event.
The envelope/body of an email.
void mailbox_size_add(struct Mailbox *m, const struct Email *e)
Add an email's size to the total size of a Mailbox.
Structs that make up an email.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
void notify_free(struct Notify **ptr)
Free a notification handler.
struct Mailbox * mailbox_find(const char *path)
Find the mailbox with a given path.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
An Event that happened to a Mailbox.
Container for Accounts, Notifications.
Convenience wrapper for the config headers.
void(* mdata_free)(void **ptr)
Free the private data attached to the Mailbox.
char * name
A short name for the Mailbox.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
void * mdata
Driver specific data.
struct Notify * notify_new(void)
Create a new notifications handler.
A set of inherited config items.
int email_max
Number of pointers in emails.
struct Mailbox * mailbox_find_name(const char *name)
Find the mailbox with a given name.
struct ConfigSubset * sub
Inherited config items.
Container for Accounts, Notifications.
void mailbox_update(struct Mailbox *m)
Get the mailbox's current size.
enum ConfigScope scope
Scope of Subset, e.g. SET_SCOPE_ACCOUNT.
#define STAILQ_FOREACH(var, head, field)
struct ConfigSubset * cs_subset_new(const char *name, struct ConfigSubset *sub_parent, struct Notify *not_parent)
Create a new Config Subset.
Representation of a mailbox.
int * v2r
Mapping from virtual to real msgno.
struct Mailbox * mailbox_new(void)
Create a new Mailbox.
bool mailbox_set_subset(struct Mailbox *m, struct ConfigSubset *sub)
Set a Mailbox's Config Subset.
Mailbox has changed, NotifyMailbox, EventMailbox.
#define STAILQ_HEAD_INITIALIZER(head)
This Config is Mailbox-specific.
struct Notify * notify
Notifications handler.
struct Buffer * mutt_buffer_init(struct Buffer *buf)
Initialise a new Buffer.
void mailbox_size_sub(struct Mailbox *m, const struct Email *e)
Subtract an email's size from the total size of a Mailbox.
void email_free(struct Email **ptr)
Free an Email.
void mailbox_changed(struct Mailbox *m, enum NotifyMailbox action)
Notify observers of a change to a Mailbox.
int gen
Generation number, for sorting.
size_t email_size(const struct Email *e)
compute the size of an email
struct Mailbox * mailbox
Mailbox in the list.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.