NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
attach.h
Go to the documentation of this file.
1
23#ifndef MUTT_ATTACH_ATTACH_H
24#define MUTT_ATTACH_ATTACH_H
25
26#include <stdbool.h>
27#include <stdio.h>
28
29struct Body;
30
35{
36 struct Body *body;
37 FILE *fp;
39 char *tree;
40 int level;
41 int num;
42 bool unowned : 1;
43 bool decrypted : 1;
44 bool collapsed : 1;
45};
46
53{
57};
58
63{
64 struct Email *email;
65 FILE *fp_root;
66
67 struct AttachPtr **idx;
68 short idxlen;
69 short idxmax;
70
71 short *v2r;
72 short vcount;
73
74 FILE **fp_idx;
75 short fp_len;
76 short fp_max;
77
78 struct Body **body_idx;
79 short body_len;
80 short body_max;
81};
82
83void mutt_actx_add_attach (struct AttachCtx *actx, struct AttachPtr *attach);
84void mutt_actx_ins_attach (struct AttachCtx *actx, struct AttachPtr *attach, int aidx);
85void mutt_actx_add_body (struct AttachCtx *actx, struct Body *b);
86void mutt_actx_add_fp (struct AttachCtx *actx, FILE *fp_new);
87void mutt_actx_free (struct AttachCtx **ptr);
88void mutt_actx_entries_free(struct AttachCtx *actx);
89struct AttachCtx *mutt_actx_new (void);
90
91void mutt_aptr_free(struct AttachPtr **ptr);
92struct AttachPtr *mutt_aptr_new (void);
93
94#endif /* MUTT_ATTACH_ATTACH_H */
struct AttachCtx * mutt_actx_new(void)
Create a new Attachment Context.
Definition: attach.c:189
void mutt_actx_add_attach(struct AttachCtx *actx, struct AttachPtr *attach)
Add an Attachment to an Attachment Context.
Definition: attach.c:65
void mutt_actx_ins_attach(struct AttachCtx *actx, struct AttachPtr *attach, int aidx)
Insert an Attachment into an Attachment Context at Specified Index.
Definition: attach.c:91
void mutt_actx_add_fp(struct AttachCtx *actx, FILE *fp_new)
Save a File handle to the Attachment Context.
Definition: attach.c:121
struct AttachPtr * mutt_aptr_new(void)
Create a new Attachment Pointer.
Definition: attach.c:40
void mutt_actx_add_body(struct AttachCtx *actx, struct Body *b)
Add an email body to an Attachment Context.
Definition: attach.c:142
void mutt_actx_entries_free(struct AttachCtx *actx)
Free entries in an Attachment Context.
Definition: attach.c:162
ExpandoDataAttach
Expando UIDs for Attachments.
Definition: attach.h:53
@ ED_ATT_NUMBER
AttachPtr.num.
Definition: attach.h:55
@ ED_ATT_TREE
AttachPtr.tree.
Definition: attach.h:56
@ ED_ATT_CHARSET
AttachPtr.body.
Definition: attach.h:54
void mutt_aptr_free(struct AttachPtr **ptr)
Free an Attachment Pointer.
Definition: attach.c:49
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:198
A set of attachments.
Definition: attach.h:63
short vcount
The number of virtual attachments.
Definition: attach.h:72
short body_len
Number of Body parts.
Definition: attach.h:79
FILE * fp_root
Used by recvattach for updating.
Definition: attach.h:65
short fp_max
Size of FILE array.
Definition: attach.h:76
struct Email * email
Used by recvattach for updating.
Definition: attach.h:64
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:67
struct Body ** body_idx
Extra struct Body* used for decryption.
Definition: attach.h:78
short fp_len
Number of FILE handles.
Definition: attach.h:75
short body_max
Size of Body array.
Definition: attach.h:80
FILE ** fp_idx
Extra FILE* used for decryption.
Definition: attach.h:74
short idxmax
Size of attachment array.
Definition: attach.h:69
short idxlen
Number of attachmentes.
Definition: attach.h:68
short * v2r
Mapping from virtual to real attachment.
Definition: attach.h:71
An email to which things will be attached.
Definition: attach.h:35
struct Body * body
Attachment.
Definition: attach.h:36
bool collapsed
Group is collapsed.
Definition: attach.h:44
char * tree
Tree characters to display.
Definition: attach.h:39
int num
Attachment index number.
Definition: attach.h:41
int level
Nesting depth of attachment.
Definition: attach.h:40
FILE * fp
Used in the recvattach menu.
Definition: attach.h:37
bool unowned
Don't unlink on detach.
Definition: attach.h:42
bool decrypted
Not part of message as stored in the email->body.
Definition: attach.h:43
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition: attach.h:38
The body of an email.
Definition: body.h:36
The envelope/body of an email.
Definition: email.h:39