diff options
author | Eduardo Chappa <echappa@gmx.com> | 2013-02-03 00:59:38 -0700 |
---|---|---|
committer | Eduardo Chappa <echappa@gmx.com> | 2013-02-03 00:59:38 -0700 |
commit | 094ca96844842928810f14844413109fc6cdd890 (patch) | |
tree | e60efbb980f38ba9308ccb4fb2b77b87bbc115f3 /pith/mimetype.h | |
download | alpine-094ca96844842928810f14844413109fc6cdd890.tar.xz |
Initial Alpine Version
Diffstat (limited to 'pith/mimetype.h')
-rw-r--r-- | pith/mimetype.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pith/mimetype.h b/pith/mimetype.h new file mode 100644 index 00000000..54981615 --- /dev/null +++ b/pith/mimetype.h @@ -0,0 +1,51 @@ +/* + * $Id: mimetype.h 769 2007-10-24 00:15:40Z hubert@u.washington.edu $ + * + * ======================================================================== + * Copyright 2006-2007 University of Washington + * Copyright 2013 Eduardo Chappa + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * ======================================================================== + */ + +#ifndef PITH_MIMETYPE_INCLUDED +#define PITH_MIMETYPE_INCLUDED + + +/* + * Struct passed mime.types search functions + */ +typedef struct { + union { + char *ext; + char *mime_type; + } from; + union { + struct { + int type; + char *subtype; + } mime; + char *ext; + } to; +} MT_MAP_T; + + +typedef int (* MT_OPERATORPROC)(MT_MAP_T *, FILE *); + + +/* exported protoypes */ +int set_mime_type_by_extension(BODY *, char *); +int set_mime_extension_by_type(char *, char *); +int mt_srch_by_ext(MT_MAP_T *, FILE *); +int mt_get_file_ext(char *, char **); +int mt_srch_mime_type(MT_OPERATORPROC, MT_MAP_T *); +int mt_translate_type(char *); + + +#endif /* PITH_MIMETYPE_INCLUDED */ |