* Fix an error in compilation when Alpine is not built with S/MIME
[alpine.git] / pith / mimetype.h
blob62f2044c12f20ed6812ffc23a5cff9eb86243aa1
1 /*
2 * $Id: mimetype.h 769 2007-10-24 00:15:40Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006-2007 University of Washington
6 * Copyright 2013-2016 Eduardo Chappa
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_MIMETYPE_INCLUDED
18 #define PITH_MIMETYPE_INCLUDED
22 * Struct passed mime.types search functions
24 typedef struct {
25 union {
26 char *ext;
27 char *mime_type;
28 } from;
29 union {
30 struct {
31 int type;
32 char *subtype;
33 } mime;
34 char *ext;
35 } to;
36 } MT_MAP_T;
39 typedef int (* MT_OPERATORPROC)(MT_MAP_T *, FILE *);
42 /* exported protoypes */
43 int set_mime_type_by_extension(BODY *, char *);
44 int set_mime_extension_by_type(char *, char *);
45 int mt_srch_by_ext(MT_MAP_T *, FILE *);
46 int mt_get_file_ext(char *, char **);
47 int mt_srch_mime_type(MT_OPERATORPROC, MT_MAP_T *);
48 int mt_translate_type(char *);
51 #endif /* PITH_MIMETYPE_INCLUDED */