1 #ifndef __lib_base_idatasource_h
2 #define __lib_base_idatasource_h
4 #include <lib/base/object.h>
6 class iTsSource: public iObject
9 /* NOTE: should only be used to get current position or filelength */
10 virtual off_t lseek(off_t offset, int whence)=0;
12 /* NOTE: you must be able to handle short reads! */
13 virtual ssize_t read(off_t offset, void *buf, size_t count)=0; /* NOTE: this is what you in normal case have to use!! */
15 virtual off_t length()=0;
16 virtual int valid()=0;