NeoMutt  2021-02-05-89-gabe350
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 Body;
33 struct Email;
34 struct Menu;
35 struct MuttWindow;
36 
41 {
46 };
47 
55 {
59 };
60 
61 int attach_tag(struct Menu *menu, int sel, int act);
62 int mutt_attach_display_loop(struct Menu *menu, int op, struct Email *e,
63  struct AttachCtx *actx, bool recv);
64 
65 void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
66  struct Body *top, struct Email *e, struct Menu *menu);
67 void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
68  struct Body *top, bool filter);
69 void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
70  struct Body *top);
71 
72 int mutt_view_attachment(FILE *fp, struct Body *a, enum ViewAttachMode mode, struct Email *e, struct AttachCtx *actx, struct MuttWindow *win);
73 
74 void mutt_check_lookup_list(struct Body *b, char *type, size_t len);
75 int mutt_compose_attachment(struct Body *a);
76 int mutt_decode_save_attachment(FILE *fp, struct Body *m, const char *path, int displaying, enum SaveAttach opt);
77 int mutt_edit_attachment(struct Body *a);
78 int mutt_get_tmp_attachment(struct Body *a);
79 int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile);
80 int mutt_print_attachment(FILE *fp, struct Body *a);
81 int mutt_save_attachment(FILE *fp, struct Body *m, const char *path, enum SaveAttach opt, struct Email *e);
82 
83 /* small helper functions to handle temporary attachment files */
84 void mutt_add_temp_attachment(const char *filename);
86 
87 #endif /* MUTT_MUTT_ATTACH_H */
AttachCtx
A set of attachments.
Definition: attach.h:49
mutt_check_lookup_list
void mutt_check_lookup_list(struct Body *b, char *type, size_t len)
Update the mime type.
Definition: mutt_attach.c:335
attach_tag
int attach_tag(struct Menu *menu, int sel, int act)
Tag an attachment - Implements Menu::tag()
Definition: recvattach.c:458
Body
The body of an email.
Definition: body.h:34
MuttWindow
A division of the screen.
Definition: mutt_window.h:115
mutt_print_attachment
int mutt_print_attachment(FILE *fp, struct Body *a)
Print out an attachment.
Definition: mutt_attach.c:1103
mutt_get_tmp_attachment
int mutt_get_tmp_attachment(struct Body *a)
Get a temporary copy of an attachment.
Definition: mutt_attach.c:69
mutt_decode_save_attachment
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:1004
mutt_add_temp_attachment
void mutt_add_temp_attachment(const char *filename)
Add file to list of temporary attachments.
Definition: mutt_attach.c:1258
SaveAttach
SaveAttach
Options for saving attachments.
Definition: mutt_attach.h:54
MUTT_VA_PAGER
@ MUTT_VA_PAGER
View attachment in pager using copiousoutput mailcap.
Definition: mutt_attach.h:45
MUTT_VA_AS_TEXT
@ MUTT_VA_AS_TEXT
Force viewing as text.
Definition: mutt_attach.h:44
mutt_pipe_attachment_list
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:1011
mutt_compose_attachment
int mutt_compose_attachment(struct Body *a)
Create an attachment.
Definition: mutt_attach.c:119
MUTT_SAVE_APPEND
@ MUTT_SAVE_APPEND
Append to existing file.
Definition: mutt_attach.h:57
ViewAttachMode
ViewAttachMode
Options for mutt_view_attachment()
Definition: mutt_attach.h:40
MUTT_VA_REGULAR
@ MUTT_VA_REGULAR
View using default method.
Definition: mutt_attach.h:42
mutt_save_attachment
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:873
MUTT_SAVE_NO_FLAGS
@ MUTT_SAVE_NO_FLAGS
No flags set.
Definition: mutt_attach.h:56
mutt_attach_display_loop
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:1285
MuttWindow::type
enum WindowType type
Window type, e.g. WT_SIDEBAR.
Definition: mutt_window.h:137
mutt_edit_attachment
int mutt_edit_attachment(struct Body *a)
Edit an attachment.
Definition: mutt_attach.c:259
mutt_view_attachment
int mutt_view_attachment(FILE *fp, struct Body *a, enum ViewAttachMode mode, struct Email *e, struct AttachCtx *actx, struct MuttWindow *win)
View an attachment.
Definition: mutt_attach.c:414
mutt_unlink_temp_attachments
void mutt_unlink_temp_attachments(void)
Delete all temporary attachments.
Definition: mutt_attach.c:1266
MUTT_SAVE_OVERWRITE
@ MUTT_SAVE_OVERWRITE
Overwrite existing file.
Definition: mutt_attach.h:58
mutt_pipe_attachment
int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile)
Pipe an attachment to a command.
Definition: mutt_attach.c:707
Email
The envelope/body of an email.
Definition: email.h:37
mutt_save_attachment_list
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:724
mutt_print_attachment_list
void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top)
Print a list of Attachments.
Definition: recvattach.c:1166
MUTT_VA_MAILCAP
@ MUTT_VA_MAILCAP
Force viewing using mailcap entry.
Definition: mutt_attach.h:43
Menu
GUI selectable list of items.
Definition: mutt_menu.h:52