00001 #ifndef RPMDAV_H
00002 #define RPMDAV_H
00003
00008 #if defined(_RPMDAV_INTERNAL)
00009 struct __dirstream {
00010 int fd;
00011 char * data;
00012 size_t allocation;
00013 size_t size;
00014 size_t offset;
00015 off_t filepos;
00016 pthread_mutex_t lock;
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
00041 extern int avmagicdir;
00042 #define ISAVMAGIC(_dir) (!memcmp((_dir), &avmagicdir, sizeof(avmagicdir)))
00043
00046
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( DIR * dir)
00060
00061 ;
00062
00068
00069 struct dirent * avReaddir(DIR * dir)
00070
00071 ;
00072
00078
00079 DIR * avOpendir(const char * path)
00080
00081 ;
00082
00083 #ifdef __cplusplus
00084 }
00085 #endif
00086
00087 #endif