CachedHTTPFileSource Class Reference

#include <CachedHTTPFileSource.h>

Inheritance diagram for CachedHTTPFileSource:

Inheritance graph
[legend]
Collaboration diagram for CachedHTTPFileSource:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Static Public Attributes

const int THREAD_EXIT = 1
const int THREAD_RUN = 0

Protected Types

typedef pair< __int64, tMapValuetMapEntry
typedef pair< __int64, wstring > tMapValue
typedef map< __int64, tMapValuetRangeMap

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 ()
CachedHTTPFileSource::tMapEntry findNextHoleInData (__int64 inUpto)
bool httpRequest (string inRequest)
bool httpRequest (string inRequest)
bool inRange (CachedHTTPFileSource::tMapEntry inTestRange, __int64 inTestValue)
virtual bool setupSocket (string inSourceLocation)
virtual bool setupSocket (string inSourceLocation)
virtual bool splitURL (string inURL)
virtual bool splitURL (string inURL)
bool startThread ()

Protected Attributes

CCritSec * mBufferLock
tMapEntry mCurrentReadRange
tMapEntry mCurrentWriteRange
string mFileName
bool mIsEOF
bool mIsOpen
string mLastResponse
unsigned short mPort
tRangeMap mRangeMap
SingleMediaFileCache mReadFile
bool mSeenResponse
string mServerName
SOCKET mSocket
string mSourceLocation
bool mWasError
SingleMediaFileCache mWriteFile

Member Typedef Documentation

typedef pair<__int64, tMapValue> CachedHTTPFileSource::tMapEntry [protected]
 

Definition at line 31 of file CachedHTTPFileSource.h.

Referenced by findNextHoleInData(), and inRange().

typedef pair<__int64, wstring> CachedHTTPFileSource::tMapValue [protected]
 

Definition at line 30 of file CachedHTTPFileSource.h.

typedef map<__int64, tMapValue> CachedHTTPFileSource::tRangeMap [protected]
 

Definition at line 33 of file CachedHTTPFileSource.h.


Constructor & Destructor Documentation

CachedHTTPFileSource::CachedHTTPFileSource void   ) 
 

Definition at line 4 of file CachedHTTPFileSource.cpp.

CachedHTTPFileSource::~CachedHTTPFileSource void   )  [virtual]
 

Definition at line 9 of file CachedHTTPFileSource.cpp.


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

void CachedHTTPFileSource::clear  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 186 of file CachedHTTPFileSource.cpp.

void CachedHTTPFileSource::close  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 209 of file CachedHTTPFileSource.cpp.

References HTTPSocket::closeSocket(), and THREAD_EXIT.

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(), HTTPFileSource::close(), close(), HTTPStreamingFileSource::open(), HTTPFileSource::open(), open(), and HTTPStreamingFileSource::seek().

void CachedHTTPFileSource::DataProcessLoop  )  [protected]
 

Definition at line 224 of file CachedHTTPFileSource.cpp.

Referenced by ThreadProc().

CachedHTTPFileSource::tMapEntry CachedHTTPFileSource::findNextHoleInData __int64  inUpto  )  [protected]
 

Definition at line 13 of file CachedHTTPFileSource.cpp.

References inRange(), mRangeMap, and tMapEntry.

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

bool CachedHTTPFileSource::inRange CachedHTTPFileSource::tMapEntry  inTestRange,
__int64  inTestValue
[protected]
 

Definition at line 87 of file CachedHTTPFileSource.cpp.

References tMapEntry.

Referenced by findNextHoleInData().

bool CachedHTTPFileSource::isEOF  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 191 of file CachedHTTPFileSource.cpp.

virtual bool IFilterDataSource::isError  )  [pure virtual, inherited]
 

Implemented in FilterFileSource, HTTPFileSource, FilterFileSource, HTTPFileSource, and HTTPStreamingFileSource.

virtual bool IFilterDataSource::isError  )  [pure virtual, inherited]
 

