Go to the documentation of this file.
24 #ifndef MUTT_CORE_MAILBOX_H
25 #define MUTT_CORE_MAILBOX_H
30 #include <sys/types.h>
63 #define MUTT_ACL_NO_FLAGS 0
64 #define MUTT_ACL_ADMIN (1 << 0)
65 #define MUTT_ACL_CREATE (1 << 1)
66 #define MUTT_ACL_DELETE (1 << 2)
67 #define MUTT_ACL_DELMX (1 << 3)
68 #define MUTT_ACL_EXPUNGE (1 << 4)
69 #define MUTT_ACL_INSERT (1 << 5)
70 #define MUTT_ACL_LOOKUP (1 << 6)
71 #define MUTT_ACL_POST (1 << 7)
72 #define MUTT_ACL_READ (1 << 8)
73 #define MUTT_ACL_SEEN (1 << 9)
74 #define MUTT_ACL_WRITE (1 << 10)
76 #define MUTT_ACL_ALL ((1 << 11) - 1)
void(* mdata_free)(void **ptr)
Free the private data attached to the Mailbox.
struct HashTable * subj_hash
Hash Table by subject.
AclFlags rights
ACL bits, see AclFlags.
const struct MxOps * mx_ops
MXAPI callback functions.
@ MUTT_MMDF
'mmdf' Mailbox type
@ NT_MAILBOX_REMOVE
A Mailbox is about to be destroyed.
int * v2r
Mapping from virtual to real msgno.
struct Email ** emails
Array of Emails.
bool append
Mailbox is opened in append mode.
@ NT_MAILBOX_INVALID
Email list was changed.
String manipulation buffer.
int msg_deleted
Number of deleted messages.
struct Mailbox * mailbox_find_name(const char *name)
Find the mailbox with a given name.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
struct Notify * notify
Notifications handler.
@ MUTT_POP
'POP3' Mailbox type
@ NT_MAILBOX_UNTAG
Clear the 'last-tagged' pointer.
NotifyMailbox
Types of Mailbox Event.
bool notified
User has been notified.
uint8_t flags
e.g. MB_NORMAL
off_t size
Size of the Mailbox.
bool has_new
Mailbox has new mail.
STAILQ_ENTRY(MailboxNode) entries
Linked list.
@ MUTT_MAILBOX_ERROR
Error occurred examining Mailbox.
struct Mailbox * mailbox
Mailbox in the list.
void mailbox_size_sub(struct Mailbox *m, const struct Email *e)
Subtract an email's size from the total size of a Mailbox.
struct Mailbox * mailbox_new(void)
Create a new Mailbox.
uint16_t AclFlags
ACL Rights - These show permission to...
struct HashTable * label_hash
Hash Table for x-labels.
int vcount
The number of virtual messages.
bool first_check_stats_done
True when the check have been done at least on time.
An Event that happened to a Mailbox.
@ MUTT_COMPRESSED
Compressed file Mailbox type.
STAILQ_HEAD(MailboxList, MailboxNode)
bool dontwrite
Don't write the mailbox on close.
void mailbox_gc_run(void)
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
enum MailboxType type
Mailbox type.
void * mdata
Driver specific data.
@ NT_MAILBOX_UPDATE
Update internal tables.
void mailbox_changed(struct Mailbox *m, enum NotifyMailbox action)
Notify observers of a change to a Mailbox.
struct timespec stats_last_checked
Mtime of mailbox the last time stats where checked.
A group of associated Mailboxes.
int gen
Generation number, for sorting.
bool changed
Mailbox has been modified.
char * name
A short name for the Mailbox.
struct Account * account
Account that owns this Mailbox.
int msg_count
Total number of messages.
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
struct timespec mtime
Time Mailbox was last changed.
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
bool newly_created
Mbox or mmdf just popped into existence.
@ NT_MAILBOX_SWITCH
Current Mailbox has changed.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
@ MUTT_MH
'MH' Mailbox type
int email_max
Number of pointers in emails.
int msg_flagged
Number of flagged messages.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
int opened
Number of times mailbox is opened.
bool verbose
Display status messages?
struct Mailbox * mailbox_find(const char *path)
Find the mailbox with a given path.
bool readonly
Don't allow changes to the mailbox.
@ NT_MAILBOX_ADD
A new Mailbox has been created.
void * compress_info
Compressed mbox module private data.
void mailbox_update(struct Mailbox *m)
Get the mailbox's current size.
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_gc_add(struct Email *e)
Add an Email to the garbage-collection set.
int mailbox_gen(void)
Get the next generation number.
struct timespec last_visited
Time of last exit from this mailbox.
@ NT_MAILBOX_CHANGED
Mailbox data has changed.
MailboxType
Supported mailbox formats.
bool mailbox_set_subset(struct Mailbox *m, struct ConfigSubset *sub)
Set a Mailbox's Config Subset.
int msg_unread
Number of unread messages.
int msg_tagged
How many messages are tagged?
@ MUTT_MAILDIR
'Maildir' Mailbox type
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Time value with nanosecond precision.
A set of inherited config items.
struct ConfigSubset * sub
Inherited config items.
The envelope/body of an email.
@ NT_MAILBOX_CLOSED
Mailbox was closed.
int msg_new
Number of new messages.
@ NT_MAILBOX_RESORT
Email list needs resorting.
@ MUTT_MBOX
'mbox' Mailbox type
struct HashTable * id_hash
Hash Table by msg id.
struct Mailbox * mailbox
The Mailbox this Event relates to.
bool peekonly
Just taking a glance, revert atime.