NeoMutt  2025-12-11-860-g80c9cc
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
attach.h
Go to the documentation of this file.
1
22
23#ifndef MUTT_ATTACH_ATTACH_H
24#define MUTT_ATTACH_ATTACH_H
25
26#include <stdbool.h>
27#include <stdio.h>
28#include "mutt/lib.h"
29
30struct Body;
31
36{
37 struct Body *body;
38 FILE *fp;
40 char *tree;
41 int level;
42 int num;
43 bool unowned : 1;
44 bool decrypted : 1;
45 bool collapsed : 1;
46};
47ARRAY_HEAD(AttachPtrArray, struct AttachPtr *);
48
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
96#endif /* MUTT_ATTACH_ATTACH_H */
#define ARRAY_HEAD(name, T)
Define a named struct for arrays of elements of a certain type.
Definition array.h:47
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 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
Convenience wrapper for the library headers.
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:36
struct Body * body
Attachment.
Definition attach.h:37
bool collapsed
Group is collapsed.
Definition attach.h:45
char * tree
Tree characters to display.
Definition attach.h:40
int num
Attachment index number.
Definition attach.h:42
int level
Nesting depth of attachment.
Definition attach.h:41
FILE * fp
Used in the recvattach menu.
Definition attach.h:38
bool unowned
Don't unlink on detach.
Definition attach.h:43
bool decrypted
Not part of message as stored in the email->body.
Definition attach.h:44
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition attach.h:39
The body of an email.
Definition body.h:36
The envelope/body of an email.
Definition email.h:39