NeoMutt  2021-10-29-225-gb9986f
Teaching an old dog new tricks
Go to the documentation of this file.
23 #ifndef MUTT_EMAIL_BODY_H
24 #define MUTT_EMAIL_BODY_H
26 #include "config.h"
27 #include <stdbool.h>
28 #include <time.h>
29 #include "parameter.h"
34 struct Body
35 {
36  // ---------------------------------------------------------------------------
37  // Data that gets stored in the Header Cache
39  unsigned int type : 4;
40  unsigned int encoding : 3;
41  unsigned int disposition : 2;
42  bool badsig : 1;
43  bool force_charset : 1;
44  bool goodsig : 1;
45  bool noconv : 1;
46  bool use_disp : 1;
47  bool warnsig : 1;
49  bool is_autocrypt : 1;
50 #endif
51  LOFF_T offset;
52  LOFF_T length;
54  char *description;
55  char *d_filename;
57  char *filename;
58  char *form_name;
59  char *subtype;
60  char *xtype;
61  struct ParameterList parameter;
63  // ---------------------------------------------------------------------------
64  // Management data - Runtime info and glue to hold the objects together
66  bool unlink : 1;
68  struct Content *content;
70  struct Body *next;
71  struct Body *parts;
72  struct Email *email;
73  struct AttachPtr *aptr;
75  time_t stamp;
76  char *language;
77  char *charset;
79  long hdr_offset;
82  // ---------------------------------------------------------------------------
83  // View data - Used by the GUI
85  bool attach_qualifies : 1;
86  bool collapsed : 1;
87  bool deleted : 1;
88  bool nowrap : 1;
89  bool tagged : 1;
90  signed short attach_count;
91 };
93 bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2);
94 void mutt_body_free (struct Body **ptr);
95 char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen);
96 struct Body *mutt_body_new (void);
98 #endif /* MUTT_EMAIL_BODY_H */
void mutt_body_free(struct Body **ptr)
Free a Body.
Definition: body.c:57
char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
Get a body's character set.
Definition: body.c:131
struct Body * mutt_body_new(void)
Create a new Body.
Definition: body.c:43
bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2)
Strictly compare two email Body's.
Definition: body.c:108
Store attributes associated with a MIME part.
An email to which things will be attached.
Definition: attach.h:35
The body of an email.
Definition: body.h:35
char * language
content-language (RFC8255)
Definition: body.h:76
char * d_filename
filename to be used for the content-disposition header If NULL, filename is used instead.
Definition: body.h:55
struct Body * parts
parts of a multipart or message/rfc822
Definition: body.h:71
LOFF_T offset
offset where the actual data begins
Definition: body.h:51
signed short attach_count
Number of attachments.
Definition: body.h:90
char * xtype
content-type if x-unknown
Definition: body.h:60
bool deleted
Attachment marked for deletion.
Definition: body.h:87
bool noconv
Don't do character set conversion.
Definition: body.h:45
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
Definition: body.h:66
bool badsig
Bad cryptographic signature (needed to check encrypted s/mime-signatures)
Definition: body.h:42
time_t stamp
Time stamp of last encoding update.
Definition: body.h:75
bool collapsed
Used by recvattach.
Definition: body.h:86
struct Envelope * mime_headers
Memory hole protected headers.
Definition: body.h:74
bool is_autocrypt
Flag autocrypt-decrypted messages for replying.
Definition: body.h:49
LOFF_T length
length (in bytes) of attachment
Definition: body.h:52
char * charset
Send mode: charset of attached file as stored on disk.
Definition: body.h:77
struct ParameterList parameter
Parameters of the content-type.
Definition: body.h:61
struct AttachPtr * aptr
Menu information, used in recvattach.c.
Definition: body.h:73
bool use_disp
Content-Disposition uses filename= ?
Definition: body.h:46
struct Email * email
header information for message/rfc822
Definition: body.h:72
char * description
Definition: body.h:54
unsigned int disposition
content-disposition, ContentDisposition
Definition: body.h:41
bool attach_qualifies
This attachment should be counted.
Definition: body.h:85
struct Content * content
Detailed info about the content of the attachment.
Definition: body.h:68
bool tagged
This attachment is tagged.
Definition: body.h:89
bool nowrap
Do not wrap the output in the pager.
Definition: body.h:88
struct Body * next
next attachment in the list
Definition: body.h:70
bool force_charset
Send mode: don't adjust the character set when in send-mode.
Definition: body.h:43
char * subtype
content-type subtype
Definition: body.h:59
unsigned int encoding
content-transfer-encoding, ContentEncoding
Definition: body.h:40
bool goodsig
Good cryptographic signature.
Definition: body.h:44
long hdr_offset
Offset in stream where the headers begin.
Definition: body.h:79
char * form_name
Content-Disposition form-data name param.
Definition: body.h:58
bool warnsig
Maybe good signature.
Definition: body.h:47
unsigned int type
content-type primary type, ContentType
Definition: body.h:39
char * filename
When sending a message, this is the file to which this structure refers.
Definition: body.h:57
Info about an attachment.
Definition: content.h:34
The envelope/body of an email.
Definition: email.h:37
The header of an Email.
Definition: envelope.h:55