00001 #ifndef RENDERFARMFSCLIENT_H
00002 #define RENDERFARMFSCLIENT_H
00003
00004 #include "mutex.inc"
00005 #include "renderfarmclient.inc"
00006 #include "renderfarmfsclient.inc"
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 extern RenderFarmFSClient *renderfarm_fs_global;
00042
00043 class RenderFarmFSClient
00044 {
00045 public:
00046 RenderFarmFSClient(RenderFarmClientThread *client);
00047 ~RenderFarmFSClient();
00048
00049 void initialize();
00050
00051
00052
00053 FILE* fopen(const char *path, const char *mode);
00054 int fclose(FILE *file);
00055 int remove (__const char *__filename);
00056 int rename (__const char *__old, __const char *__new);
00057 int fgetc (FILE *__stream);
00058 int fputc (int __c, FILE *__stream);
00059 size_t fread (void *__restrict __ptr, size_t __size,
00060 size_t __n, FILE *__restrict __stream);
00061 size_t fwrite (__const void *__restrict __ptr, size_t __size,
00062 size_t __n, FILE *__restrict __s);
00063 int fseek (FILE *__stream, int64_t __off, int __whence);
00064 int64_t ftell (FILE *__stream);
00065 int stat64 (__const char *__restrict __file,
00066 struct stat64 *__restrict __buf);
00067 int stat (__const char *__restrict __file,
00068 struct stat *__restrict __buf);
00069 char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
00070 int fileno(FILE *file);
00071 int fscanf(FILE *__restrict stream, const char *__restrict format, va_list ap);
00072
00073
00074
00075
00076 void lock();
00077 void unlock();
00078 int is_open(FILE *ptr);
00079
00080 void set_open(FILE *ptr, int64_t pointer);
00081 void unset_open(FILE *ptr, int64_t pointer);
00082
00083 int64_t get_64(FILE *ptr);
00084
00085 Mutex *mutex_lock;
00086 ArrayList<FILE*> files;
00087
00088
00089 ArrayList<int64_t> pointers;
00090 RenderFarmClientThread *client;
00091 };
00092
00093
00094
00095
00096
00097 #endif