1 /*@ S-nail - a mail user agent derived from Berkeley Mail. 2 *@ Mailcap file a.k.a. RFC 1524 handling. 3 * 4 * Copyright (c) 2019 - 2020 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>. 5 * SPDX-License-Identifier: ISC 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 */ 19 #ifndef mx_MAILCAP_H 20 #define mx_MAILCAP_H 21 22 #include <mx/nail.h> 23 #ifdef mx_HAVE_MAILCAP 24 25 #define mx_HEADER 26 #include <su/code-in.h> 27 28 /* Forward: only used for the provider of that type ... */ 29 struct mx_mimetype_handler; 30 31 /* `mailcap' */ 32 EXPORT int c_mailcap(void *vp); 33 34 /* Try to find an action Mailcap handler for the MIME content-type ct, fill in 35 * mthp accordingly upon success. 36 * If this returns TRUM1 then it is a only-use-as-last-resort handler. */ 37 EXPORT boole mx_mailcap_handler(struct mx_mimetype_handler *mthp, 38 char const *ct, enum sendaction action, struct mimepart const *mpp); 39 40 #include <su/code-ou.h> 41 #endif /* mx_HAVE_MAILCAP */ 42 #endif /* mx_MAILCAP_H */ 43 /* s-it-mode */ 44