diff options
Diffstat (limited to 'noatun-plugins/oblique/kbuffer.h')
-rw-r--r-- | noatun-plugins/oblique/kbuffer.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/noatun-plugins/oblique/kbuffer.h b/noatun-plugins/oblique/kbuffer.h index 63e626b..0341fef 100644 --- a/noatun-plugins/oblique/kbuffer.h +++ b/noatun-plugins/oblique/kbuffer.h @@ -21,15 +21,19 @@ public: /** open a memory buffer */ bool open(int mode); /** read in a block of memory */ - Q_LONG readBlock(char* data, long unsigned int maxLen); + TQ_LONG readBlock(char* data, long unsigned int maxLen); /** query buffer size */ - Q_ULONG size() const; +#ifdef USE_QT4 + qint64 size() const; +#else // USE_QT4 + TQ_ULONG size() const; +#endif // USE_QT4 /** No descriptions */ void flush(); /** Close buffer */ void close(); /** write a block of memory */ - Q_LONG writeBlock(const char *data, long unsigned int maxLen); + TQ_LONG writeBlock(const char *data, long unsigned int maxLen); /** read a byte */ int getch(); /** undo last getch() @@ -40,6 +44,12 @@ public: void* data() { return &buf[0]; } + +#ifdef USE_QT4 + virtual inline qint64 readData ( char * data, qint64 maxSize ) { return readBlock(data, maxSize); } + virtual inline qint64 writeData ( const char * data, qint64 maxSize ) { return writeBlock(data, maxSize); } +#endif // USE_QT4 + private: std::vector<char> buf; std::vector<char>::iterator bufPos; |