1 #ifndef ___POSITION_BRIDGE_IO_H_ 2 #define ___POSITION_BRIDGE_IO_H_ 3 //------------------------------------------------------------------------------ 4 // BeOS 5 #include <DataIO.h> 6 #include <SupportDefs.h> 7 // C++ 8 // MAC 9 #include "NoWindows.h" // before IO.h 10 #include "IO.h" 11 //------------------------------------------------------------------------------ 12 //============================================================================== 13 class TPositionBridgeIO : public CIO 14 { 15 public: 16 TPositionBridgeIO(); 17 virtual ~TPositionBridgeIO(); 18 19 virtual int Open(const wchar_t* oName); 20 virtual int Close(); 21 22 virtual int Read(void* oBuf, unsigned int oBytesToRead, unsigned int* oBytesRead); 23 virtual int Write(const void* oBuf, unsigned int oBytesToWrite, unsigned int* oBytesWritten); 24 25 virtual int Seek(int oDistance, unsigned int oMoveMode); 26 27 virtual int Create(const wchar_t* oName); 28 virtual int Delete(); 29 30 virtual int SetEOF(); 31 32 virtual int GetPosition(); 33 virtual int GetSize(); 34 virtual int GetName(wchar_t* oBuffer); 35 36 status_t SetPositionIO(BPositionIO* oPositionIO); 37 38 private: 39 BPositionIO* mPositionIO; 40 }; 41 //============================================================================== 42 #endif // ___POSITION_BRIDGE_IO_H_ 43