summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/http.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/http.h b/tools/http.h
index 63aa434c..2adcf8e3 100644
--- a/tools/http.h
+++ b/tools/http.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: http.h,v 1.4 2007-01-07 05:28:36 phintuka Exp $
+ * $Id: http.h,v 1.5 2007-01-07 09:45:48 phintuka Exp $
*
*/
@@ -19,6 +19,16 @@
"Connection: Close\r\n" \
"\r\n"
+#define HTTP_REPLY_404 \
+ "HTTP/1.1 404 Not Found\r\n" \
+ "Connection: Close\r\n" \
+ "\r\n"
+
+#define HTTP_REPLY_416 \
+ "HTTP/1.1 416 Requested Range Not Satisfiable\r\n" \
+ "Connection: Close\r\n" \
+ "\r\n"
+
#define HTTP_REPLY_200_PRIMARY \
"HTTP/1.1 200 OK\r\n" \
"Content-Type: video/mpeg\r\n" \
@@ -104,7 +114,7 @@ class cConnState : public cHttpReq
class cHttpStreamer : protected cListObject, cThread
{
public:
- cHttpStreamer(int fd_http, const char *filename, const char *Range=NULL);
+ cHttpStreamer(int fd_http, const char *filename, cConnState *Request);
virtual ~cHttpStreamer();
static void CloseAll(bool OnlyFinished = false);
@@ -127,6 +137,7 @@ class cHttpStreamer : protected cListObject, cThread
virtual void Action(void);
+ bool ParseRequest(void);
void ParseRange(const char *Range);
bool ReadPipelined(void);
bool Seek(void);