]>
Commit | Line | Data |
---|---|---|
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 | * |
503b54c9 MS |
9 | * These coded instructions, statements, and computer programs are the |
10 | * property of Apple Inc. and are protected by Federal copyright | |
11 | * law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | * which should have been included with this file. If this file is | |
13 | * file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | */ |
15 | ||
16 | #ifndef _CUPS_DIR_H_ | |
17 | # define _CUPS_DIR_H_ | |
18 | ||
19 | ||
20 | /* | |
21 | * Include necessary headers... | |
22 | */ | |
23 | ||
2fb76298 | 24 | # include "versioning.h" |
ef416fc2 | 25 | # include <sys/stat.h> |
26 | ||
27 | ||
28 | /* | |
29 | * C++ magic... | |
30 | */ | |
31 | ||
d09495fa | 32 | # ifdef __cplusplus |
ef416fc2 | 33 | extern "C" { |
d09495fa | 34 | # endif /* __cplusplus */ |
ef416fc2 | 35 | |
36 | ||
37 | /* | |
38 | * Data types... | |
39 | */ | |
40 | ||
41 | typedef struct _cups_dir_s cups_dir_t; /**** Directory type ****/ | |
42 | ||
43 | typedef struct cups_dentry_s /**** Directory entry type ****/ | |
44 | { | |
45 | char filename[260]; /* File name */ | |
46 | struct stat fileinfo; /* File information */ | |
47 | } cups_dentry_t; | |
48 | ||
49 | ||
50 | /* | |
51 | * Prototypes... | |
52 | */ | |
53 | ||
2fb76298 MS |
54 | extern void cupsDirClose(cups_dir_t *dp) _CUPS_API_1_2; |
55 | extern cups_dir_t *cupsDirOpen(const char *directory) _CUPS_API_1_2; | |
56 | extern cups_dentry_t *cupsDirRead(cups_dir_t *dp) _CUPS_API_1_2; | |
57 | extern void cupsDirRewind(cups_dir_t *dp) _CUPS_API_1_2; | |
ef416fc2 | 58 | |
59 | ||
d09495fa | 60 | # ifdef __cplusplus |
ef416fc2 | 61 | } |
d09495fa | 62 | # endif /* __cplusplus */ |
ef416fc2 | 63 | #endif /* !_CUPS_DIR_H_ */ |