xref: /minix3/include/cdbw.h (revision f14fb602092e015ff630df58e17c2a9cd57d29b3)
1*f14fb602SLionel Sambuc /*	$NetBSD: cdbw.h,v 1.2 2012/06/03 21:21:45 joerg Exp $	*/
22fe8fb19SBen Gras /*-
32fe8fb19SBen Gras  * Copyright (c) 2010 The NetBSD Foundation, Inc.
42fe8fb19SBen Gras  * All rights reserved.
52fe8fb19SBen Gras  *
62fe8fb19SBen Gras  * This code is derived from software contributed to The NetBSD Foundation
72fe8fb19SBen Gras  * by Joerg Sonnenberger.
82fe8fb19SBen Gras  *
92fe8fb19SBen Gras  * Redistribution and use in source and binary forms, with or without
102fe8fb19SBen Gras  * modification, are permitted provided that the following conditions
112fe8fb19SBen Gras  * are met:
122fe8fb19SBen Gras  *
132fe8fb19SBen Gras  * 1. Redistributions of source code must retain the above copyright
142fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer.
152fe8fb19SBen Gras  * 2. Redistributions in binary form must reproduce the above copyright
162fe8fb19SBen Gras  *    notice, this list of conditions and the following disclaimer in
172fe8fb19SBen Gras  *    the documentation and/or other materials provided with the
182fe8fb19SBen Gras  *    distribution.
192fe8fb19SBen Gras  *
202fe8fb19SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
212fe8fb19SBen Gras  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
222fe8fb19SBen Gras  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
232fe8fb19SBen Gras  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
242fe8fb19SBen Gras  * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
252fe8fb19SBen Gras  * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
262fe8fb19SBen Gras  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
272fe8fb19SBen Gras  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
282fe8fb19SBen Gras  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
292fe8fb19SBen Gras  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
302fe8fb19SBen Gras  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
312fe8fb19SBen Gras  * SUCH DAMAGE.
322fe8fb19SBen Gras  */
332fe8fb19SBen Gras 
342fe8fb19SBen Gras #ifndef	_CDBW_H
352fe8fb19SBen Gras #define	_CDBW_H
362fe8fb19SBen Gras 
372fe8fb19SBen Gras #include <sys/cdefs.h>
382fe8fb19SBen Gras #include <inttypes.h>
392fe8fb19SBen Gras #include <stddef.h>
402fe8fb19SBen Gras 
412fe8fb19SBen Gras struct cdbw;
422fe8fb19SBen Gras 
432fe8fb19SBen Gras __BEGIN_DECLS
442fe8fb19SBen Gras 
452fe8fb19SBen Gras struct cdbw	*cdbw_open(void);
462fe8fb19SBen Gras int		 cdbw_put(struct cdbw *, const void *, size_t,
472fe8fb19SBen Gras     const void *, size_t);
482fe8fb19SBen Gras int		 cdbw_put_data(struct cdbw *, const void *, size_t,
492fe8fb19SBen Gras     uint32_t *);
502fe8fb19SBen Gras int		 cdbw_put_key(struct cdbw *, const void *, size_t,
512fe8fb19SBen Gras     uint32_t);
52*f14fb602SLionel Sambuc uint32_t	 cdbw_stable_seeder(void);
532fe8fb19SBen Gras int		 cdbw_output(struct cdbw *, int, const char[16],
542fe8fb19SBen Gras     uint32_t (*)(void));
552fe8fb19SBen Gras void		 cdbw_close(struct cdbw *);
562fe8fb19SBen Gras 
572fe8fb19SBen Gras __END_DECLS
582fe8fb19SBen Gras 
592fe8fb19SBen Gras #endif /* _CDBW_H */
60