rpmio/rpmdav.h

Go to the documentation of this file.
00001 #ifndef RPMDAV_H
00002 #define RPMDAV_H
00003 
00008 #if defined(_RPMDAV_INTERNAL)
00009 struct __dirstream {
00010     int fd;                     /* File descriptor.  */
00011     char * data;                /* Directory block.  */
00012     size_t allocation;          /* Space allocated for the block.  */
00013     size_t size;                /* Total valid data in the block.  */
00014     size_t offset;              /* Current offset into the block.  */
00015     off_t filepos;              /* Position of next entry to read.  */
00016     pthread_mutex_t lock;       /* Mutex lock for this structure.  */
00017 };
00018 #endif
00019 
00020 #if !defined(DT_DIR) || defined(__APPLE__)
00021 # define DT_UNKNOWN     0
00022 # define DT_FIFO        1
00023 # define DT_CHR         2
00024 # define DT_DIR         4
00025 # define DT_BLK         6
00026 # define DT_REG         8
00027 # define DT_LNK         10
00028 # define DT_SOCK        12
00029 # define DT_WHT         14
00030 typedef struct __dirstream *    AVDIR;
00031 typedef struct __dirstream *    DAVDIR;
00032 #else
00033 typedef DIR *                   AVDIR;
00034 typedef DIR *                   DAVDIR;
00035 #endif
00036 
00037 
00040 /*@unchecked@*/
00041 extern int avmagicdir;
00042 #define ISAVMAGIC(_dir) (!memcmp((_dir), &avmagicdir, sizeof(avmagicdir)))
00043 
00046 /*@unchecked@*/
00047 extern int davmagicdir;
00048 #define ISDAVMAGIC(_dir) (!memcmp((_dir), &davmagicdir, sizeof(davmagicdir)))
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053 
00059 int avClosedir(/*@only@*/ DIR * dir)
00060         /*@globals fileSystem @*/
00061         /*@modifies dir, fileSystem @*/;
00062 
00068 /*@dependent@*/ /*@null@*/
00069 struct dirent * avReaddir(DIR * dir)
00070         /*@globals fileSystem @*/
00071         /*@modifies fileSystem @*/;
00072 
00078 /*@null@*/
00079 DIR * avOpendir(const char * path)
00080         /*@globals fileSystem, internalState @*/
00081         /*@modifies fileSystem, internalState @*/;
00082 
00083 #ifdef __cplusplus
00084 }
00085 #endif
00086 
00087 #endif /* RPMDAV_H */

Generated on Tue Feb 19 22:26:20 2008 for rpm by  doxygen 1.5.1