1/* 2 * "$Id: dir.h 11093 2013-07-03 20:48:42Z msweet $" 3 * 4 * Public directory definitions for CUPS. 5 * 6 * This set of APIs abstracts enumeration of directory entries. 7 * 8 * Copyright 2007-2011 by Apple Inc. 9 * Copyright 1997-2006 by Easy Software Products, all rights reserved. 10 * 11 * These coded instructions, statements, and computer programs are the 12 * property of Apple Inc. and are protected by Federal copyright 13 * law. Distribution and use rights are outlined in the file "LICENSE.txt" 14 * which should have been included with this file. If this file is 15 * file is missing or damaged, see the license at "http://www.cups.org/". 16 */ 17 18#ifndef _CUPS_DIR_H_ 19# define _CUPS_DIR_H_ 20 21 22/* 23 * Include necessary headers... 24 */ 25 26# include "versioning.h" 27# include <sys/stat.h> 28 29 30/* 31 * C++ magic... 32 */ 33 34# ifdef __cplusplus 35extern "C" { 36# endif /* __cplusplus */ 37 38 39/* 40 * Data types... 41 */ 42 43typedef struct _cups_dir_s cups_dir_t; /**** Directory type ****/ 44 45typedef struct cups_dentry_s /**** Directory entry type ****/ 46{ 47 char filename[260]; /* File name */ 48 struct stat fileinfo; /* File information */ 49} cups_dentry_t; 50 51 52/* 53 * Prototypes... 54 */ 55 56extern void cupsDirClose(cups_dir_t *dp) _CUPS_API_1_2; 57extern cups_dir_t *cupsDirOpen(const char *directory) _CUPS_API_1_2; 58extern cups_dentry_t *cupsDirRead(cups_dir_t *dp) _CUPS_API_1_2; 59extern void cupsDirRewind(cups_dir_t *dp) _CUPS_API_1_2; 60 61 62# ifdef __cplusplus 63} 64# endif /* __cplusplus */ 65#endif /* !_CUPS_DIR_H_ */ 66 67/* 68 * End of "$Id: dir.h 11093 2013-07-03 20:48:42Z msweet $". 69 */ 70