00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __IO_FILE_H__
00024 #define __IO_FILE_H__
00025
00026 #include <sys/types.h>
00027 #include <unistd.h>
00028
00029 #include <libopenraw/libopenraw.h>
00030
00031 #include "stream.h"
00032
00033
00034 namespace OpenRaw {
00035 namespace IO {
00036
00037
00039 class File
00040 : public Stream
00041 {
00042 public:
00046 File(const char *filename);
00047 virtual ~File();
00048
00049
00051 virtual Error open();
00053 virtual int close();
00055 virtual int seek(off_t offset, int whence);
00057 virtual int read(void *buf, size_t count);
00058 virtual off_t filesize();
00059
00060
00061
00062 private:
00064 File(const File& f);
00066 File & operator=(const File&);
00067
00069 ::io_methods *m_methods;
00071 ::IOFileRef m_ioRef;
00072 };
00073
00074
00075 }
00076 }
00077
00078 #endif