Implemented in FilterFileSource, HTTPFileSource, FilterFileSource, HTTPFileSource, and HTTPStreamingFileSource.

Referenced by OggDemuxPacketSourceFilter::SetUpPins(), and OggDemuxSourceFilter::SetUpPins().

virtual bool IFilterDataSource::open string  inSourceLocation,
unsigned long  inStartByte = 0
[pure virtual, inherited]
 

Implemented in FilterFileSource, HTTPFileSource, and HTTPStreamingFileSource.

bool CachedHTTPFileSource::open string  inSourceLocation  )  [virtual]
 

Implements IFilterDataSource.

Definition at line 132 of file CachedHTTPFileSource.cpp.

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

Here is the call graph for this function:

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

Implements IFilterDataSource.

Definition at line 107 of file CachedHTTPFileSource.cpp.

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

Here is the call graph for this function:

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

Implements IFilterDataSource.

Definition at line 94 of file CachedHTTPFileSource.cpp.

References mReadFile, 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(), HTTPFileSource::open(), and open().

Here is the call graph for this function:

virtual string IFilterDataSource::shouldRetryAt  )  [pure virtual, inherited]
 

Implemented in FilterFileSource, HTTPFileSource, FilterFileSource, HTTPFileSource, and HTTPStreamingFileSource.

virtual string IFilterDataSource::shouldRetryAt  )  [pure virtual, inherited]
 

Implemented in FilterFileSource, HTTPFileSource, FilterFileSource, HTTPFileSource, and HTTPStreamingFileSource.

Referenced by OggDemuxPacketSourceFilter::SetUpPins(), and OggDemuxSourceFilter::SetUpPins().

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 CachedHTTPFileSource::startThread  )  [protected]
 

Definition at line 55 of file CachedHTTPFileSource.cpp.

References THREAD_RUN.

Referenced by open().

DWORD CachedHTTPFileSource::ThreadProc  ) 
 

Definition at line 63 of file CachedHTTPFileSource.cpp.

References DataProcessLoop(), THREAD_EXIT, and THREAD_RUN.

Here is the call graph for this function:


Member Data Documentation

CCritSec* CachedHTTPFileSource::mBufferLock [protected]
 

Definition at line 49 of file CachedHTTPFileSource.h.

Referenced by open(), and read().

tMapEntry CachedHTTPFileSource::mCurrentReadRange [protected]
 

Definition at line 40 of file CachedHTTPFileSource.h.

tMapEntry CachedHTTPFileSource::mCurrentWriteRange [protected]
 

Definition at line 41 of file CachedHTTPFileSource.h.

string HTTPSocket::mFileName [protected, inherited]
 

Definition at line 51 of file HTTPSocket.h.

Referenced by HTTPSocket::splitURL().

bool HTTPSocket::mIsEOF [protected, inherited]
 

Definition at line 58 of file HTTPSocket.h.

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 short HTTPSocket::mPort [protected, inherited]
 

Definition at line 52 of file HTTPSocket.h.

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

tRangeMap CachedHTTPFileSource::mRangeMap [protected]
 

Definition at line 35 of file CachedHTTPFileSource.h.

Referenced by findNextHoleInData().

SingleMediaFileCache CachedHTTPFileSource::mReadFile [protected]
 

Definition at line 37 of file CachedHTTPFileSource.h.

Referenced by open(), read(), and seek().

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.

SingleMediaFileCache CachedHTTPFileSource::mWriteFile [protected]
 

Definition at line 38 of file CachedHTTPFileSource.h.

const int CachedHTTPFileSource::THREAD_EXIT = 1 [static]
 

Definition at line 16 of file CachedHTTPFileSource.h.

Referenced by close(), and ThreadProc().

const int CachedHTTPFileSource::THREAD_RUN = 0 [static]
 

Definition at line 15 of file CachedHTTPFileSource.h.

Referenced by startThread(), and ThreadProc().


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