1e1051a39Sopenharmony_ci/* 2e1051a39Sopenharmony_ci * Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved. 3e1051a39Sopenharmony_ci * 4e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License"). You may not use 5e1051a39Sopenharmony_ci * this file except in compliance with the License. You can obtain a copy 6e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at 7e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html 8e1051a39Sopenharmony_ci */ 9e1051a39Sopenharmony_ci 10e1051a39Sopenharmony_ci/* 11e1051a39Sopenharmony_ci * This file is dual-licensed and is also available under the following 12e1051a39Sopenharmony_ci * terms: 13e1051a39Sopenharmony_ci * 14e1051a39Sopenharmony_ci * Copyright (c) 2004, Richard Levitte <richard@levitte.org> 15e1051a39Sopenharmony_ci * All rights reserved. 16e1051a39Sopenharmony_ci * 17e1051a39Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 18e1051a39Sopenharmony_ci * modification, are permitted provided that the following conditions 19e1051a39Sopenharmony_ci * are met: 20e1051a39Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright 21e1051a39Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 22e1051a39Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright 23e1051a39Sopenharmony_ci * notice, this list of conditions and the following disclaimer in the 24e1051a39Sopenharmony_ci * documentation and/or other materials provided with the distribution. 25e1051a39Sopenharmony_ci * 26e1051a39Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27e1051a39Sopenharmony_ci * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28e1051a39Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29e1051a39Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30e1051a39Sopenharmony_ci * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31e1051a39Sopenharmony_ci * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32e1051a39Sopenharmony_ci * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33e1051a39Sopenharmony_ci * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34e1051a39Sopenharmony_ci * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35e1051a39Sopenharmony_ci * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36e1051a39Sopenharmony_ci * SUCH DAMAGE. 37e1051a39Sopenharmony_ci */ 38e1051a39Sopenharmony_ci 39e1051a39Sopenharmony_ci#ifndef OSSL_INTERNAL_O_DIR_H 40e1051a39Sopenharmony_ci# define OSSL_INTERNAL_O_DIR_H 41e1051a39Sopenharmony_ci# pragma once 42e1051a39Sopenharmony_ci 43e1051a39Sopenharmony_citypedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX; 44e1051a39Sopenharmony_ci 45e1051a39Sopenharmony_ci/* 46e1051a39Sopenharmony_ci * returns NULL on error or end-of-directory. If it is end-of-directory, 47e1051a39Sopenharmony_ci * errno will be zero 48e1051a39Sopenharmony_ci */ 49e1051a39Sopenharmony_ciconst char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory); 50e1051a39Sopenharmony_ci/* returns 1 on success, 0 on error */ 51e1051a39Sopenharmony_ciint OPENSSL_DIR_end(OPENSSL_DIR_CTX **ctx); 52e1051a39Sopenharmony_ci 53e1051a39Sopenharmony_ci#endif /* LPDIR_H */ 54