23 |
|
|
24 |
/* See RFC1524 (A User Agent Configuration Mechanism). */ |
/* See RFC1524 (A User Agent Configuration Mechanism). */ |
25 |
|
|
26 |
|
#ifdef __cplusplus |
27 |
|
extern "C" { |
28 |
|
#endif |
29 |
|
|
30 |
/* Create a mailcap from stream. */ |
/* Create a mailcap from stream. */ |
31 |
int mu_mailcap_create (mu_mailcap_t * mailcap, stream_t stream); |
int mu_mailcap_create __P((mu_mailcap_t * mailcap, stream_t stream)); |
32 |
|
|
33 |
/* Destroy mailcap object. */ |
/* Destroy mailcap object. */ |
34 |
void mu_mailcap_destroy (mu_mailcap_t * mailcap); |
void mu_mailcap_destroy __P((mu_mailcap_t * mailcap)); |
35 |
|
|
36 |
/* Return the number of entries in the mailcap file. */ |
/* Return the number of entries in the mailcap file. */ |
37 |
int mu_mailcap_entries_count (mu_mailcap_t mailcap, size_t *pno); |
int mu_mailcap_entries_count __P((mu_mailcap_t mailcap, size_t *pno)); |
38 |
|
|
39 |
/* Return the mailcap record number, no, of the mailcap file . */ |
/* Return the mailcap record number, no, of the mailcap file . */ |
40 |
int mu_mailcap_get_entry (mu_mailcap_t mailcap, size_t no, mu_mailcap_entry_t *entry); |
int mu_mailcap_get_entry __P((mu_mailcap_t mailcap, size_t no, |
41 |
|
mu_mailcap_entry_t *entry)); |
42 |
|
|
43 |
|
/* Return the number of fields in a mailcap entry */ |
44 |
|
int mu_mailcap_entry_fields_count __P((mu_mailcap_entry_t entry, |
45 |
|
size_t *pcount)); |
46 |
|
|
47 |
/* Save in buffer[] the content-type of the record. */ |
/* Save in buffer[] the content-type of the record. */ |
48 |
int mu_mailcap_entry_get_typefield (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_typefield __P((mu_mailcap_entry_t entry, |
49 |
|
char *buffer, size_t buflen, |
50 |
|
size_t *pn)); |
51 |
|
|
52 |
/* Save in buffer[] the view command of the record. */ |
/* Save in buffer[] the view command of the record. */ |
53 |
int mu_mailcap_entry_get_viewcommand (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_viewcommand __P((mu_mailcap_entry_t entry, |
54 |
|
char *buffer, size_t buflen, |
55 |
|
size_t *pn)); |
56 |
|
|
57 |
/* Save in buffer[] the field number no the record . */ |
/* Save in buffer[] the field number no the record . */ |
58 |
int mu_mailcap_entry_get_field (mu_mailcap_entry_t entry, size_t no, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_field __P((mu_mailcap_entry_t entry, size_t no, |
59 |
|
char *buffer, size_t buflen, size_t *pn)); |
60 |
|
|
61 |
/* Save in buffer the value of a key: |
/* Save in buffer the value of a key: |
62 |
* mu_mailcap_entry_get_value (entry, "compose", buffer, buflen, pn); |
* mu_mailcap_entry_get_value __P((entry, "compose", buffer, buflen, pn)); |
63 |
* i.e compose="lynx %s" --> "lynx %s" will be save in buffer without the quotes. */ |
* i.e compose="lynx %s" --> "lynx %s" will be saved in the buffer without |
64 |
int mu_mailcap_entry_get_value (mu_mailcap_entry_t entry, const char *key, char *buffer, size_t buflen, size_t *pn); |
* the quotes. */ |
65 |
|
int mu_mailcap_entry_get_value __P((mu_mailcap_entry_t entry, const char *key, |
66 |
|
char *buffer, size_t buflen, size_t *pn)); |
67 |
|
|
68 |
/* Helper function saving in buffer, the argument of "compose" field. */ |
/* Helper function saving in buffer, the argument of "compose" field. */ |
69 |
int mu_mailcap_entry_get_compose (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_compose __P((mu_mailcap_entry_t entry, char *buffer, |
70 |
|
size_t buflen, size_t *pn)); |
71 |
|
|
72 |
/* Helper function saving in buffer, the argument of "composetyped" field. */ |
/* Helper function saving in buffer, the argument of "composetyped" field. */ |
73 |
int mu_mailcap_entry_get_composetyped (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_composetyped __P((mu_mailcap_entry_t entry, |
74 |
|
char *buffer, size_t buflen, |
75 |
|
size_t *pn)); |
76 |
|
|
77 |
/* Helper function saving in buffer, the argument of "edit" field. */ |
/* Helper function saving in buffer, the argument of "edit" field. */ |
78 |
int mu_mailcap_entry_get_edit (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_edit __P((mu_mailcap_entry_t entry, char *buffer, |
79 |
|
size_t buflen, size_t *pn)); |
80 |
|
|
81 |
/* Helper function saving in buffer, the argument of "textualnewlines" field. */ |
/* Helper function saving in buffer, the argument of "textualnewlines" field. */ |
82 |
int mu_mailcap_entry_get_textualnewlines (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_textualnewlines __P((mu_mailcap_entry_t entry, |
83 |
|
char *buffer, size_t buflen, |
84 |
|
size_t *pn)); |
85 |
|
|
86 |
/* Helper function saving in buffer, the argument of "test" field. */ |
/* Helper function saving in buffer, the argument of "test" field. */ |
87 |
int mu_mailcap_entry_get_test (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_test __P((mu_mailcap_entry_t entry, |
88 |
|
char *buffer, size_t buflen, size_t *pn)); |
89 |
|
|
90 |
/* Helper function saving in buffer, the argument of "x11-bitmap" field. */ |
/* Helper function saving in buffer, the argument of "x11-bitmap" field. */ |
91 |
int mu_mailcap_entry_get_x11bitmap (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_x11bitmap __P((mu_mailcap_entry_t entry, |
92 |
|
char *buffer, size_t buflen, size_t *pn)); |
93 |
|
|
94 |
/* Helper function saving in buffer, the argument of "description" field. */ |
/* Helper function saving in buffer, the argument of "description" field. */ |
95 |
int mu_mailcap_entry_get_description (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_description __P((mu_mailcap_entry_t entry, |
96 |
|
char *buffer, size_t buflen, |
97 |
|
size_t *pn)); |
98 |
|
|
99 |
/* Helper function saving in buffer, the argument of "nametemplate" field. */ |
/* Helper function saving in buffer, the argument of "nametemplate" field. */ |
100 |
int mu_mailcap_entry_get_nametemplate (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_nametemplate __P((mu_mailcap_entry_t entry, |
101 |
|
char *buffer, size_t buflen, |
102 |
|
size_t *pn)); |
103 |
|
|
104 |
/* Helper function saving in buffer, the argument of "notes" field. */ |
/* Helper function saving in buffer, the argument of "notes" field. */ |
105 |
int mu_mailcap_entry_get_notes (mu_mailcap_entry_t entry, char *buffer, size_t buflen, size_t *pn); |
int mu_mailcap_entry_get_notes __P((mu_mailcap_entry_t entry, char *buffer, |
106 |
|
size_t buflen, size_t *pn)); |
|
/* Helper function return *on != 0 if the flag "needsterminal" is in the record. */ |
|
|
int mu_mailcap_entry_needsterminal (mu_mailcap_entry_t entry, int *on); |
|
107 |
|
|
108 |
/* Helper function return *on != 0 if the flag "copiousoutput" is in the record. */ |
/* Helper function. Returns *on != 0 if the flag "needsterminal" is in the |
109 |
int mu_mailcap_entry_copiousoutput (mu_mailcap_entry_t entry, int *on); |
record. */ |
110 |
|
int mu_mailcap_entry_needsterminal __P((mu_mailcap_entry_t entry, int *on)); |
111 |
|
|
112 |
|
/* Helper function. Returns *on != 0 if the flag "copiousoutput" is in the |
113 |
|
record. */ |
114 |
|
int mu_mailcap_entry_copiousoutput __P((mu_mailcap_entry_t entry, int *on)); |
115 |
|
|
116 |
|
#ifdef __cplusplus |
117 |
|
} |
118 |
|
#endif |
119 |
|
|
120 |
#endif |
#endif |