NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
envelope.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_EMAIL_ENVELOPE_H
25 #define MUTT_EMAIL_ENVELOPE_H
26 
27 #include "config.h"
28 #include <stdbool.h>
29 #include "mutt/mutt.h"
30 #include "address/lib.h"
31 
32 #define MUTT_ENV_CHANGED_IRT (1 << 0)
33 #define MUTT_ENV_CHANGED_REFS (1 << 1)
34 #define MUTT_ENV_CHANGED_XLABEL (1 << 2)
35 #define MUTT_ENV_CHANGED_SUBJECT (1 << 3)
36 
37 #ifdef USE_AUTOCRYPT
38 
42 {
43  char *addr;
44  char *keydata;
45  bool prefer_encrypt : 1;
46  bool invalid : 1;
48 };
49 #endif
50 
54 struct Envelope
55 {
56  struct AddressList return_path;
57  struct AddressList from;
58  struct AddressList to;
59  struct AddressList cc;
60  struct AddressList bcc;
61  struct AddressList sender;
62  struct AddressList reply_to;
63  struct AddressList mail_followup_to;
64  struct AddressList x_original_to;
65  char *list_post;
66  char *subject;
67  char *real_subj;
68  char *disp_subj;
69  char *message_id;
70  char *supersedes;
71  char *date;
72  char *x_label;
73  char *organization;
74 #ifdef USE_NNTP
75  char *newsgroups;
76  char *xref;
77  char *followup_to;
78  char *x_comment_to;
79 #endif
80  struct Buffer spam;
81  struct ListHead references;
82  struct ListHead in_reply_to;
83  struct ListHead userhdrs;
84 #ifdef USE_AUTOCRYPT
87 #endif
88  unsigned char changed;
89 };
90 
91 bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2);
92 void mutt_env_free (struct Envelope **ptr);
93 void mutt_env_merge (struct Envelope *base, struct Envelope **extra);
94 struct Envelope *mutt_env_new (void);
95 int mutt_env_to_intl (struct Envelope *env, const char **tag, char **err);
96 void mutt_env_to_local (struct Envelope *e);
97 
98 #ifdef USE_AUTOCRYPT
100 void mutt_autocrypthdr_free(struct AutocryptHeader **p);
101 #endif
102 
103 #endif /* MUTT_EMAIL_ENVELOPE_H */
struct AutocryptHeader * autocrypt_gossip
Definition: envelope.h:86
char * supersedes
Supersedes header.
Definition: envelope.h:70
bool prefer_encrypt
Definition: envelope.h:45
char * xref
List of cross-references.
Definition: envelope.h:76
char * disp_subj
Display subject (modified copy of subject)
Definition: envelope.h:68
char * date
Sent date.
Definition: envelope.h:71
void mutt_autocrypthdr_free(struct AutocryptHeader **p)
Free an AutocryptHeader.
Definition: envelope.c:74
String manipulation buffer.
Definition: buffer.h:33
char * real_subj
Offset of the real subject.
Definition: envelope.h:67
struct Envelope * mutt_env_new(void)
Create a new Envelope.
Definition: envelope.c:42
struct AutocryptHeader * autocrypt
Definition: envelope.h:85
Email Address Handling.
unsigned char changed
Changed fields, e.g. MUTT_ENV_CHANGED_SUBJECT.
Definition: envelope.h:88
char * message_id
Message ID.
Definition: envelope.h:69
char * keydata
Definition: envelope.h:44
char * x_comment_to
List of &#39;X-comment-to&#39; fields.
Definition: envelope.h:78
void mutt_env_merge(struct Envelope *base, struct Envelope **extra)
Merge the headers of two Envelopes.
Definition: envelope.c:151
struct AutocryptHeader * next
Definition: envelope.h:47
char * addr
Definition: envelope.h:43
Parse Autocrypt header info.
Definition: envelope.h:41
int mutt_env_to_intl(struct Envelope *env, const char **tag, char **err)
Convert an Envelope&#39;s Address fields to Punycode format.
Definition: envelope.c:312
char * list_post
This stores a mailto URL, or nothing.
Definition: envelope.h:65
char * subject
Email&#39;s subject.
Definition: envelope.h:66
char * newsgroups
List of newsgroups.
Definition: envelope.h:75
char * followup_to
List of &#39;followup-to&#39; fields.
Definition: envelope.h:77
char * organization
Organisation header.
Definition: envelope.h:73
struct AutocryptHeader * mutt_autocrypthdr_new(void)
Create a new AutocryptHeader.
Definition: envelope.c:65
bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2)
Strictly compare two Envelopes.
Definition: envelope.c:241
char * x_label
X-Label.
Definition: envelope.h:72
void mutt_env_to_local(struct Envelope *e)
Convert an Envelope&#39;s Address fields to local format.
Definition: envelope.c:274
The header of an Email.
Definition: envelope.h:54
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
Definition: envelope.c:96