IDataReader.h 558 B

123456789101112131415161718192021
  1. #ifndef NULLSOFT_NSV_NSVPLAY_IDATAREADER_H
  2. #define NULLSOFT_NSV_NSVPLAY_IDATAREADER_H
  3. #include <stddef.h>
  4. #include <bfc/platform/types.h>
  5. class IDataReader
  6. {
  7. public:
  8. virtual ~IDataReader() { }
  9. virtual size_t read(char *buf, size_t len)=0; // returns bytes read
  10. virtual bool iseof()=0;
  11. virtual char *geterror()=0;
  12. virtual char *gettitle() { return 0; }
  13. virtual char *getheader(char *header_name) { return 0; }
  14. virtual bool canseek() { return 0; }
  15. virtual int seek(uint64_t newpos) { return 1; }
  16. virtual uint64_t getsize() { return ~0; }
  17. };
  18. #endif