HTTPFileSource Class Reference

#include <HTTPFileSource.h>

Inheritance diagram for HTTPFileSource:

Inheritance graph
[legend]
Collaboration diagram for HTTPFileSource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void clear ()
virtual void clear ()
virtual void close ()
virtual void close ()
 HTTPFileSource (void)
 HTTPFileSource (void)
virtual bool isEOF ()
virtual bool isEOF ()
virtual bool isError ()
virtual bool isError ()
virtual bool open (string inSourceLocation, unsigned long inStartByte=0)
virtual bool open (string inSourceLocation)
virtual unsigned long read (char *outBuffer, unsigned long inNumBytes)
virtual unsigned long read (char *outBuffer, unsigned long inNumBytes)
virtual unsigned long seek (unsigned long inPos)
virtual unsigned long seek (unsigned long inPos)
virtual string shouldRetryAt ()
virtual string shouldRetryAt ()
DWORD ThreadProc ()
DWORD ThreadProc ()
virtual ~HTTPFileSource (void)
virtual ~HTTPFileSource (void)

Static Public Attributes

const int THREAD_EXIT = 1
const int THREAD_RUN = 0

Protected Member Functions

virtual string assembleRequest (string inFilePath, unsigned long inStartByte=0)
virtual string assembleRequest (string inFilePath)
virtual void closeSocket ()
virtual void closeSocket ()
void DataProcessLoop ()
void DataProcessLoop ()
unsigned short getHTTPResponseCode (string inHTTPResponse)
unsigned short getHTTPResponseCode (string inHTTPResponse)
bool httpRequest (string inRequest)
bool httpRequest (string inRequest)
virtual bool setupSocket (string inSourceLocation)
virtual bool setupSocket (string inSourceLocation)
virtual bool splitURL (string inURL)
virtual bool splitURL (string inURL)
bool startThread ()
bool startThread ()
void unChunk (unsigned char *inBuff, unsigned long inNumBytes)
void unChunk (unsigned char *inBuff, unsigned long inNumBytes)

Protected Attributes

fstream debugLog
fstream fileDump
CCritSec * mBufferLock
CCritSec * mBufferLock
unsigned long mChunkRemains
SingleMediaFileCache mFileCache
string mFileName
unsigned char * mInterBuff
unsigned char * mInterBuff
bool mIsChunked
bool mIsEOF
bool mIsFirstChunk
bool mIsOpen
string mLastResponse
unsigned long mNumLeftovers
unsigned short mPort
string mRetryAt
bool mSeenResponse
string mServerName
SOCKET mSocket
string mSourceLocation
bool mWasError
fstream rawDump

Static Protected Attributes

const unsigned long RECV_BUFF_SIZE = 1024

Constructor & Destructor Documentation

HTTPFileSource::HTTPFileSource void   ) 
 

Definition at line 35 of file HTTPFileSource.cpp.

References debugLog, false, fileDump, mBufferLock, mInterBuff, rawDump, RECV_BUFF_SIZE, and true.

HTTPFileSource::~HTTPFileSource void   )  [virtual]
 

Definition at line 52 of file HTTPFileSource.cpp.

References close(), debugLog, fileDump, and rawDump.

Here is the call graph for this function:

HTTPFileSource::HTTPFileSource void   ) 
 

virtual HTTPFileSource::~HTTPFileSource void   )  [virtual]
 


Member Function Documentation

string HTTPSocket::assembleRequest string  inFilePath,
unsigned long  inStartByte = 0
[virtual, inherited]
 

Definition at line 136 of file HTTPSocket.cpp.

References HTTPSocket::mServerName, and StringHelper::numToString().

Here is the call graph for this function:

string HTTPSocket::assembleRequest string  inFilePath  )  [virtual, inherited]
 

Definition at line 134 of file HTTPSocket.cpp.

References HTTPSocket::mServerName.

Referenced by HTTPStreamingFileSource::open(), open(), and CachedHTTPFileSource::open().

virtual void HTTPFileSource::clear  )  [virtual]
 

Implements IFilterDataSource.

void HTTPFileSource::clear  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 416 of file HTTPFileSource.cpp.

References debugLog, and mRetryAt.

virtual void HTTPFileSource::close  )  [virtual]
 

Implements IFilterDataSource.

void HTTPFileSource::close  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 344 of file HTTPFileSource.cpp.

References HTTPSocket::closeSocket(), and THREAD_EXIT.

Referenced by ~HTTPFileSource().

Here is the call graph for this function:

virtual void HTTPSocket::closeSocket  )  [virtual, inherited]
 

void HTTPSocket::closeSocket  )  [virtual, inherited]
 

Definition at line 205 of file HTTPSocket.cpp.

References HTTPSocket::mSocket.

Referenced by HTTPStreamingFileSource::close(), close(), CachedHTTPFileSource::close(), HTTPStreamingFileSource::open(), open(), CachedHTTPFileSource::open(), and HTTPStreamingFileSource::seek().

void HTTPFileSource::DataProcessLoop  )  [protected]
 

void HTTPFileSource::DataProcessLoop  )  [protected]
 

