add support http ts stream.(client)
[vuplus_dvbapp] / lib / base / httpstream.h
diff --git a/lib/base/httpstream.h b/lib/base/httpstream.h
new file mode 100644 (file)
index 0000000..f02bb24
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef __lib_base_httpstream_h
+#define __lib_base_httpstream_h
+
+#include <string>
+#include <lib/base/ebase.h>
+#include <lib/base/itssource.h>
+#include <lib/base/socketbase.h>
+
+class eHttpStream: public iTsSource, public eSocketBase, public Object
+{
+       DECLARE_REF(eHttpStream);
+
+       int streamSocket;
+
+       /* iTsSource */
+       off_t lseek(off_t offset, int whence);
+       ssize_t read(off_t offset, void *buf, size_t count);
+       off_t length();
+       int valid();
+
+public:
+       eHttpStream();
+       ~eHttpStream();
+       int open(const char *url);
+       int close();
+};
+
+#endif