MythTV  master
mythiowrapper.h
Go to the documentation of this file.
1 #ifndef MYTHIOWRAPPER_H
2 #define MYTHIOWRAPPER_H
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*); //NOLINT(modernize-use-using) included from C code
21 
22 void MythFileOpenRegisterCallback(const char *Pathname, void* Object, callback_t Func);
23 int MythFileCheck (int Id);
24 MTV_PUBLIC int MythFileOpen (const char *Pathname, int Flags);
25 MTV_PUBLIC int MythfileClose (int FileID);
26 #ifdef _WIN32
27 MTV_PUBLIC off64_t MythFileSeek (int FileID, off64_t Offset, int Whence);
28 MTV_PUBLIC off64_t MythFileTell (int FileID);
29 #else
30 MTV_PUBLIC off_t MythFileSeek (int FileID, off_t Offset, int Whence);
31 MTV_PUBLIC off_t MythFileTell (int FileID);
32 #endif
33 MTV_PUBLIC ssize_t MythFileRead (int FileID, void *Buffer, size_t Count);
34 MTV_PUBLIC ssize_t MythFileWrite (int FileID, void *Buffer, size_t Count);
35 MTV_PUBLIC int MythFileStat (const char *Path, struct stat *Buf);
36 MTV_PUBLIC int MythFileStatFD (int FileID, struct stat *Buf);
37 int MythFileExists (const char *Path, const char *File);
38 int MythDirCheck (int DirID);
39 MTV_PUBLIC int MythDirOpen (const char *DirName);
40 MTV_PUBLIC int MythDirClose (int DirID);
41 MTV_PUBLIC char* MythDirRead (int DirID);
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 #endif
47 
MythFileExists
int MythFileExists(const char *Path, const char *File)
Definition: mythiowrapper.cpp:358
callback_t
void(* callback_t)(void *)
Definition: mythiowrapper.h:20
mythtvexp.h
MythDirClose
MTV_PUBLIC int MythDirClose(int DirID)
Definition: mythiowrapper.cpp:446
MythFileRead
MTV_PUBLIC ssize_t MythFileRead(int FileID, void *Buffer, size_t Count)
Definition: mythiowrapper.cpp:284
MythDirRead
MTV_PUBLIC char * MythDirRead(int DirID)
Definition: mythiowrapper.cpp:469
MythFileWrite
MTV_PUBLIC ssize_t MythFileWrite(int FileID, void *Buffer, size_t Count)
Definition: mythiowrapper.cpp:303
MythFileStatFD
MTV_PUBLIC int MythFileStatFD(int FileID, struct stat *Buf)
Definition: mythiowrapper.cpp:337
MythFileTell
MTV_PUBLIC off64_t MythFileTell(int FileID)
Definition: mythiowrapper.cpp:261
MythFileStat
MTV_PUBLIC int MythFileStat(const char *Path, struct stat *Buf)
Definition: mythiowrapper.cpp:322
MythFileOpen
MTV_PUBLIC int MythFileOpen(const char *Pathname, int Flags)
Definition: mythiowrapper.cpp:114
strings.h
off_t
#define off_t
Definition: mythiowrapper.cpp:240
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MythfileClose
MTV_PUBLIC int MythfileClose(int FileID)
Definition: mythiowrapper.cpp:204
Buffer
Definition: MythExternControl.h:36
MythDirOpen
MTV_PUBLIC int MythDirOpen(const char *DirName)
Definition: mythiowrapper.cpp:394
Buf
IFSPoint * Buf
Definition: ifs.cpp:148
MythFileOpenRegisterCallback
void MythFileOpenRegisterCallback(const char *Pathname, void *Object, callback_t Func)
Definition: mythiowrapper.cpp:80
MythFileCheck
int MythFileCheck(int Id)
Definition: mythiowrapper.cpp:107
MythDirCheck
int MythDirCheck(int DirID)
Definition: mythiowrapper.cpp:385
MythFileSeek
MTV_PUBLIC off64_t MythFileSeek(int FileID, off64_t Offset, int Whence)