Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

67 рядки
2.7 KiB

  1. /* Copied from Richard Levitte's (richard@levitte.org) LP library. All
  2. * symbol names have been changed, with permission from the author. */
  3. /* $LP: LPlib/source/LPdir.h,v 1.1 2004/06/14 08:56:04 _cvs_levitte Exp $ */
  4. /*
  5. * Copyright (c) 2004, Richard Levitte <richard@levitte.org>
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  18. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. * SUCH DAMAGE.
  28. */
  29. #ifndef OPENSSL_HEADER_DIRECTORY_H
  30. #define OPENSSL_HEADER_DIRECTORY_H
  31. #include <openssl/base.h>
  32. #if defined(__cplusplus)
  33. extern "C" {
  34. #endif
  35. /* Directory functions abstract the O/S specific operations for opening and
  36. * reading directories in the filesystem. */
  37. /* OPENSSL_dir_context_st is an opaque structure that represents an open
  38. * directory and a position in that directory. */
  39. typedef struct OPENSSL_dir_context_st OPENSSL_DIR_CTX;
  40. /* OPENSSL_DIR_read reads a single filename from |ctx|. On the first call,
  41. * |directory| must be given and |*ctx| must be NULL. Subsequent calls with the
  42. * same |*ctx| will return subsequent file names until it returns NULL to
  43. * indicate EOF. The strings returned reference a buffer internal to the
  44. * |OPENSSL_DIR_CTX| and will be overridden by subsequent calls. */
  45. OPENSSL_EXPORT const char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx,
  46. const char *directory);
  47. /* OPENSSL_DIR_end closes |*ctx|. It returns one on success and zero on
  48. * error. */
  49. OPENSSL_EXPORT int OPENSSL_DIR_end(OPENSSL_DIR_CTX **ctx);
  50. #if defined(__cplusplus)
  51. } /* extern C */
  52. #endif
  53. #endif /* OPENSSL_HEADER_DIRECTORY_H */