1295016Sjkim/* crypto/o_dir.h */
2280304Sjkim/*
3280304Sjkim * Copied from Richard Levitte's (richard@levitte.org) LP library.  All
4160814Ssimon * symbol names have been changed, with permission from the author.
5160814Ssimon */
6160814Ssimon
7160814Ssimon/* $LP: LPlib/source/LPdir.h,v 1.1 2004/06/14 08:56:04 _cvs_levitte Exp $ */
8160814Ssimon/*
9160814Ssimon * Copyright (c) 2004, Richard Levitte <richard@levitte.org>
10160814Ssimon * All rights reserved.
11160814Ssimon *
12160814Ssimon * Redistribution and use in source and binary forms, with or without
13160814Ssimon * modification, are permitted provided that the following conditions
14160814Ssimon * are met:
15160814Ssimon * 1. Redistributions of source code must retain the above copyright
16160814Ssimon *    notice, this list of conditions and the following disclaimer.
17160814Ssimon * 2. Redistributions in binary form must reproduce the above copyright
18160814Ssimon *    notice, this list of conditions and the following disclaimer in the
19160814Ssimon *    documentation and/or other materials provided with the distribution.
20160814Ssimon *
21160814Ssimon * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22160814Ssimon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23160814Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24160814Ssimon * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25160814Ssimon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26160814Ssimon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27160814Ssimon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28160814Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29160814Ssimon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30160814Ssimon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31160814Ssimon * SUCH DAMAGE.
32160814Ssimon */
33160814Ssimon
34160814Ssimon#ifndef O_DIR_H
35280304Sjkim# define O_DIR_H
36160814Ssimon
37160814Ssimon#ifdef __cplusplus
38160814Ssimonextern "C" {
39160814Ssimon#endif
40160814Ssimon
41280304Sjkimtypedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
42160814Ssimon
43280304Sjkim  /*
44280304Sjkim   * returns NULL on error or end-of-directory. If it is end-of-directory,
45280304Sjkim   * errno will be zero
46280304Sjkim   */
47280304Sjkimconst char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory);
48160814Ssimon  /* returns 1 on success, 0 on error */
49280304Sjkimint OPENSSL_DIR_end(OPENSSL_DIR_CTX **ctx);
50160814Ssimon
51160814Ssimon#ifdef __cplusplus
52160814Ssimon}
53160814Ssimon#endif
54160814Ssimon
55280304Sjkim#endif                          /* LPDIR_H */
56