blob: f6878cbd4b3c36903250721f639d750e71a8baa8 [file] [log] [blame]
Philip P. Moltmann25aee822016-12-15 12:16:46 -08001/*
2 * Public directory definitions for CUPS.
3 *
4 * This set of APIs abstracts enumeration of directory entries.
5 *
6 * Copyright 2007-2011 by Apple Inc.
7 * Copyright 1997-2006 by Easy Software Products, all rights reserved.
8 *
Haibo Huang265f7572019-12-13 16:47:52 -08009 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
Philip P. Moltmann25aee822016-12-15 12:16:46 -080010 */
11
12#ifndef _CUPS_DIR_H_
13# define _CUPS_DIR_H_
14
15
16/*
17 * Include necessary headers...
18 */
19
20# include "versioning.h"
21# include <sys/stat.h>
22
23
24/*
25 * C++ magic...
26 */
27
28# ifdef __cplusplus
29extern "C" {
30# endif /* __cplusplus */
31
32
33/*
34 * Data types...
35 */
36
37typedef struct _cups_dir_s cups_dir_t; /**** Directory type ****/
38
39typedef struct cups_dentry_s /**** Directory entry type ****/
40{
41 char filename[260]; /* File name */
42 struct stat fileinfo; /* File information */
43} cups_dentry_t;
44
45
46/*
47 * Prototypes...
48 */
49
50extern void cupsDirClose(cups_dir_t *dp) _CUPS_API_1_2;
51extern cups_dir_t *cupsDirOpen(const char *directory) _CUPS_API_1_2;
52extern cups_dentry_t *cupsDirRead(cups_dir_t *dp) _CUPS_API_1_2;
53extern void cupsDirRewind(cups_dir_t *dp) _CUPS_API_1_2;
54
55
56# ifdef __cplusplus
57}
58# endif /* __cplusplus */
59#endif /* !_CUPS_DIR_H_ */