NeoMutt  2020-06-26-30-g76c339
Teaching an old dog new tricks
Go to the documentation of this file.
26 #include "config.h"
27 #include <stddef.h>
28 #include <stdbool.h>
29 #include <time.h>
30 #include "mutt/lib.h"
31 #include "tags.h"
32 #include "ncrypt/lib.h"
37 struct Email
38 {
42  bool mime : 1;
43  bool flagged : 1;
44  bool tagged : 1;
45  bool deleted : 1;
46  bool purge : 1;
47  bool quasi_deleted : 1;
48  bool changed : 1;
49  bool attach_del : 1;
50  bool old : 1;
51  bool read : 1;
52  bool expired : 1;
53  bool superseded : 1;
54  bool replied : 1;
55  bool subject_changed : 1;
56  bool threaded : 1;
57  bool display_subject : 1;
58  bool recip_valid : 1;
59  bool active : 1;
60  bool trash : 1;
62  // timezone of the sender of this message
63  unsigned int zhours : 5;
64  unsigned int zminutes : 6;
65  bool zoccident : 1;
67  bool searched : 1;
68  bool matched : 1;
70  bool attach_valid : 1;
72  // the following are used to support collapsing threads
73  bool collapsed : 1;
74  bool limited : 1;
75  size_t num_hidden;
77  short recipient;
79  int pair;
81  time_t date_sent;
82  time_t received;
83  LOFF_T offset;
84  int lines;
85  int index;
86  int msgno;
87  int vnum;
88  int score;
89  struct Envelope *env;
90  struct Body *content;
91  char *path;
93  char *tree;
94  struct MuttThread *thread;
96  short attach_total;
98 #ifdef MIXMASTER
99  struct ListHead chain;
100 #endif
102  struct TagList tags;
106  void *edata;
107  void (*edata_free)(void **ptr);
108  struct Notify *notify;
109 };
114 struct EmailNode
115 {
116  struct Email *email;
117  STAILQ_ENTRY(EmailNode) entries;
118 };
119 STAILQ_HEAD(EmailList, EmailNode);
127 {
130 };
136 {
138  struct Email **emails;
139 };
141 bool email_cmp_strict(const struct Email *e1, const struct Email *e2);
142 void email_free (struct Email **ptr);
143 struct Email *email_new (void);
144 size_t email_size (const struct Email *e);
146 int emaillist_add_email(struct EmailList *el, struct Email *e);
147 void emaillist_clear (struct EmailList *el);
149 #endif /* MUTT_EMAIL_EMAIL_H */
An Event that happened to an Email.
Definition: email.h:135
int lines
How many lines in the body of this message?
Definition: email.h:84
The envelope/body of an email.
Definition: email.h:37
struct MuttThread * thread
Thread of Emails.
Definition: email.h:94
bool attach_del
Has an attachment marked for deletion.
Definition: email.h:49
short recipient
User_is_recipient()&#39;s return value, cached.
Definition: email.h:77
struct Body * content
List of MIME parts.
Definition: email.h:90
bool display_subject
Used for threading.
Definition: email.h:57
bool threaded
Used for threading.
Definition: email.h:56
bool changed
Email has been edited.
Definition: email.h:48
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: lib.h:123
bool searched
Email has been searched.
Definition: email.h:67
#define STAILQ_ENTRY(type)
Definition: queue.h:324
struct Email ** emails
Definition: email.h:138
bool zoccident
True, if west of UTC, False if east.
Definition: email.h:65
bool expired
Already expired?
Definition: email.h:52
void email_free(struct Email **ptr)
Free an Email.
Definition: email.c:41
The body of an email.
Definition: body.h:34
bool email_cmp_strict(const struct Email *e1, const struct Email *e2)
Strictly compare message emails.
Definition: email.c:84
void emaillist_clear(struct EmailList *el)
Drop a private list of Emails.
Definition: email.c:123
int num_emails
Definition: email.h:137
bool tagged
Email is tagged.
Definition: email.h:44
bool read
Email is read.
Definition: email.h:51
bool old
Email is seen, but unread.
Definition: email.h:50
bool mime
Has a MIME-Version header?
Definition: email.h:42
struct Envelope * env
Envelope information.
Definition: email.h:89
A new Email has just been created.
Definition: email.h:128
short attach_total
Number of qualifying attachments in message, if attach_valid.
Definition: email.h:96
bool superseded
Got superseded?
Definition: email.h:53
bool limited
Is this message in a limited view?
Definition: email.h:74
struct TagList tags
For drivers that support server tagging.
Definition: email.h:102
bool quasi_deleted
Deleted from neomutt, but not modified on disk.
Definition: email.h:47
bool trash
Message is marked as trashed on disk (used by the maildir_trash option)
Definition: email.h:60
int score
Message score.
Definition: email.h:88
time_t date_sent
Time when the message was sent (UTC)
Definition: email.h:81
struct ListHead chain
Mixmaster chain.
Definition: email.h:99
bool active
Message is not to be removed.
Definition: email.h:59
size_t email_size(const struct Email *e)
compute the size of an email
Definition: email.c:110
size_t num_hidden
Number of hidden messages in this view.
Definition: email.h:75
void(* edata_free)(void **ptr)
Driver-specific data free function.
Definition: email.h:107
bool attach_valid
true when the attachment count is valid
Definition: email.h:70
struct Email * email_new(void)
Create a new Email.
Definition: email.c:68
API for encryption/signing of emails.
bool collapsed
Is this message part of a collapsed thread?
Definition: email.h:73
Notification API.
Definition: notify.c:39
bool purge
Skip trash folder when deleting.
Definition: email.h:46
int vnum
Virtual message number.
Definition: email.h:87
unsigned int zhours
Hours away from UTC.
Definition: email.h:63
char * tree
Character string to print thread tree.
Definition: email.h:93
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib...
Definition: email.h:39
struct Notify * notify
Notifications handler.
Definition: email.h:108
Types of Email Event.
Definition: email.h:126
LOFF_T offset
Where in the stream does this message begin?
Definition: email.h:83
An Email is about to be destroyed.
Definition: email.h:129
An Email conversation.
Definition: thread.h:34
STAILQ_HEAD(EmailList, EmailNode)
int emaillist_add_email(struct EmailList *el, struct Email *e)
Add an Email to a list.
Definition: email.c:144
bool flagged
Marked important?
Definition: email.h:43
bool deleted
Email is deleted.
Definition: email.h:45
void * edata
Driver-specific data.
Definition: email.h:106
struct Email * email
Email in the list.
Definition: email.h:116
bool replied
Email has been replied to.
Definition: email.h:54
char * maildir_flags
Unknown maildir flags.
Definition: email.h:104
char * path
Path of Email (for local Mailboxes)
Definition: email.h:91
int index
The absolute (unsorted) message number.
Definition: email.h:85
bool subject_changed
Used for threading.
Definition: email.h:55
Driver based email tags.
bool recip_valid
Is_recipient is valid.
Definition: email.h:58
List of Emails.
Definition: email.h:114
Convenience wrapper for the library headers.
unsigned int zminutes
Minutes away from UTC.
Definition: email.h:64
int pair
Color-pair to use when displaying in the index.
Definition: email.h:79
time_t received
Time when the message was placed in the mailbox.
Definition: email.h:82
The header of an Email.
Definition: envelope.h:54
bool matched
Search matches this Email.
Definition: email.h:68
int msgno
Number displayed to the user.
Definition: email.h:86