NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
mutt_attach.h
Go to the documentation of this file.
1 
23 /* common protos for compose / attach menus */
24 
25 #ifndef MUTT_MUTT_ATTACH_H
26 #define MUTT_MUTT_ATTACH_H
27 
28 #include <stdbool.h>
29 #include <stdio.h>
30 
31 struct AttachCtx;
32 struct Menu;
33 struct Email;
34 struct Body;
35 
40 {
44 };
45 
53 {
57 };
58 
59 int attach_tag(struct Menu *menu, int sel, int act);
60 int mutt_attach_display_loop(struct Menu *menu, int op, struct Email *e,
61  struct AttachCtx *actx, bool recv);
62 
63 void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
64  struct Body *top, struct Email *e, struct Menu *menu);
65 void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
66  struct Body *top, bool filter);
67 void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
68  struct Body *top);
69 
70 int mutt_view_attachment(FILE *fp, struct Body *a, enum ViewAttachMode mode, struct Email *e, struct AttachCtx *actx);
71 
72 void mutt_check_lookup_list(struct Body *b, char *type, size_t len);
73 int mutt_compose_attachment(struct Body *a);
74 int mutt_decode_save_attachment(FILE *fp, struct Body *m, const char *path, int displaying, enum SaveAttach opt);
75 int mutt_edit_attachment(struct Body *a);
76 int mutt_get_tmp_attachment(struct Body *a);
77 int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile);
78 int mutt_print_attachment(FILE *fp, struct Body *a);
79 int mutt_save_attachment(FILE *fp, struct Body *m, const char *path, enum SaveAttach opt, struct Email *e);
80 
81 /* small helper functions to handle temporary attachment files */
82 void mutt_add_temp_attachment(const char *filename);
84 
85 #endif /* MUTT_MUTT_ATTACH_H */
int mutt_compose_attachment(struct Body *a)
Create an attachment.
Definition: mutt_attach.c:115
char * filename
when sending a message, this is the file to which this structure refers
Definition: body.h:46
int mutt_save_attachment(FILE *fp, struct Body *m, const char *path, enum SaveAttach opt, struct Email *e)
Save an attachment.
Definition: mutt_attach.c:789
int mutt_attach_display_loop(struct Menu *menu, int op, struct Email *e, struct AttachCtx *actx, bool recv)
Event loop for the Attachment menu.
Definition: recvattach.c:1146
The envelope/body of an email.
Definition: email.h:39
GUI selectable list of items.
Definition: mutt_menu.h:82
No flags set.
Definition: mutt_attach.h:54
void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top, struct Email *e, struct Menu *menu)
Save a list of attachments.
Definition: recvattach.c:651
Overwrite existing file.
Definition: mutt_attach.h:56
ViewAttachMode
Options for mutt_view_attachment()
Definition: mutt_attach.h:39
Force viewing as text.
Definition: mutt_attach.h:43
View using default method.
Definition: mutt_attach.h:41
The body of an email.
Definition: body.h:34
int mutt_edit_attachment(struct Body *a)
Edit an attachment.
Definition: mutt_attach.c:254
void mutt_check_lookup_list(struct Body *b, char *type, size_t len)
Update the mime type.
Definition: mutt_attach.c:329
void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top)
Print a list of Attachments.
Definition: recvattach.c:1029
void mutt_unlink_temp_attachments(void)
Delete all temporary attachments.
Definition: mutt_attach.c:1189
int attach_tag(struct Menu *menu, int sel, int act)
Tag an attachment - Implements Menu::menu_tag()
Definition: recvattach.c:447
int mutt_decode_save_attachment(FILE *fp, struct Body *m, const char *path, int displaying, enum SaveAttach opt)
Decode, then save an attachment.
Definition: mutt_attach.c:920
int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile)
Pipe an attachment to a command.
Definition: mutt_attach.c:672
int mutt_view_attachment(FILE *fp, struct Body *a, enum ViewAttachMode mode, struct Email *e, struct AttachCtx *actx)
View an attachment.
Definition: mutt_attach.c:384
Force viewing using mailcap entry.
Definition: mutt_attach.h:42
unsigned int type
content-type primary type
Definition: body.h:65
void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top, bool filter)
Pipe a list of attachments to a command.
Definition: recvattach.c:879
int mutt_print_attachment(FILE *fp, struct Body *a)
Print out an attachment.
Definition: mutt_attach.c:1019
int mutt_get_tmp_attachment(struct Body *a)
Get a temporary copy of an attachment.
Definition: mutt_attach.c:65
Append to existing file.
Definition: mutt_attach.h:55
void mutt_add_temp_attachment(const char *filename)
Add file to list of temporary attachments.
Definition: mutt_attach.c:1181
A set of attachments.
Definition: attach.h:49
SaveAttach
Options for saving attachments.
Definition: mutt_attach.h:52