NeoMutt  2024-04-25-89-g194907
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#include "expando/lib.h"
29
30struct Body;
31struct Buffer;
32
37{
38 struct Body *body;
39 FILE *fp;
41 char *tree;
42 int level;
43 int num;
44 bool unowned : 1;
45 bool decrypted : 1;
46 bool collapsed : 1;
47};
48
55{
59};
60
65{
66 struct Email *email;
67 FILE *fp_root;
68
69 struct AttachPtr **idx;
70 short idxlen;
71 short idxmax;
72
73 short *v2r;
74 short vcount;
75
76 FILE **fp_idx;
77 short fp_len;
78 short fp_max;
79
80 struct Body **body_idx;
81 short body_len;
82 short body_max;
83};
84
85void mutt_actx_add_attach (struct AttachCtx *actx, struct AttachPtr *attach);
86void mutt_actx_ins_attach (struct AttachCtx *actx, struct AttachPtr *attach, int aidx);
87void mutt_actx_add_body (struct AttachCtx *actx, struct Body *b);
88void mutt_actx_add_fp (struct AttachCtx *actx, FILE *fp_new);
89void mutt_actx_free (struct AttachCtx **ptr);
90void mutt_actx_entries_free(struct AttachCtx *actx);
91struct AttachCtx *mutt_actx_new (void);
92
93void mutt_aptr_free(struct AttachPtr **ptr);
94struct AttachPtr *mutt_aptr_new (void);
95
96void attach_arrow(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
97void attach_C (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
98void attach_c (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
99void attach_D (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
100void attach_d (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
101void attach_e (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
102void attach_F (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
103void attach_f (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
104void attach_I (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
105void attach_M (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
106void attach_m (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
107void attach_Q (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
108void attach_s (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
109void attach_T (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
110void attach_t (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
111void attach_u (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf);
112
113long attach_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags);
114long attach_X_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags);
115
116#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:55
@ ED_ATT_NUMBER
AttachPtr.num.
Definition: attach.h:57
@ ED_ATT_TREE
AttachPtr.tree.
Definition: attach.h:58
@ ED_ATT_CHARSET
AttachPtr.body.
Definition: attach.h:56
void attach_arrow(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
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
Parse Expando string.
long attach_X_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Number of MIME parts - Implements ExpandoRenderData::get_number() -.
Definition: dlg_attach.c:452
long attach_n_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Attachment: Index number - Implements ExpandoRenderData::get_number() -.
Definition: dlg_attach.c:325
void attach_m(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Major MIME type - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:301
void attach_D(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Deleted - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:209
void attach_s(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Size - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:370
void attach_e(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: MIME type - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:222
void attach_t(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Is Tagged - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:403
void attach_T(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Tree characters - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:416
void attach_c(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Requires conversion flag - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:136
void attach_d(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Description - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:165
void attach_u(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Unlink flag - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:439
void attach_F(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Filename in header - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:258
void attach_M(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: MIME subtype - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:313
void attach_C(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Charset - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:149
void attach_f(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Filename - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:234
void attach_I(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Disposition flag - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:276
void attach_Q(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Attachment: Attachment counting - Implements ExpandoRenderData::get_string() -.
Definition: dlg_attach.c:344
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
Definition: render.h:32
A set of attachments.
Definition: attach.h:65
short vcount
The number of virtual attachments.
Definition: attach.h:74
short body_len
Number of Body parts.
Definition: attach.h:81
FILE * fp_root
Used by recvattach for updating.
Definition: attach.h:67
short fp_max
Size of FILE array.
Definition: attach.h:78
struct Email * email
Used by recvattach for updating.
Definition: attach.h:66
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:69
struct Body ** body_idx
Extra struct Body* used for decryption.
Definition: attach.h:80
short fp_len
Number of FILE handles.
Definition: attach.h:77
short body_max
Size of Body array.
Definition: attach.h:82
FILE ** fp_idx
Extra FILE* used for decryption.
Definition: attach.h:76
short idxmax
Size of attachment array.
Definition: attach.h:71
short idxlen
Number of attachmentes.
Definition: attach.h:70
short * v2r
Mapping from virtual to real attachment.
Definition: attach.h:73
An email to which things will be attached.
Definition: attach.h:37
struct Body * body
Attachment.
Definition: attach.h:38
bool collapsed
Group is collapsed.
Definition: attach.h:46
char * tree
Tree characters to display.
Definition: attach.h:41
int num
Attachment index number.
Definition: attach.h:43
int level
Nesting depth of attachment.
Definition: attach.h:42
FILE * fp
Used in the recvattach menu.
Definition: attach.h:39
bool unowned
Don't unlink on detach.
Definition: attach.h:44
bool decrypted
Not part of message as stored in the email->body.
Definition: attach.h:45
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition: attach.h:40
The body of an email.
Definition: body.h:36
String manipulation buffer.
Definition: buffer.h:36
The envelope/body of an email.
Definition: email.h:39
Basic Expando Node.
Definition: node.h:69