NeoMutt  2021-10-29-33-g41675a
Teaching an old dog new tricks
DOXYGEN
mailcap.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_MAILCAP_H
24 #define MUTT_MAILCAP_H
25 
26 #include <stddef.h>
27 #include <stdbool.h>
28 
29 struct Body;
30 struct Buffer;
31 
36 {
37  char *command;
38  char *testcommand;
41  char *editcommand;
42  char *printcommand;
43  char *nametemplate;
44  char *convert;
45  bool needsterminal : 1;
46  bool copiousoutput : 1;
47  bool xneomuttkeep : 1;
48  bool xneomuttnowrap: 1;
49 };
50 
55 {
61 };
62 
63 void mailcap_entry_free(struct MailcapEntry **ptr);
64 struct MailcapEntry *mailcap_entry_new(void);
65 int mailcap_expand_command(struct Body *a, const char *filename, const char *type, struct Buffer *command);
66 void mailcap_expand_filename(const char *nametemplate, const char *oldfile, struct Buffer *newfile);
67 bool mailcap_lookup(struct Body *a, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt);
68 
69 #endif /* MUTT_MAILCAP_H */
MailcapLookup
Mailcap actions.
Definition: mailcap.h:55
@ MUTT_MC_PRINT
Mailcap print field.
Definition: mailcap.h:59
@ MUTT_MC_EDIT
Mailcap edit field.
Definition: mailcap.h:57
@ MUTT_MC_AUTOVIEW
Mailcap autoview field.
Definition: mailcap.h:60
@ MUTT_MC_NO_FLAGS
No flags set.
Definition: mailcap.h:56
@ MUTT_MC_COMPOSE
Mailcap compose field.
Definition: mailcap.h:58
struct MailcapEntry * mailcap_entry_new(void)
Allocate memory for a new rfc1524 entry.
Definition: mailcap.c:437
bool mailcap_lookup(struct Body *a, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt)
Find given type in the list of mailcap files.
Definition: mailcap.c:475
void mailcap_entry_free(struct MailcapEntry **ptr)
Deallocate an struct MailcapEntry.
Definition: mailcap.c:446
int mailcap_expand_command(struct Body *a, const char *filename, const char *type, struct Buffer *command)
Expand expandos in a command.
Definition: mailcap.c:67
void mailcap_expand_filename(const char *nametemplate, const char *oldfile, struct Buffer *newfile)
Expand a new filename from a template or existing filename.
Definition: mailcap.c:545
The body of an email.
Definition: body.h:35
String manipulation buffer.
Definition: buffer.h:34
A mailcap entry.
Definition: mailcap.h:36
char * composecommand
Definition: mailcap.h:39
bool needsterminal
endwin() and system
Definition: mailcap.h:45
char * testcommand
Definition: mailcap.h:38
char * nametemplate
Definition: mailcap.h:43
char * printcommand
Definition: mailcap.h:42
char * composetypecommand
Definition: mailcap.h:40
char * editcommand
Definition: mailcap.h:41
char * command
Definition: mailcap.h:37
bool copiousoutput
needs pager, basically
Definition: mailcap.h:46
bool xneomuttkeep
do not remove the file on command exit
Definition: mailcap.h:47
char * convert
Definition: mailcap.h:44
bool xneomuttnowrap
do not wrap the output in the pager
Definition: mailcap.h:48