00001 #ifndef __MYTHIOWRAPPER__
00002 #define __MYTHIOWRAPPER__
00003
00004 #include <sys/stat.h>
00005 #include <sys/types.h>
00006 #include <unistd.h>
00007
00008 #include "mythtvexp.h"
00009
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013
00014 typedef void (*callback_t)(void*);
00015 void mythfile_open_register_callback(const char *pathname, void* object,
00016 callback_t func);
00017
00018 int mythfile_check(int fileID);
00019 MTV_PUBLIC int mythfile_open(const char *pathname, int flags);
00020 MTV_PUBLIC int mythfile_close(int fileID);
00021 #ifdef USING_MINGW
00022 MTV_PUBLIC off64_t mythfile_seek(int fileID, off64_t offset, int whence);
00023 MTV_PUBLIC off64_t mythfile_tell(int fileID);
00024 #else
00025 MTV_PUBLIC off_t mythfile_seek(int fileID, off_t offset, int whence);
00026 MTV_PUBLIC off_t mythfile_tell(int fileID);
00027 #endif
00028 MTV_PUBLIC ssize_t mythfile_read(int fileID, void *buf, size_t count);
00029 MTV_PUBLIC ssize_t mythfile_write(int fileID, void *buf, size_t count);
00030 MTV_PUBLIC int mythfile_stat(const char *path, struct stat *buf);
00031 MTV_PUBLIC int mythfile_stat_fd(int fileID, struct stat *buf);
00032 int mythfile_exists(const char *path, const char *file);
00033
00034 int mythdir_check(int fileID);
00035 MTV_PUBLIC int mythdir_opendir(const char *dirname);
00036 MTV_PUBLIC int mythdir_closedir(int dirID);
00037 MTV_PUBLIC char *mythdir_readdir(int dirID);
00038
00039 #ifdef __cplusplus
00040 }
00041 #endif
00042
00043 #endif
00044