NeoMutt  2018-07-16 +2481-68dcde
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/mutt.h"
31 #include "ncrypt/ncrypt.h"
32 #include "tags.h"
34 struct Notify;
39 struct Email
40 {
44  bool mime : 1;
45  bool flagged : 1;
46  bool tagged : 1;
47  bool deleted : 1;
48  bool purge : 1;
49  bool quasi_deleted : 1;
50  bool changed : 1;
51  bool attach_del : 1;
52  bool old : 1;
53  bool read : 1;
54  bool expired : 1;
55  bool superseded : 1;
56  bool replied : 1;
57  bool subject_changed : 1;
58  bool threaded : 1;
59  bool display_subject : 1;
60  bool recip_valid : 1;
61  bool active : 1;
62  bool trash : 1;
64  // timezone of the sender of this message
65  unsigned int zhours : 5;
66  unsigned int zminutes : 6;
67  bool zoccident : 1;
69  bool searched : 1;
70  bool matched : 1;
72  bool attach_valid : 1;
74  // the following are used to support collapsing threads
75  bool collapsed : 1;
76  bool limited : 1;
77  size_t num_hidden;
79  short recipient;
81  int pair;
83  time_t date_sent;
84  time_t received;
85  LOFF_T offset;
86  int lines;
87  int index;
88  int msgno;
89  int vnum;
90  int score;
91  struct Envelope *env;
92  struct Body *content;
93  char *path;
95  char *tree;
96  struct MuttThread *thread;
98  short attach_total;
100 #ifdef MIXMASTER
101  struct ListHead chain;
102 #endif
104 #ifdef USE_POP
105  int refno;
106 #endif
108  struct TagList tags;
112  void *edata;
113  void (*free_edata)(void **);
114  struct Notify *notify;
115 };
120 struct EmailNode
121 {
122  struct Email *email;
123  STAILQ_ENTRY(EmailNode) entries;
124 };
125 STAILQ_HEAD(EmailList, EmailNode);
131 {
133  struct Email **emails;
134 };
140 {
144 };
146 bool email_cmp_strict(const struct Email *e1, const struct Email *e2);
147 void email_free (struct Email **ptr);
148 struct Email *email_new (void);
149 size_t email_size (const struct Email *e);
151 void emaillist_clear(struct EmailList *el);
153 #endif /* MUTT_EMAIL_EMAIL_H */
void(* free_edata)(void **)
Driver-specific data free function.
Definition: email.h:113
An Event that happened to an Email.
Definition: email.h:130
int lines
How many lines in the body of this message?
Definition: email.h:86
The envelope/body of an email.
Definition: email.h:39
struct MuttThread * thread
Thread of Emails.
Definition: email.h:96
bool attach_del
Has an attachment marked for deletion.
Definition: email.h:51
short recipient
User_is_recipient()&#39;s return value, cached.
Definition: email.h:79
struct Body * content
List of MIME parts.
Definition: email.h:92
int refno
Message number on server.
Definition: email.h:105
bool display_subject
Used for threading.
Definition: email.h:59
bool threaded
Used for threading.
Definition: email.h:58
bool changed
Email has been edited.
Definition: email.h:50
bool searched
Email has been searched.
Definition: email.h:69
#define STAILQ_ENTRY(type)
Definition: queue.h:325
struct Email ** emails
Definition: email.h:133
bool zoccident
True, if west of UTC, False if east.
Definition: email.h:67
bool expired
Already expired?
Definition: email.h:54
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:127
int num_emails
Definition: email.h:132
bool tagged
Email is tagged.
Definition: email.h:46
bool read
Email is read.
Definition: email.h:53
bool old
Email is seen, but unread.
Definition: email.h:52
bool mime
Has a MIME-Version header?
Definition: email.h:44
struct Envelope * env
Envelope information.
Definition: email.h:91
short attach_total
Number of qualifying attachments in message, if attach_valid.
Definition: email.h:98
bool superseded
Got superseded?
Definition: email.h:55
bool limited
Is this message in a limited view?
Definition: email.h:76
struct TagList tags
For drivers that support server tagging.
Definition: email.h:108
bool quasi_deleted
Deleted from neomutt, but not modified on disk.
Definition: email.h:49
bool trash
Message is marked as trashed on disk (used by the maildir_trash option)
Definition: email.h:62
int score
Message score.
Definition: email.h:90
time_t date_sent
Time when the message was sent (UTC)
Definition: email.h:83
bool active
Message is not to be removed.
Definition: email.h:61
size_t email_size(const struct Email *e)
compute the size of an email
Definition: email.c:114
size_t num_hidden
Number of hidden messages in this view.
Definition: email.h:77
bool attach_valid
true when the attachment count is valid
Definition: email.h:72
struct Email * email_new(void)
Create a new Email.
Definition: email.c:68
bool collapsed
Is this message part of a collapsed thread?
Definition: email.h:75
Notification API.
Definition: notify.c:40
bool purge
Skip trash folder when deleting.
Definition: email.h:48
int vnum
Virtual message number.
Definition: email.h:89
API for encryption/signing of emails.
unsigned int zhours
Hours away from UTC.
Definition: email.h:65
char * tree
Character string to print thread tree.
Definition: email.h:95
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/ncrypt.h pgplib.h, smime.h
Definition: email.h:41
struct Notify * notify
Notifications handler.
Definition: email.h:114
Types of Email Event.
Definition: email.h:139
LOFF_T offset
Where in the stream does this message begin?
Definition: email.h:85
An Email conversation.
Definition: thread.h:34
STAILQ_HEAD(EmailList, EmailNode)
bool flagged
Marked important?
Definition: email.h:45
bool deleted
Email is deleted.
Definition: email.h:47
void * edata
Driver-specific data.
Definition: email.h:112
struct Email * email
Email in the list.
Definition: email.h:122
bool replied
Email has been replied to.
Definition: email.h:56
char * maildir_flags
Unknown maildir flags.
Definition: email.h:110
char * path
Path of Email (for local Mailboxes)
Definition: email.h:93
int index
The absolute (unsorted) message number.
Definition: email.h:87
bool subject_changed
Used for threading.
Definition: email.h:57
Driver based email tags.
bool recip_valid
Is_recipient is valid.
Definition: email.h:60
List of Emails.
Definition: email.h:120
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
Definition: ncrypt.h:120
unsigned int zminutes
Minutes away from UTC.
Definition: email.h:66
int pair
Color-pair to use when displaying in the index.
Definition: email.h:81
time_t received
Time when the message was placed in the mailbox.
Definition: email.h:84
The header of an Email.
Definition: envelope.h:54
bool matched
Search matches this Email.
Definition: email.h:70
int msgno
Number displayed to the user.
Definition: email.h:88