2 8e1fb8d5 2024-06-13 thomas.ad * Copyright (c) 2024 Thomas Adam <thomas@xteddy.org>
4 8e1fb8d5 2024-06-13 thomas.ad * Permission to use, copy, modify, and distribute this software for any
5 8e1fb8d5 2024-06-13 thomas.ad * purpose with or without fee is hereby granted, provided that the above
6 8e1fb8d5 2024-06-13 thomas.ad * copyright notice and this permission notice appear in all copies.
8 8e1fb8d5 2024-06-13 thomas.ad * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 8e1fb8d5 2024-06-13 thomas.ad * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 8e1fb8d5 2024-06-13 thomas.ad * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 8e1fb8d5 2024-06-13 thomas.ad * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 8e1fb8d5 2024-06-13 thomas.ad * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 8e1fb8d5 2024-06-13 thomas.ad * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 8e1fb8d5 2024-06-13 thomas.ad * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 8e1fb8d5 2024-06-13 thomas.ad #ifndef MAILCAP_H
18 8e1fb8d5 2024-06-13 thomas.ad #define MAILCAP_H
20 8e1fb8d5 2024-06-13 thomas.ad struct mailcap {
21 8e1fb8d5 2024-06-13 thomas.ad char *mime_type;
22 8e1fb8d5 2024-06-13 thomas.ad char *cmd;
23 8e1fb8d5 2024-06-13 thomas.ad char **cmd_argv;
24 8e1fb8d5 2024-06-13 thomas.ad int cmd_argc;
26 836a2edc 2024-06-14 op #define MAILCAP_NEEDSTERMINAL 0x1
27 836a2edc 2024-06-14 op #define MAILCAP_COPIOUSOUTPUT 0x2
28 8e1fb8d5 2024-06-13 thomas.ad int flags;
30 8e1fb8d5 2024-06-13 thomas.ad TAILQ_ENTRY(mailcap) mailcaps;
33 8e1fb8d5 2024-06-13 thomas.ad extern TAILQ_HEAD(mailcaplist, mailcap) mailcaps;
35 8e1fb8d5 2024-06-13 thomas.ad extern struct mailcaplist mailcaps;
37 8e1fb8d5 2024-06-13 thomas.ad void init_mailcap(void);
38 836a2edc 2024-06-14 op void mailcap_parse(FILE *);
39 8e1fb8d5 2024-06-13 thomas.ad struct mailcap *mailcap_cmd_from_mimetype(char *, char *);