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