NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
attach.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_EMAIL_ATTACH_H
24 #define MUTT_EMAIL_ATTACH_H
25 
26 #include <stdbool.h>
27 #include <stdio.h>
28 
29 struct Body;
30 
34 struct AttachPtr
35 {
36  struct Body *content;
37  FILE *fp;
39  char *tree;
40  int level;
41  int num;
42  bool unowned : 1;
43  bool decrypted : 1;
44 };
45 
49 struct AttachCtx
50 {
51  struct Email *email;
52  FILE *fp_root;
53 
54  struct AttachPtr **idx;
55  short idxlen;
56  short idxmax;
57 
58  short *v2r;
59  short vcount;
60 
61  FILE **fp_idx;
62  short fp_len;
63  short fp_max;
64 
65  struct Body **body_idx;
66  short body_len;
67  short body_max;
68 };
69 
70 void mutt_actx_add_attach (struct AttachCtx *actx, struct AttachPtr *attach);
71 void mutt_actx_add_body (struct AttachCtx *actx, struct Body *new_body);
72 void mutt_actx_add_fp (struct AttachCtx *actx, FILE *fp_new);
73 void mutt_actx_free (struct AttachCtx **ptr);
74 void mutt_actx_entries_free(struct AttachCtx *actx);
75 struct AttachCtx *mutt_actx_new (void);
76 
77 #endif /* MUTT_EMAIL_ATTACH_H */
void mutt_actx_entries_free(struct AttachCtx *actx)
Free entries in an Attachment Context.
Definition: attach.c:103
An email to which things will be attached.
Definition: attach.h:34
The envelope/body of an email.
Definition: email.h:39
FILE ** fp_idx
Extra FILE* used for decryption.
Definition: attach.h:61
short body_len
Number of Body parts.
Definition: attach.h:66
void mutt_actx_add_fp(struct AttachCtx *actx, FILE *fp_new)
Save a File handle to the Attachment Context.
Definition: attach.c:62
struct Email * email
Used by recvattach for updating.
Definition: attach.h:51
short idxmax
Size of attachment array.
Definition: attach.h:56
FILE * fp_root
Used by recvattach for updating.
Definition: attach.h:52
short idxlen
Number of attachmentes.
Definition: attach.h:55
The body of an email.
Definition: body.h:34
char * tree
Tree characters to display.
Definition: attach.h:39
struct Body ** body_idx
Extra struct Body* used for decryption.
Definition: attach.h:65
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:140
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition: attach.h:38
bool unowned
Don&#39;t unlink on detach.
Definition: attach.h:42
short body_max
Size of Body array.
Definition: attach.h:67
bool decrypted
Not part of message as stored in the email->content.
Definition: attach.h:43
int num
Attachment index number.
Definition: attach.h:41
FILE * fp
Used in the recvattach menu.
Definition: attach.h:37
short * v2r
Mapping from virtual to real attachment.
Definition: attach.h:58
struct Body * content
Attachment.
Definition: attach.h:36
short fp_max
Size of FILE array.
Definition: attach.h:63
void mutt_actx_add_body(struct AttachCtx *actx, struct Body *new_body)
Add an email box to an Attachment Context.
Definition: attach.c:83
A set of attachments.
Definition: attach.h:49
int level
Nesting depth of attachment.
Definition: attach.h:40
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:54
void mutt_actx_add_attach(struct AttachCtx *actx, struct AttachPtr *attach)
Add an Attachment to an Attachment Context.
Definition: attach.c:40
short fp_len
Number of FILE handles.
Definition: attach.h:62
struct AttachCtx * mutt_actx_new(void)
Create a new Attachment Context.
Definition: attach.c:131
short vcount
The number of virtual attachments.
Definition: attach.h:59