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

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

Static Public Attributes

const int THREAD_RUN = 0
const int THREAD_EXIT = 1

Protected Member Functions

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

Protected Attributes

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

Static Protected Attributes

const unsigned long RECV_BUFF_SIZE = 1024

Constructor & Destructor Documentation

HTTPFileSource::HTTPFileSource void   ) 
 

Definition at line 34 of file HTTPFileSource.cpp.

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

HTTPFileSource::~HTTPFileSource void   )  [virtual]
 

Definition at line 51 of file HTTPFileSource.cpp.

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

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 134 of file HTTPSocket.cpp.

References HTTPSocket::mServerName.

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

void HTTPFileSource::clear  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 358 of file HTTPFileSource.cpp.

void HTTPFileSource::close  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 288 of file HTTPFileSource.cpp.

References HTTPSocket::closeSocket(), and THREAD_EXIT.

Referenced by ~HTTPFileSource().

Here is the call graph for this function:

void HTTPSocket::closeSocket  )  [virtual, inherited]
 

Definition at line 205 of file HTTPSocket.cpp.

References HTTPSocket::mSocket.

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

void HTTPFileSource::DataProcessLoop  )  [protected]
 

Definition at line 167 of file HTTPFileSource.cpp.

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

Referenced by ThreadProc().

Here is the call graph for this function:

bool HTTPSocket::httpRequest string  inRequest  )  [inherited]
 

Definition at line 141 of file HTTPSocket.cpp.

References HTTPSocket::mSocket.

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

bool HTTPFileSource::isEOF  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 363 of file HTTPFileSource.cpp.

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

Here is the call graph for this function:

bool HTTPFileSource::open string  inSourceLocation  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 311 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:

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

Implements IFilterDataSource.

Definition at line 379 of file HTTPFileSource.cpp.

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

Here is the call graph for this function:

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

Implements IFilterDataSource.

Definition at line 274 of file HTTPFileSource.cpp.

References mFileCache, and SingleMediaFileCache::readSeek().

Here is the call graph for this function:

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 open(), and CachedHTTPFileSource::open().

Here is the call graph for this function:

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]
 

Definition at line 304 of file HTTPFileSource.cpp.

References THREAD_RUN.

Referenced by open().

DWORD HTTPFileSource::ThreadProc  ) 
 

Definition at line 254 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]
 

Definition at line 65 of file HTTPFileSource.cpp.

References 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 78 of file HTTPFileSource.h.

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

fstream HTTPFileSource::fileDump [protected]
 

Definition at line 79 of file HTTPFileSource.h.

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

CCritSec* HTTPFileSource::mBufferLock [protected]
 

Definition at line 86 of file HTTPFileSource.h.

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

unsigned long HTTPFileSource::mChunkRemains [protected]
 

Definition at line 74 of file HTTPFileSource.h.

Referenced by unChunk().

SingleMediaFileCache HTTPFileSource::mFileCache [protected]
 

Definition at line 71 of file HTTPFileSource.h.

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

string HTTPSocket::mFileName [protected, inherited]
 

Definition at line 49 of file HTTPSocket.h.

Referenced by HTTPSocket::splitURL().

unsigned char* HTTPFileSource::mInterBuff [protected]
 

Definition at line 82 of file HTTPFileSource.h.

Referenced by HTTPFileSource(), and unChunk().

bool HTTPFileSource::mIsChunked [protected]
 

Definition at line 73 of file HTTPFileSource.h.

Referenced by DataProcessLoop().

bool HTTPSocket::mIsEOF [protected, inherited]
 

Definition at line 54 of file HTTPSocket.h.

bool HTTPFileSource::mIsFirstChunk [protected]
 

Definition at line 76 of file HTTPFileSource.h.

Referenced by unChunk().

bool HTTPSocket::mIsOpen [protected, inherited]
 

Definition at line 56 of file HTTPSocket.h.

string HTTPSocket::mLastResponse [protected, inherited]
 

Definition at line 51 of file HTTPSocket.h.

unsigned long HTTPFileSource::mNumLeftovers [protected]
 

Definition at line 83 of file HTTPFileSource.h.

Referenced by unChunk().

unsigned short HTTPSocket::mPort [protected, inherited]
 

Definition at line 50 of file HTTPSocket.h.

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

bool HTTPSocket::mSeenResponse [protected, inherited]
 

Definition at line 57 of file HTTPSocket.h.

string HTTPSocket::mServerName [protected, inherited]
 

Definition at line 48 of file HTTPSocket.h.

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

SOCKET HTTPSocket::mSocket [protected, inherited]
 

Definition at line 52 of file HTTPSocket.h.

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

bool HTTPSocket::mWasError [protected, inherited]
 

Definition at line 55 of file HTTPSocket.h.

fstream HTTPFileSource::rawDump [protected]
 

Definition at line 80 of file HTTPFileSource.h.

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

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

Definition at line 84 of file HTTPFileSource.h.

Referenced by DataProcessLoop(), and HTTPFileSource().

const int HTTPFileSource::THREAD_EXIT = 1 [static]
 

Definition at line 53 of file HTTPFileSource.h.

Referenced by close(), and ThreadProc().

const int HTTPFileSource::THREAD_RUN = 0 [static]
 

Definition at line 52 of file HTTPFileSource.h.

Referenced by startThread(), and ThreadProc().


The documentation for this class was generated from the following files:
Generated on Tue Feb 15 15:03:19 2005 for oggdsf by  doxygen 1.3.9