Definition at line 168 of file HTTPFileSource.cpp.

References debugLog, getHTTPResponseCode(), mBufferLock, mFileCache, mIsChunked, mRetryAt, RECV_BUFF_SIZE, unChunk(), and SingleMediaFileCache::write().

Referenced by ThreadProc().

Here is the call graph for this function:

unsigned short HTTPFileSource::getHTTPResponseCode string  inHTTPResponse  )  [protected]
 

unsigned short HTTPFileSource::getHTTPResponseCode string  inHTTPResponse  )  [protected]
 

Definition at line 288 of file HTTPFileSource.cpp.

References StringHelper::stringToNum().

Referenced by DataProcessLoop().

Here is the call graph for this function:

bool HTTPSocket::httpRequest string  inRequest  )  [inherited]
 

bool HTTPSocket::httpRequest string  inRequest  )  [inherited]
 

Definition at line 141 of file HTTPSocket.cpp.

References HTTPSocket::mSocket.

Referenced by HTTPStreamingFileSource::open(), open(), and CachedHTTPFileSource::open().

virtual bool HTTPFileSource::isEOF  )  [virtual]
 

Implements IFilterDataSource.

bool HTTPFileSource::isEOF  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 427 of file HTTPFileSource.cpp.

References SingleMediaFileCache::bytesAvail(), mBufferLock, and mFileCache.

Here is the call graph for this function:

virtual bool HTTPFileSource::isError  )  [virtual]
 

Implements IFilterDataSource.

bool HTTPFileSource::isError  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 423 of file HTTPFileSource.cpp.

bool HTTPFileSource::open string  inSourceLocation,
unsigned long  inStartByte = 0
[virtual]
 

Implements IFilterDataSource.

Definition at line 370 of file HTTPFileSource.cpp.

References HTTPSocket::assembleRequest(), HTTPSocket::closeSocket(), HTTPSocket::httpRequest(), mBufferLock, mFileCache, StringHelper::numToString(), SingleMediaFileCache::open(), HTTPSocket::setupSocket(), and startThread().

Here is the call graph for this function:

bool HTTPFileSource::open string  inSourceLocation  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 369 of file HTTPFileSource.cpp.

References HTTPSocket::assembleRequest(), HTTPSocket::closeSocket(), HTTPSocket::httpRequest(), mBufferLock, mFileCache, StringHelper::numToString(), SingleMediaFileCache::open(), HTTPSocket::setupSocket(), and startThread().

Here is the call graph for this function:

virtual unsigned long HTTPFileSource::read char *  outBuffer,
unsigned long  inNumBytes
[virtual]
 

Implements IFilterDataSource.

unsigned long HTTPFileSource::read char *  outBuffer,
unsigned long  inNumBytes
[virtual]
 

Implements IFilterDataSource.

Definition at line 443 of file HTTPFileSource.cpp.

References SingleMediaFileCache::bytesAvail(), debugLog, mBufferLock, mFileCache, and SingleMediaFileCache::read().

Here is the call graph for this function:

virtual unsigned long HTTPFileSource::seek unsigned long  inPos  )  [virtual]
 

Implements IFilterDataSource.

unsigned long HTTPFileSource::seek unsigned long  inPos  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 330 of file HTTPFileSource.cpp.

References mFileCache, and SingleMediaFileCache::readSeek().

Here is the call graph for this function:

virtual bool HTTPSocket::setupSocket string  inSourceLocation  )  [virtual, inherited]
 

bool HTTPSocket::setupSocket string  inSourceLocation  )  [virtual, inherited]
 

Definition at line 67 of file HTTPSocket.cpp.

References HTTPSocket::mPort, HTTPSocket::mServerName, HTTPSocket::mSocket, and HTTPSocket::splitURL().

Referenced by HTTPStreamingFileSource::open(), open(), and CachedHTTPFileSource::open().

Here is the call graph for this function:

virtual string HTTPFileSource::shouldRetryAt  )  [virtual]
 

Implements IFilterDataSource.

string HTTPFileSource::shouldRetryAt  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 303 of file HTTPFileSource.cpp.

virtual bool HTTPSocket::splitURL string  inURL  )  [virtual, inherited]
 

bool HTTPSocket::splitURL string  inURL  )  [virtual, inherited]
 

Definition at line 153 of file HTTPSocket.cpp.

References HTTPSocket::mFileName, HTTPSocket::mPort, and HTTPSocket::mServerName.

Referenced by HTTPSocket::setupSocket().

bool HTTPFileSource::startThread  )  [protected]
 

bool HTTPFileSource::startThread  )  [protected]
 

Definition at line 362 of file HTTPFileSource.cpp.

References THREAD_RUN.

Referenced by open().

DWORD HTTPFileSource::ThreadProc  ) 
 

DWORD HTTPFileSource::ThreadProc  ) 
 

Definition at line 308 of file HTTPFileSource.cpp.

References DataProcessLoop(), THREAD_EXIT, and THREAD_RUN.

Here is the call graph for this function:

void HTTPFileSource::unChunk unsigned char *  inBuff,
unsigned long  inNumBytes
[protected]
 

