160 struct Email *e = NULL;
186 struct Email *e2 = NULL;
254 for (i = 0, j = 0; i < m->
msg_count; i++)
426 if ((inum < 0) || (inum >= m->
msg_count))
451 return mv ? mv->
mailbox : NULL;
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
#define ARRAY_SIZE(head)
The number of elements stored.
void mutt_pattern_free(struct PatternList **pat)
Free a Pattern.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
void mailbox_size_sub(struct Mailbox *m, const struct Email *e)
Subtract an email's size from the total size of a Mailbox.
void mailbox_gc_add(struct Email *e)
Add an Email to the garbage-collection set.
@ 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_UPDATE
Update internal tables.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
@ MUTT_MH
'MH' Mailbox type
@ MUTT_IMAP
'IMAP' Mailbox type
@ MUTT_MAILDIR
'Maildir' Mailbox type
SecurityFlags crypt_query(struct Body *b)
Check out the type of encryption used.
Structs that make up an email.
void mutt_sort_headers(struct MailboxView *mv, bool init)
Sort emails by their headers.
#define mutt_debug(LEVEL,...)
int mview_mailbox_observer(struct NotifyCallback *nc)
Notification that a Mailbox has changed - Implements observer_t -.
struct HashElem * mutt_hash_insert(struct HashTable *table, const char *strkey, void *data)
Add a new element to the Hash Table (with string keys)
void mutt_hash_delete(struct HashTable *table, const char *strkey, const void *data)
Remove an element from a Hash Table.
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
void mutt_hash_free(struct HashTable **ptr)
Free a hash table.
void imap_notify_delete_email(struct Mailbox *m, struct Email *e)
Inform IMAP that an Email has been deleted.
@ LL_DEBUG5
Log at debug level 5.
@ LL_NOTIFY
Log of notifications.
#define MUTT_MEM_CALLOC(n, type)
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
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_set_parent(struct Notify *notify, struct Notify *parent)
Set the parent notification handler.
void notify_free(struct Notify **ptr)
Free a notification handler.
void mutt_clear_threads(struct ThreadsContext *tctx)
Clear the threading of message in a mailbox.
struct ThreadsContext * mutt_thread_ctx_init(struct MailboxView *mv)
Initialize a threading context.
void mutt_thread_ctx_free(struct ThreadsContext **ptr)
Finalize a threading context.
struct HashTable * mutt_make_id_hash(struct Mailbox *m)
Create a Hash Table for message-ids.
Create/manipulate threading in emails.
struct Email * mutt_get_virt_email(struct Mailbox *m, int vnum)
Get a virtual Email.
static void mview_clean(struct MailboxView *mv)
Release memory and initialize a MailboxView.
struct Mailbox * mview_mailbox(struct MailboxView *mv)
Wrapper to get the mailbox in a MailboxView, or NULL.
static void update_tables(struct MailboxView *mv)
Update a MailboxView's internal tables.
bool mutt_limit_current_thread(struct MailboxView *mv, struct Email *e)
Limit the email view to the current thread.
void mview_free(struct MailboxView **ptr)
Free a MailboxView.
static struct MuttThread * top_of_thread(struct Email *e)
Find the first email in the current thread.
int ea_add_tagged(struct EmailArray *ea, struct MailboxView *mv, struct Email *e, bool use_tagged)
Get an array of the tagged Emails.
bool message_is_tagged(struct Email *e)
Is a message in the index tagged (and within limit)
void mview_update(struct MailboxView *mv)
Update the MailboxView's message counts.
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
struct MailboxView * mview_new(struct Mailbox *m, struct Notify *parent)
Create a new MailboxView.
@ NT_MVIEW_DELETE
The Mview is about to be destroyed.
@ NT_MVIEW_ADD
The Mview has been opened.
int mx_msg_padding_size(struct Mailbox *m)
Bytes of padding between messages - Wrapper for MxOps::msg_padding_size()
API for encryption/signing of emails.
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
@ NT_MVIEW
MailboxView has changed, NotifyMview, EventMview.
Match patterns to emails.
void mutt_score_message(struct Mailbox *m, struct Email *e, bool upd_mbox)
Apply scoring to an email.
Routines for adding user scores to emails.
LOFF_T offset
offset where the actual data begins
LOFF_T length
length (in bytes) of attachment
long hdr_offset
Offset in stream where the headers begin.
The envelope/body of an email.
bool visible
Is this message part of the view?
struct Envelope * env
Envelope information.
bool collapsed
Is this message part of a collapsed thread?
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
struct Body * body
List of MIME parts.
bool old
Email is seen, but unread.
size_t num_hidden
Number of hidden messages in this view (only valid when collapsed is set)
bool changed
Email has been edited.
bool flagged
Marked important?
bool threaded
Used for threading.
int vnum
Virtual message number.
int msgno
Number displayed to the user.
bool deleted
Email is deleted.
bool quasi_deleted
Deleted from neomutt, but not modified on disk.
bool tagged
Email is tagged.
bool superseded
Got superseded?
struct MuttThread * thread
Thread of Emails.
char * supersedes
Supersedes header.
unsigned char changed
Changed fields, e.g. MUTT_ENV_CHANGED_SUBJECT.
char * message_id
Message ID.
char *const real_subj
Offset of the real subject.
An Event that happened to an MailboxView.
struct MailboxView * mv
The MailboxView this Event relates to.
bool collapsed
Are all threads collapsed?
off_t vsize
Size (in bytes) of the messages shown.
struct Notify * notify
Notifications: NotifyMview, EventMview.
struct PatternList * limit_pattern
Compiled limit pattern.
struct ThreadsContext * threads
Threads context.
int msg_in_pager
Message currently shown in the pager.
struct Mailbox * mailbox
Current Mailbox.
char * pattern
Limit pattern string.
int vcount
The number of virtual messages.
bool changed
Mailbox has been modified.
int * v2r
Mapping from virtual to real msgno.
int msg_new
Number of new messages.
int msg_count
Total number of messages.
enum MailboxType type
Mailbox type.
struct HashTable * subj_hash
Hash Table: "subject" -> Email.
struct Email ** emails
Array of Emails.
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
struct HashTable * id_hash
Hash Table: "message-id" -> Email.
int msg_deleted
Number of deleted messages.
int msg_flagged
Number of flagged messages.
int msg_tagged
How many messages are tagged?
int msg_unread
Number of unread messages.
struct MuttThread * parent
Parent of this Thread.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Data passed to a notification function.
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()