aboutsummaryrefslogtreecommitdiff
path: root/lib/base/itssource.h
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-11-24 16:11:20 +0100
committerghost <andreas.monzner@multimedia-labs.de>2010-11-24 16:11:20 +0100
commitd6b8ff865af5c59b109c7e6ede3868db11e46f7d (patch)
treeeeb251a23425541a1f790da757891741addcbec8 /lib/base/itssource.h
parent8683394e33d39fb9d1b5e3726a5a1b5f9b1d3e2c (diff)
parent453fc1c6f82fa3b6ae983059eb55ad822860a5eb (diff)
downloadenigma2-d6b8ff865af5c59b109c7e6ede3868db11e46f7d.tar.gz
enigma2-d6b8ff865af5c59b109c7e6ede3868db11e46f7d.zip
Merge branch 'bug_615_replace_rawfile' into experimental
Diffstat (limited to 'lib/base/itssource.h')
-rw-r--r--lib/base/itssource.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/base/itssource.h b/lib/base/itssource.h
new file mode 100644
index 00000000..91167ff5
--- /dev/null
+++ b/lib/base/itssource.h
@@ -0,0 +1,19 @@
+#ifndef __lib_base_idatasource_h
+#define __lib_base_idatasource_h
+
+#include <lib/base/object.h>
+
+class iTsSource: public iObject
+{
+public:
+ /* NOTE: should only be used to get current position or filelength */
+ virtual off_t lseek(off_t offset, int whence)=0;
+
+ /* NOTE: you must be able to handle short reads! */
+ virtual ssize_t read(off_t offset, void *buf, size_t count)=0; /* NOTE: this is what you in normal case have to use!! */
+
+ virtual off_t length()=0;
+ virtual int valid()=0;
+};
+
+#endif