MythTV  master
mythiowrapper.h
Go to the documentation of this file.
1 #ifndef __MYTHIOWRAPPER__
2 #define __MYTHIOWRAPPER__
3 
4 #ifdef __cplusplus
5 #include <cstring>
6 #else
7 #include <string.h>
8 #endif
9 #include <strings.h>
10 #include <sys/stat.h>
11 #include <sys/types.h>
12 #include <unistd.h>
13 
14 #include "mythtvexp.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 typedef void (*callback_t)(void*);
21 void mythfile_open_register_callback(const char *pathname, void* object,
22  callback_t func);
23 
24 int mythfile_check(int fileID);
25 MTV_PUBLIC int mythfile_open(const char *pathname, int flags);
26 MTV_PUBLIC int mythfile_close(int fileID);
27 #ifdef _WIN32
28 MTV_PUBLIC off64_t mythfile_seek(int fileID, off64_t offset, int whence);
29 MTV_PUBLIC off64_t mythfile_tell(int fileID);
30 #else
31 MTV_PUBLIC off_t mythfile_seek(int fileID, off_t offset, int whence);
32 MTV_PUBLIC off_t mythfile_tell(int fileID);
33 #endif
34 MTV_PUBLIC ssize_t mythfile_read(int fileID, void *buf, size_t count);
35 MTV_PUBLIC ssize_t mythfile_write(int fileID, void *buf, size_t count);
36 MTV_PUBLIC int mythfile_stat(const char *path, struct stat *buf);
37 MTV_PUBLIC int mythfile_stat_fd(int fileID, struct stat *buf);
38 int mythfile_exists(const char *path, const char *file);
39 
40 int mythdir_check(int fileID);
41 MTV_PUBLIC int mythdir_opendir(const char *dirname);
42 MTV_PUBLIC int mythdir_closedir(int dirID);
43 MTV_PUBLIC char *mythdir_readdir(int dirID);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif
50 
MTV_PUBLIC int mythfile_close(int fileID)
void mythfile_open_register_callback(const char *pathname, void *object, callback_t func)
MTV_PUBLIC int mythdir_closedir(int dirID)
int mythdir_check(int fileID)
#define off_t
MTV_PUBLIC char * mythdir_readdir(int dirID)
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MTV_PUBLIC ssize_t mythfile_read(int fileID, void *buf, size_t count)
MTV_PUBLIC int mythfile_open(const char *pathname, int flags)
void(* callback_t)(void *)
Definition: mythiowrapper.h:20
MTV_PUBLIC off64_t mythfile_seek(int fileID, off64_t offset, int whence)
int mythfile_exists(const char *path, const char *file)
MTV_PUBLIC off64_t mythfile_tell(int fileID)
MTV_PUBLIC ssize_t mythfile_write(int fileID, void *buf, size_t count)
int mythfile_check(int fileID)
MTV_PUBLIC int mythdir_opendir(const char *dirname)
MTV_PUBLIC int mythfile_stat(const char *path, struct stat *buf)
MTV_PUBLIC int mythfile_stat_fd(int fileID, struct stat *buf)