24#ifndef MUTT_CORE_MAILBOX_H
25#define MUTT_CORE_MAILBOX_H
60#define MUTT_ACL_NO_FLAGS 0
61#define MUTT_ACL_ADMIN (1 << 0)
62#define MUTT_ACL_CREATE (1 << 1)
63#define MUTT_ACL_DELETE (1 << 2)
64#define MUTT_ACL_DELMX (1 << 3)
65#define MUTT_ACL_EXPUNGE (1 << 4)
66#define MUTT_ACL_INSERT (1 << 5)
67#define MUTT_ACL_LOOKUP (1 << 6)
68#define MUTT_ACL_POST (1 << 7)
69#define MUTT_ACL_READ (1 << 8)
70#define MUTT_ACL_SEEN (1 << 9)
71#define MUTT_ACL_WRITE (1 << 10)
73#define MUTT_ACL_ALL ((1 << 11) - 1)
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
NotifyMailbox
Types of Mailbox Event.
@ NT_MAILBOX_UNTAG
Clear the 'last-tagged' pointer.
@ NT_MAILBOX_CHANGE
Mailbox has been changed.
@ NT_MAILBOX_RESORT
Email list needs resorting.
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
@ NT_MAILBOX_INVALID
Email list was changed.
@ NT_MAILBOX_DELETE_ALL
All Mailboxes are about to be deleted.
@ NT_MAILBOX_UPDATE
Update internal tables.
@ NT_MAILBOX_ADD
Mailbox has been added.
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.
ExpandoDataMailbox
Expando UIDs for Mailboxes.
@ ED_MBX_MESSAGE_COUNT
Mailbox.msg_count.
@ ED_MBX_PERCENTAGE
HdrFormatInfo.pager_progress.
@ ED_MBX_MAILBOX_NAME
Mailbox, mailbox_path()
int mailbox_gen(void)
Get the next generation number.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
uint16_t AclFlags
ACL Rights - These show permission to...
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.
struct Mailbox * mailbox_find_name(const char *name)
Find the mailbox with a given name.
void mailbox_changed(struct Mailbox *m, enum NotifyMailbox action)
Notify observers of a change to a Mailbox.
MailboxType
Supported mailbox formats.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_MMDF
'mmdf' Mailbox type
@ MUTT_MAILBOX_ERROR
Error occurred examining Mailbox.
@ 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_UNKNOWN
Mailbox wasn't recognised.
@ MUTT_MAILDIR
'Maildir' Mailbox type
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.
Convenience wrapper for the library headers.
#define STAILQ_HEAD(name, type)
A group of associated Mailboxes.
String manipulation buffer.
A set of inherited config items.
The envelope/body of an email.
An Event that happened to a Mailbox.
struct Mailbox * mailbox
The Mailbox this Event relates to.
struct Mailbox * mailbox
Mailbox in the list.
STAILQ_ENTRY(MailboxNode) entries
Linked list.
void(* mdata_free)(void **ptr)
int vcount
The number of virtual messages.
bool changed
Mailbox has been modified.
bool has_new
Mailbox has new mail.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
bool append
Mailbox is opened in append mode.
int * v2r
Mapping from virtual to real msgno.
const struct MxOps * mx_ops
MXAPI callback functions.
int msg_new
Number of new messages.
time_t last_checked
Last time we checked this mailbox for new mail.
int msg_count
Total number of messages.
bool first_check_stats_done
True when the check have been done at least one time.
AclFlags rights
ACL bits, see AclFlags.
int email_max
Size of emails array.
enum MailboxType type
Mailbox type.
bool newly_created
Mbox or mmdf just popped into existence.
bool poll_new_mail
Check for new mail.
void * mdata
Driver specific data.
struct HashTable * subj_hash
Hash Table: "subject" -> Email.
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 HashTable * id_hash
Hash Table: "message-id" -> Email.
struct Buffer pathbuf
Path of the Mailbox.
bool peekonly
Just taking a glance, revert atime.
int msg_deleted
Number of deleted messages.
struct Account * account
Account that owns this Mailbox.
bool dontwrite
Don't write the mailbox on close.
bool notified
User has been notified.
off_t size
Size of the Mailbox.
struct HashTable * label_hash
Hash Table: "x-labels" -> Email.
bool visible
True if a result of "mailboxes".
int msg_flagged
Number of flagged messages.
int opened
Number of times mailbox is opened.
void * compress_info
Compressed mbox module private data.
struct timespec last_visited
Time of last exit from this mailbox.
bool readonly
Don't allow changes to the mailbox.
int msg_tagged
How many messages are tagged?
bool verbose
Display status messages?
int msg_unread
Number of unread messages.
int gen
Generation number, for sorting.
struct ConfigSubset * sub
Inherited config items.