X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fseekable.h;h=9522311f55b32ae2f75bd2f62f9e233a3f28a6fd;hp=cabb9dcdfc7ffc50b979163e447443fdd100e3e2;hb=a56e05106571f28dc3044296849ccd5127d7d859;hpb=6c40658510b68788fd5ef0488b20873b6aa32938 diff --git a/source/io/seekable.h b/source/io/seekable.h index cabb9dc..9522311 100644 --- a/source/io/seekable.h +++ b/source/io/seekable.h @@ -6,6 +6,14 @@ namespace Msp { namespace IO { +class Handle; + +#ifdef MSVC +typedef __int64 SeekOffset; +#else +typedef long long SeekOffset; +#endif + enum SeekType { S_BEG, @@ -13,8 +21,6 @@ enum SeekType S_END }; -int sys_seek_type(SeekType); - class Seekable: public Base { @@ -23,12 +29,15 @@ protected: public: /** Changes the read/write offset. Returns the new offset. */ - virtual unsigned seek(int, SeekType) = 0; + virtual SeekOffset seek(SeekOffset, SeekType) = 0; /** Returns the current read/write offset. */ - virtual unsigned tell() const = 0; + virtual SeekOffset tell() const = 0; }; + +SeekOffset sys_seek(Handle &, SeekOffset, SeekType); + } // namespace IO } // namespace Msp