void HTTPFileSource::unChunk unsigned char *  inBuff,
unsigned long  inNumBytes
[protected]
 

Definition at line 66 of file HTTPFileSource.cpp.

References debugLog, fileDump, mChunkRemains, mFileCache, mInterBuff, mIsFirstChunk, mNumLeftovers, rawDump, and SingleMediaFileCache::write().

Referenced by DataProcessLoop().

Here is the call graph for this function:


Member Data Documentation

fstream HTTPFileSource::debugLog [protected]
 

Definition at line 83 of file HTTPFileSource.h.

Referenced by clear(), DataProcessLoop(), HTTPFileSource(), read(), unChunk(), and ~HTTPFileSource().

fstream HTTPFileSource::fileDump [protected]
 

Definition at line 84 of file HTTPFileSource.h.

Referenced by HTTPFileSource(), unChunk(), and ~HTTPFileSource().

CCritSec* HTTPFileSource::mBufferLock [protected]
 

Definition at line 91 of file HTTPFileSource.h.

CCritSec* HTTPFileSource::mBufferLock [protected]
 

Definition at line 90 of file HTTPFileSource.h.

Referenced by DataProcessLoop(), HTTPFileSource(), isEOF(), open(), and read().

unsigned long HTTPFileSource::mChunkRemains [protected]
 

Definition at line 78 of file HTTPFileSource.h.

Referenced by unChunk().

SingleMediaFileCache HTTPFileSource::mFileCache [protected]
 

Definition at line 75 of file HTTPFileSource.h.

Referenced by DataProcessLoop(), isEOF(), open(), read(), seek(), and unChunk().

string HTTPSocket::mFileName [protected, inherited]
 

Definition at line 51 of file HTTPSocket.h.

Referenced by HTTPSocket::splitURL().

unsigned char* HTTPFileSource::mInterBuff [protected]
 

Definition at line 87 of file HTTPFileSource.h.

unsigned char* HTTPFileSource::mInterBuff [protected]
 

Definition at line 86 of file HTTPFileSource.h.

Referenced by HTTPFileSource(), and unChunk().

bool HTTPFileSource::mIsChunked [protected]
 

Definition at line 77 of file HTTPFileSource.h.

Referenced by DataProcessLoop().

bool HTTPSocket::mIsEOF [protected, inherited]
 

Definition at line 58 of file HTTPSocket.h.

bool HTTPFileSource::mIsFirstChunk [protected]
 

Definition at line 80 of file HTTPFileSource.h.

Referenced by unChunk().

bool HTTPSocket::mIsOpen [protected, inherited]
 

Definition at line 60 of file HTTPSocket.h.

string HTTPSocket::mLastResponse [protected, inherited]
 

Definition at line 53 of file HTTPSocket.h.

unsigned long HTTPFileSource::mNumLeftovers [protected]
 

Definition at line 88 of file HTTPFileSource.h.

Referenced by unChunk().

unsigned short HTTPSocket::mPort [protected, inherited]
 

Definition at line 52 of file HTTPSocket.h.

Referenced by HTTPSocket::setupSocket(), and HTTPSocket::splitURL().

string HTTPFileSource::mRetryAt [protected]
 

Definition at line 81 of file HTTPFileSource.h.

Referenced by clear(), and DataProcessLoop().

bool HTTPSocket::mSeenResponse [protected, inherited]
 

Definition at line 61 of file HTTPSocket.h.

string HTTPSocket::mServerName [protected, inherited]
 

Definition at line 50 of file HTTPSocket.h.

Referenced by HTTPSocket::assembleRequest(), HTTPSocket::setupSocket(), and HTTPSocket::splitURL().

SOCKET HTTPSocket::mSocket [protected, inherited]
 

Definition at line 54 of file HTTPSocket.h.

Referenced by HTTPSocket::closeSocket(), HTTPSocket::httpRequest(), and HTTPSocket::setupSocket().

string HTTPSocket::mSourceLocation [protected, inherited]
 

Definition at line 56 of file HTTPSocket.h.

bool HTTPSocket::mWasError [protected, inherited]
 

Definition at line 59 of file HTTPSocket.h.

fstream HTTPFileSource::rawDump [protected]
 

Definition at line 85 of file HTTPFileSource.h.

Referenced by HTTPFileSource(), unChunk(), and ~HTTPFileSource().

const unsigned long HTTPFileSource::RECV_BUFF_SIZE = 1024 [static, protected]
 

Definition at line 89 of file HTTPFileSource.h.

Referenced by DataProcessLoop(), and HTTPFileSource().

const int HTTPFileSource::THREAD_EXIT = 1 [static]
 

Definition at line 54 of file HTTPFileSource.h.

Referenced by close(), and ThreadProc().

const int HTTPFileSource::THREAD_RUN = 0 [static]
 

Definition at line 53 of file HTTPFileSource.h.

Referenced by startThread(), and ThreadProc().


The documentation for this class was generated from the following files:
Generated on Fri Feb 17 00:01:00 2006 for oggdsf by  doxygen 1.3.9