NeoMutt  2019-11-11
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 <stdbool.h>
27 
28 struct Body;
29 struct Buffer;
30 
31 /* These Config Variables are only used in rfc1524.c */
32 extern bool C_MailcapSanitize;
33 
38 {
39  char *command;
40  char *testcommand;
43  char *editcommand;
44  char *printcommand;
45  char *nametemplate;
46  char *convert;
47  bool needsterminal : 1;
48  bool copiousoutput : 1;
49  bool xneomuttkeep : 1;
50 };
51 
56 {
62 };
63 
64 void mailcap_entry_free(struct MailcapEntry **ptr);
65 struct MailcapEntry *mailcap_entry_new(void);
66 int mailcap_expand_command(struct Body *a, const char *filename, const char *type, struct Buffer *command);
67 void mailcap_expand_filename(const char *nametemplate, const char *oldfile, struct Buffer *newfile);
68 bool mailcap_lookup(struct Body *a, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt);
69 
70 #endif /* MUTT_MAILCAP_H */
bool xneomuttkeep
do not remove the file on command exit
Definition: mailcap.h:49
A mailcap entry.
Definition: mailcap.h:37
char * convert
Definition: mailcap.h:46
Mailcap autoview field.
Definition: mailcap.h:61
char * composetypecommand
Definition: mailcap.h:42
String manipulation buffer.
Definition: buffer.h:33
No flags set.
Definition: mailcap.h:57
void mailcap_entry_free(struct MailcapEntry **ptr)
Deallocate an struct MailcapEntry.
Definition: mailcap.c:438
The body of an email.
Definition: body.h:34
Mailcap compose field.
Definition: mailcap.h:59
Mailcap print field.
Definition: mailcap.h:60
bool copiousoutput
needs pager, basically
Definition: mailcap.h:48
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:522
char * editcommand
Definition: mailcap.h:43
char * command
Definition: mailcap.h:39
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:467
int mailcap_expand_command(struct Body *a, const char *filename, const char *type, struct Buffer *command)
Expand expandos in a command.
Definition: mailcap.c:70
char * printcommand
Definition: mailcap.h:44
char * nametemplate
Definition: mailcap.h:45
MailcapLookup
Mailcap actions.
Definition: mailcap.h:55
char * composecommand
Definition: mailcap.h:41
Mailcap edit field.
Definition: mailcap.h:58
bool C_MailcapSanitize
Config: Restrict the possible characters in mailcap expandos.
Definition: mailcap.c:49
struct MailcapEntry * mailcap_entry_new(void)
Allocate memory for a new rfc1524 entry.
Definition: mailcap.c:429
bool needsterminal
endwin() and system
Definition: mailcap.h:47
char * testcommand
Definition: mailcap.h:40