]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/dir.h
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / cups / dir.h
CommitLineData
ef416fc2 1/*
503b54c9 2 * Public directory definitions for CUPS.
ef416fc2 3 *
503b54c9 4 * This set of APIs abstracts enumeration of directory entries.
ef416fc2 5 *
503b54c9
MS
6 * Copyright 2007-2011 by Apple Inc.
7 * Copyright 1997-2006 by Easy Software Products, all rights reserved.
ef416fc2 8 *
e3101897 9 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
ef416fc2 10 */
11
12#ifndef _CUPS_DIR_H_
13# define _CUPS_DIR_H_
14
15
16/*
17 * Include necessary headers...
18 */
19
2fb76298 20# include "versioning.h"
ef416fc2 21# include <sys/stat.h>
22
23
24/*
25 * C++ magic...
26 */
27
d09495fa 28# ifdef __cplusplus
ef416fc2 29extern "C" {
d09495fa 30# endif /* __cplusplus */
ef416fc2 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
2fb76298
MS
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;
ef416fc2 54
55
d09495fa 56# ifdef __cplusplus
ef416fc2 57}
d09495fa 58# endif /* __cplusplus */
ef416fc2 59#endif /* !_CUPS_DIR_H_ */