xref: /netbsd-src/usr.bin/mail/mime_decode.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1*ce099b40Smartin /*	$NetBSD: mime_decode.h,v 1.5 2008/04/28 20:24:14 martin Exp $	*/
28207b28aSchristos 
38207b28aSchristos /*-
48207b28aSchristos  * Copyright (c) 2006 The NetBSD Foundation, Inc.
58207b28aSchristos  * All rights reserved.
68207b28aSchristos  *
78207b28aSchristos  * This code is derived from software contributed to The NetBSD Foundation
88207b28aSchristos  * by Anon Ymous.
98207b28aSchristos  *
108207b28aSchristos  * Redistribution and use in source and binary forms, with or without
118207b28aSchristos  * modification, are permitted provided that the following conditions
128207b28aSchristos  * are met:
138207b28aSchristos  * 1. Redistributions of source code must retain the above copyright
148207b28aSchristos  *    notice, this list of conditions and the following disclaimer.
158207b28aSchristos  * 2. Redistributions in binary form must reproduce the above copyright
168207b28aSchristos  *    notice, this list of conditions and the following disclaimer in the
178207b28aSchristos  *    documentation and/or other materials provided with the distribution.
188207b28aSchristos  *
198207b28aSchristos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
208207b28aSchristos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
218207b28aSchristos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
228207b28aSchristos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
238207b28aSchristos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
248207b28aSchristos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
258207b28aSchristos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
268207b28aSchristos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
278207b28aSchristos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
288207b28aSchristos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
298207b28aSchristos  * POSSIBILITY OF SUCH DAMAGE.
308207b28aSchristos  */
318207b28aSchristos 
328207b28aSchristos 
338207b28aSchristos #ifdef MIME_SUPPORT
348207b28aSchristos 
358207b28aSchristos #ifndef __MIME_DECODE_H__
368207b28aSchristos #define __MIME_DECODE_H__
378207b28aSchristos 
388207b28aSchristos /*
398207b28aSchristos  * All routines declared here are exported via mime.h
408207b28aSchristos  */
418207b28aSchristos 
428207b28aSchristos FILE *	mime_decode_body(struct mime_info *);
438207b28aSchristos void	mime_decode_close(struct mime_info *);
448207b28aSchristos FILE *	mime_decode_header(struct mime_info *);
45a2fe0ba0Schristos char *	mime_decode_hfield(char *, size_t, const char *, char *);
468207b28aSchristos struct mime_info *mime_decode_open(struct message *);
478207b28aSchristos int	mime_sendmessage(struct message *, FILE *, struct ignoretab *,
488207b28aSchristos     const char *, struct mime_info *);
498207b28aSchristos 
508207b28aSchristos #endif /* __MIME_DECODE_H__ */
518207b28aSchristos #endif /* MIME_SUPPORT */
52