Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CascadeHTTPStream.h

Go to the documentation of this file.
00001 //
00002 // CascadeHTTPStream.h - header file for class CascadeHTTPStream
00003 //
00004 // Copyright (c) 2002, Roku, LLC.  All rights reserved.
00005 //
00008 
00009 #ifndef _ROKU_INCLUDE_CASCADE_AV_CASCADEHTTPSTREAM_H
00010 #define _ROKU_INCLUDE_CASCADE_AV_CASCADEHTTPSTREAM_H
00011 
00012 #include <cascade/util/CascadeStream.h>
00013 
00014 class CascadeHTTPClient;
00015 class CascadeHTTPStream;
00016 
00029 class CascadeHTTPStream : public CascadeStream
00030 {
00031 public:
00032         CascadeHTTPStream();
00036         CascadeHTTPStream(const char * pURL);
00042         virtual ~CascadeHTTPStream();
00046 public:
00047     virtual bool Open(const char * pURL);
00052 
00053     virtual bool Close();
00057 
00058             void SetConnectTimeout( u32 inMicroseconds );
00066 
00067             void SetSendTimeout( u32 inMicroseconds );
00075 
00076             void SetReceiveTimeout( u32 inMicroseconds );
00084 
00085             void SetUserAgent( const CascadeString &inUserAgentString );
00091             bool GetResponseHeaderValue( const char * pResponseHeaderKey, 
00092                                          CascadeString &value) const;
00103 
00104 
00105 public: // overrides from class CascadeStream
00106     virtual  u64 GetSize();
00107     virtual  u64 GetPosition();
00108     virtual bool SeekToPosition(u64 nPosition);
00109     virtual  u32 ReadBytes(u32 nBytes, void * pBuff);
00110 public:
00111     virtual bool ForceSeekToPosition(u64 nPosition);
00112         // this one forces the seek to the position, ignoring
00113         // the value of the current position
00114 protected:
00115     virtual void AddHeaders( CascadeHTTPClient *inClient ) {}
00116         // For override by subclasses that may need to add additional
00117         // headers
00118     virtual void OnHTTPConnectionEstablished( CascadeHTTPClient *inClient ) {}
00119         // For override by subclasses that may need to read response
00120         // headers
00121 private:
00122     class Stream; friend class Stream;
00123     Stream * m_pStream;
00124 };
00125 
00126 #endif // #ifndef _ROKU_INCLUDE_CASCADE_AV_CASCADEHTTPSTREAM_H
00127 
00129 //  LOG
00131 //  16-Mar-04   dave        created
00132 //  17-May-04   dwoodward   modified
00133 //  24-May-04   mjkobb      Added AddHeaders functionality
00134 //  16-Jun-04   mjkobb      Added SetReceiveTimeout
00135 //  27-Jun-04   mjkobb      Oops.  Added SetConnectTimeout and SetSendTimeout
00136 //  15-Sep-04   mjkobb      Roll 1.1 changes into 1.2
00137 //  07-Oct-04   dwoodward   added ForceSeekToPosition()
00138 //      28-Oct-04       dsletten        added OnHTTPConnectionEstablished()
00139 //  12-Apr-05   mjkobb      Added GetResponseHeaderValue
00140 

Generated on Sun Jul 24 14:27:17 2005 for Cascade Library by  doxygen 1.4.1